|
| 1 | +connection node_2; |
| 2 | +connection node_1; |
| 3 | +connection node_1; |
| 4 | +CREATE TABLE t1 (c INT); |
| 5 | +INSERT INTO t1 VALUES (0),(0); |
| 6 | +CREATE TABLE t2 (c INT); |
| 7 | +SET SESSION wsrep_trx_fragment_unit='STATEMENTS'; |
| 8 | +SET SESSION wsrep_trx_fragment_size=2; |
| 9 | +DROP TABLE mysql.wsrep_streaming_log; |
| 10 | +ERROR 42000: DROP command denied to user 'root'@'localhost' for table `mysql`.`wsrep_streaming_log` |
| 11 | +CREATE TRIGGER tgr AFTER INSERT ON t2 FOR EACH ROW UPDATE t1 SET c=c+1; |
| 12 | +INSERT INTO t2 VALUES (1),(2); |
| 13 | +SELECT * FROM t1; |
| 14 | +c |
| 15 | +2 |
| 16 | +2 |
| 17 | +SELECT * FROM t2; |
| 18 | +c |
| 19 | +1 |
| 20 | +2 |
| 21 | +SET wsrep_trx_fragment_unit=DEFAULT; |
| 22 | +SET GLOBAL wsrep_trx_fragment_size=DEFAULT; |
| 23 | +DROP TRIGGER tgr; |
| 24 | +DROP TABLE t1, t2; |
| 25 | +connection node_2; |
| 26 | +SET GLOBAL wsrep_on=OFF; |
| 27 | +SET SESSION wsrep_trx_fragment_unit='STATEMENTS'; |
| 28 | +ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'STATEMENTS' |
| 29 | +SELECT @@wsrep_trx_fragment_unit; |
| 30 | +@@wsrep_trx_fragment_unit |
| 31 | +bytes |
| 32 | +SELECT @@wsrep_trx_fragment_size; |
| 33 | +@@wsrep_trx_fragment_size |
| 34 | +0 |
| 35 | +SET SESSION wsrep_trx_fragment_size = 2; |
| 36 | +ERROR 42000: Variable 'wsrep_trx_fragment_size' can't be set to the value of '2' |
| 37 | +SHOW WARNINGS; |
| 38 | +Level Code Message |
| 39 | +Warning 1231 Cannot set 'wsrep_trx_fragment_size' to a value other than 0 because wsrep is switched off. |
| 40 | +Error 1231 Variable 'wsrep_trx_fragment_size' can't be set to the value of '2' |
| 41 | +SELECT @@wsrep_trx_fragment_unit; |
| 42 | +@@wsrep_trx_fragment_unit |
| 43 | +bytes |
| 44 | +SELECT @@wsrep_trx_fragment_size; |
| 45 | +@@wsrep_trx_fragment_size |
| 46 | +0 |
| 47 | +DROP TABLE mysql.wsrep_streaming_log; |
| 48 | +SET SESSION wsrep_trx_fragment_unit='STATEMENTS'; |
| 49 | +ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'STATEMENTS' |
| 50 | +SET SESSION wsrep_trx_fragment_size = 2; |
| 51 | +ERROR 42000: Variable 'wsrep_trx_fragment_size' can't be set to the value of '2' |
| 52 | +SHOW WARNINGS; |
| 53 | +Level Code Message |
| 54 | +Warning 1231 Cannot set 'wsrep_trx_fragment_size' to a value other than 0 because wsrep is switched off. |
| 55 | +Error 1231 Variable 'wsrep_trx_fragment_size' can't be set to the value of '2' |
| 56 | +SELECT @@wsrep_trx_fragment_unit; |
| 57 | +@@wsrep_trx_fragment_unit |
| 58 | +bytes |
| 59 | +SELECT @@wsrep_trx_fragment_size; |
| 60 | +@@wsrep_trx_fragment_size |
| 61 | +0 |
| 62 | +SET SESSION wsrep_trx_fragment_size = 0; |
| 63 | +SELECT @@wsrep_trx_fragment_unit; |
| 64 | +@@wsrep_trx_fragment_unit |
| 65 | +bytes |
| 66 | +SELECT @@wsrep_trx_fragment_size; |
| 67 | +@@wsrep_trx_fragment_size |
| 68 | +0 |
| 69 | +SET GLOBAL wsrep_on=ON; |
| 70 | +SET SESSION wsrep_trx_fragment_unit='STATEMENTS'; |
| 71 | +ERROR 42000: Variable 'wsrep_trx_fragment_unit' can't be set to the value of 'STATEMENTS' |
| 72 | +SET SESSION wsrep_trx_fragment_size = 2; |
| 73 | +ERROR 42000: Variable 'wsrep_trx_fragment_size' can't be set to the value of '2' |
| 74 | +SHOW WARNINGS; |
| 75 | +Level Code Message |
| 76 | +Warning 1231 Cannot set 'wsrep_trx_fragment_size' to a value other than 0 because streaming table mysql.wsrep_streaming_log does not exists. |
| 77 | +Error 1231 Variable 'wsrep_trx_fragment_size' can't be set to the value of '2' |
| 78 | +SELECT @@wsrep_trx_fragment_unit; |
| 79 | +@@wsrep_trx_fragment_unit |
| 80 | +bytes |
| 81 | +SELECT @@wsrep_trx_fragment_size; |
| 82 | +@@wsrep_trx_fragment_size |
| 83 | +0 |
| 84 | +SET GLOBAL wsrep_on=OFF; |
| 85 | +CREATE TABLE IF NOT EXISTS mysql.wsrep_streaming_log |
| 86 | +( |
| 87 | +node_uuid CHAR(36), |
| 88 | +trx_id BIGINT, |
| 89 | +seqno BIGINT, |
| 90 | +flags INT NOT NULL, |
| 91 | +frag LONGBLOB NOT NULL, |
| 92 | +PRIMARY KEY (node_uuid, trx_id, seqno) |
| 93 | +) ENGINE=InnoDB STATS_PERSISTENT=0 CHARSET=latin1; |
| 94 | +SET GLOBAL wsrep_on=ON; |
| 95 | +connection node_1; |
| 96 | +CREATE TABLE t1 (c INT); |
| 97 | +INSERT INTO t1 VALUES (0),(0); |
| 98 | +CREATE TABLE t2 (c INT); |
| 99 | +SET SESSION wsrep_trx_fragment_unit='STATEMENTS'; |
| 100 | +SET SESSION wsrep_trx_fragment_size=2; |
| 101 | +CREATE TRIGGER tgr AFTER INSERT ON t2 FOR EACH ROW UPDATE t1 SET c=c+1; |
| 102 | +INSERT INTO t2 VALUES (1),(2); |
| 103 | +SELECT * FROM t1; |
| 104 | +c |
| 105 | +2 |
| 106 | +2 |
| 107 | +SELECT * FROM t2; |
| 108 | +c |
| 109 | +1 |
| 110 | +2 |
| 111 | +connection node_2; |
| 112 | +INSERT INTO t2 VALUES (1),(2); |
| 113 | +SELECT * FROM t1; |
| 114 | +c |
| 115 | +4 |
| 116 | +4 |
| 117 | +SELECT * FROM t2; |
| 118 | +c |
| 119 | +1 |
| 120 | +2 |
| 121 | +1 |
| 122 | +2 |
| 123 | +connection node_1; |
| 124 | +SET wsrep_trx_fragment_unit=DEFAULT; |
| 125 | +SET GLOBAL wsrep_trx_fragment_size=DEFAULT; |
| 126 | +DROP TRIGGER tgr; |
| 127 | +DROP TABLE t1, t2; |
0 commit comments