summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-05-14 23:45:32 +0200
committerSergei Golubchik <sergii@pisem.net>2010-05-14 23:45:32 +0200
commit2462ee054553fd7fc024e56d033e6987bb218c2a (patch)
tree0841558c8f5a6b6386f4a040203b9c38bc7f436c /libmysqld/lib_sql.cc
parent27bf2b3ca9dc2508c25c9cd6da160c01e585ed01 (diff)
downloadmariadb-git-2462ee054553fd7fc024e56d033e6987bb218c2a.tar.gz
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
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc2
1 files changed, 2 insertions, 0 deletions
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])
{