2014-10-01 00:06:15 +02:00
|
|
|
|
#
|
|
|
|
|
# Test non-ascii table, column and index names
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
--source include/galera_cluster.inc
|
|
|
|
|
--source include/have_innodb.inc
|
|
|
|
|
|
|
|
|
|
--let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait)
|
|
|
|
|
SET GLOBAL wsrep_sync_wait = 7;
|
|
|
|
|
|
|
|
|
|
--connection node_2
|
|
|
|
|
SET GLOBAL wsrep_sync_wait = 7;
|
|
|
|
|
|
|
|
|
|
--connection node_1
|
|
|
|
|
|
|
|
|
|
# Spaces in identifiers
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE `database with space`;
|
|
|
|
|
USE `database with space`;
|
|
|
|
|
CREATE TABLE `table with space` (
|
|
|
|
|
`column with space` INTEGER AUTO_INCREMENT PRIMARY KEY,
|
|
|
|
|
`second column with space` INTEGER,
|
|
|
|
|
UNIQUE `index name with space` (`second column with space`)
|
2015-04-21 19:17:17 +02:00
|
|
|
|
);
|
2015-05-12 22:56:06 +02:00
|
|
|
|
INSERT INTO `table with space` VALUES (1, 1);
|
2014-10-01 00:06:15 +02:00
|
|
|
|
|
|
|
|
|
# Unicode identifiers
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE `база`;
|
|
|
|
|
USE `база`;
|
|
|
|
|
CREATE TABLE `таблица` (
|
|
|
|
|
`първа_колона` INTEGER PRIMARY KEY,
|
|
|
|
|
`втора_колона` INTEGER,
|
|
|
|
|
UNIQUE `индекс` (`втора_колона`)
|
2015-04-21 19:17:17 +02:00
|
|
|
|
);
|
2014-10-01 00:06:15 +02:00
|
|
|
|
|
|
|
|
|
INSERT INTO `таблица` VALUES (1, 1);
|
|
|
|
|
|
|
|
|
|
# Without a PK
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE `втора база`;
|
|
|
|
|
USE `втора база`;
|
|
|
|
|
CREATE TABLE `втора таблица` (
|
|
|
|
|
`първа колона` INTEGER,
|
|
|
|
|
`втора колона` INTEGER,
|
|
|
|
|
KEY `първи индекс` (`първа колона`)
|
2015-04-21 19:17:17 +02:00
|
|
|
|
);
|
2014-10-01 00:06:15 +02:00
|
|
|
|
|
|
|
|
|
INSERT INTO `втора таблица` VALUES (1, 1);
|
|
|
|
|
|
|
|
|
|
--connection node_2
|
|
|
|
|
USE `database with space`;
|
2015-04-21 19:17:17 +02:00
|
|
|
|
SELECT `second column with space` FROM `table with space`;
|
2014-10-01 00:06:15 +02:00
|
|
|
|
|
|
|
|
|
USE `база`;
|
|
|
|
|
SELECT * FROM `таблица`;
|
|
|
|
|
|
|
|
|
|
USE `втора база`;
|
2015-04-21 19:17:17 +02:00
|
|
|
|
SELECT `втора колона` FROM `втора таблица`;
|
2014-10-01 00:06:15 +02:00
|
|
|
|
|
|
|
|
|
--eval SET GLOBAL wsrep_sync_wait = $wsrep_sync_wait_orig
|
|
|
|
|
|
|
|
|
|
--connection node_1
|
|
|
|
|
DROP TABLE `database with space`.`table with space`;
|
|
|
|
|
DROP TABLE `база`.`таблица`;
|
|
|
|
|
DROP TABLE `втора база`.`втора таблица`;
|
|
|
|
|
|
|
|
|
|
DROP DATABASE `database with space`;
|
|
|
|
|
DROP DATABASE `база`;
|
|
|
|
|
DROP DATABASE `втора база`;
|
|
|
|
|
--eval SET GLOBAL wsrep_sync_wait = $wsrep_sync_wait_orig
|
|
|
|
|
|