mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixes during review of new pushed code
Fixed new bug when running a SP without a default database mysql-test/r/information_schema.result: Added test to cover changes made in default handling mysql-test/r/sp-security.result: Added test when executing SP without a default database mysql-test/t/information_schema.test: Added test to cover changes made in default handling mysql-test/t/sp-security.test: Added test when executing SP without a default database sql/item_strfunc.cc: Removed wrong push sql/mysqld.cc: Indentation fix sql/sql_base.cc: Use share->db instead of share->table_cache_key Remove assert that can never fail (because of test in previous row) sql/sql_db.cc: Allow empty database name when called from SP (To allow on run without a default database) sql/sql_parse.cc: Added comment sql/sql_show.cc: Indentation fixes Simplified code by checking for 'wrong' condition first and doing continue instead of going down one level Simplified precision and decimal handling
This commit is contained in:
@@ -238,7 +238,8 @@ end:
|
||||
|
||||
|
||||
/*
|
||||
Check if user exist and password supplied is correct.
|
||||
Check if user exist and password supplied is correct.
|
||||
|
||||
SYNOPSIS
|
||||
check_user()
|
||||
thd thread handle, thd->{host,user,ip} are used
|
||||
@@ -273,6 +274,10 @@ int check_user(THD *thd, enum enum_server_command command,
|
||||
/* Change database if necessary */
|
||||
if (db && db[0])
|
||||
{
|
||||
/*
|
||||
thd->db is saved in caller and needs to be freed by caller if this
|
||||
function returns 0
|
||||
*/
|
||||
thd->db= 0;
|
||||
thd->db_length= 0;
|
||||
if (mysql_change_db(thd, db, FALSE))
|
||||
|
||||
Reference in New Issue
Block a user