mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
This commit is contained in:
@ -1571,21 +1571,16 @@ error:
|
||||
|
||||
static bool mysql_insert_select_prepare_tester(THD *thd)
|
||||
{
|
||||
TABLE_LIST *first;
|
||||
bool res;
|
||||
SELECT_LEX *first_select= &thd->lex->select_lex;
|
||||
TABLE_LIST *second_table= ((TABLE_LIST*)first_select->table_list.first)->
|
||||
next_local;
|
||||
|
||||
/* Skip first table, which is the table we are inserting in */
|
||||
first_select->table_list.first= (byte*)(first=
|
||||
((TABLE_LIST*)first_select->
|
||||
table_list.first)->next_local);
|
||||
res= mysql_insert_select_prepare(thd);
|
||||
/*
|
||||
insert/replace from SELECT give its SELECT_LEX for SELECT,
|
||||
and item_list belong to SELECT
|
||||
*/
|
||||
thd->lex->select_lex.context.resolve_in_select_list= TRUE;
|
||||
thd->lex->select_lex.context.table_list= first;
|
||||
return res;
|
||||
first_select->table_list.first= (byte *) second_table;
|
||||
thd->lex->select_lex.context.table_list=
|
||||
thd->lex->select_lex.context.first_name_resolution_table= second_table;
|
||||
|
||||
return mysql_insert_select_prepare(thd);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user