From 2462ee054553fd7fc024e56d033e6987bb218c2a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 14 May 2010 23:45:32 +0200 Subject: 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 --- libmysqld/lib_sql.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmysqld/lib_sql.cc') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 5521e024f8f..ecf668490e6 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -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]) { -- cgit v1.2.1