summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorunknown <dlenev@mockturtle.local>2007-05-11 21:55:55 +0400
committerunknown <dlenev@mockturtle.local>2007-05-11 21:55:55 +0400
commit5c5623775cf1006c5d9974073e63347a1732578c (patch)
tree7e0dd933e024c82884a722e2fa0094fba2418dfe /sql/sql_prepare.cc
parenta0567199b118f14ec346249d91aabe2ee5d99354 (diff)
parentc5a82455966e729219d164941f1461bb01a26290 (diff)
downloadmariadb-git-5c5623775cf1006c5d9974073e63347a1732578c.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mockturtle.local:/home/dlenev/src/mysql-5.0-cts-3 sql/mysql_priv.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 9c41ee57a21..684a13d4679 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1491,8 +1491,21 @@ static bool mysql_test_create_table(Prepared_statement *stmt)
if (select_lex->item_list.elements)
{
+ if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ lex->link_first_table_back(create_table, link_to_local);
+ create_table->create= TRUE;
+ }
+
+ if (open_and_lock_tables(stmt->thd, lex->query_tables))
+ DBUG_RETURN(TRUE);
+
+ if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+ create_table= lex->unlink_first_table(&link_to_local);
+
select_lex->context.resolve_in_select_list= TRUE;
- res= select_like_stmt_test_with_open_n_lock(stmt, tables, 0, 0);
+
+ res= select_like_stmt_test(stmt, 0, 0);
}
/* put tables back for PS rexecuting */