Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/r/rpl_virtual_gcol.result |
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 master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] [connection slave] set @saved_slave_rows_search_algorithms= @@global.slave_rows_search_algorithms; SET GLOBAL slave_rows_search_algorithms= 'INDEX_SCAN,HASH_SCAN'; [connection master] CREATE TABLE gtable (doc JSON); INSERT INTO gtable (doc) VALUES ('{"id": 1, "name": "abcd efgh"}'), ('{"id": 2, "name": "abcd ijk"}'); ALTER TABLE gtable ADD COLUMN gtext JSON GENERATED ALWAYS AS (JSON_EXTRACT(doc, '$.name')) VIRTUAL; include/sync_slave_sql_with_master.inc [connection master] UPDATE gtable SET doc = JSON_SET(doc, '$.name', 'abcd lmnopqrstuvxz') WHERE JSON_EXTRACT(doc, '$.id') = 2; include/sync_slave_sql_with_master.inc [connection master] INSERT INTO gtable(doc) VALUES (NULL); include/sync_slave_sql_with_master.inc [connection master] UPDATE gtable SET doc = '{ "id": 4, "name": "abc aba" }' where doc IS NULL; include/sync_slave_sql_with_master.inc [connection master] UPDATE gtable SET doc = NULL WHERE JSON_EXTRACT(doc, '$.id') = 4; include/sync_slave_sql_with_master.inc [connection master] DROP TABLE gtable; include/sync_slave_sql_with_master.inc [connection master] CREATE TABLE gtable(id INT, doc JSON, gcol JSON AS (JSON_ARRAY(id, doc))); INSERT INTO gtable(id, doc) VALUES(10, '{"a": 1}'); include/sync_slave_sql_with_master.inc [connection master] UPDATE gtable SET doc = JSON_REPLACE(gcol, '$[0].a',"a"); include/sync_slave_sql_with_master.inc [connection master] DROP TABLE gtable; include/sync_slave_sql_with_master.inc [connection master] CREATE TABLE gtable (doc TEXT); INSERT INTO gtable (doc) VALUES ('point(1 1)'), ('point(2 2)'); ALTER TABLE gtable ADD COLUMN gtext GEOMETRY GENERATED ALWAYS AS (ST_GEOMFROMTEXT(doc)) VIRTUAL; UPDATE gtable SET doc = 'POINT(3 3)' WHERE ST_X(ST_GEOMFROMTEXT(doc)) = 2; INSERT INTO gtable(doc) VALUES (NULL); UPDATE gtable SET doc = 'POINT(4 4)' where doc IS NULL; UPDATE gtable SET doc = NULL WHERE ST_X(ST_GEOMFROMTEXT(doc)) = 4; include/sync_slave_sql_with_master.inc [connection master] DROP TABLE gtable; include/sync_slave_sql_with_master.inc [connection master] CREATE TABLE gtable(a DOUBLE, b DOUBLE AS (a * a)); INSERT INTO gtable (a) VALUES (1); include/sync_slave_sql_with_master.inc [connection master] UPDATE gtable SET a= 2; include/sync_slave_sql_with_master.inc [connection master] DROP TABLE gtable; include/sync_slave_sql_with_master.inc [connection master] CREATE TABLE gtable(geo GEOMETRY, gcol GEOMETRY AS (GEOMETRYCOLLECTION(geo, geo))); INSERT INTO gtable (geo) VALUES (POINT(1, 1)); include/sync_slave_sql_with_master.inc [connection master] UPDATE gtable SET geo = LINESTRING(POINT(1, 1), POINT(2, 2)); include/sync_slave_sql_with_master.inc [connection master] DROP TABLE gtable; include/sync_slave_sql_with_master.inc SET @slave_parallel_type_saved= @@GLOBAL.SLAVE_PARALLEL_TYPE; SET @slave_parallel_workers_saved= @@GLOBAL.SLAVE_PARALLEL_WORKERS; SET @slave_preserver_commit_order_saved= @@GLOBAL.SLAVE_PRESERVE_COMMIT_ORDER; include/stop_slave.inc SET GLOBAL slave_parallel_type= 'LOGICAL_CLOCK'; SET GLOBAL slave_parallel_workers= 4; SET GLOBAL slave_preserve_commit_order= ON; include/start_slave.inc CALL mtr.add_suppression("This version of MySQL doesn't yet support 'sorting of non-scalar JSON values'"); [connection master] CREATE TABLE gtable(id INT, jd JSON, td TEXT, gcol JSON AS (JSON_OBJECT(id,jd,JSON_KEYS(jd),td))); INSERT INTO gtable(id,jd,td) VALUES(100, '{"a":1}', 'characters'); include/sync_slave_sql_with_master.inc include/diff_tables.inc [master:gtable, slave:gtable] [connection master] UPDATE gtable SET jd = JSON_REPLACE(jd, '$[0].a',"a"); include/sync_slave_sql_with_master.inc include/diff_tables.inc [master:gtable, slave:gtable] [connection master] UPDATE gtable SET jd= JSON_SET(jd, '$.key', '["h","e","l","l","o"]'); include/sync_slave_sql_with_master.inc include/diff_tables.inc [master:gtable, slave:gtable] [connection master] DROP TABLE gtable; include/sync_slave_sql_with_master.inc SET @@global.slave_rows_search_algorithms= @saved_slave_rows_search_algorithms; include/stop_slave.inc SET @@GLOBAL.SLAVE_PARALLEL_TYPE= @slave_parallel_type_saved; SET @@GLOBAL.SLAVE_PARALLEL_WORKERS= @slave_parallel_workers_saved; SET @@GLOBAL.SLAVE_PRESERVE_COMMIT_ORDER= @slave_preserver_commit_order_saved; include/start_slave.inc include/rpl_end.inc