summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-02-14 18:58:24 +0200
committerunknown <monty@hundin.mysql.fi>2002-02-14 18:58:24 +0200
commit5fa6df3081eea58dbd21e24315e27d166e66d23c (patch)
tree9f6476af645cdeb53eefe6ca4f6bc6f4ac04bf84 /sql/sql_yacc.yy
parent7bff1b0c345c6d8f334bd31f693fb9cbe69ea120 (diff)
parent3a231663f034394fe341ebc98fa335f824fa3135 (diff)
downloadmariadb-git-5fa6df3081eea58dbd21e24315e27d166e66d23c.tar.gz
merge with 3.23.49
BitKeeper/etc/logging_ok: auto-union acconfig.h: Auto merged Docs/manual.texi: Auto merged client/client_priv.h: Auto merged include/mysql.h: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/row/row0mysql.c: Auto merged mysql-test/t/comments.test: Auto merged sql/sql_lex.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/unireg.cc: Auto merged sql/unireg.h: Auto merged
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 91cf0ae5fc9..c3db58ce20b 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -596,9 +596,17 @@ END_OF_INPUT
query:
END_OF_INPUT
{
- if (!current_thd->bootstrap)
+ THD *thd=current_thd;
+ if (!thd->bootstrap &&
+ (!(thd->lex.options & OPTION_FOUND_COMMENT)))
+ {
send_error(&current_thd->net,ER_EMPTY_QUERY);
- YYABORT;
+ YYABORT;
+ }
+ else
+ {
+ thd->lex.sql_command = SQLCOM_EMPTY_QUERY;
+ }
}
| verb_clause END_OF_INPUT {}