Bug #61282 Bad handshake with MySQL 5.5.12 using ODBC 3.51
Submitted: 25 May 2011 7:36 Modified: 25 May 2011 14:17
Reporter: Gregor Kittlaus Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Windows Severity:S3 (Non-critical)
Version:5.5.12 OS:Microsoft Windows (XP SP3)
Assigned to: CPU Architecture:Any
Tags: bad handshake

[25 May 2011 7:36] Gregor Kittlaus
Description:
With an ODBC 3.51 driver, you are not able to connect to a server with version 5.5.12.

In version 5.5.11 there was no problem with connecting to the server. In 5.5.12 you'll receive an errormessage "Bad Handshake".

Plain new installation. Nothing to see in the server-error-log.
Content:
110525  9:19:45 [Note] Plugin 'FEDERATED' is disabled.
110525  9:19:45 [Note] Plugin 'InnoDB' is disabled.
110525  9:19:45 [Note] Event Scheduler: Loaded 0 events
110525  9:19:45 [Note] C:\Gateway\Tools\MySQL\bin\mysqld: ready for connections.
Version: '5.5.12'  socket: ''  port: 3306  MySQL Community Server (GPL)

How to repeat:
The Server is configured for MyISAM only and is using the OLD_PASSWORD hash in the users table except for root.

The ODBC string looks like this:

Driver={MySQL ODBC 3.51 Driver};Server=SERVER;Database=jlab5;User=USERNAME;password=PASSWORD;option=4

Unfortunately, the client does not give me any logfile even with option 524292
[25 May 2011 7:42] Gregor Kittlaus
Logfile of ODBC driver:

APPLICAT        e80-d58	ENTER SQLAllocEnv 
		HENV *              0325F6B0

APPLICAT        e80-d58	EXIT  SQLAllocEnv  with return code 0 (SQL_SUCCESS)
		HENV *              0x0325F6B0 ( 0x03271540)

APPLICAT        e80-d58	ENTER SQLGetEnvAttr 
		SQLHENV             03271540
		SQLINTEGER                 201 <unknown>
		SQLPOINTER          [Unknown attribute 201]
		SQLINTEGER                   4 
		SQLINTEGER *        0x0012E2FC

APPLICAT        e80-d58	EXIT  SQLGetEnvAttr  with return code 0 (SQL_SUCCESS)
		SQLHENV             03271540
		SQLINTEGER                 201 <unknown>
		SQLPOINTER          [Unknown attribute 201]
		SQLINTEGER                   4 
		SQLINTEGER *        0x0012E2FC (1448120)

APPLICAT        e80-d58	ENTER SQLAllocEnv 
		HENV *              0325F6B4

APPLICAT        e80-d58	EXIT  SQLAllocEnv  with return code 0 (SQL_SUCCESS)
		HENV *              0x0325F6B4 ( 0x032715e8)

APPLICAT        e80-d58	ENTER SQLSetEnvAttr 
		SQLHENV             032715E8
		SQLINTEGER                 201 <unknown>
		SQLPOINTER          [Unknown attribute 201]
		SQLINTEGER                  -6 

APPLICAT        e80-d58	EXIT  SQLSetEnvAttr  with return code 0 (SQL_SUCCESS)
		SQLHENV             032715E8
		SQLINTEGER                 201 <unknown>
		SQLPOINTER          [Unknown attribute 201]
		SQLINTEGER                  -6 

APPLICAT        e80-d58	ENTER SQLAllocConnect 
		HENV                032715E8
		HDBC *              0012EEF8

APPLICAT        e80-d58	EXIT  SQLAllocConnect  with return code 0 (SQL_SUCCESS)
		HENV                032715E8
		HDBC *              0x0012EEF8 ( 0x03271690)

APPLICAT        e80-d58	ENTER SQLGetInfoW 
		HDBC                03271690
		UWORD                       10 <SQL_ODBC_VER>
		PTR                 0x0012EEC4 
		SWORD                       22 
		SWORD *             0x00000000

APPLICAT        e80-d58	EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
		HDBC                03271690
		UWORD                       10 <SQL_ODBC_VER>
		PTR                 0x0012EEC4 
		SWORD                       22 
		SWORD *             0x00000000

APPLICAT        e80-d58	ENTER SQLSetConnectAttrW 
		SQLHDBC             03271690
		SQLINTEGER                 103 <SQL_ATTR_LOGIN_TIMEOUT>
		SQLPOINTER          0x0000000F
		SQLINTEGER                  -6 

