Page 1 of 1

issue-#49 problems with SqlOdbc3 driver

Posted: Thu Apr 21, 2016 7:17 am
by Josef Templ
Finally, I was able to resolve the ODBC deadlock problem in SqlOdbc and SqlOdbc3 completely!
The previous fix was a best effort (95%) work around but not a 100% fix.

Have a look at the changes at http://redmine.blackboxframework.org/pr ... ae881451b2.

When reading multiple parts of a column (ReadVarString, ReadBlob),
any DB operation must be suppressed until the column has been read completely.
Calling NEW in between can invoke the garbage collector, which in turn can finalize unused tables.
Finalization of tables has therefore been delayed by using an action.

Plus one trivial Optimization: empty and NULL VARCHAR strings reuse a common string object.

- Josef

Re: issue-#49 revisited

Posted: Thu Jul 07, 2016 3:40 pm
by Josef Templ
I fixed a crash with DB servers that have a long server name.
The crash happens in SqlOdbc3 where the name of the database server is obtained.
The string length was passed as 255 but must be LEN(str) * SIZE(CHAR) = 52.
Longer names are truncated automatically.

For the very trivial change see http://redmine.blackboxframework.org/pr ... ype=inline.

- Josef

Re: issue-#49 revisited

Posted: Wed Jul 27, 2016 1:31 pm
by Josef Templ
As the hopefully last update I fixed a bug in SqlOdbc3 with respect to return code noData.
Here is the diff: http://redmine.blackboxframework.org/pr ... e81db21945.

- Josef

Re: issue-#49 revisited

Posted: Wed Aug 03, 2016 1:07 pm
by Josef Templ
can we proceed with this issue?

Re: issue-#49 revisited

Posted: Thu Aug 04, 2016 12:22 am
by DGDanforth
Just a comment. I know nothing about Sql so will probably abstain from voting on this issue.

Josef, do you want a vote created now?

-Doug

Re: issue-#49 revisited

Posted: Thu Aug 04, 2016 4:49 am
by Josef Templ
The background of this fix is the following:
I am using my own Sql-odbc driver for my projects but I tried to
synchronize my version with the current SqlOdbc3 module
and thereby I detected this bug. The result code noDate has simply
be forgotten to be handled at some places.

From my point of view it is ready for voting.

- Josef

Re: issue-#49 problems with SqlOdbc3 driver

Posted: Mon Aug 08, 2016 2:36 am
by Ivan Denisov