mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
check of using same table for changing and select
mysql-test/r/subselect.result: test of using same table for changing and select mysql-test/t/subselect.test: test of using same table for changing and select sql/mysql_priv.h: new function sql/sql_base.cc: new function
This commit is contained in:
@@ -171,6 +171,13 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
|
||||
table->time_stamp= save_time_stamp;
|
||||
goto abort;
|
||||
}
|
||||
if (find_real_table_in_list(table_list->next,
|
||||
table_list->db, table_list->real_name))
|
||||
{
|
||||
my_error(ER_INSERT_TABLE_USED, MYF(0), table_list->real_name);
|
||||
goto abort;
|
||||
}
|
||||
|
||||
value_count= values->elements;
|
||||
while ((values= its++))
|
||||
{
|
||||
|
Reference in New Issue
Block a user