summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <kaa@polly.local>2006-11-24 17:01:43 +0300
committerunknown <kaa@polly.local>2006-11-24 17:01:43 +0300
commitf3c26f7d9c180fb2b220ee7a11a7419ada2a06bf (patch)
treef6acf5c2da54e35e01d16302af7e743497a034a8 /sql
parent60aefd19b5bc8e85e6a9f5628157ba0bc1450f91 (diff)
parent2b720487f0cda632d1a0b590744c7b38b8ac4434 (diff)
downloadmariadb-git-f3c26f7d9c180fb2b220ee7a11a7419ada2a06bf.tar.gz
Merge polly.local:/tmp/maint/bug22077/my50-bug22077
into polly.local:/home/kaa/src/maint/mysql-5.0-maint sql/sql_parse.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_parse.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index e3734026858..af62e1a199f 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2515,12 +2515,13 @@ mysql_execute_command(THD *thd)
tables. Except for the replication thread and the 'super' users.
*/
if (opt_readonly &&
- !(thd->security_ctx->master_access & SUPER_ACL) &&
- uc_update_queries[lex->sql_command] &&
- !((lex->sql_command == SQLCOM_CREATE_TABLE) &&
- (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) &&
- ((lex->sql_command != SQLCOM_UPDATE_MULTI) &&
- some_non_temp_table_to_be_updated(thd, all_tables)))
+ !(thd->security_ctx->master_access & SUPER_ACL) &&
+ uc_update_queries[lex->sql_command] &&
+ !((lex->sql_command == SQLCOM_CREATE_TABLE) &&
+ (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) &&
+ !((lex->sql_command == SQLCOM_DROP_TABLE) && lex->drop_temporary) &&
+ ((lex->sql_command != SQLCOM_UPDATE_MULTI) &&
+ some_non_temp_table_to_be_updated(thd, all_tables)))
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
DBUG_RETURN(-1);