diff options
author | Mats Kindahl <mats@sun.com> | 2008-10-23 21:27:09 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2008-10-23 21:27:09 +0200 |
commit | a1df058d64c6e2ae45c22ecc7e07defe4fde1b18 (patch) | |
tree | 09212d65be943c6c5dfd6d6a834841683d81f9f8 /mysql-test/t/log_tables.test | |
parent | de500cabb46cf9f05d9bf8e42b4b02cc52a8032a (diff) | |
parent | 7908c85a59f3f8fa931c6851c9031a5d1db961e7 (diff) | |
download | mariadb-git-a1df058d64c6e2ae45c22ecc7e07defe4fde1b18.tar.gz |
Merging 5.1 main into 5.1-rpl
Diffstat (limited to 'mysql-test/t/log_tables.test')
-rw-r--r-- | mysql-test/t/log_tables.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 22cd219534f..952121c8bb6 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -944,6 +944,52 @@ deallocate prepare long_query; set global general_log = @old_general_log_state; # +# Bug#34306: Can't make copy of log tables when server binary log is enabled +# + +--disable_warnings +DROP TABLE IF EXISTS log_count; +DROP TABLE IF EXISTS slow_log_copy; +DROP TABLE IF EXISTS general_log_copy; +--enable_warnings + +CREATE TABLE log_count (count BIGINT(21)); + +SET @old_general_log_state = @@global.general_log; +SET @old_slow_log_state = @@global.slow_query_log; + +SET GLOBAL general_log = ON; +SET GLOBAL slow_query_log = ON; + +CREATE TABLE slow_log_copy SELECT * FROM mysql.slow_log; +INSERT INTO slow_log_copy SELECT * FROM mysql.slow_log; +INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.slow_log)); +DROP TABLE slow_log_copy; + +CREATE TABLE general_log_copy SELECT * FROM mysql.general_log; +INSERT INTO general_log_copy SELECT * FROM mysql.general_log; +INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.general_log)); +DROP TABLE general_log_copy; + +SET GLOBAL general_log = OFF; +SET GLOBAL slow_query_log = OFF; + +CREATE TABLE slow_log_copy SELECT * FROM mysql.slow_log; +INSERT INTO slow_log_copy SELECT * FROM mysql.slow_log; +INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.slow_log)); +DROP TABLE slow_log_copy; + +CREATE TABLE general_log_copy SELECT * FROM mysql.general_log; +INSERT INTO general_log_copy SELECT * FROM mysql.general_log; +INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.general_log)); +DROP TABLE general_log_copy; + +SET GLOBAL general_log = @old_general_log_state; +SET GLOBAL slow_query_log = @old_slow_log_state; + +DROP TABLE log_count; + +# # Bug #31700: thd->examined_row_count not incremented for 'const' type queries # SET @old_slow_log_state = @@global.slow_query_log; |