diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2007-03-29 21:11:17 +0300 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2007-03-29 21:11:17 +0300 |
commit | e57c8007a4e2c7d1f8bda44b0af6599126673ef4 (patch) | |
tree | b931193692f1cf128130b65c64be0083c17e62b0 /sql/sql_connect.cc | |
parent | 0fdd64ba6391e556c3438733cb4f479f2c3395cf (diff) | |
download | mariadb-git-e57c8007a4e2c7d1f8bda44b0af6599126673ef4.tar.gz |
Manual merge from 5.0
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r-- | sql/sql_connect.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 09ee4962235..d03a17079d8 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -315,6 +315,7 @@ int check_user(THD *thd, enum enum_server_command command, bool check_count) { DBUG_ENTER("check_user"); + LEX_STRING db_str= { (char *) db, db ? strlen(db) : 0 }; #ifdef NO_EMBEDDED_ACCESS_CHECKS thd->main_security_ctx.master_access= GLOBAL_ACLS; // Full rights @@ -326,7 +327,7 @@ int check_user(THD *thd, enum enum_server_command command, function returns 0 */ thd->reset_db(NULL, 0); - if (mysql_change_db(thd, db, FALSE)) + if (mysql_change_db(thd, &db_str, FALSE)) { /* Send the error to the client */ net_send_error(thd); @@ -472,7 +473,7 @@ int check_user(THD *thd, enum enum_server_command command, /* Change database if necessary */ if (db && db[0]) { - if (mysql_change_db(thd, db, FALSE)) + if (mysql_change_db(thd, &db_str, FALSE)) { /* Send error to the client */ net_send_error(thd); |