summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
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_parse.cc
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_parse.cc')
-rw-r--r--sql/sql_parse.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 01327363c59..7f9c8da05c1 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1312,6 +1312,10 @@ mysql_execute_command(void)
res=mysql_do(thd, *lex->insert_list);
break;
+ case SQLCOM_EMPTY_QUERY:
+ send_ok(&thd->net);
+ break;
+
case SQLCOM_PURGE:
{
if (check_process_priv(thd))
@@ -2094,13 +2098,20 @@ mysql_execute_command(void)
{
uint privilege= (lex->duplicates == DUP_REPLACE ?
INSERT_ACL | UPDATE_ACL | DELETE_ACL : INSERT_ACL);
- if (!(lex->local_file && (thd->client_capabilities & CLIENT_LOCAL_FILES)))
+
+ if (!lex->local_file)
{
if (check_access(thd,privilege | FILE_ACL,tables->db))
goto error;
}
else
{
+ if (!(thd->client_capabilities & CLIENT_LOCAL_FILES) ||
+ ! opt_local_infile)
+ {
+ send_error(&thd->net,ER_NOT_ALLOWED_COMMAND);
+ goto error;
+ }
if (check_access(thd,privilege,tables->db,&tables->grant.privilege) ||
grant_option && check_grant(thd,privilege,tables))
goto error;