Martin J. Evans wrote:
> The following code demonstrates the problem you describe:
> I expected SQLTables or SQLFetch to
> fail if the database connection was
> dropped - it does not fail in 3.51.12.
I've modified your code to run SQLFetch also.
On my workstation with 3.51.12, SQLFetch returns
-1 (SQL_ERROR) when I yank the server.
Could you take a look at the changed code
(attached) and see what I'm missing?
> compile it, run it and when it stops, go and shut down your mysql
> server and hit return - it should say the connection is dead
> because the SQLExecute will spot the server is down - it doesn't.
In my case it never has.
As I've stated in bug 14639, MyODBC has never returned anything
other than "success" for SQL_ATTR_CONNECTION_DEAD.
Always returning success was in fact sort of the correct thing to
do before 3.51.12, because older versions would automatically
reconnect behind your back when the connection was lost.
(By means of mysql_ping(), I believe.)
3.51.12 does *not* reconnect, which is why the missing ping/
functionality has suddenly become a big problem. Most things do
not break when MyODBC reconnects silently in the background and then
return OK, but when it does _not_ reconnect and _still_ returns OK,
> dead = 0 <--------should be SQL_CD_TRUE = 1
I agree that's a big, bad bug.
But 3.51.09 also returns "dead = 0". So unfortunately the test
code doesn't excercise my problem.
> I've not looked at the myodbc code
Where can it be found? I know it's GPL,
but I'm missing myodbc3 on http://mysql.bkbits.net/.
> Given the other recent postings on this list re myodbc 3 and 5 it
> does not sound like they will get fixed unless we fix them. I/we
> (easysoft) have posted other patches for myodbc but I didn't see
> any recognition that they were accepted or even used so I'm not
> going to spend any time looking through myodbc to fix these new
> issues when I can work around them now. If the situation changes
> I'd be happy to look into it further.
Bug 14639, which is a very simple consistent bug with a test case
which should affect a lot of users has been open for more than a
month now. I have a memory leak issue through our paid support
which is almost a year old with no fix.
MyODBC is the most stable connector for many MySQL users, yet still
it seems bugs are not fixed, developers give little feedback on them
and generally I agree with you that not much is happening :-).
I wouldn't recommend MySQL to anyone looking
for an ODBC-compatible database at this time.