File: ndb_binlog_discover_multi.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (75 lines) | stat: -rw-r--r-- 2,545 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Tests to test binlogging after mysqld restart
# This file has tests for the following :
# 1. WL#12731: Improve database synchronization during mysqld startup
# 2. Bug#17250994 BAD BINLOG GENERATION AFTER MISMATCH TABLE DISCOVER
#
# Reset binlogging for test
reset master;
reset master;
# Setup
create table t1 (a int unsigned auto_increment not null primary key)
engine=ndbcluster;
# Shutdown server 1
# Run DDLs to be tested on Server1 startup
# Alter table while server 1 is down (To test Bug#17250994)
alter table t1 algorithm=inplace, add column b varchar(16);
Warnings:
Warning	1478	Converted FIXED field 'b' to DYNAMIC to enable online ADD COLUMN
# Create databases when server 1 is down (To test WL#12731)
create database test_db;
create table test_db.t1(a int) engine ndb;
# Startup server1
# Check that the tables are all discovered
show tables;
Tables_in_test
t1
show tables in test_db;
Tables_in_test_db
t1
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int unsigned NOT NULL AUTO_INCREMENT,
  `b` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
show create table test_db.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
# Insert into tables and check binlog
insert into t1 (b) values('String to find');
# Wait for the row to be committed to binlog
insert into test_db.t1 values (1);
# Wait for the row to be committed to binlog
# check that data went in ok
select * from t1;
a	b
1	String to find
select * from test_db.t1;
a
1
# Verify the row was properly binlogged after alter table
FLUSH BINARY LOGS;
###   @2='String to find'
# View binlog to verify that INSERTS were written properly
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
binlog.000003	#	Query	#	#	BEGIN
binlog.000003	#	Table_map	#	#	table_id: # (test.t1)
binlog.000003	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
binlog.000003	#	Write_rows	#	#	table_id: #
binlog.000003	#	Write_rows	#	#	table_id: # flags: STMT_END_F
binlog.000003	#	Query	#	#	COMMIT
binlog.000003	#	Query	#	#	BEGIN
binlog.000003	#	Table_map	#	#	table_id: # (test_db.t1)
binlog.000003	#	Table_map	#	#	table_id: # (mysql.ndb_apply_status)
binlog.000003	#	Write_rows	#	#	table_id: #
binlog.000003	#	Write_rows	#	#	table_id: # flags: STMT_END_F
binlog.000003	#	Query	#	#	COMMIT
binlog.000003	#	Rotate	#	#	binlog.000004;pos=POS
# Cleanup
drop database test_db;
drop table t1;