diff options
Diffstat (limited to 'storage/spider/mysql-test/spider/bugfix/r/mdev_20502.result')
-rw-r--r-- | storage/spider/mysql-test/spider/bugfix/r/mdev_20502.result | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_20502.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_20502.result new file mode 100644 index 00000000..e5f16b81 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_20502.result @@ -0,0 +1,85 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +this test is for MDEV-20502 + +drop and create databases +connection master_1; +CREATE DATABASE auto_test_local; +USE auto_test_local; +connection child2_1; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +id int(10) unsigned NOT NULL AUTO_INCREMENT, +val int(10) unsigned DEFAULT NULL, +PRIMARY KEY(id) +) ENGINE=Spider COMMENT='table "tbl_a", srv "s_2_1"' +INSERT INTO tbl_a (val) VALUES (1); + +test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +connection master_1; +SELECT id, 0 AS const, val FROM tbl_a; +id const val +1 0 1 +SELECT 1+2, id, 0 AS const, val, val+10, (SELECT tbl_a.val+1 FROM tbl_a) AS sq +FROM tbl_a; +1+2 id const val val+10 sq +3 1 0 1 11 2 +INSERT INTO tbl_a (val) VALUES (2), (1); +SELECT val+10, 0 AS const, val, (SELECT tbl_a.val+1 FROM tbl_a LIMIT 1) AS sq +FROM tbl_a GROUP BY val; +val+10 const val sq +11 0 1 2 +12 0 2 2 +SELECT MAX(id) AS m, 0 AS const, val, (SELECT tbl_a.val+1 FROM tbl_a LIMIT 1) AS sq +FROM tbl_a GROUP BY val; +m const val sq +3 0 1 2 +2 0 2 2 +connection child2_1; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'; +argument +select t0.`id` `id`,t0.`val` `val` from `auto_test_remote`.`tbl_a` t0 +select t0.`id` `id`,t0.`val` `val`,(t0.`val` + 10) `val+10` from `auto_test_remote`.`tbl_a` t0 +select (t0.`val` + 1) `tbl_a.val+1` from `auto_test_remote`.`tbl_a` t0 +select `id`,`val` from `auto_test_remote`.`tbl_a` order by `id` desc limit 1 for update +select (t0.`val` + 10) `val+10`,t0.`val` `val` from `auto_test_remote`.`tbl_a` t0 group by t0.`val` order by t0.`val` +select (t0.`val` + 1) `tbl_a.val+1` from `auto_test_remote`.`tbl_a` t0 limit 1 +select max(t0.`id`) `m`,t0.`val` `val` from `auto_test_remote`.`tbl_a` t0 group by t0.`val` order by t0.`val` +select (t0.`val` + 1) `tbl_a.val+1` from `auto_test_remote`.`tbl_a` t0 limit 1 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %' +SELECT id, val FROM tbl_a ORDER BY id; +id val +1 1 +2 2 +3 1 + +deinit +connection master_1; +DROP DATABASE IF EXISTS auto_test_local; +connection child2_1; +DROP DATABASE IF EXISTS auto_test_remote; +SET GLOBAL log_output = @old_log_output; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test |