diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ad1e050acf..2093cbce00 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +2000-10-10 12:50 GMT+3 Alexander Kresin + * contrib/mysql/mysql.c + * Fix in sqlConnect() for support of versions > 3.22.00 + 2000-10-10 10:58 GMT+3 Alexander Kresin * source/rdd/dbfcdx/dbfcdx1.h * added #pragma pack(1) and #pragma pack() for structure alignment diff --git a/harbour/contrib/mysql/mysql.c b/harbour/contrib/mysql/mysql.c index 7f217756b7..cb692c32b1 100644 --- a/harbour/contrib/mysql/mysql.c +++ b/harbour/contrib/mysql/mysql.c @@ -58,7 +58,8 @@ HB_FUNC(SQLCONNECT) // MYSQL *mysql_real_connect(MYSQL*, char * host, char * use #if MYSQL_VERSION_ID > 32200 /* from 3.22.x of MySQL there is a new parameter in mysql_real_connect() call, that is char * db which is not used here */ - mysql = mysql_real_connect(NULL, _parc(1), _parc(2), _parc(3), NULL, 0, NULL, 0); + if ( (mysql = mysql_init((MYSQL*) 0)) ) + mysql_real_connect( mysql, _parc(1), _parc(2), _parc(3), NULL, 0, NULL, 0); #else mysql = mysql_real_connect(NULL, _parc(1), _parc(2), _parc(3), 0, NULL, 0); #endif