diff options
author | unknown <bell@sanja.is.com.ua> | 2004-06-22 12:38:23 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-06-22 12:38:23 +0300 |
commit | 7c021c3acd1b647143dcce14fc035478ba82bad9 (patch) | |
tree | 769b0ed37a8970e4f71f40cbd54304785eb8e4f4 /sql/sql_prepare.cc | |
parent | 3da21e1c3e7ba6e5b45bbd196c3bb02513bcc04f (diff) | |
parent | 6f364111cb7a03881fd395a7f7e93288800cdf1f (diff) | |
download | mariadb-git-7c021c3acd1b647143dcce14fc035478ba82bad9.tar.gz |
Merge
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
mysql-test/r/subselect.result:
SCCS merged
mysql-test/t/subselect.test:
SCCS merged
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index fac2d32d152..09b442f8dfc 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1307,6 +1307,7 @@ static int mysql_test_create_table(Prepared_statement *stmt, DBUG_ENTER("mysql_test_create_table"); THD *thd= stmt->thd; LEX *lex= stmt->lex; + SELECT_LEX *select_lex= &lex->select_lex; int res= 0; /* Skip first table, which is the table we are creating */ @@ -1315,8 +1316,12 @@ static int mysql_test_create_table(Prepared_statement *stmt, &create_table_local); if (!(res= create_table_precheck(thd, tables, create_table)) && - lex->select_lex.item_list.elements) + select_lex->item_list.elements) + { + select_lex->resolve_mode= SELECT_LEX::SELECT_MODE; res= select_like_statement_test(stmt, tables); + select_lex->resolve_mode= SELECT_LEX::NOMATTER_MODE; + } /* put tables back for PS rexecuting */ tables= lex->link_first_table_back(tables, create_table, @@ -1400,7 +1405,11 @@ static int mysql_test_insert_select(Prepared_statement *stmt, (TABLE_LIST *)lex->select_lex.table_list.first; /* Skip first table, which is the table we are inserting in */ lex->select_lex.table_list.first= (byte*) first_local_table->next; - lex->select_lex.resolve_mode= SELECT_LEX::NOMATTER_MODE; + /* + insert/replace from SELECT give its SELECT_LEX for SELECT, + and item_list belong to SELECT + */ + lex->select_lex.resolve_mode= SELECT_LEX::SELECT_MODE; res= select_like_statement_test(stmt, tables); /* revert changes*/ lex->select_lex.table_list.first= (byte*) first_local_table; |