1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-16473 WITH statement throws 'no database selected' error

Different fix, just use NULL, not no_db,
This commit is contained in:
Sergei Golubchik
2018-06-28 12:36:32 +02:00
parent 090febbb2d
commit 52a25d7b67
8 changed files with 13 additions and 45 deletions

View File

@ -3959,12 +3959,9 @@ public:
my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
return TRUE;
}
/*
It does not matter what database name is set in this case
because it will never be used after parser stage
*/
*p_db_length= strlen(no_db);
*p_db= strmake(no_db, *p_db_length);
/* This will allow to throw an error later for non-CTE references */
*p_db= NULL;
*p_db_length= 0;
}
else
{