Manual merge from mysql-5.1-bugteam.
conflicts: conflict sql/sql_prepare.cc
This commit is contained in:
commit
48582afb84
@ -3187,17 +3187,23 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
|
|||||||
thd->stmt_arena= this;
|
thd->stmt_arena= this;
|
||||||
|
|
||||||
Parser_state parser_state;
|
Parser_state parser_state;
|
||||||
if (!parser_state.init(thd, thd->query(), thd->query_length()))
|
if (parser_state.init(thd, thd->query(), thd->query_length()))
|
||||||
{
|
{
|
||||||
parser_state.m_lip.stmt_prepare_mode= TRUE;
|
thd->restore_backup_statement(this, &stmt_backup);
|
||||||
parser_state.m_lip.multi_statements= FALSE;
|
thd->restore_active_arena(this, &stmt_backup);
|
||||||
lex_start(thd);
|
thd->stmt_arena= old_stmt_arena;
|
||||||
|
DBUG_RETURN(TRUE);
|
||||||
error= parse_sql(thd, & parser_state, NULL) ||
|
|
||||||
thd->is_error() ||
|
|
||||||
init_param_array(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parser_state.m_lip.stmt_prepare_mode= TRUE;
|
||||||
|
parser_state.m_lip.multi_statements= FALSE;
|
||||||
|
|
||||||
|
lex_start(thd);
|
||||||
|
|
||||||
|
error= parse_sql(thd, & parser_state, NULL) ||
|
||||||
|
thd->is_error() ||
|
||||||
|
init_param_array(this);
|
||||||
|
|
||||||
lex->set_trg_event_type_for_tables();
|
lex->set_trg_event_type_for_tables();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user