APPLICAT        e80-d58	EXIT  SQLSetConnectAttrW  with return code 0 (SQL_SUCCESS)
		SQLHDBC             03271690
		SQLINTEGER                 103 <SQL_ATTR_LOGIN_TIMEOUT>
		SQLPOINTER          0x0000000F (BADMEM)
		SQLINTEGER                  -6 

APPLICAT        e80-d58	ENTER SQLDriverConnectW 
		HDBC                03271690
		HWND                00000000
		WCHAR *             0x74324EC8 [      -3] "******\ 0"
		SWORD                       -3 
		WCHAR *             0x74324EC8 
		SWORD                        2 
		SWORD *             0x00000000
		UWORD                        0 <SQL_DRIVER_NOPROMPT>

APPLICAT        e80-d58	EXIT  SQLDriverConnectW  with return code -1 (SQL_ERROR)
		HDBC                03271690
		HWND                00000000
		WCHAR *             0x74324EC8 [      -3] "******\ 0"
		SWORD                       -3 
		WCHAR *             0x74324EC8 
		SWORD                        2 
		SWORD *             0x00000000
		UWORD                        0 <SQL_DRIVER_NOPROMPT>

		DIAG [S1000] [MySQL][ODBC 3.51 Driver]Bad handshake (1043) 

APPLICAT        e80-d58	ENTER SQLGetDiagRecW 
		SQLSMALLINT                  2 
		SQLHANDLE           03271690
		SQLSMALLINT                  1 
		SQLWCHAR *          0x0012EE58 (NYI) 
 		SQLINTEGER *        0x0012EA3C
		SQLWCHAR *          0x0012EA58 (NYI) 
 		SQLSMALLINT                512 
		SQLSMALLINT *       0x0012EA40

APPLICAT        e80-d58	EXIT  SQLGetDiagRecW  with return code 0 (SQL_SUCCESS)
		SQLSMALLINT                  2 
		SQLHANDLE           03271690
		SQLSMALLINT                  1 
		SQLWCHAR *          0x0012EE58 (NYI) 
 		SQLINTEGER *        0x0012EA3C (1043)
		SQLWCHAR *          0x0012EA58 (NYI) 
 		SQLSMALLINT                512 
		SQLSMALLINT *       0x0012EA40 (38)

APPLICAT        e80-d58	ENTER SQLGetDiagRecW 
		SQLSMALLINT                  2 
		SQLHANDLE           03271690
		SQLSMALLINT                  2 
		SQLWCHAR *          0x0012EE58 (NYI) 
 		SQLINTEGER *        0x0012EA3C
		SQLWCHAR *          0x0012EA58 (NYI) 
 		SQLSMALLINT                512 
		SQLSMALLINT *       0x0012EA40

APPLICAT        e80-d58	EXIT  SQLGetDiagRecW  with return code 100 (SQL_NO_DATA_FOUND)
		SQLSMALLINT                  2 
		SQLHANDLE           03271690
		SQLSMALLINT                  2 
		SQLWCHAR *          0x0012EE58 (NYI) 
 		SQLINTEGER *        0x0012EA3C
		SQLWCHAR *          0x0012EA58 (NYI) 
 		SQLSMALLINT                512 
		SQLSMALLINT *       0x0012EA40

APPLICAT        e80-d58	ENTER SQLFreeConnect 
		HDBC                03271690

APPLICAT        e80-d58	EXIT  SQLFreeConnect  with return code 0 (SQL_SUCCESS)
		HDBC                03271690
[25 May 2011 7:44] Tonci Grgin
Probably a duplicate of Bug#61280.
[25 May 2011 8:22] Valeriy Kravchuk
What exact version of driver, 3.51.xx, do you use? I wonder if it is linked with some old client library and may be affected by bug #61222.
[25 May 2011 8:25] Gregor Kittlaus
Yes it looks like the same thing.
I am using 3.51.06 - stable release
[25 May 2011 12:26] Valeriy Kravchuk
Duplicate of bug #61222.
[25 May 2011 14:17] Gregor Kittlaus
additional information added
[22 Jun 2011 18:08] Loren Sorensen
This is true of 5.5.13, as well.  Upgraded from 5.5.11 and now all my PRTG monitors are broken.