mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Fixed BUG#13616: "CALL <dbname>.<procedurename>" executes properly, but
displays error
When returning to the old database (which may be ""), don't do
access check - mysql_change_db() would then generate the error
"No database selected".
Note: No test case added; it seems a db is always selected when running
tests.
sql/sp_head.cc:
Don't do access check when returning to db after a call.
This commit is contained in:
parent
625c9582e2
commit
399caa6d79
1 changed files with 3 additions and 1 deletions
|
|
@ -1051,8 +1051,10 @@ int sp_head::execute(THD *thd)
|
|||
original thd->db will then have been freed */
|
||||
if (dbchanged)
|
||||
{
|
||||
/* No access check when changing back to where we came from.
|
||||
(It would generate an error from mysql_change_db() when olddb=="") */
|
||||
if (! thd->killed)
|
||||
ret= mysql_change_db(thd, olddb, 0);
|
||||
ret= mysql_change_db(thd, olddb, 1);
|
||||
}
|
||||
m_flags&= ~IS_INVOKED;
|
||||
DBUG_RETURN(ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue