Skip to content

Commit 45712a9

Browse files
author
Jan Lindström
committed
MDEV-13871: galera.galera_unicode_identifiers failed in buildbot with 'Unknown database'
Wait in second node until tables with databases are created.
1 parent 8252423 commit 45712a9

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

mysql-test/suite/galera/r/galera_unicode_identifiers.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ CREATE TABLE `table with space` (
66
`column with space` INTEGER AUTO_INCREMENT PRIMARY KEY,
77
`second column with space` INTEGER,
88
UNIQUE `index name with space` (`second column with space`)
9-
);
9+
) engine=innodb;
1010
INSERT INTO `table with space` VALUES (1, 1);
1111
CREATE DATABASE `база`;
1212
USE `база`;
1313
CREATE TABLE `таблица` (
1414
`първа_колона` INTEGER PRIMARY KEY,
1515
`втора_колона` INTEGER,
1616
UNIQUE `индекс` (`втора_колона`)
17-
);
17+
) engine=innodb;
1818
INSERT INTO `таблица` VALUES (1, 1);
1919
CREATE DATABASE `втора база`;
2020
USE `втора база`;
2121
CREATE TABLE `втора таблица` (
2222
`първа колона` INTEGER,
2323
`втора колона` INTEGER,
2424
KEY `първи индекс` (`първа колона`)
25-
);
25+
) engine=innodb;
2626
INSERT INTO `втора таблица` VALUES (1, 1);
2727
USE `database with space`;
2828
SELECT `second column with space` FROM `table with space`;

mysql-test/suite/galera/t/galera_unicode_identifiers.test

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ SET GLOBAL wsrep_sync_wait = 15;
1313

1414
--connection node_1
1515

16+
--let $innodb_num_tables_orig = `SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES`
17+
1618
# Spaces in identifiers
1719

1820
CREATE DATABASE `database with space`;
@@ -21,7 +23,7 @@ CREATE TABLE `table with space` (
2123
`column with space` INTEGER AUTO_INCREMENT PRIMARY KEY,
2224
`second column with space` INTEGER,
2325
UNIQUE `index name with space` (`second column with space`)
24-
);
26+
) engine=innodb;
2527
INSERT INTO `table with space` VALUES (1, 1);
2628

2729
# Unicode identifiers
@@ -32,7 +34,7 @@ CREATE TABLE `таблица` (
3234
`първа_колона` INTEGER PRIMARY KEY,
3335
`втора_колона` INTEGER,
3436
UNIQUE `индекс` (`втора_колона`)
35-
);
37+
) engine=innodb;
3638

3739
INSERT INTO `таблица` VALUES (1, 1);
3840

@@ -44,11 +46,15 @@ CREATE TABLE `втора таблица` (
4446
`първа колона` INTEGER,
4547
`втора колона` INTEGER,
4648
KEY `първи индекс` (`първа колона`)
47-
);
49+
) engine=innodb;
4850

4951
INSERT INTO `втора таблица` VALUES (1, 1);
5052

5153
--connection node_2
54+
# Wait until 3 above tables with databases are created also to this node
55+
--let $wait_condition = SELECT COUNT(*) = $innodb_num_tables_orig + 3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
56+
--source include/wait_condition.inc
57+
5258
USE `database with space`;
5359
SELECT `second column with space` FROM `table with space`;
5460

0 commit comments

Comments
 (0)