Bug #43731 STMT not available in ODBC Connector 5.1
Submitted: 18 Mar 2009 15:47 Modified: 8 Apr 2013 5:42
Reporter: Jon Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.1.5 OS:Windows (XP SP3)
Assigned to: CPU Architecture:Any

[18 Mar 2009 15:47] Jon
Description:
According to http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters...., there should be an Options and an Advanced panel in the driver configuration.  There are neither.

As well, the same documentation indicates that STMT can be used to set an initial statement to run after connection.  This is available in the Options panel for driver 3.51 but is not available for 5.1.  Further, copying the registry entry created by 3.51 to a 5.1 DSN does work - the statement is ignored (and dropped when the DSN is updated).

How to repeat:
Create a 5.1 DSN. Observe the absence of Options and Advanced cconfiguration panels, preventing the creation of a STMT option.

Suggested fix:
Adjust the driver configuration to work as indicated in the documentation.
[18 Mar 2009 15:57] Tonci Grgin
Hi Jon and thanks for your report.

Basically we have two things to verify here:
  o Outdated documentation treating 3.51 and 5.1 versions as being the same
and
  o Feature request to add statement to execute to 5.1 configuration

So it is not in any way S1! Please lower the severity to appropriate level, S4.

Verified as described.
[3 May 2009 19:58] Jess Balint
add STMT alias

Attachment: bug43731.diff (text/x-diff), 1.45 KiB.

[3 May 2009 19:58] Jess Balint
Looks like the documentation has been updated to differentiate between STMT(3.51)/INITSTMT(5.1). I will add an alias to read STMT in 5.1
[13 Aug 2009 21:08] Jess Balint
pushed to https://code.launchpad.net/~myodbc-developers/myodbc/bug43731
[10 Sep 2009 11:10] Lawrenty Novitsky
i'm not sure whether we should guarantee precedence of INITSTMT over STMT, if dsn or connection string happens to contain them both. i don't think that very likely to ever happen and so i'm fine with that. as long as documentation says it should be INITSTMT for 5.1
[25 Feb 2010 3:52] Russell Levy
I am getting a strange error on W2K on a connection string that works perfectly in XP, Vista, 7, etc. When I removed the spaces between semicolons and the next attribute from connection string, it worked.

Even though I was not connecting to localhost, the error message was "Can't connect to MySQL server on 'localhost'". Would I be correct to assume that this patch will correct the problem?
[8 Apr 2013 5:42] Bogdan Degtyariov
STMT option is no longer listed in the options. INITSTMT should be used instead:

http://dev.mysql.com/doc/refman/5.5/en/connector-odbc-configuration-connection-parameters....