diff options
author | unknown <sergefp@mysql.com> | 2004-04-27 03:44:41 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-04-27 03:44:41 +0400 |
commit | 978ba8f47ef6adf41c5a9eb75cc927c3aa1b8e69 (patch) | |
tree | e26205820dce9563bbb1bde4b6d57634a9e288cf /sql/sql_lex.cc | |
parent | c41919f3583aa40645cc10571718b39091980c25 (diff) | |
download | mariadb-git-978ba8f47ef6adf41c5a9eb75cc927c3aa1b8e69.tar.gz |
Fix for BUG#3567: Disallow several SQL statements inside a Prepared Statement.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index d16e1f87085..66e2782dd84 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -882,10 +882,12 @@ int yylex(void *arg, void *yythd) case MY_LEX_COLON: // optional line terminator if (yyPeek()) { - if (((THD *)yythd)->client_capabilities & CLIENT_MULTI_STATEMENTS) + THD* thd= (THD*)yythd; + if ((thd->client_capabilities & CLIENT_MULTI_STATEMENTS) && + (thd->command != COM_PREPARE)) { lex->found_colon=(char*)lex->ptr; - ((THD *)yythd)->server_status |= SERVER_MORE_RESULTS_EXISTS; + thd->server_status |= SERVER_MORE_RESULTS_EXISTS; lex->next_state=MY_LEX_END; return(END_OF_INPUT); } |