mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fixed crash in connect.misc with embedded server
The problem was that connect tried to recusiverly call emb_advanced_command(), which was not supported. Fixed by adding support for recursive calls.
This commit is contained in:
@@ -78,7 +78,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
||||
uint port, const char *unix_socket,ulong client_flag)
|
||||
{
|
||||
char name_buff[USERNAME_LENGTH];
|
||||
|
||||
THD *org_current_thd= embedded_get_current_thd();
|
||||
DBUG_ENTER("mysql_real_connect");
|
||||
DBUG_PRINT("enter",("host: %s db: %s user: %s (libmysqld)",
|
||||
host ? host : "(Null)",
|
||||
@@ -200,6 +200,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
||||
}
|
||||
}
|
||||
}
|
||||
embedded_set_current_thd(org_current_thd);
|
||||
|
||||
DBUG_PRINT("exit",("Mysql handler: %p", mysql));
|
||||
DBUG_RETURN(mysql);
|
||||
@@ -216,6 +217,7 @@ error:
|
||||
mysql_close(mysql);
|
||||
mysql->free_me=free_me;
|
||||
}
|
||||
embedded_set_current_thd(org_current_thd);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user