Commit 7aa0a605 authored by unknown's avatar unknown

Merge XtraDB from Percona-server-5.5.17-rel22.1 into MariaDB 5.5

parents 680cc8d1 6afbf295
......@@ -36,29 +36,29 @@ TRIGGERS
USER_PRIVILEGES
USER_STATISTICS
VIEWS
INNODB_CMPMEM_RESET
PBXT_STATISTICS
INNODB_CMPMEM
INNODB_SYS_COLUMNS
INNODB_RSEG
INNODB_CMP
INNODB_TRX
INNODB_SYS_TABLESTATS
INNODB_LOCK_WAITS
INNODB_INDEX_STATS
INNODB_CMP
INNODB_BUFFER_POOL_PAGES_INDEX
INNODB_LOCKS
INNODB_SYS_FOREIGN_COLS
INNODB_CMP_RESET
INNODB_BUFFER_POOL_PAGES
INNODB_TRX
INNODB_BUFFER_POOL_PAGES_INDEX
INNODB_LOCKS
INNODB_BUFFER_POOL_PAGES_BLOB
INNODB_SYS_TABLES
PBXT_STATISTICS
INNODB_CMPMEM
INNODB_BUFFER_POOL_PAGES_BLOB
INNODB_CMPMEM_RESET
INNODB_SYS_FIELDS
INNODB_SYS_COLUMNS
INNODB_SYS_STATS
INNODB_TABLE_STATS
INNODB_SYS_FOREIGN
INNODB_SYS_INDEXES
INNODB_INDEX_STATS
XTRADB_ADMIN_COMMAND
INNODB_TABLE_STATS
INNODB_SYS_STATS
SELECT t.table_name, c1.column_name
FROM information_schema.tables t
INNER JOIN
......@@ -109,29 +109,29 @@ TRIGGERS TRIGGER_SCHEMA
USER_PRIVILEGES GRANTEE
USER_STATISTICS USER
VIEWS TABLE_SCHEMA
INNODB_CMPMEM_RESET page_size
PBXT_STATISTICS ID
INNODB_CMPMEM page_size
INNODB_SYS_COLUMNS TABLE_ID
INNODB_RSEG rseg_id
INNODB_CMP page_size
INNODB_TRX trx_id
INNODB_SYS_TABLESTATS SCHEMA
INNODB_LOCK_WAITS requesting_trx_id
INNODB_INDEX_STATS table_schema
INNODB_CMP page_size
INNODB_BUFFER_POOL_PAGES_INDEX index_id
INNODB_LOCKS lock_id
INNODB_SYS_FOREIGN_COLS ID
INNODB_CMP_RESET page_size
INNODB_BUFFER_POOL_PAGES page_type
INNODB_TRX trx_id
INNODB_BUFFER_POOL_PAGES_INDEX index_id
INNODB_LOCKS lock_id
INNODB_BUFFER_POOL_PAGES_BLOB space_id
INNODB_SYS_TABLES SCHEMA
PBXT_STATISTICS ID
INNODB_CMPMEM page_size
INNODB_BUFFER_POOL_PAGES_BLOB space_id
INNODB_CMPMEM_RESET page_size
INNODB_SYS_FIELDS INDEX_ID
INNODB_SYS_COLUMNS TABLE_ID
INNODB_SYS_STATS INDEX_ID
INNODB_TABLE_STATS table_schema
INNODB_SYS_FOREIGN ID
INNODB_SYS_INDEXES INDEX_ID
INNODB_INDEX_STATS table_schema
XTRADB_ADMIN_COMMAND result_message
INNODB_TABLE_STATS table_schema
INNODB_SYS_STATS INDEX_ID
SELECT t.table_name, c1.column_name
FROM information_schema.tables t
INNER JOIN
......@@ -182,29 +182,29 @@ TRIGGERS TRIGGER_SCHEMA
USER_PRIVILEGES GRANTEE
USER_STATISTICS USER
VIEWS TABLE_SCHEMA
INNODB_CMPMEM_RESET page_size
PBXT_STATISTICS ID
INNODB_CMPMEM page_size
INNODB_SYS_COLUMNS TABLE_ID
INNODB_RSEG rseg_id
INNODB_CMP page_size
INNODB_TRX trx_id
INNODB_SYS_TABLESTATS SCHEMA
INNODB_LOCK_WAITS requesting_trx_id
INNODB_INDEX_STATS table_schema
INNODB_CMP page_size
INNODB_BUFFER_POOL_PAGES_INDEX index_id
INNODB_LOCKS lock_id
INNODB_SYS_FOREIGN_COLS ID
INNODB_CMP_RESET page_size
INNODB_BUFFER_POOL_PAGES page_type
INNODB_TRX trx_id
INNODB_BUFFER_POOL_PAGES_INDEX index_id
INNODB_LOCKS lock_id
INNODB_BUFFER_POOL_PAGES_BLOB space_id
INNODB_SYS_TABLES SCHEMA
PBXT_STATISTICS ID
INNODB_CMPMEM page_size
INNODB_BUFFER_POOL_PAGES_BLOB space_id
INNODB_CMPMEM_RESET page_size
INNODB_SYS_FIELDS INDEX_ID
INNODB_SYS_COLUMNS TABLE_ID
INNODB_SYS_STATS INDEX_ID
INNODB_TABLE_STATS table_schema
INNODB_SYS_FOREIGN ID
INNODB_SYS_INDEXES INDEX_ID
INNODB_INDEX_STATS table_schema
XTRADB_ADMIN_COMMAND result_message
INNODB_TABLE_STATS table_schema
INNODB_SYS_STATS INDEX_ID
select 1 as f1 from information_schema.tables where "CHARACTER_SETS"=
(select cast(table_name as char) from information_schema.tables
order by table_name limit 1) limit 1;
......@@ -322,29 +322,29 @@ Database: information_schema
| USER_PRIVILEGES |
| USER_STATISTICS |
| VIEWS |
| INNODB_CMPMEM_RESET |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_SYS_COLUMNS |
| INNODB_RSEG |
| INNODB_CMP |
| INNODB_TRX |
| INNODB_SYS_TABLESTATS |
| INNODB_LOCK_WAITS |
| INNODB_INDEX_STATS |
| INNODB_CMP |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_SYS_FOREIGN_COLS |
| INNODB_CMP_RESET |
| INNODB_BUFFER_POOL_PAGES |
| INNODB_TRX |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_SYS_TABLES |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_CMPMEM_RESET |
| INNODB_SYS_FIELDS |
| INNODB_SYS_COLUMNS |
| INNODB_SYS_STATS |
| INNODB_TABLE_STATS |
| INNODB_SYS_FOREIGN |
| INNODB_SYS_INDEXES |
| INNODB_INDEX_STATS |
| XTRADB_ADMIN_COMMAND |
| INNODB_TABLE_STATS |
| INNODB_SYS_STATS |
+---------------------------------------+
Database: INFORMATION_SCHEMA
+---------------------------------------+
......@@ -385,29 +385,29 @@ Database: INFORMATION_SCHEMA
| USER_PRIVILEGES |
| USER_STATISTICS |
| VIEWS |
| INNODB_CMPMEM_RESET |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_SYS_COLUMNS |
| INNODB_RSEG |
| INNODB_CMP |
| INNODB_TRX |
| INNODB_SYS_TABLESTATS |
| INNODB_LOCK_WAITS |
| INNODB_INDEX_STATS |
| INNODB_CMP |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_SYS_FOREIGN_COLS |
| INNODB_CMP_RESET |
| INNODB_BUFFER_POOL_PAGES |
| INNODB_TRX |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_SYS_TABLES |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_CMPMEM_RESET |
| INNODB_SYS_FIELDS |
| INNODB_SYS_COLUMNS |
| INNODB_SYS_STATS |
| INNODB_TABLE_STATS |
| INNODB_SYS_FOREIGN |
| INNODB_SYS_INDEXES |
| INNODB_INDEX_STATS |
| XTRADB_ADMIN_COMMAND |
| INNODB_TABLE_STATS |
| INNODB_SYS_STATS |
+---------------------------------------+
Wildcard: inf_rmation_schema
+--------------------+
......
......@@ -114,29 +114,29 @@ Database: information_schema
| USER_PRIVILEGES |
| USER_STATISTICS |
| VIEWS |
| INNODB_CMPMEM_RESET |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_SYS_COLUMNS |
| INNODB_RSEG |
| INNODB_CMP |
| INNODB_TRX |
| INNODB_SYS_TABLESTATS |
| INNODB_LOCK_WAITS |
| INNODB_INDEX_STATS |
| INNODB_CMP |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_SYS_FOREIGN_COLS |
| INNODB_CMP_RESET |
| INNODB_BUFFER_POOL_PAGES |
| INNODB_TRX |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_SYS_TABLES |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_CMPMEM_RESET |
| INNODB_SYS_FIELDS |
| INNODB_SYS_COLUMNS |
| INNODB_SYS_STATS |
| INNODB_TABLE_STATS |
| INNODB_SYS_FOREIGN |
| INNODB_SYS_INDEXES |
| INNODB_INDEX_STATS |
| XTRADB_ADMIN_COMMAND |
| INNODB_TABLE_STATS |
| INNODB_SYS_STATS |
+---------------------------------------+
Database: INFORMATION_SCHEMA
+---------------------------------------+
......@@ -177,29 +177,29 @@ Database: INFORMATION_SCHEMA
| USER_PRIVILEGES |
| USER_STATISTICS |
| VIEWS |
| INNODB_CMPMEM_RESET |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_SYS_COLUMNS |
| INNODB_RSEG |
| INNODB_CMP |
| INNODB_TRX |
| INNODB_SYS_TABLESTATS |
| INNODB_LOCK_WAITS |
| INNODB_INDEX_STATS |
| INNODB_CMP |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_SYS_FOREIGN_COLS |
| INNODB_CMP_RESET |
| INNODB_BUFFER_POOL_PAGES |
| INNODB_TRX |
| INNODB_BUFFER_POOL_PAGES_INDEX |
| INNODB_LOCKS |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_SYS_TABLES |
| PBXT_STATISTICS |
| INNODB_CMPMEM |
| INNODB_BUFFER_POOL_PAGES_BLOB |
| INNODB_CMPMEM_RESET |
| INNODB_SYS_FIELDS |
| INNODB_SYS_COLUMNS |
| INNODB_SYS_STATS |
| INNODB_TABLE_STATS |
| INNODB_SYS_FOREIGN |
| INNODB_SYS_INDEXES |
| INNODB_INDEX_STATS |
| XTRADB_ADMIN_COMMAND |
| INNODB_TABLE_STATS |
| INNODB_SYS_STATS |
+---------------------------------------+
Wildcard: inf_rmation_schema
+--------------------+
......
......@@ -38,3 +38,6 @@ percona_show_slave_status_nolock: Feature not merged into MariaDB
percona_slow_extended-slave_innodb_stats: Feature not merged into MariaDB
percona_slow_extended-slave_statements-and-use_global_long_query_time: Feature not merged into MariaDB
userstat_bug602047: Feature not merged into MariaDB
percona_innodb_expand_fast_index_creation: Feature not merged into MariaDB
percona_innodb_kill_idle_trx: Feature not merged into MariaDB
percona_innodb_kill_idle_trx_locks: Feature not merged into MariaDB
......@@ -12,4 +12,5 @@ connect(localhost,root,,test,port,socket);
ERROR HY000: Too many connections
SET GLOBAL max_connections = @old_max_connections;
SET GLOBAL log_warnings = @old_log_warnings;
1
[log_grep.inc] file: percona.log_connection_error.err pattern: Too many connections
[log_grep.inc] lines: 1
......@@ -45,10 +45,10 @@ if(!`select LENGTH('$log_error_')`)
# does not know the location of its .err log, use default location
let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err;
}
# Assign env variable LOG_ERROR
let LOG_ERROR=$log_error_;
--let grep_file = $log_error
--let grep_pattern = Too many connections
--source grep.inc
exec $cmd;
--let log_error=$log_error_
--let log_file=percona.log_connection_error.err
--let log_file_full_path=$log_error
--let grep_pattern= Too many connections
--source log_grep.inc
CREATE TABLE t1(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
a CHAR(1) NOT NULL,
b CHAR(36) NOT NULL) ENGINE=InnoDB;
INSERT INTO t1(a,b) VALUES ('a','b');
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
ALTER TABLE t1 ADD KEY (a);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b;
id 1
select_type SIMPLE
table t1
type ALL
possible_keys a
key NULL
key_len NULL
ref NULL
rows 16
Extra
id 1
select_type SIMPLE
table t2
type ref
possible_keys a
key a
key_len 1
ref test.t1.a
rows 1
Extra Using where
ALTER TABLE t1 DROP KEY a;
SET expand_fast_index_creation = 1;
SELECT @@expand_fast_index_creation;
@@expand_fast_index_creation
1
ALTER TABLE t1 ADD KEY (a);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b;
id 1
select_type SIMPLE
table t1
type ALL
possible_keys a
key NULL
key_len NULL
ref NULL
rows 16
Extra
id 1
select_type SIMPLE
table t2
type ALL
possible_keys a
key NULL
key_len NULL
ref NULL
rows 16
Extra Using where; Using join buffer
SET expand_fast_index_creation = 0;
DROP TABLE t1;
--source include/have_innodb.inc
########################################################################
# Bug #857590: Fast index creation does not update index statistics
########################################################################
CREATE TABLE t1(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
a CHAR(1) NOT NULL,
b CHAR(36) NOT NULL) ENGINE=InnoDB;
INSERT INTO t1(a,b) VALUES ('a','b');
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
# Check that fast index creation is used
--enable_info
ALTER TABLE t1 ADD KEY (a);
--disable_info
# The default (wrong) plan due to bogus statistics
--vertical_results
EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b;
--horizontal_results
ALTER TABLE t1 DROP KEY a;
SET expand_fast_index_creation = 1;
SELECT @@expand_fast_index_creation;
# Check that stats are updated with the option enabled
--enable_info
ALTER TABLE t1 ADD KEY (a);
--disable_info
--vertical_results
EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b;
--horizontal_results
SET expand_fast_index_creation = 0;
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
# Checking variables
SHOW VARIABLES LIKE 'innodb_fake_changes';
Variable_name Value
innodb_fake_changes OFF
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
VARIABLE_VALUE
OFF
SET innodb_fake_changes=1;
SHOW VARIABLES LIKE 'innodb_fake_changes';
Variable_name Value
innodb_fake_changes ON
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
VARIABLE_VALUE
ON
SET innodb_fake_changes=default;
SHOW VARIABLES LIKE 'innodb_fake_changes';
Variable_name Value
innodb_fake_changes OFF
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
VARIABLE_VALUE
OFF
# Explicit COMMIT should fail when innodb_fake_changes is enabled
# DML should be fine
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
INSERT INTO t1 VALUES (2);
UPDATE t1 SET a=0;
DELETE FROM t1 LIMIT 1;
SELECT * FROM t1;
a
1
COMMIT;
ERROR HY000: Got error 131 during COMMIT
SET innodb_fake_changes=default;
DROP TABLE t1;
# DDL must result in error
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
ERROR HY000: Can't create table 'test.t2' (errno: 131)
DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
TRUNCATE TABLE t1;
ERROR HY000: Got error 131 during COMMIT
ALTER TABLE t1 ENGINE=MyISAM;
ERROR HY000: Got error 131 during COMMIT
ROLLBACK;
SET innodb_fake_changes=default;
DROP TABLE t1;
--source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # Checking variables
SHOW VARIABLES LIKE 'innodb_fake_changes';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
SET innodb_fake_changes=1;
SHOW VARIABLES LIKE 'innodb_fake_changes';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
SET innodb_fake_changes=default;
SHOW VARIABLES LIKE 'innodb_fake_changes';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes';
--echo # Explicit COMMIT should fail when innodb_fake_changes is enabled
--echo # DML should be fine
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
INSERT INTO t1 VALUES (2);
UPDATE t1 SET a=0;
DELETE FROM t1 LIMIT 1;
SELECT * FROM t1;
--error 1180
COMMIT;
SET innodb_fake_changes=default;
DROP TABLE t1;
--echo # DDL must result in error
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
--error 1005
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
--error 1051
DROP TABLE t1;
--error 1180
TRUNCATE TABLE t1;
--error 1180
ALTER TABLE t1 ENGINE=MyISAM;
ROLLBACK;
SET innodb_fake_changes=default;
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
# Verifying that X_LOCK not acquired
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
1
SET innodb_lock_wait_timeout=3;
UPDATE t1 SET a=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SELECT * FROM t1 LOCK IN SHARE MODE;
a
1
ROLLBACK;
SET innodb_fake_changes=default;
DROP TABLE t1;
--source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--echo # Verifying that X_LOCK not acquired
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connect (conn1,localhost,root,,)
--connection conn1
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
--connection default
SET innodb_lock_wait_timeout=3;
--error 1205
UPDATE t1 SET a=2;
SELECT * FROM t1 LOCK IN SHARE MODE;
--connection conn1
ROLLBACK;
SET innodb_fake_changes=default;
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
SET autocommit=0;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 0
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 0
SET GLOBAL innodb_kill_idle_transaction=1;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 1
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 1
BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;
a
1
2
3
BEGIN;
INSERT INTO t1 VALUES (4),(5),(6);
SELECT * FROM t1;
ERROR HY000: MySQL server has gone away
SELECT * FROM t1;
a
1
2
3
DROP TABLE t1;
SET GLOBAL innodb_kill_idle_transaction=0;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 0
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 0
--source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
SET autocommit=0;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
--source percona_innodb_kill_idle_trx_show.inc
SET GLOBAL innodb_kill_idle_transaction=1;
--source percona_innodb_kill_idle_trx_show.inc
BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;
BEGIN;
INSERT INTO t1 VALUES (4),(5),(6);
sleep 3;
--enable_reconnect
--error 2006 --error CR_SERVER_GONE_ERROR
SELECT * FROM t1;
SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_kill_idle_transaction=0;
--source percona_innodb_kill_idle_trx_show.inc
DROP TABLE IF EXISTS t1;
SET autocommit=0;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 0
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 0
SET GLOBAL innodb_kill_idle_transaction=5;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 5
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 5
BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;
a
1
2
3
### Locking rows. Lock should be released when idle trx is killed.
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
1
2
3
UPDATE t1 set a=4;
SELECT * FROM t1;
a
4
4
4
DROP TABLE t1;
SET GLOBAL innodb_kill_idle_transaction=0;
SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction';
Variable_name Value
innodb_kill_idle_transaction 0
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction';
VARIABLE_NAME VARIABLE_VALUE
INNODB_KILL_IDLE_TRANSACTION 0
--source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
SET autocommit=0;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
--source percona_innodb_kill_idle_trx_show.inc
SET GLOBAL innodb_kill_idle_transaction=5;
--source percona_innodb_kill_idle_trx_show.inc
connect (conn1,localhost,root,,);
connection conn1;
BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;
--echo ### Locking rows. Lock should be released when idle trx is killed.
BEGIN;
SELECT * FROM t1 FOR UPDATE;
connection default;
UPDATE t1 set a=4;
SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_kill_idle_transaction=0;
--source percona_innodb_kill_idle_trx_show.inc
......@@ -6,69 +6,65 @@ INSERT INTO t2 VALUES(10);
INSERT INTO t2 VALUES(20);
INSERT INTO t2 VALUES(10);
INSERT INTO t2 VALUES(20);
Issuing operation that should not return any rows and stopping the thread #1
SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped';
CREATE TABLE t1 (a INT);
SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready';
Thread #1 stopped
Issuing row-returning query and stopping the thread #2 at the end of query
SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped';
SELECT a FROM t2 WHERE a > 15;
SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready';
Thread #2 stopped
Look at thread states
SHOW PROCESSLIST;
Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read
### root ### test Query ### ### SHOW PROCESSLIST 0 0 2
### root ### test Query ### ### CREATE TABLE t1 (a INT) 0 0 1
### root ### test Query ### ### SELECT a FROM t2 WHERE a > 15 2 5 6
SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist
ORDER BY id;
SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id;
id info rows_sent rows_examined rows_read
### SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist
ORDER BY id 0 0 1
### SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id 0 0 1
### CREATE TABLE t1 (a INT) 0 0 1
### SELECT a FROM t2 WHERE a > 15 2 5 6
Let threads #1 and #2 finish their job
SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
a
20
20
Issuing row-returning query and stopping the thread #2 in the middle of query
SET DEBUG_SYNC= 'sent_row SIGNAL thread1_ready WAIT_FOR threads_dumped';
SELECT a FROM t2 WHERE a < 15;
SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready';
SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped';
SELECT a FROM t2 WHERE a > 15;
SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready';
Thread #2 stopped, look at its state
SHOW PROCESSLIST;
Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read
### root ### test Query ### ### SHOW PROCESSLIST 0 0 4
### root ### test Sleep ### ### NULL 0 0 1
### root ### test Query ### ### SELECT a FROM t2 WHERE a < 15 1 0 1
### root ### test Query ### ### SELECT a FROM t2 WHERE a > 15 1 0 3
SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id;
id rows_sent rows_examined rows_read
### 0 0 1
### 0 0 1
### 1 0 3
SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id;
id info rows_sent rows_examined rows_read
### SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id 0 0 1
### SELECT a FROM t2 WHERE a < 15 1 0 1
### SELECT a FROM t2 WHERE a > 15 1 0 3
SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
Let thread #2 finish its job
a
10
10
10
a
20
20
Issuing an UPDATE and stopping thread #2
SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread1_ready WAIT_FOR threads_dumped';
UPDATE t2 SET a = 15 WHERE a = 20;
SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready';
SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped';
UPDATE t2 SET a = 15 WHERE a = 10;
SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready';
Thread #2 stopped, look at its state
SHOW PROCESSLIST;
Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read
### root ### test Query ### ### SHOW PROCESSLIST 0 0 4
### root ### test Sleep ### ### NULL 0 0 1
### root ### test Query ### ### UPDATE t2 SET a = 15 WHERE a = 20 0 5 6
### root ### test Query ### ### UPDATE t2 SET a = 15 WHERE a = 10 0 5 6
SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id;
id rows_sent rows_examined rows_read
### 0 0 1
### 0 0 1
### 0 5 6
SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id;
id info rows_sent rows_examined rows_read
### SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id 0 0 1
### UPDATE t2 SET a = 15 WHERE a = 20 0 5 6
### UPDATE t2 SET a = 15 WHERE a = 10 0 5 6
SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
Let thread #2 finish its job
DROP TABLES t1, t2;
......@@ -13,76 +13,63 @@ INSERT INTO t2 VALUES(20);
INSERT INTO t2 VALUES(10);
INSERT INTO t2 VALUES(20);
connect (conn1, localhost, root, ,);
connect (conn2, localhost, root, ,);
--connect (conn1, localhost, root, ,)
--connect (conn2, localhost, root, ,)
--connection conn1
echo Issuing operation that should not return any rows and stopping the thread #1;
SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped';
send CREATE TABLE t1 (a INT);
--connection default
SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready';
--echo Thread #1 stopped
--connection conn2
echo Issuing row-returning query and stopping the thread #2 at the end of query;
SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped';
send SELECT a FROM t2 WHERE a > 15;
--connection default
SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready';
--echo Thread #2 stopped
--echo Look at thread states
--replace_column 1 ### 3 ### 6 ### 7 ###
SHOW PROCESSLIST;
# The running threads are different between SHOW above and SELECT below. Thus select info too to
# show the difference. Results are in the same order as in SHOW.
--replace_column 1 ###
SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist
ORDER BY id;
echo Let threads #1 and #2 finish their job;
SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
--source include/percona_processlist_row_stats_show.inc
--connection conn1
reap;
--connection conn2
reap;
echo Issuing row-returning query and stopping the thread #2 in the middle of query;
--connection conn1
SET DEBUG_SYNC= 'sent_row SIGNAL thread1_ready WAIT_FOR threads_dumped';
send SELECT a FROM t2 WHERE a < 15;
--connection default
SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready';
--connection conn2
SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped';
send SELECT a FROM t2 WHERE a > 15;
--connection default
SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready';
echo Thread #2 stopped, look at its state;
--replace_column 1 ### 3 ### 6 ### 7 ###
SHOW PROCESSLIST;
--replace_column 1 ###
SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id;
SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
echo Let thread #2 finish its job;
--source include/percona_processlist_row_stats_show.inc
--connection conn1
reap;
--connection conn2
reap;
echo Issuing an UPDATE and stopping thread #2;
--connection conn1
SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread1_ready WAIT_FOR threads_dumped';
send UPDATE t2 SET a = 15 WHERE a = 20;
--connection default
SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready';
--connection conn2
SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped';
send UPDATE t2 SET a = 15 WHERE a = 10;
--connection default
SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready';
echo Thread #2 stopped, look at its state;
--replace_column 1 ### 3 ### 6 ### 7 ###
SHOW PROCESSLIST;
--replace_column 1 ###
SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id;
SET DEBUG_SYNC= 'now SIGNAL threads_dumped';
echo Let thread #2 finish its job;
--source include/percona_processlist_row_stats_show.inc
--connection conn1
reap;
--connection conn2
reap;
......
SET GLOBAL query_exec_time=0.1;
--source include/have_response_time_distribution.inc
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc
--source include/have_debug.inc
--disable_query_log
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement:");
--enable_query_log
connection master;
-- disable_warnings
DROP TABLE IF EXISTS t;
-- enable_warnings
CREATE TABLE t(id INT);
SELECT * from t;
sync_slave_with_master;
connection slave;
SELECT * from t;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=ON;
connection master;
INSERT INTO t SELECT SLEEP(0.4);
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
INSERT INTO t SELECT SLEEP(0.4);
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
sync_slave_with_master;
connection slave;
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
connection master;
INSERT INTO t SELECT SLEEP(0.4);
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
INSERT INTO t SELECT SLEEP(0.4);
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
sync_slave_with_master;
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc
connection slave;
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
--let base=1
--source include/query_response_time-replication.inc
--let base=2
--source include/query_response_time-replication.inc
--let base=10
--source include/query_response_time-replication.inc
--let base=7
--source include/query_response_time-replication.inc
--let base=156
--source include/query_response_time-replication.inc
--let base=1000
--source include/query_response_time-replication.inc
--let base=1001
--source include/query_response_time-replication.inc
--source include/rpl_end.inc
SET GLOBAL query_exec_time=default;
connection master;
DROP TABLE IF EXISTS t;
sync_slave_with_master;
connection slave;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=OFF;
STOP SLAVE;
-- source include/wait_for_slave_to_stop.inc
SET GLOBAL query_exec_time=default;
--source include/have_response_time_distribution.inc
--source include/have_debug.inc
SET GLOBAL debug="d,query_exec_time_debug";
CREATE TABLE t(a INT);
delimiter /;
CREATE FUNCTION test_f()
RETURNS CHAR(30) DETERMINISTIC
delimiter ^;
CREATE PROCEDURE test_f(t DECIMAL(3,2))
BEGIN
SET SESSION debug="+d,query_exec_time_1.1";
RETURN 'Hello, world!';
END/
delimiter ;/
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
source include/percona_query_response_time_show.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
SELECT test_f();
SELECT test_f();
SELECT test_f();
SELECT test_f();
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
SELECT test_f();
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
SELECT test_f();
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
SELECT test_f();
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
SELECT test_f();
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
DROP FUNCTION test_f;
SET GLOBAL debug=default;
SET SESSION query_exec_time=t;
INSERT INTO t VALUES(1);
SET SESSION query_exec_time=0.1;
DELETE FROM t;
END^
delimiter ;^
--let base=1
--source include/query_response_time-stored.inc
--let base=2
--source include/query_response_time-stored.inc
--let base=10
--source include/query_response_time-stored.inc
--let base=7
--source include/query_response_time-stored.inc
--let base=156
--source include/query_response_time-stored.inc
--let base=1000
--source include/query_response_time-stored.inc
--let base=1001
--source include/query_response_time-stored.inc
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
DROP PROCEDURE test_f;
DROP TABLE t;
--source include/have_response_time_distribution.inc
--source include/have_debug.inc
SET GLOBAL debug="d,query_exec_time_debug";
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
source include/percona_query_response_time_show.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
source include/percona_query_response_time_sleep.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
source include/percona_query_response_time_sleep.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
source include/percona_query_response_time_sleep.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
source include/percona_query_response_time_sleep.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
source include/percona_query_response_time_flush.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
source include/percona_query_response_time_sleep.inc;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
source include/percona_query_response_time_show.inc;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
SET GLOBAL debug=default;
--let base=1
--source include/query_response_time.inc
--let base=2
--source include/query_response_time.inc
--let base=10
--source include/query_response_time.inc
--let base=7
--source include/query_response_time.inc
--let base=156
--source include/query_response_time.inc
--let base=1000
--source include/query_response_time.inc
--let base=1001
--source include/query_response_time.inc
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
......@@ -41,6 +41,7 @@ DIV_PRECISION_INCREMENT
ENGINE_CONDITION_PUSHDOWN
ERROR_COUNT
EVENT_SCHEDULER
EXPAND_FAST_INDEX_CREATION
EXPIRE_LOGS_DAYS
EXTERNAL_USER
FAST_INDEX_CREATION
......@@ -83,6 +84,7 @@ INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
INNODB_ADDITIONAL_MEM_POOL_SIZE
INNODB_AUTOEXTEND_INCREMENT
INNODB_AUTOINC_LOCK_MODE
INNODB_BLOCKING_BUFFER_POOL_RESTORE
INNODB_BUFFER_POOL_INSTANCES
INNODB_BUFFER_POOL_RESTORE_AT_STARTUP
INNODB_BUFFER_POOL_SHM_CHECKSUM
......@@ -100,6 +102,7 @@ INNODB_DATA_HOME_DIR
INNODB_DICT_SIZE_LIMIT
INNODB_DOUBLEWRITE
INNODB_DOUBLEWRITE_FILE
INNODB_FAKE_CHANGES
INNODB_FAST_CHECKSUM
INNODB_FAST_SHUTDOWN
INNODB_FILE_FORMAT
......@@ -109,12 +112,15 @@ INNODB_FILE_PER_TABLE
INNODB_FLUSH_LOG_AT_TRX_COMMIT
INNODB_FLUSH_METHOD
INNODB_FLUSH_NEIGHBOR_PAGES
INNODB_FORCE_LOAD_CORRUPTED
INNODB_FORCE_RECOVERY
INNODB_IBUF_ACCEL_RATE
INNODB_IBUF_ACTIVE_CONTRACT
INNODB_IBUF_MAX_SIZE
INNODB_IMPORT_TABLE_FROM_XTRABACKUP
INNODB_IO_CAPACITY
INNODB_KILL_IDLE_TRANSACTION
INNODB_LARGE_PREFIX
INNODB_LAZY_DROP_TABLE
INNODB_LOCKS_UNSAFE_FOR_BINLOG
INNODB_LOCK_WAIT_TIMEOUT
......@@ -132,6 +138,7 @@ INNODB_OPEN_FILES
INNODB_PAGE_SIZE
INNODB_PURGE_BATCH_SIZE
INNODB_PURGE_THREADS
INNODB_RANDOM_READ_AHEAD
INNODB_READ_AHEAD
INNODB_READ_AHEAD_THRESHOLD
INNODB_READ_IO_THREADS
......@@ -187,6 +194,7 @@ LOG_ERROR
LOG_OUTPUT
LOG_QUERIES_NOT_USING_INDEXES
LOG_SLAVE_UPDATES
LOG_SLOW_ADMIN_STATEMENTS
LOG_SLOW_FILTER
LOG_SLOW_QUERIES
LOG_SLOW_RATE_LIMIT
......@@ -275,6 +283,7 @@ QUERY_CACHE_SIZE
QUERY_CACHE_STRIP_COMMENTS
QUERY_CACHE_TYPE
QUERY_CACHE_WLOCK_INVALIDATE
QUERY_EXEC_TIME
QUERY_PREALLOC_SIZE
QUERY_RESPONSE_TIME_RANGE_BASE
QUERY_RESPONSE_TIME_STATS
......
......@@ -39,6 +39,7 @@ DIV_PRECISION_INCREMENT
ENGINE_CONDITION_PUSHDOWN
ERROR_COUNT
EVENT_SCHEDULER
EXPAND_FAST_INDEX_CREATION
EXPIRE_LOGS_DAYS
EXTERNAL_USER
FAST_INDEX_CREATION
......@@ -81,6 +82,7 @@ INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
INNODB_ADDITIONAL_MEM_POOL_SIZE
INNODB_AUTOEXTEND_INCREMENT
INNODB_AUTOINC_LOCK_MODE
INNODB_BLOCKING_BUFFER_POOL_RESTORE
INNODB_BUFFER_POOL_INSTANCES
INNODB_BUFFER_POOL_RESTORE_AT_STARTUP
INNODB_BUFFER_POOL_SHM_CHECKSUM
......@@ -97,6 +99,7 @@ INNODB_DATA_HOME_DIR
INNODB_DICT_SIZE_LIMIT
INNODB_DOUBLEWRITE
INNODB_DOUBLEWRITE_FILE
INNODB_FAKE_CHANGES
INNODB_FAST_CHECKSUM
INNODB_FAST_SHUTDOWN
INNODB_FILE_FORMAT
......@@ -106,12 +109,15 @@ INNODB_FILE_PER_TABLE
INNODB_FLUSH_LOG_AT_TRX_COMMIT
INNODB_FLUSH_METHOD
INNODB_FLUSH_NEIGHBOR_PAGES
INNODB_FORCE_LOAD_CORRUPTED
INNODB_FORCE_RECOVERY
INNODB_IBUF_ACCEL_RATE
INNODB_IBUF_ACTIVE_CONTRACT
INNODB_IBUF_MAX_SIZE
INNODB_IMPORT_TABLE_FROM_XTRABACKUP
INNODB_IO_CAPACITY
INNODB_KILL_IDLE_TRANSACTION
INNODB_LARGE_PREFIX
INNODB_LAZY_DROP_TABLE
INNODB_LOCKS_UNSAFE_FOR_BINLOG
INNODB_LOCK_WAIT_TIMEOUT
......@@ -129,6 +135,7 @@ INNODB_OPEN_FILES
INNODB_PAGE_SIZE
INNODB_PURGE_BATCH_SIZE
INNODB_PURGE_THREADS
INNODB_RANDOM_READ_AHEAD
INNODB_READ_AHEAD
INNODB_READ_AHEAD_THRESHOLD
INNODB_READ_IO_THREADS
......@@ -184,6 +191,7 @@ LOG_ERROR
LOG_OUTPUT
LOG_QUERIES_NOT_USING_INDEXES
LOG_SLAVE_UPDATES
LOG_SLOW_ADMIN_STATEMENTS
LOG_SLOW_FILTER
LOG_SLOW_QUERIES
LOG_SLOW_RATE_LIMIT
......
set GLOBAL query_cache_size=1355776;
SET GLOBAL query_cache_size=1355776;
flush query cache;
flush query cache;
reset query cache;
......@@ -8,20 +8,16 @@ CREATE TABLE t(id INT, number INT);
INSERT INTO t VALUES (0,1);
INSERT INTO t VALUES (1,2);
INSERT INTO t VALUES (2,3);
SET SESSION debug="+d,status_waiting_on_query_cache_mutex_sleep";
SET DEBUG_SYNC='status_waiting_on_query_cache_mutex SIGNAL thread_ready';
SELECT number from t where id > 0;
number
2
3
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
SELECT number from t where id > 0;
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
SELECT number from t where id > 0;
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
SHOW PROCESSLIST;
Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read
Id root localhost test Sleep Time NULL Rows_sent Rows_examined Rows_read
Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0 Rows_sent Rows_examined Rows_read
Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0 Rows_sent Rows_examined Rows_read
Id root localhost test Query Time NULL SHOW PROCESSLIST Rows_sent Rows_examined Rows_read
### root ### test Query ### NULL SHOW PROCESSLIST ### ### ###
### root ### test Query ### Waiting on query cache mutex SELECT number from t where id > 0 ### ### ###
SELECT id, info, state FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id;
id info state
### SELECT id, info, state FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id executing
### SELECT number from t where id > 0 Waiting on query cache mutex
DROP TABLE t;
set GLOBAL query_cache_size=0;
SET GLOBAL query_cache_size=0;
--source include/have_query_cache.inc
--source include/have_debug.inc
set GLOBAL query_cache_size=1355776;
--source include/have_debug_sync.inc
SET GLOBAL query_cache_size=1355776;
--source include/percona_query_cache_with_comments_clear.inc
-- disable_warnings
......@@ -10,28 +11,21 @@ CREATE TABLE t(id INT, number INT);
INSERT INTO t VALUES (0,1);
INSERT INTO t VALUES (1,2);
INSERT INTO t VALUES (2,3);
SELECT number from t where id > 0;
--connect (conn0,localhost,root,,)
--connect (conn1,localhost,root,,)
--connect (conn2,localhost,root,,)
--connection conn0
--error 0, ER_UNKNOWN_SYSTEM_VARIABLE
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
SEND SELECT number from t where id > 0;
SLEEP 1.0;
--connect (conn,localhost,root,,)
--connection conn1
--error 0, ER_UNKNOWN_SYSTEM_VARIABLE
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
--connection conn
SET SESSION debug="+d,status_waiting_on_query_cache_mutex_sleep";
SET DEBUG_SYNC='status_waiting_on_query_cache_mutex SIGNAL thread_ready';
SEND SELECT number from t where id > 0;
SLEEP 1.0;
--connection conn2
--error 0, ER_UNKNOWN_SYSTEM_VARIABLE
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
--replace_column 1 Id 6 Time 9 Rows_sent 10 Rows_examined 11 Rows_read
--connection default
--replace_column 1 ### 3 ### 6 ### 9 ### 10 ### 11 ###
SHOW PROCESSLIST;
--replace_column 1 ###
SELECT id, info, state FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id;
--disconnect conn
DROP TABLE t;
set GLOBAL query_cache_size=0;
SET GLOBAL query_cache_size=0;
connection master;
CREATE TABLE t(id INT);
connection slave;
SET GLOBAL query_exec_time = 0.1;
--source include/restart_slave_sql.inc
connection slave;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
--eval SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
connection master;
SET SESSION query_exec_time = 0.31; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.32; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.33; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.34; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.35; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.36; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.37; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.38; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.39; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.4; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 1.1; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 1.2; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 1.3; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 1.5; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 1.4; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 0.5; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 2.1; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 2.3; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 2.5; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 3.1; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 4.1; INSERT INTO t VALUES(1);
SET SESSION query_exec_time = 5.1; INSERT INTO t VALUES(1);
sync_slave_with_master;
connection slave;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SHOW QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
connection master;
DROP TABLE t;
sync_slave_with_master;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base;
FLUSH QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
CALL test_f(0.31);
CALL test_f(0.32);
CALL test_f(0.33);
CALL test_f(0.34);
CALL test_f(0.35);
CALL test_f(0.36);
CALL test_f(0.37);
CALL test_f(0.38);
CALL test_f(0.39);
CALL test_f(0.4);
CALL test_f(1.1);
CALL test_f(1.2);
CALL test_f(1.3);
CALL test_f(1.5);
CALL test_f(1.4);
CALL test_f(0.5);
CALL test_f(2.1);
CALL test_f(2.3);
CALL test_f(2.5);
CALL test_f(3.1);
CALL test_f(4.1);
CALL test_f(5.1);
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SHOW QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SET SESSION query_exec_time=default;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base;
FLUSH QUERY_RESPONSE_TIME;
# Following two queries check works of FLUSH and
# respecting of "QUERY_RESPONSE_TIME_STATS" variable (see launchpad bug #855312)
SHOW QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
SET SESSION query_exec_time=0.31; SELECT 1;
SET SESSION query_exec_time=0.32; SELECT 1;
SET SESSION query_exec_time=0.33; SELECT 1;
SET SESSION query_exec_time=0.34; SELECT 1;
SET SESSION query_exec_time=0.35; SELECT 1;
SET SESSION query_exec_time=0.36; SELECT 1;
SET SESSION query_exec_time=0.37; SELECT 1;
SET SESSION query_exec_time=0.38; SELECT 1;
SET SESSION query_exec_time=0.39; SELECT 1;
SET SESSION query_exec_time=0.4; SELECT 1;
SET SESSION query_exec_time=1.1; SELECT 1;
SET SESSION query_exec_time=1.2; SELECT 1;
SET SESSION query_exec_time=1.3; SELECT 1;
SET SESSION query_exec_time=1.5; SELECT 1;
SET SESSION query_exec_time=1.4; SELECT 1;
SET SESSION query_exec_time=0.5; SELECT 1;
SET SESSION query_exec_time=2.1; SELECT 1;
SET SESSION query_exec_time=2.3; SELECT 1;
SET SESSION query_exec_time=2.5; SELECT 1;
SET SESSION query_exec_time=3.1; SELECT 1;
SET SESSION query_exec_time=4.1; SELECT 1;
SET SESSION query_exec_time=5.1; SELECT 1;
SET SESSION query_exec_time=0.1;
SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
SHOW QUERY_RESPONSE_TIME;
SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
SET SESSION query_exec_time=default;
include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave SQL: Request to stop slave SQL Thread received while applying a group that has non-transactional changes");
include/rpl_connect.inc [creating slave_lock]
include/rpl_connect.inc [creating slave_nolock]
[master]
DROP TABLE IF EXISTS t;
CREATE TABLE t(id INT);
INSERT INTO t SELECT SLEEP(10);
[slave]
SET DEBUG_SYNC='RESET';
SET GLOBAL DEBUG="+d,after_mysql_insert,after_show_slave_status";
[master]
INSERT INTO t VALUES(0);
[slave]
check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - both should work fine
[slave_lock]
SHOW SLAVE STATUS;
SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
SIGNAL after SHOW SLAVE STATUS is 'signal.after_show_slave_status'
[slave]
SET DEBUG_SYNC='now SIGNAL signal.empty';
[slave_nolock]
SHOW SLAVE STATUS NOLOCK;
SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
# should be 'signal.after_show_slave_status'
SIGNAL after SHOW SLAVE STATUS NOLOCK is 'signal.after_show_slave_status'
[slave]
SET DEBUG_SYNC='now SIGNAL signal.continue';
[slave]
SET DEBUG_SYNC='now SIGNAL signal.empty';
[master]
INSERT INTO t VALUES(1);
[slave]
include/rpl_connect.inc [creating slave_stop]
[slave_stop]
STOP SLAVE;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
master count(*)
master 1
slave count(*)
slave 0
[slave]
check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - just NOLOCK version should works fine
[slave_lock]
SHOW SLAVE STATUS;
SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
SIGNAL after SHOW SLAVE STATUS is 'signal.empty'
[slave]
SET DEBUG_SYNC='now SIGNAL signal.empty';
[slave_nolock]
SHOW SLAVE STATUS NOLOCK;
SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
# should be 'signal.after_show_slave_status'
SIGNAL after SHOW SLAVE STATUS NOLOCK is 'signal.after_show_slave_status'
[slave]
SET DEBUG_SYNC='now SIGNAL signal.continue';
[slave]
SET DEBUG_SYNC='now SIGNAL signal.empty';
[slave_stop]
include/wait_for_slave_to_stop.inc
START SLAVE;
include/wait_for_slave_to_start.inc
slave count(*)
slave 1
[master]
SET DEBUG_SYNC='RESET';
[slave]
SET GLOBAL DEBUG='';
SET DEBUG_SYNC='RESET';
[master]
DROP TABLE t;
STOP SLAVE;
include/wait_for_slave_to_stop.inc
include/rpl_end.inc
--source include/master-slave.inc
--source include/have_debug_sync.inc
--source include/have_binlog_format_statement.inc
--disable_query_log
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement:");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
--enable_query_log
call mtr.add_suppression("Slave SQL: Request to stop slave SQL Thread received while applying a group that has non-transactional changes");
--let $rpl_connection_name=slave_lock
--let $rpl_server_number=2
--source include/rpl_connect.inc
--let $rpl_connection_name=slave_nolock
--let $rpl_server_number=2
--source include/rpl_connect.inc
--let $show_statement= SHOW PROCESSLIST
--let $field= Info
connection master;
--disable_warnings
DROP TABLE IF EXISTS t;
--enable_warnings
CREATE TABLE t(id INT);
sync_slave_with_master;
--echo [master]
--disable_warnings
DROP TABLE IF EXISTS t;
--enable_warnings
CREATE TABLE t(id INT);
sync_slave_with_master;
connection slave;
--echo [slave]
SET DEBUG_SYNC='RESET';
SET GLOBAL DEBUG="+d,after_mysql_insert,after_show_slave_status";
connection master;
send INSERT INTO t SELECT SLEEP(10);
--echo [master]
INSERT INTO t VALUES(0);
connection slave;
sleep 15;
send STOP SLAVE;
--echo [slave]
--let $condition= 'INSERT INTO t VALUES(0)'
--source include/wait_show_condition.inc
--echo check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - both should work fine
--source include/percona_show_slave_status_nolock.inc
connection master;
reap;
--echo [master]
INSERT INTO t VALUES(1);
--disable_query_log
select "master",count(*) from t;
--enable_query_log
connection slave;
--echo [slave]
--let $condition= 'INSERT INTO t VALUES(1)'
--source include/wait_show_condition.inc
connection slave1;
--disable_query_log
select "slave",count(*) from t;
--enable_query_log
--let $rpl_connection_name=slave_stop
--let $rpl_server_number=2
--source include/rpl_connect.inc
--disable_result_log
SHOW SLAVE STATUS NOLOCK;
--enable_result_log
connection slave_stop;
--echo [slave_stop]
send STOP SLAVE;
connection slave;
reap;
--echo [slave]
--let $condition= 'STOP SLAVE'
--source include/wait_show_condition.inc
--echo check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - just NOLOCK version should works fine
--source include/percona_show_slave_status_nolock.inc
--source include/wait_for_slave_to_stop.inc
START SLAVE;
--source include/wait_for_slave_to_start.inc
--disable_query_log
select "slave",count(*) from t;
--enable_query_log
connection slave_stop;
--echo [slave_stop]
reap;
--source include/wait_for_slave_to_stop.inc
START SLAVE;
--source include/wait_for_slave_to_start.inc
connection master;
DROP TABLE t;
--echo [master]
SET DEBUG_SYNC='RESET';
connection slave;
--echo [slave]
SET GLOBAL DEBUG='';
SET DEBUG_SYNC='RESET';
connection master;
--echo [master]
DROP TABLE t;
sync_slave_with_master;
STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
--source include/rpl_end.inc
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
......@@ -878,6 +878,7 @@ btr_search_guess_on_hash(
btr_pcur_t pcur;
#endif
ut_ad(index && info && tuple && cursor && mtr);
ut_ad(!dict_index_is_ibuf(index));
ut_ad((latch_mode == BTR_SEARCH_LEAF)
|| (latch_mode == BTR_MODIFY_LEAF));
......
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -534,7 +534,9 @@ buf_flush_remove(
case BUF_BLOCK_ZIP_DIRTY:
buf_page_set_state(bpage, BUF_BLOCK_ZIP_PAGE);
UT_LIST_REMOVE(flush_list, buf_pool->flush_list, bpage);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
buf_LRU_insert_zip_clean(bpage);
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
break;
case BUF_BLOCK_FILE_PAGE:
UT_LIST_REMOVE(flush_list, buf_pool->flush_list, bpage);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -312,4 +312,5 @@ ulint
innobase_get_lower_case_table_names(void);
/*=====================================*/
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment