1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mysql.com:/home/mydev/mysql-4.0

into  mysql.com:/home/mydev/mysql-4.0-bug5390


sql/sql_parse.cc:
  Auto merged
This commit is contained in:
unknown
2005-12-06 17:48:31 +01:00
8 changed files with 169 additions and 27 deletions

View File

@ -2081,11 +2081,6 @@ mysql_execute_command(void)
if (thd->select_limit < select_lex->select_limit)
thd->select_limit= HA_POS_ERROR; // No limit
if (check_dup(tables->db, tables->real_name, tables->next))
{
/* Using same table for INSERT and SELECT */
select_lex->options |= OPTION_BUFFER_RESULT;
}
{
/* TODO: Delete the following loop when locks is set by sql_yacc */
TABLE_LIST *table;
@ -2098,6 +2093,12 @@ mysql_execute_command(void)
(byte*) (((TABLE_LIST *) lex->select_lex.table_list.first)->next);
if (!(res=open_and_lock_tables(thd, tables)))
{
/* MERGE sub-tables can only be detected after open. */
if (mysql_lock_have_duplicate(thd, tables->table, tables->next))
{
/* Using same table for INSERT and SELECT */
select_lex->options |= OPTION_BUFFER_RESULT;
}
if ((result=new select_insert(tables->table,&lex->field_list,
lex->duplicates)))
res=handle_select(thd,lex,result);