issue-#49 problems with SqlOdbc3 driver

issue-#49 problems with SqlOdbc3 driver

Postby Josef Templ » Thu Apr 21, 2016 7:17 am

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/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=78bc333099b9309123915dae338142ed811a0e52&rev_to=8d7b5789dab274f3f308d12d8b03acae881451b2.

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
User avatar
Josef Templ
 
Posts: 1957
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#49 revisited

Postby Josef Templ » Thu Jul 07, 2016 3:40 pm

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/projects/blackbox/repository/revisions/4494b7a2e9c7ccc30a84fc3d03cbd4e81db21945/diff/Sql/Mod/Odbc3.odc?utf8=%E2%9C%93&type=inline.

- Josef
User avatar
Josef Templ
 
Posts: 1957
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#49 revisited

Postby Josef Templ » Wed Jul 27, 2016 1:31 pm

User avatar
Josef Templ
 
Posts: 1957
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#49 revisited

Postby Josef Templ » Wed Aug 03, 2016 1:07 pm

can we proceed with this issue?
User avatar
Josef Templ
 
Posts: 1957
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#49 revisited

Postby DGDanforth » Thu Aug 04, 2016 12:22 am

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
User avatar
DGDanforth
 
Posts: 1060
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA

Re: issue-#49 revisited

Postby Josef Templ » Thu Aug 04, 2016 4:49 am

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
User avatar
Josef Templ
 
Posts: 1957
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#49 problems with SqlOdbc3 driver

Postby Ivan Denisov » Mon Aug 08, 2016 2:36 am

Ivan Denisov
 
Posts: 1690
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia


Return to Resolved (Bugs)

Who is online

Users browsing this forum: No registered users and 1 guest

cron