mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 09:15:30 +02:00
MDEV-11129 CREATE OR REPLACE TABLE t1 AS SELECT spfunc() crashes if spfunc() references t1
Fixed by extending unique_table() with a flag to not allow usage of the replaced table. I also cleaned up find_dup_table() to not use goto next. I also added more comments to the code in find_dup_table()
This commit is contained in:
parent
d703e09cd6
commit
ef295c31e3
7 changed files with 82 additions and 22 deletions
|
|
@ -1483,7 +1483,8 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
|
|||
{
|
||||
Item *fake_conds= 0;
|
||||
TABLE_LIST *duplicate;
|
||||
if ((duplicate= unique_table(thd, table_list, table_list->next_global, 1)))
|
||||
if ((duplicate= unique_table(thd, table_list, table_list->next_global,
|
||||
CHECK_DUP_ALLOW_DIFFERENT_ALIAS)))
|
||||
{
|
||||
update_non_unique_table_error(table_list, "INSERT", duplicate);
|
||||
DBUG_RETURN(TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue