Debian Codegraph @

mysql-test/suite/ndb_binlog/r/ndb_binlog_discover_multi.result

raw
1 #
2 # Tests to test binlogging after mysqld restart
3 # This file has tests for the following :
4 # 1. WL#12731: Improve database synchronization during mysqld startup
5 # 2. Bug#17250994 BAD BINLOG GENERATION AFTER MISMATCH TABLE DISCOVER
6 #
7 # Reset binlogging for test
8 reset master;
9 reset master;
10 # Setup
11 create table t1 (a int unsigned auto_increment not null primary key)
12 engine=ndbcluster;
13 # Shutdown server 1
14 # Run DDLs to be tested on Server1 startup
15 # Alter table while server 1 is down (To test Bug#17250994)
16 alter table t1 algorithm=inplace, add column b varchar(16);
17 Warnings:
18 Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable online ADD COLUMN
19 # Create databases when server 1 is down (To test WL#12731)
20 create database test_db;
21 create table test_db.t1(a int) engine ndb;
22 # Startup server1
23 # Check that the tables are all discovered
24 show tables;
25 Tables_in_test
26 t1
27 show tables in test_db;
28 Tables_in_test_db
29 t1
30 show create table t1;
31 Table Create Table
32 t1 CREATE TABLE `t1` (
33 `a` int unsigned NOT NULL AUTO_INCREMENT,
34 `b` varchar(16) DEFAULT NULL,
35 PRIMARY KEY (`a`)
36 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
37 show create table test_db.t1;
38 Table Create Table
39 t1 CREATE TABLE `t1` (
40 `a` int DEFAULT NULL
41 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
42 # Insert into tables and check binlog
43 insert into t1 (b) values('String to find');
44 # Wait for the row to be committed to binlog
45 insert into test_db.t1 values (1);
46 # Wait for the row to be committed to binlog
47 # check that data went in ok
48 select * from t1;
49 a b
50 1 String to find
51 select * from test_db.t1;
52 a
53 1
54 # Verify the row was properly binlogged after alter table
55 FLUSH BINARY LOGS;
56 ### @2='String to find'
57 # View binlog to verify that INSERTS were written properly
58 include/show_binlog_events.inc
59 Log_name Pos Event_type Server_id End_log_pos Info
60 binlog.000003 # Query # # BEGIN
61 binlog.000003 # Table_map # # table_id: # (test.t1)
62 binlog.000003 # Table_map # # table_id: # (mysql.ndb_apply_status)
63 binlog.000003 # Write_rows # # table_id: #
64 binlog.000003 # Write_rows # # table_id: # flags: STMT_END_F
65 binlog.000003 # Query # # COMMIT
66 binlog.000003 # Query # # BEGIN
67 binlog.000003 # Table_map # # table_id: # (test_db.t1)
68 binlog.000003 # Table_map # # table_id: # (mysql.ndb_apply_status)
69 binlog.000003 # Write_rows # # table_id: #
70 binlog.000003 # Write_rows # # table_id: # flags: STMT_END_F
71 binlog.000003 # Query # # COMMIT
72 binlog.000003 # Rotate # # binlog.000004;pos=POS
73 # Cleanup
74 drop database test_db;
75 drop table t1;