| 1 |
# |
| 2 |
# Test repl.key_format = FLAT16 . Since it is very difficult to cause a collision on a 16-byte hash, |
| 3 |
# we simply verify that the option is settable and that replication works. |
| 4 |
# |
| 5 |
|
| 6 |
--source include/galera_cluster.inc |
| 7 |
--source include/have_innodb.inc |
| 8 |
|
| 9 |
--connection node_1 |
| 10 |
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` |
| 11 |
SET GLOBAL wsrep_provider_options = 'repl.key_format=FLAT16'; |
| 12 |
|
| 13 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; |
| 14 |
INSERT INTO t1 VALUES (123); |
| 15 |
|
| 16 |
CREATE TABLE t2 (f1 VARCHAR(256)) ENGINE=InnoDB; |
| 17 |
INSERT INTO t2 VALUES (REPEAT('a', 256)); |
| 18 |
|
| 19 |
--connection node_2 |
| 20 |
SELECT COUNT(*) = 1 FROM t1; |
| 21 |
UPDATE t1 SET f1 = 234; |
| 22 |
UPDATE t2 SET f1 = REPEAT('b', 256); |
| 23 |
|
| 24 |
--connection node_1 |
| 25 |
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 234; |
| 26 |
SELECT COUNT(*) = 1 FROM t2 WHERE f1 = REPEAT('b', 256); |
| 27 |
|
| 28 |
--disable_query_log |
| 29 |
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; |
| 30 |
--enable_query_log |
| 31 |
|
| 32 |
DROP TABLE t1; |
| 33 |
DROP TABLE t2; |