mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
crash on --with-embedded-privilege-control builds:
1. fix broken change user handling (no restart should happen in the normal case) 2. add assert to guarantee that we never send a request to change to the same plugin 3. "fix" plugin string as sent by the client to be able to compare native plugins by pointers 4. more complete MYSQL initialization in the embedded case 5. change_user.test updated to handle -with-embedded-privilege-control builds
This commit is contained in:
@ -583,6 +583,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
|
||||
thd->mysql= mysql;
|
||||
mysql->server_version= server_version;
|
||||
mysql->client_flag= client_flag;
|
||||
mysql->server_capabilities= client_flag;
|
||||
init_alloc_root(&mysql->field_alloc, 8192, 0);
|
||||
}
|
||||
|
||||
@ -694,6 +695,7 @@ int check_embedded_connection(MYSQL *mysql, const char *db)
|
||||
|
||||
memset(thd->scramble, 55, SCRAMBLE_LENGTH); // dummy scramble
|
||||
thd->scramble[SCRAMBLE_LENGTH]= 0;
|
||||
strcpy(mysql->scramble, thd->scramble);
|
||||
|
||||
if (mysql->passwd && mysql->passwd[0])
|
||||
{
|
||||
|
Reference in New Issue
Block a user