mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into vajra.(none):/opt/local/work/mysql-5.1-runtime
This commit is contained in:
@ -1493,8 +1493,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_normal_and_derived_tables(stmt->thd, lex->query_tables, 0))
|
||||
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(stmt, tables, 0, 0);
|
||||
|
||||
res= select_like_stmt_test(stmt, 0, 0);
|
||||
}
|
||||
|
||||
/* put tables back for PS rexecuting */
|
||||
@ -1795,6 +1808,9 @@ static bool check_prepared_statement(Prepared_statement *stmt,
|
||||
case SQLCOM_KILL:
|
||||
break;
|
||||
|
||||
case SQLCOM_PREPARE:
|
||||
case SQLCOM_EXECUTE:
|
||||
case SQLCOM_DEALLOCATE_PREPARE:
|
||||
default:
|
||||
/*
|
||||
Trivial check of all status commands. This is easier than having
|
||||
@ -2851,10 +2867,14 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
|
||||
|
||||
old_stmt_arena= thd->stmt_arena;
|
||||
thd->stmt_arena= this;
|
||||
lex_start(thd, thd->query, thd->query_length);
|
||||
lex->stmt_prepare_mode= TRUE;
|
||||
|
||||
error= MYSQLparse((void *)thd) || thd->is_fatal_error ||
|
||||
Lex_input_stream lip(thd, thd->query, thd->query_length);
|
||||
lip.stmt_prepare_mode= TRUE;
|
||||
thd->m_lip= &lip;
|
||||
lex_start(thd);
|
||||
int err= MYSQLparse((void *)thd);
|
||||
|
||||
error= err || thd->is_fatal_error ||
|
||||
thd->net.report_error || init_param_array(this);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user