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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection master]
[connection slave]
SET @saved_slave_rows_search_algorithms= @@global.slave_rows_search_algorithms;
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
CREATE TABLE t1 (i INT);
CREATE TABLE t2 (j INT NOT NULL PRIMARY KEY);
CREATE FUNCTION f1 () RETURNS INT BEGIN
UPDATE t1 SET i = 2 WHERE i = 1;
UPDATE t1 SET i = 3 WHERE i = 2;
UPDATE t1 SET i = 4 WHERE i = 3;
UPDATE t1 SET i = 5 WHERE i = 4;
UPDATE t2 SET j = 2 WHERE j = 1;
UPDATE t2 SET j = 3 WHERE j = 2;
UPDATE t2 SET j = 4 WHERE j = 3;
UPDATE t2 SET j = 5 WHERE j = 4;
RETURN 0;
END|
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'HASH_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'TABLE_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'INDEX_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'HASH_SCAN,TABLE_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'HASH_SCAN,INDEX_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'TABLE_SCAN,INDEX_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
SET GLOBAL slave_rows_search_algorithms= 'HASH_SCAN,TABLE_SCAN,INDEX_SCAN';
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
[connection master]
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT f1();
f1()
0
include/sync_slave_sql_with_master.inc
include/assert.inc ['There is only one row in table t1']
include/assert.inc ['There is only one row in table t2']
[connection master]
include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:test.t2, slave:test.t2]
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
include/sync_slave_sql_with_master.inc
[connection master]
DROP FUNCTION f1;
DROP TABLE t1,t2;
[connection slave]
SET GLOBAL slave_rows_search_algorithms= @saved_slave_rows_search_algorithms;
Warnings:
Warning 1287 '@@slave_rows_search_algorithms' is deprecated and will be removed in a future release.
include/rpl_end.inc
|