Today a long standing Easysoft customer upgraded from DBD::ODBC 1.13 to 1.21 and their scripts stopped working properly :-( It appears they use the ping method to detect whether the connection handle is connected to the database and since upgrading to 1.21 they are getting DBD::ODBC::db ping failed: Cannot allocate statement when disconnected from the database at ./xxx.pl line 11 when calling the ping method after a disconnect.
I finally tracked this down to a change in DBD::ODBC which now refuses to allocate a statement handle if the connection handle is not connected and ping tries to allocate a statement handle. The fix was fairly straight forward since the ping method is implemented in ODBC.pm so it only needed the call to allocate a statement handle wrapping in an eval. However, for some reason I don't know as yet, setting PrintError and RaiseError to 0 via local does not stop the error being printed or raised so until I work this out I've had to change the ping method to:
What I don't understand is why "local" is not working for PrintError and RaiseError in the eval. I posted this to dbi-dev here.
Recent comments
31 weeks 4 days ago
34 weeks 5 hours ago
35 weeks 4 days ago
35 weeks 5 days ago
43 weeks 6 days ago
45 weeks 3 hours ago
46 weeks 2 days ago
49 weeks 1 day ago
1 year 1 week ago
1 year 4 weeks ago