Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
Description
There is a regression caused by MDEV-18333.
As of this commit before MDEV-18333:
commit f2e1451740d417f1c9ea8626d937fbcacc91bb55
|
Merge: e39d6e0 2d34713
|
Author: Oleksandr Byelkin <sanja@mariadb.com>
|
Date: Fri Mar 1 15:52:06 2019 +0100
|
The following script
FLUSH SLOW LOGS;
|
SET @@GLOBAL.slow_query_log=ON; |
SET @@GLOBAL.log_output='TABLE'; |
SET @@SESSION.slow_query_log=ON; |
SET @@SESSION.long_query_time=0.000001; |
|
SET @@GLOBAL.log_slow_admin_statements=OFF; |
SET log_slow_filter=DEFAULT; |
TRUNCATE TABLE mysql.slow_log; |
CREATE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
ALTER TABLE t1 ADD b INT; |
PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT'; |
EXECUTE stmt; |
DEALLOCATE PREPARE stmt; |
DROP TABLE t1; |
SELECT db, user_host, sql_text FROM mysql.slow_log WHERE sql_text NOT LIKE '%debug_dbug%'; |
produced this output:
+------+---------------------------+----------------------------------------------+
|
| db | user_host | sql_text |
|
+------+---------------------------+----------------------------------------------+
|
| test | root[root] @ localhost [] | TRUNCATE TABLE mysql.slow_log |
|
| test | root[root] @ localhost [] | CREATE TABLE t1 (a INT) |
|
| test | root[root] @ localhost [] | INSERT INTO t1 VALUES (1),(2),(3),(4) |
|
| test | root[root] @ localhost [] | PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT' |
|
| test | root[root] @ localhost [] | DEALLOCATE PREPARE stmt |
|
| test | root[root] @ localhost [] | DROP TABLE t1 |
|
+------+---------------------------+----------------------------------------------+
|
As of this later commit (which includes MDEV-18333):
commit ea52ecbc103b1424cf0b6f8faf990676b2b57a63
|
Merge: 2a2ab12 149b754
|
Author: Sergey Vojtovich <svoj@mariadb.org>
|
Date: Mon Mar 11 22:50:24 2019 +0400
|
the same script returns a different output:
+------+---------------------------+----------------------------------------------+
|
| db | user_host | sql_text |
|
+------+---------------------------+----------------------------------------------+
|
| test | root[root] @ localhost [] | TRUNCATE TABLE mysql.slow_log |
|
| test | root[root] @ localhost [] | CREATE TABLE t1 (a INT) |
|
| test | root[root] @ localhost [] | INSERT INTO t1 VALUES (1),(2),(3),(4) |
|
| test | root[root] @ localhost [] | PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT' |
|
| test | root[root] @ localhost [] | ALTER TABLE t1 ADD c INT |
|
| test | root[root] @ localhost [] | DEALLOCATE PREPARE stmt |
|
| test | root[root] @ localhost [] | DROP TABLE t1 |
|
+------+---------------------------+----------------------------------------------+
|
Notice, before MDEV-18333, non of the ALTER statements appeared in the slow log.
With MDEV-18333:
- the directly executed ALTER is not in the slow log (correct)
- the prepared ALTER is in the log (wrong)
The served does not respect the log_slow_admin_statements setting with prepared statements any more.
Attachments
Issue Links
- relates to
-
MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned off
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Description |
There is a regression caused by As of this commit before {noformat} commit f2e1451740d417f1c9ea8626d937fbcacc91bb55 Merge: e39d6e0 2d34713 Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Mar 1 15:52:06 2019 +0100 {noformat} The following script {code:sql} FLUSH SLOW LOGS; SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.log_output='TABLE'; SET @@SESSION.slow_query_log=ON; SET @@SESSION.long_query_time=0.000001; SET @@GLOBAL.log_slow_admin_statements=OFF; SET log_slow_filter=DEFAULT; TRUNCATE TABLE mysql.slow_log; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3),(4); ALTER TABLE t1 ADD b INT; PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT'; EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1; SELECT db, user_host, sql_text FROM mysql.slow_log WHERE sql_text NOT LIKE '%debug_dbug%'; {code} produced this output: {noformat} +------+---------------------------+----------------------------------------------+ | db | user_host | sql_text | +------+---------------------------+----------------------------------------------+ | test | root[root] @ localhost [] | TRUNCATE TABLE mysql.slow_log | | test | root[root] @ localhost [] | CREATE TABLE t1 (a INT) | | test | root[root] @ localhost [] | INSERT INTO t1 VALUES (1),(2),(3),(4) | | test | root[root] @ localhost [] | PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT' | | test | root[root] @ localhost [] | DEALLOCATE PREPARE stmt | | test | root[root] @ localhost [] | DROP TABLE t1 | +------+---------------------------+----------------------------------------------+ {noformat} As of this later commit (which includes {noformat} commit ea52ecbc103b1424cf0b6f8faf990676b2b57a63 Merge: 2a2ab12 149b754 Author: Sergey Vojtovich <svoj@mariadb.org> Date: Mon Mar 11 22:50:24 2019 +0400 {noformat} the same script returns a different output: {noformat} +------+---------------------------+----------------------------------------------+ | db | user_host | sql_text | +------+---------------------------+----------------------------------------------+ | test | root[root] @ localhost [] | TRUNCATE TABLE mysql.slow_log | | test | root[root] @ localhost [] | CREATE TABLE t1 (a INT) | | test | root[root] @ localhost [] | INSERT INTO t1 VALUES (1),(2),(3),(4) | | test | root[root] @ localhost [] | PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT' | | test | root[root] @ localhost [] | ALTER TABLE t1 ADD c INT | | test | root[root] @ localhost [] | DEALLOCATE PREPARE stmt | | test | root[root] @ localhost [] | DROP TABLE t1 | +------+---------------------------+----------------------------------------------+ {noformat} Notice, before With - the directly executed {{ALTER}} is not in the slow log - the prepared {{ALTER}} is in the log The served does not respect the {{log_slow_admin_statements}} setting with prepared statements any more. |
There is a regression caused by As of this commit before {noformat} commit f2e1451740d417f1c9ea8626d937fbcacc91bb55 Merge: e39d6e0 2d34713 Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Mar 1 15:52:06 2019 +0100 {noformat} The following script {code:sql} FLUSH SLOW LOGS; SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.log_output='TABLE'; SET @@SESSION.slow_query_log=ON; SET @@SESSION.long_query_time=0.000001; SET @@GLOBAL.log_slow_admin_statements=OFF; SET log_slow_filter=DEFAULT; TRUNCATE TABLE mysql.slow_log; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3),(4); ALTER TABLE t1 ADD b INT; PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT'; EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1; SELECT db, user_host, sql_text FROM mysql.slow_log WHERE sql_text NOT LIKE '%debug_dbug%'; {code} produced this output: {noformat} +------+---------------------------+----------------------------------------------+ | db | user_host | sql_text | +------+---------------------------+----------------------------------------------+ | test | root[root] @ localhost [] | TRUNCATE TABLE mysql.slow_log | | test | root[root] @ localhost [] | CREATE TABLE t1 (a INT) | | test | root[root] @ localhost [] | INSERT INTO t1 VALUES (1),(2),(3),(4) | | test | root[root] @ localhost [] | PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT' | | test | root[root] @ localhost [] | DEALLOCATE PREPARE stmt | | test | root[root] @ localhost [] | DROP TABLE t1 | +------+---------------------------+----------------------------------------------+ {noformat} As of this later commit (which includes {noformat} commit ea52ecbc103b1424cf0b6f8faf990676b2b57a63 Merge: 2a2ab12 149b754 Author: Sergey Vojtovich <svoj@mariadb.org> Date: Mon Mar 11 22:50:24 2019 +0400 {noformat} the same script returns a different output: {noformat} +------+---------------------------+----------------------------------------------+ | db | user_host | sql_text | +------+---------------------------+----------------------------------------------+ | test | root[root] @ localhost [] | TRUNCATE TABLE mysql.slow_log | | test | root[root] @ localhost [] | CREATE TABLE t1 (a INT) | | test | root[root] @ localhost [] | INSERT INTO t1 VALUES (1),(2),(3),(4) | | test | root[root] @ localhost [] | PREPARE stmt FROM 'ALTER TABLE t1 ADD c INT' | | test | root[root] @ localhost [] | ALTER TABLE t1 ADD c INT | | test | root[root] @ localhost [] | DEALLOCATE PREPARE stmt | | test | root[root] @ localhost [] | DROP TABLE t1 | +------+---------------------------+----------------------------------------------+ {noformat} Notice, before With - the directly executed {{ALTER}} is not in the slow log (correct) - the prepared {{ALTER}} is in the log (wrong) The served does not respect the {{log_slow_admin_statements}} setting with prepared statements any more. |
issue.field.resolutiondate | 2019-03-13 05:37:43.0 | 2019-03-13 05:37:43.943 |
Fix Version/s | 10.1.39 [ 23305 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 93122 ] | MariaDB v4 [ 155903 ] |