Skip to content
Permalink
Browse files

MDEV-18907 Slow log: RENAME TABLE is not "admin", while ALTER TABLE..…

…RENAME is
  • Loading branch information...
abarkov committed Mar 13, 2019
1 parent 691c306 commit d7a38eaf1a3b3138a77156a64fba7f90a5dc6257
Showing with 3 additions and 2 deletions.
  1. +1 −1 mysql-test/r/log_slow_debug.result
  2. +2 −1 sql/sql_parse.cc
@@ -73,6 +73,7 @@ sql_text
[slow] CREATE INDEX t1a ON t1 (a)
[slow] DROP INDEX t1a ON t1
[slow] ALTER TABLE t2 RENAME t2
[slow] RENAME TABLE t2 TO t3
[slow] ALTER TABLE t4 MODIFY a INT DEFAULT 1
#
# Expect none of admin DDL statements in the slow log (ON,filesort)
@@ -120,7 +121,6 @@ sql_text
[slow] CREATE TABLE t1 (a INT)
[slow] DROP TABLE t1
[slow] CREATE TABLE t2 (a INT)
[slow] RENAME TABLE t2 TO t3
[slow] DROP TABLE t3
[slow] CREATE TABLE t4 (a INT)
[slow] PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1'
@@ -324,7 +324,8 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_DROP_DB]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_ALTER_DB_UPGRADE]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_ALTER_DB]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_RENAME_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_RENAME_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS |
CF_ADMIN_COMMAND;
sql_command_flags[SQLCOM_DROP_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS |
CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
sql_command_flags[SQLCOM_CREATE_VIEW]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |

0 comments on commit d7a38ea

Please sign in to comment.
You can’t perform that action at this time.