diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-11-16 20:39:08 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-11-22 13:53:17 +0100 |
commit | 779d416a992f0d4a28dc2c2724d81bd3b780e2cb (patch) | |
tree | d292bc1188bf99592e4ac753233e9f003bb1a2ef /sql/sql_insert.cc | |
parent | 4a27ab23cb2e2e9cc4e10614850a4f996c499090 (diff) | |
download | mariadb-git-779d416a992f0d4a28dc2c2724d81bd3b780e2cb.tar.gz |
MDEV-10724 Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&, bool, bool)
Attempt to insert in several tables now checked just by table map.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 432f8b67378..7c0c1b68a2b 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -78,6 +78,7 @@ #include "sql_audit.h" #include "sql_derived.h" // mysql_handle_derived #include "sql_prepare.h" +#include <my_bit.h> #include "debug_sync.h" @@ -127,6 +128,14 @@ static bool check_view_single_update(List<Item> &fields, List<Item> *values, while ((item= it++)) tables|= item->used_tables(); + /* + Check that table is only one + (we can not rely on check_single_table because it skips some + types of tables) + */ + if (my_count_bits(tables) > 1) + goto error; + if (values) { it.init(*values); |