summaryrefslogtreecommitdiff
path: root/libmysqld
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
commit3b98d69d689efcaba97476f34537fde24cfd5451 (patch)
tree0841558c8f5a6b6386f4a040203b9c38bc7f436c /libmysqld
parentc9b10e250d96d3f8eab22ebb698654da78fed5d8 (diff)
downloadmariadb-git-3b98d69d689efcaba97476f34537fde24cfd5451.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')
-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])
{