Debian Codegraph @

mysql-test/suite/ndb_ddl/schema_dist_client_wait.result

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