diff options
Diffstat (limited to 'libmysqld/libmysqld.c')
-rw-r--r-- | libmysqld/libmysqld.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index a2bd4242c3d..0b21d11df31 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -92,7 +92,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) { - char *db_name; char name_buff[USERNAME_LENGTH]; DBUG_ENTER("mysql_real_connect"); @@ -155,16 +154,14 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, port=0; unix_socket=0; - db_name = db ? my_strdup(db,MYF(MY_WME)) : NULL; + mysql->thd= create_embedded_thd(client_flag); - mysql->thd= create_embedded_thd(client_flag, db_name); - - init_embedded_mysql(mysql, client_flag, db_name); + init_embedded_mysql(mysql, client_flag); if (mysql_init_character_set(mysql)) goto error; - if (check_embedded_connection(mysql)) + if (check_embedded_connection(mysql, db)) goto error; /* Send client information for access check */ |