1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
set @save_debug= @@global.debug;
# Test that the schema dist client waits properly
# for the coordinator to complete the distribution
# and release all references to the schema object
# Delay release of ndb_schema_object after coordinator has completed
set global debug='+d,ndb_delay_schema_obj_release_after_coord_complete';
# Run DDLs on the same schema objects and verify that they succeed.
CREATE DATABASE IF NOT EXISTS tmp_db;
CREATE DATABASE IF NOT EXISTS tmp_db;
Warnings:
Note 1007 Can't create database 'tmp_db'; database exists
# Cleanup
set global debug= @save_debug;
DROP DATABASE IF EXISTS tmp_db;
#
# Test to check if the Client thread is hung, when the coordinator
# did not receive the schema operation.
#
CREATE TABLE t1 (a INT) ENGINE NDB;
# Now, make the coordinator ignore the schema operation
set global debug="+d,ndb_schema_op_start_timeout";
call mtr.add_suppression("Schema dist client detected timeout");
call mtr.add_suppression("Failed to distribute");
# Execute any DDL on table t1
ALTER TABLE t1 ADD b INT;
Warnings:
Warning 1296 Node 49: 'Client detected timeout'
Warning 1296 Schema distribution failed
# Reset coordinator to handle all schema operations
set global debug="-d,ndb_schema_op_start_timeout";
include/assert_grep.inc [Verify if ndb_schema_dist_timeout triggered by schema distribution client.]
#
# Test to simulate the case when client thread
# detects timeout, but before freeing the schema object
# Coordinator receives the schema event
#
set global debug="+d,ndb_stale_event_with_schema_obj";
call mtr.add_suppression("Schema dist client detected timeout");
call mtr.add_suppression("Distribution of '.*' - client timeout");
call mtr.add_suppression("Failed to distribute");
# Execute any DDL on table t1
ALTER TABLE t1 ADD i INT;
Warnings:
Warning 1296 Node 49: 'Client detected timeout'
Warning 1296 Schema distribution failed
set global debug="-d,ndb_stale_event_with_schema_obj";
include/assert_grep.inc [Verify that schema distribution client detected timeout]
include/assert_grep.inc [Verify that coordinator received event after client timeout]
DROP TABLE t1;
|