diff options
author | Monty <monty@mariadb.org> | 2018-05-16 21:51:46 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-05-16 21:51:46 +0300 |
commit | ef295c31e3d50a99a90beccfb4deb9d9d36ac1e3 (patch) | |
tree | e504c310e3f0829c2041e65e1e9cbfe7ac5fc99d /sql/sql_delete.cc | |
parent | d703e09cd6706673fbb127f540d3917068b40755 (diff) | |
download | mariadb-git-ef295c31e3d50a99a90beccfb4deb9d9d36ac1e3.tar.gz |
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()
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 0780f418c80..609e5472ba6 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -903,7 +903,7 @@ multi_delete::initialize_tables(JOIN *join) TABLE_LIST *tbl= walk->correspondent_table->find_table_for_update(); tables_to_delete_from|= tbl->table->map; if (delete_while_scanning && - unique_table(thd, tbl, join->tables_list, false)) + unique_table(thd, tbl, join->tables_list, 0)) { /* If the table we are going to delete from appears |