1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

The second cleanup patch in scope of BUG#11986.

1. Introduce parse_sql() as a high-level replacement for MYSQLparse().
parse_sql() is responsible to switch and restore "parser context"
(THD::m_lip for now).

2. Fix typo in sp.cc: THD::spcont should be reset *before* calling
the parser.
This commit is contained in:
anozdrin/alik@ibm.
2007-06-14 18:35:59 +04:00
parent 96f57c13df
commit 1ff91214c6
9 changed files with 70 additions and 47 deletions

View File

@@ -2858,12 +2858,11 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
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);
error= parse_sql(thd, &lip) ||
thd->net.report_error ||
init_param_array(this);
/*
While doing context analysis of the query (in check_prepared_statement)