1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-23 19:21:55 +03:00

BUG#5390 - problems with merge tables

Problem #1: INSERT...SELECT, Version for 5.1.
Extended the unique table check by a check of lock data.
Merge sub-tables cannot be detected by doing name checks only.
This commit is contained in:
ingo@mysql.com
2005-12-22 13:48:00 +01:00
parent 7b8fa1e3c6
commit a04c5adb0b
12 changed files with 216 additions and 39 deletions

View File

@ -890,7 +890,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
{
Item *fake_conds= 0;
TABLE_LIST *duplicate;
if ((duplicate= unique_table(table_list, table_list->next_global)))
if ((duplicate= unique_table(thd, table_list, table_list->next_global)))
{
update_non_unique_table_error(table_list, "INSERT", duplicate);
DBUG_RETURN(TRUE);
@ -2228,7 +2228,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
query
*/
if (!(lex->current_select->options & OPTION_BUFFER_RESULT) &&
unique_table(table_list, table_list->next_global))
unique_table(thd, table_list, table_list->next_global))
{
/* Using same table for INSERT and SELECT */
lex->current_select->options|= OPTION_BUFFER_RESULT;