1
0
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:
Monty
2024-02-26 14:51:27 +02:00
parent 0c079f4f76
commit 89aae15da2
3 changed files with 26 additions and 4 deletions

View File

@@ -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);
}