[CONC-1] Error 2058 connecting to MySQL 5.0.90 Created: 2012-12-12  Updated: 2012-12-15  Resolved: 2012-12-15

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Adrian Matlack Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Microsoft Windows 7 x64, Embarcadero C++ Builder 2010, MySQL 5.0.90 (32 bit)



 Description   

Using libmariadb.dll (win32) the following code results in error 2058 connecting to MySQL 5.0.90:

MYSQL *mysql = mysql_init( NULL );
if( !mysql_real_connect( mysql, "localhost", "root", "", "", 3306, NULL, 0 ) )
{
int errorNumber = mysql_errno( mysql );
char *errorString = ( char * ) mysql_error( mysql );

//errorNumber=2058
//errorString = Can't connect twice. Already connected
}

Also, it seems that error codes 2058 and 2059 are reversed.

errmsg.h:
#define CR_AUTH_PLUGIN_CANNOT_LOAD 2058
#define CR_ALREADY_CONNECTED 2059

errmsg.c:
/* 2058 */ "Can't connect twice. Already connected",
/* 2059 */ "Plugin %s could not be loaded: %s",



 Comments   
Comment by Adrian Matlack [ 2012-12-13 ]

In my bug report I set the password to an empty string to obscure it, but as I have checked further the error only occurs when a password is given. After further research the problem occurs when the user has a pre-4.1 style password (OLD_PASSWORD). Is this supported?

I apologize for the error in my original post.

Comment by Georg Richter [ 2012-12-15 ]

Fixed in rev. 21.

This fix also includes an additional fix for old password authentication

Generated at Thu Feb 08 03:02:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.