From e1c78f239c2e6418da0b6180c11cf82105774ae9 Mon Sep 17 00:00:00 2001 From: Hangjie Mo Date: Wed, 25 Dec 2024 17:35:15 +0800 Subject: [PATCH] tests: update `mysql-tester` and fix some syntax problem (#58464) --- tests/integrationtest/r/ddl/db_change.result | 2 +- .../r/ddl/db_integration.result | 2 +- .../integrationtest/r/ddl/db_partition.result | 20 ++++++------- tests/integrationtest/r/ddl/db_table.result | 6 ++-- .../integrationtest/r/ddl/foreign_key.result | 4 +-- tests/integrationtest/r/ddl/partition.result | 4 +-- .../r/executor/aggregate.result | 2 +- .../integrationtest/r/executor/delete.result | 4 +-- .../r/executor/executor.result | 12 ++++---- tests/integrationtest/r/executor/grant.result | 4 +-- .../integrationtest/r/executor/issues.result | 30 +++++++++---------- .../r/executor/password_management.result | 4 +-- .../integrationtest/r/executor/sample.result | 2 +- tests/integrationtest/r/executor/show.result | 4 +-- .../integrationtest/r/executor/simple.result | 2 +- .../r/explain_complex_stats.result | 2 +- .../r/expression/builtin.result | 18 +++++------ .../r/expression/issues.result | 2 +- .../planner/core/casetest/index/index.result | 2 +- .../core/casetest/pushdown/push_down.result | 2 +- .../r/planner/core/integration.result | 2 +- .../core/memtable_predicate_extractor.result | 4 +-- .../r/session/clustered_index.result | 16 +++++----- tests/integrationtest/r/tpch.result | 4 +-- tests/integrationtest/r/types/const.result | 18 +++++------ tests/integrationtest/run-tests.sh | 2 +- tests/integrationtest/t/ddl/db_change.test | 2 +- tests/integrationtest/t/executor/delete.test | 4 +-- tests/integrationtest/t/executor/sample.test | 2 +- .../t/explain_complex_stats.test | 2 +- .../integrationtest/t/expression/builtin.test | 2 +- .../t/planner/core/casetest/index/index.test | 2 +- .../core/casetest/pushdown/push_down.test | 2 +- .../t/planner/core/integration.test | 2 +- tests/integrationtest/t/tpch.test | 4 +-- 35 files changed, 98 insertions(+), 98 deletions(-) diff --git a/tests/integrationtest/r/ddl/db_change.result b/tests/integrationtest/r/ddl/db_change.result index 964bf8a9e3c69..0a17177a1c460 100644 --- a/tests/integrationtest/r/ddl/db_change.result +++ b/tests/integrationtest/r/ddl/db_change.result @@ -50,4 +50,4 @@ alter table t modify column c timestamp not null; select floor((unix_timestamp() - unix_timestamp(c)) / 2) from t; floor((unix_timestamp() - unix_timestamp(c)) / 2) 0 -set @@time_zone='SYSTEM' +set @@time_zone='SYSTEM'; diff --git a/tests/integrationtest/r/ddl/db_integration.result b/tests/integrationtest/r/ddl/db_integration.result index e49534d1601d7..816118f1c99ab 100644 --- a/tests/integrationtest/r/ddl/db_integration.result +++ b/tests/integrationtest/r/ddl/db_integration.result @@ -805,7 +805,7 @@ alter table t1 alter index a invisible; Error 3522 (HY000): A primary key index cannot be invisible create table t2(a int, primary key(a)); alter table t2 alter index PRIMARY invisible; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 34 near "PRIMARY invisible;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 34 near "PRIMARY invisible" create table t3(a int NOT NULL, b int); alter table t3 add index idx((a+b)); select distinct index_name, is_visible from information_schema.statistics where table_schema = 'ddl__db_integration' and table_name = 't3' order by index_name; diff --git a/tests/integrationtest/r/ddl/db_partition.result b/tests/integrationtest/r/ddl/db_partition.result index fb359b6f234d0..7befa7c797977 100644 --- a/tests/integrationtest/r/ddl/db_partition.result +++ b/tests/integrationtest/r/ddl/db_partition.result @@ -302,7 +302,7 @@ partition p1 values in ((3,'a'),(4,'b')), partition p3 values in ((5,null)) ); create table t (a int) partition by list (a) (partition p0 values in (default), partition p1 values in (maxvalue)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 112 near "maxvalue));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 112 near "maxvalue))" alter table t add partition ( partition p4 values in ((7,'a')), partition p5 values in ((8,'a'))); @@ -311,19 +311,19 @@ partition pDef values in (10, default)); Error 1653 (HY000): Inconsistency in usage of column lists for partitioning alter table t add partition ( partition pDef values in ((10, default))); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 40 near ")));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 40 near ")))" alter table t add partition ( partition pDef values in (default, 10)); Error 1653 (HY000): Inconsistency in usage of column lists for partitioning alter table t add partition ( partition pDef values in ((default, 10))); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 36 near ", 10)));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 36 near ", 10)))" alter table t add partition ( partition pDef values in ((9,'a'), (default, 10, 'q')); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 45 near ", 10, 'q'));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 45 near ", 10, 'q'))" alter table t add partition ( partition pDef values in ((9,'a'), (10, default, 'q')); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 49 near ", 'q'));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 49 near ", 'q'))" alter table t add partition ( partition pDef values in (default)); alter table t add partition ( @@ -340,7 +340,7 @@ alter table t add partition ( partition pDef values in ((9, 'c'), default)); alter table t add partition ( partition pDef values in ((9, 'c'), (default))); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 46 near ")));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 46 near ")))" alter table t drop partition pDef; alter table t add partition ( partition pDef values in (default, (9,'c'))); @@ -355,7 +355,7 @@ alter table t add partition ( partition pDef values in ((9,'d'), default, (10, 'd'))); alter table t add partition ( partition pDef values in ((9,'a'), (10, default, 'q')); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 49 near ", 'q'));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 2 column 49 near ", 'q'))" show create table t; Table Create Table t CREATE TABLE `t` ( @@ -657,13 +657,13 @@ Error 1526 (HY000): Table has no partition for value from column_list set @@tidb_partition_prune_mode = default; drop table if exists t; create table t (a int) partition by range (a) (partition p0 values less than (default)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 86 near "));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 86 near "))" create table t (a int) partition by range (a) (partition p0 values less than ("default")); Error 1697 (HY000): VALUES value for partition 'p0' must have type INT create table t (a varchar(55)) partition by range columns (a) (partition p0 values less than ("default")); drop table t; create table t (a varchar(55)) partition by range columns (a) (partition p0 values less than (default)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 102 near "));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 102 near "))" create table t (a varchar(55)) partition by range columns (a) (partition p0 default); Error 1480 (HY000): Only LIST PARTITIONING can use VALUES IN in partition definition create table t (a varchar(55)) partition by list columns (a) (partition p0 default); @@ -687,7 +687,7 @@ PARTITION BY LIST (`a`) (PARTITION `p0` DEFAULT) drop table t; create table t (a int) partition by list (a) (partition p0 values in ()); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 71 near "));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 71 near "))" drop table if exists t; create table t (id int) partition by list (id) ( partition p0 values in (1,2), diff --git a/tests/integrationtest/r/ddl/db_table.result b/tests/integrationtest/r/ddl/db_table.result index 0d679a8742989..bbdae60f13d53 100644 --- a/tests/integrationtest/r/ddl/db_table.result +++ b/tests/integrationtest/r/ddl/db_table.result @@ -68,12 +68,12 @@ c1 int(11), c2 decimal(16,4) GENERATED ALWAYS AS ((case when (c0 = 0) then 0when (c0 > 0) then (c1 / c0) end)) ); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 4 column 83 near "then (c1 / c0) end)) -);" +)" create table t (a bigint, b int, c int generated always as (b+1)) partition by hash(a) partitions 4; alter table t drop column a; Error 3855 (HY000): Column 'a' has a partitioning function dependency and cannot be dropped or renamed alter table t modify column c int GENERATED ALWAYS AS ((case when (a = 0) then 0when (a > 0) then (b / a) end)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 97 near "then (b / a) end));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 97 near "then (b / a) end))" alter table t add column d int GENERATED ALWAYS AS ((case when (a = 0) then 0when (a > 0) then (b / a) end)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 94 near "then (b / a) end));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 94 near "then (b / a) end))" drop table if exists t; diff --git a/tests/integrationtest/r/ddl/foreign_key.result b/tests/integrationtest/r/ddl/foreign_key.result index 40aec792188d6..0d3a86cdb6c64 100644 --- a/tests/integrationtest/r/ddl/foreign_key.result +++ b/tests/integrationtest/r/ddl/foreign_key.result @@ -230,7 +230,7 @@ drop table if exists child, parent; create table parent (ref int, key(ref)); create table child (ref int, constraint fk1 foreign key(ref) references parent(ref)); alter table child drop foreign key if exists fk2; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 37 near "if exists fk2;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 37 near "if exists fk2" alter table child drop foreign key if exists fk1; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 37 near "if exists fk1;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 37 near "if exists fk1" drop database test1; diff --git a/tests/integrationtest/r/ddl/partition.result b/tests/integrationtest/r/ddl/partition.result index 0fecd412ae507..b1831d5a9e842 100644 --- a/tests/integrationtest/r/ddl/partition.result +++ b/tests/integrationtest/r/ddl/partition.result @@ -389,7 +389,7 @@ CREATE TABLE tp1 (id int) PARTITION BY RANGE (id) (PARTITION `P_LT_100` VALUES L PARTITION `P_LT_200` VALUES LESS THAN (200), PARTITION `P_LT_300` VALUES LESS THAN (300), PARTITION `P_LT_400` VALUES LESS THAN (400), - PARTITION `P_LT_500` VALUES LESS THAN (500)); + PARTITION `P_LT_500` VALUES LESS THAN (500)) drop table tp1; create table tp1(id int); ALTER TABLE tp1 PARTITION BY RANGE (id) INTERVAL (100) FIRST PARTITION LESS THAN (200) LAST PARTITION LESS THAN (600); @@ -399,7 +399,7 @@ ALTER TABLE tp1 PARTITION BY RANGE (id) (PARTITION `P_LT_200` VALUES LESS THAN ( PARTITION `P_LT_300` VALUES LESS THAN (300), PARTITION `P_LT_400` VALUES LESS THAN (400), PARTITION `P_LT_500` VALUES LESS THAN (500), - PARTITION `P_LT_600` VALUES LESS THAN (600)); + PARTITION `P_LT_600` VALUES LESS THAN (600)) drop table tp1; DROP TABLE IF EXISTS t; CREATE TABLE t (a int NOT NULL, b varchar(20) NOT NULL, c datetime NOT NULL ) PARTITION BY RANGE COLUMNS (c) INTERVAL (1 MINUTE) FIRST PARTITION LESS THAN ('2024-01-01') LAST PARTITION LESS THAN ('2024-01-01 00:10:00'); diff --git a/tests/integrationtest/r/executor/aggregate.result b/tests/integrationtest/r/executor/aggregate.result index 4de3e447d9a7d..f712e18fe6efd 100644 --- a/tests/integrationtest/r/executor/aggregate.result +++ b/tests/integrationtest/r/executor/aggregate.result @@ -700,7 +700,7 @@ select approx_count_distinct(c,d) from t; approx_count_distinct(c,d) 5 select count(c,d) from t; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 15 near ",d) from t;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 15 near ",d) from t" select d*2 as ee, sum(c) from t group by ee order by ee; ee sum(c) 2 2 diff --git a/tests/integrationtest/r/executor/delete.result b/tests/integrationtest/r/executor/delete.result index df17c80ebc7a0..9bf6bac35298f 100644 --- a/tests/integrationtest/r/executor/delete.result +++ b/tests/integrationtest/r/executor/delete.result @@ -114,14 +114,14 @@ delete from t where cast(id as unsigned) = 1; Error 1690 (22003): BIGINT value is out of range in '18446744073709551616' update t set id = '1' where cast(id as unsigned) = 1; Error 1690 (22003): BIGINT value is out of range in '18446744073709551616' -set sql_mode='' +set sql_mode=''; delete from t where cast(id as unsigned) = 1; Level Code Message Warning 1292 Truncated incorrect INTEGER value: '18446744073709551616' update t set id = '1' where cast(id as unsigned) = 1; Level Code Message Warning 1292 Truncated incorrect INTEGER value: '18446744073709551616' -set sql_mode=DEFAULT +set sql_mode=DEFAULT; drop table if exists parent, child; create table parent (a int primary key); create table child (a int, foreign key (a) references parent(a)); diff --git a/tests/integrationtest/r/executor/executor.result b/tests/integrationtest/r/executor/executor.result index f998336193202..020195558b87a 100644 --- a/tests/integrationtest/r/executor/executor.result +++ b/tests/integrationtest/r/executor/executor.result @@ -1283,7 +1283,7 @@ select * from select_limit limit 18446744073709551615 offset 3; id name 4 hello select * from select_limit limit 18446744073709551616 offset 3; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 53 near "18446744073709551616 offset 3;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 53 near "18446744073709551616 offset 3" drop table if exists select_order_test; create table select_order_test(id int not null default 1, name varchar(255), PRIMARY KEY(id)); insert INTO select_order_test VALUES (1, "hello"); @@ -3142,9 +3142,9 @@ select c > a from t; c > a 0 load stats; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 11 near ";" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 10 near "" load stats ./xxx.json; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 12 near "./xxx.json;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 12 near "./xxx.json" drop database if exists test_show; create database test_show; use test_show; @@ -3526,7 +3526,7 @@ Error 1406 (22001): Data too long for column 'c1' at row 1 insert into t values ('123'); insert into t values ('1234'); insert into t values ('12345); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 30 near "'12345);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 29 near "'12345)" drop table if exists t; create table t (c1 bit(62)); insert into t values ('12345678'); @@ -3616,7 +3616,7 @@ create table t2(a int, b int, c int); insert into t2 values (11, 8, (select not b)); Error 1054 (42S22): Unknown column 'b' in 'field list' insert into t2 set a = 11, b = 8, c = (select b)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 49 near ");" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 49 near ")" insert into t2 values(1, 1, (select b from t2)); select * from t2; a b c @@ -4086,7 +4086,7 @@ admin show bdr role; BDR_ROLE admin set bdr role test_err; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 27 near "test_err;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 27 near "test_err" admin show bdr role; BDR_ROLE diff --git a/tests/integrationtest/r/executor/grant.result b/tests/integrationtest/r/executor/grant.result index 23970bcec9e62..b8872d786c920 100644 --- a/tests/integrationtest/r/executor/grant.result +++ b/tests/integrationtest/r/executor/grant.result @@ -184,9 +184,9 @@ Error 1105 (HY000): Duplicate require ISSUER clause CREATE USER 'u9'@'%' require subject '/CN=TiDB\OU=PingCAP' subject '/CN=TiDB\OU=PingCAP2'; Error 1105 (HY000): Duplicate require SUBJECT clause CREATE USER 'u9'@'%' require ssl ssl; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 36 near "ssl;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 36 near "ssl" CREATE USER 'u9'@'%' require x509 x509; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 38 near "x509;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 38 near "x509" drop user if exists 'maint_auth_str1'@'%'; CREATE USER 'maint_auth_str1'@'%' IDENTIFIED BY 'foo'; SELECT authentication_string FROM mysql.user WHERE `Host` = '%' and `User` = 'maint_auth_str1'; diff --git a/tests/integrationtest/r/executor/issues.result b/tests/integrationtest/r/executor/issues.result index 90fbd3efcd6d0..601dd844ae771 100644 --- a/tests/integrationtest/r/executor/issues.result +++ b/tests/integrationtest/r/executor/issues.result @@ -899,43 +899,43 @@ TOTAL_SPLIT_REGION SCATTER_FINISH_RATIO 203 1 analyze table pt; set @@tidb_distsql_scan_concurrency = default; -explain analyze select * from t order by id; # expected distsql concurrency 2 +explain analyze select * from t order by id; id estRows actRows task access object execution info operator info memory disk TableReader_11 256.00 root NULL max_distsql_concurrency: 2 NULL └─TableFullScan_10 256.00 cop[tikv] table:t NULL keep order:true -explain analyze select * from t limit 100; # expected distsql concurrency 1 +explain analyze select * from t limit 100; id estRows actRows task access object execution info operator info memory disk Limit_7 100.00 root NULL NULL offset:0, count:100 └─TableReader_11 100.00 root NULL max_distsql_concurrency: 1 NULL └─Limit_10 100.00 cop[tikv] NULL NULL offset:0, count:100 └─TableFullScan_9 100.00 cop[tikv] table:t NULL keep order:false -explain analyze select * from t limit 100000; # expected distsql concurrency 15 +explain analyze select * from t limit 100000; id estRows actRows task access object execution info operator info memory disk Limit_7 256.00 root NULL NULL offset:0, count:100000 └─TableReader_11 256.00 root NULL max_distsql_concurrency: 15 NULL └─Limit_10 256.00 cop[tikv] NULL NULL offset:0, count:100000 └─TableFullScan_9 256.00 cop[tikv] table:t NULL keep order:false -explain analyze select * from t where c = 'abc' limit 100; # expected distsql concurrency 15 +explain analyze select * from t where c = 'abc' limit 100; id estRows actRows task access object execution info operator info memory disk Limit_8 0.26 root NULL NULL offset:0, count:100 └─TableReader_13 0.26 root NULL max_distsql_concurrency: 15 NULL └─Limit_12 0.26 cop[tikv] NULL NULL offset:0, count:100 └─Selection_11 0.26 cop[tikv] NULL NULL eq(executor__issues.t.c, "abc") └─TableFullScan_10 256.00 cop[tikv] table:t NULL keep order:false, stats:partial[c:unInitialized] -explain analyze select * from t where c = 'abc' limit 100000; # expected distsql concurrency 15 +explain analyze select * from t where c = 'abc' limit 100000; id estRows actRows task access object execution info operator info memory disk Limit_8 0.26 root NULL NULL offset:0, count:100000 └─TableReader_13 0.26 root NULL max_distsql_concurrency: 15 NULL └─Limit_12 0.26 cop[tikv] NULL NULL offset:0, count:100000 └─Selection_11 0.26 cop[tikv] NULL NULL eq(executor__issues.t.c, "abc") └─TableFullScan_10 256.00 cop[tikv] table:t NULL keep order:false, stats:partial[c:unInitialized] -explain analyze select * from t order by id limit 100; # expected distsql concurrency 1 +explain analyze select * from t order by id limit 100; id estRows actRows task access object execution info operator info memory disk Limit_10 100.00 root NULL NULL offset:0, count:100 └─TableReader_17 100.00 root NULL max_distsql_concurrency: 1 NULL └─Limit_16 100.00 cop[tikv] NULL NULL offset:0, count:100 └─TableFullScan_15 100.00 cop[tikv] table:t NULL keep order:true -explain analyze select * from t order by id limit 100000; # expected distsql concurrency 15 +explain analyze select * from t order by id limit 100000; id estRows actRows task access object execution info operator info memory disk Limit_11 256.00 root NULL NULL offset:0, count:100000 └─TableReader_21 256.00 root NULL max_distsql_concurrency: 15 NULL @@ -951,49 +951,49 @@ Limit_11 0.26 root NULL NULL offset:0, count:100 select @@tidb_partition_prune_mode; @@tidb_partition_prune_mode dynamic -explain analyze select * from pt order by id; # expected distsql concurrency 2 +explain analyze select * from pt order by id; id estRows actRows task access object execution info operator info memory disk TableReader_11 256.00 root partition:all max_distsql_concurrency: 2 NULL └─TableFullScan_10 256.00 cop[tikv] table:pt NULL keep order:true -explain analyze select * from pt limit 100; # expected distsql concurrency 7 +explain analyze select * from pt limit 100; id estRows actRows task access object execution info operator info memory disk Limit_7 100.00 root NULL NULL offset:0, count:100 └─TableReader_11 100.00 root partition:all max_distsql_concurrency: 7 NULL └─Limit_10 100.00 cop[tikv] NULL NULL offset:0, count:100 └─TableFullScan_9 100.00 cop[tikv] table:pt NULL keep order:false -explain analyze select * from pt limit 100000; # expected distsql concurrency 15 +explain analyze select * from pt limit 100000; id estRows actRows task access object execution info operator info memory disk Limit_7 256.00 root NULL NULL offset:0, count:100000 └─TableReader_11 256.00 root partition:all max_distsql_concurrency: 15 NULL └─Limit_10 256.00 cop[tikv] NULL NULL offset:0, count:100000 └─TableFullScan_9 256.00 cop[tikv] table:pt NULL keep order:false -explain analyze select * from pt where val = 125 limit 100; # expected distsql concurrency 15 +explain analyze select * from pt where val = 125 limit 100; id estRows actRows task access object execution info operator info memory disk Limit_8 100.00 root NULL NULL offset:0, count:100 └─TableReader_13 100.00 root partition:all max_distsql_concurrency: 15 NULL └─Limit_12 100.00 cop[tikv] NULL NULL offset:0, count:100 └─Selection_11 100.00 cop[tikv] NULL NULL eq(executor__issues.pt.val, 125) └─TableFullScan_10 125.00 cop[tikv] table:pt NULL keep order:false, stats:partial[val:missing] -explain analyze select * from pt where val = 125 limit 100000; # expected distsql concurrency 15 +explain analyze select * from pt where val = 125 limit 100000; id estRows actRows task access object execution info operator info memory disk Limit_8 204.80 root NULL NULL offset:0, count:100000 └─TableReader_13 204.80 root partition:all max_distsql_concurrency: 15 NULL └─Limit_12 204.80 cop[tikv] NULL NULL offset:0, count:100000 └─Selection_11 204.80 cop[tikv] NULL NULL eq(executor__issues.pt.val, 125) └─TableFullScan_10 256.00 cop[tikv] table:pt NULL keep order:false, stats:partial[val:missing] -explain analyze select * from pt order by id limit 100; # expected distsql concurrency 7, but currently get 1, see issue #55190 +explain analyze select * from pt order by id limit 100; id estRows actRows task access object execution info operator info memory disk Limit_10 100.00 root NULL NULL offset:0, count:100 └─TableReader_17 100.00 root partition:all max_distsql_concurrency: 1 NULL └─Limit_16 100.00 cop[tikv] NULL NULL offset:0, count:100 └─TableFullScan_15 100.00 cop[tikv] table:pt NULL keep order:true -explain analyze select * from pt order by id limit 100000; # expected distsql concurrency 15 +explain analyze select * from pt order by id limit 100000; id estRows actRows task access object execution info operator info memory disk Limit_11 256.00 root NULL NULL offset:0, count:100000 └─TableReader_21 256.00 root partition:all max_distsql_concurrency: 15 NULL └─Limit_20 256.00 cop[tikv] NULL NULL offset:0, count:100000 └─TableFullScan_19 256.00 cop[tikv] table:pt NULL keep order:true -explain analyze select * from pt where val = 126 order by id limit 100; # expected distsql concurrency 15 +explain analyze select * from pt where val = 126 order by id limit 100; id estRows actRows task access object execution info operator info memory disk Limit_11 100.00 root NULL NULL offset:0, count:100 └─TableReader_20 100.00 root partition:all max_distsql_concurrency: 15 NULL diff --git a/tests/integrationtest/r/executor/password_management.result b/tests/integrationtest/r/executor/password_management.result index 9dc758299b42f..4da711c2140bd 100644 --- a/tests/integrationtest/r/executor/password_management.result +++ b/tests/integrationtest/r/executor/password_management.result @@ -336,9 +336,9 @@ Password_reuse_history Password_reuse_time 5 6 drop USER testReuse; CREATE USER testReuse PASSWORD HISTORY -5; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "-5;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "-5" CREATE USER testReuse PASSWORD REUSE INTERVAL -6 DAY; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 47 near "-6 DAY;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 47 near "-6 DAY" CREATE USER testReuse PASSWORD HISTORY 65535 PASSWORD REUSE INTERVAL 65535 DAY; SELECT Password_reuse_history,Password_reuse_time FROM mysql.user WHERE user = 'testReuse'; Password_reuse_history Password_reuse_time diff --git a/tests/integrationtest/r/executor/sample.result b/tests/integrationtest/r/executor/sample.result index 013d426567e15..3db85675637c4 100644 --- a/tests/integrationtest/r/executor/sample.result +++ b/tests/integrationtest/r/executor/sample.result @@ -1,4 +1,4 @@ -set @@global.tidb_scatter_region='table' +set @@global.tidb_scatter_region='table'; drop table if exists t; set tidb_enable_clustered_index = on; create table t (a varchar(255) primary key, b bigint); diff --git a/tests/integrationtest/r/executor/show.result b/tests/integrationtest/r/executor/show.result index 16df96b9c74e7..219a543d797d0 100644 --- a/tests/integrationtest/r/executor/show.result +++ b/tests/integrationtest/r/executor/show.result @@ -552,10 +552,10 @@ select 1; 1 1 create invalid; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 14 near "invalid;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 14 near "invalid" show errors; Level Code Message -Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 14 near "invalid;" +Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 14 near "invalid" show tables; Error 1046 (3D000): No database selected show tables; diff --git a/tests/integrationtest/r/executor/simple.result b/tests/integrationtest/r/executor/simple.result index 783c513271996..377bc8534df6c 100644 --- a/tests/integrationtest/r/executor/simple.result +++ b/tests/integrationtest/r/executor/simple.result @@ -260,7 +260,7 @@ ALTER USER CURRENT_USER IDENTIFIED BY 'zzz'; ALTER USER 'issue17247'@'%' IDENTIFIED BY 'kkk'; ALTER USER 'issue17247'@'%' IDENTIFIED BY PASSWORD '*B50FBDB37F1256824274912F2A1CE648082C3F1F'; ALTER USER USER() IDENTIFIED BY PASSWORD '*B50FBDB37F1256824274912F2A1CE648082C3F1F'; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "PASSWORD '*B50FBDB37F1256824274912F2A1CE648082C3F1F';" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "PASSWORD '*B50FBDB37F1256824274912F2A1CE648082C3F1F'" drop table if exists t; do 1, @a:=1; select @a; diff --git a/tests/integrationtest/r/explain_complex_stats.result b/tests/integrationtest/r/explain_complex_stats.result index 9183896d7aefb..6c74d0bea6c0b 100644 --- a/tests/integrationtest/r/explain_complex_stats.result +++ b/tests/integrationtest/r/explain_complex_stats.result @@ -245,4 +245,4 @@ HashAgg 18000.00 root group by:Column#32, funcs:sum(Column#31)->Column#30 │ └─TableFullScan 2000.00 cop[tikv] table:tbl_008 keep order:false └─TableReader 2000.00 root data:TableFullScan └─TableFullScan 2000.00 cop[tikv] table:tbl_009 keep order:false -set @@sql_mode=default +set @@sql_mode=default; diff --git a/tests/integrationtest/r/expression/builtin.result b/tests/integrationtest/r/expression/builtin.result index d1e0adb5f4064..614ea719ceef5 100644 --- a/tests/integrationtest/r/expression/builtin.result +++ b/tests/integrationtest/r/expression/builtin.result @@ -1582,7 +1582,7 @@ Error 1690 (22003): BIGINT UNSIGNED value is out of range in '(92233720368547758 select 1 / '2007' div 1; 1 / '2007' div 1 0 -set sql_mode=default +set sql_mode=default; DROP TABLE IF EXISTS table_string; CREATE TABLE table_string(a CHAR(20), b VARCHAR(20), c TINYTEXT, d TEXT(20), e MEDIUMTEXT, f LONGTEXT, g BIGINT); INSERT INTO table_string (a, b, c, d, e, f, g) VALUES ('a', 'b', 'c', 'd', 'e', 'f', 2); @@ -3340,31 +3340,31 @@ SELECT MID('abc',2); MID('abc',2) bc SELECT CURRENT_TIME(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 21 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 21 near "-1)" SELECT CURRENT_TIME(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'current_time'. Maximum is 6. SELECT CURRENT_TIME(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT CURRENT_TIMESTAMP(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 26 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 26 near "-1)" SELECT CURRENT_TIMESTAMP(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'current_timestamp'. Maximum is 6. SELECT CURRENT_TIMESTAMP(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT CURTIME(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "-1)" SELECT CURTIME(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'curtime'. Maximum is 6. SELECT CURTIME(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT LOCALTIME(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 18 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 18 near "-1)" SELECT LOCALTIME(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'localtime'. Maximum is 6. SELECT LOCALTIME(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT LOCALTIMESTAMP(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 23 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 23 near "-1)" SELECT LOCALTIMESTAMP(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'localtimestamp'. Maximum is 6. SELECT LOCALTIMESTAMP(2147483648); @@ -3376,19 +3376,19 @@ Error 1426 (42000): Too-big precision 2147483647 specified for 'now'. Maximum is SELECT NOW(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT SYSDATE(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "-1)" SELECT SYSDATE(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'sysdate'. Maximum is 6. SELECT SYSDATE(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT UTC_TIME(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 17 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 17 near "-1)" SELECT UTC_TIME(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'utc_time'. Maximum is 6. SELECT UTC_TIME(2147483648); Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use SELECT UTC_TIMESTAMP(-1); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 22 near "-1);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 22 near "-1)" SELECT UTC_TIMESTAMP(2147483647); Error 1426 (42000): Too-big precision 2147483647 specified for 'utc_timestamp'. Maximum is 6. SELECT UTC_TIMESTAMP(2147483648); diff --git a/tests/integrationtest/r/expression/issues.result b/tests/integrationtest/r/expression/issues.result index f9d88b654e683..7c2d3e94cdae6 100644 --- a/tests/integrationtest/r/expression/issues.result +++ b/tests/integrationtest/r/expression/issues.result @@ -1378,7 +1378,7 @@ select .78$123; $123 0.78 select .78$421+1; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 15 near "+1;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 15 near "+1" select t. `r10` > 3 from t; t. `r10` > 3 1 diff --git a/tests/integrationtest/r/planner/core/casetest/index/index.result b/tests/integrationtest/r/planner/core/casetest/index/index.result index 2609b55e36898..d3128f1864959 100644 --- a/tests/integrationtest/r/planner/core/casetest/index/index.result +++ b/tests/integrationtest/r/planner/core/casetest/index/index.result @@ -816,7 +816,7 @@ HashJoin 12.50 root inner join, equal:[eq(planner__core__casetest__index__index └─TableReader(Probe) 7992.00 root data:Selection └─Selection 7992.00 cop[tikv] not(isnull(planner__core__casetest__index__index.t1.a)), not(istrue_with_null(json_memberof(cast(6252179388429456273, json BINARY), planner__core__casetest__index__index.t1.c))) └─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -SHOW WARNINGS +SHOW WARNINGS; Level Code Message Warning 1815 Optimizer Hint /*+ INL_JOIN(t1) */ or /*+ TIDB_INLJ(t1) */ is inapplicable DROP table if exists t; diff --git a/tests/integrationtest/r/planner/core/casetest/pushdown/push_down.result b/tests/integrationtest/r/planner/core/casetest/pushdown/push_down.result index 75d49d4c5593f..c5fac3fad6a15 100644 --- a/tests/integrationtest/r/planner/core/casetest/pushdown/push_down.result +++ b/tests/integrationtest/r/planner/core/casetest/pushdown/push_down.result @@ -253,7 +253,7 @@ KEY `idx_2` (`col_1`(5)), UNIQUE KEY `idx_3` (`col_1`(5)), KEY `idx_4` (`col_1`(4)) ) ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_chinese_ci; -explain select 1, r0 as col_754 from ( select format(t4a8656d1.col_74, 1) as r0 from t4a8656d1 join tld47bc815 on t4a8656d1.col_74 = tld47bc815.col_1 where JSON_OVERLAPS(t4a8656d1.col_73, '[0.035131302371695955]') group by t4a8656d1.col_74, t4a8656d1.col_73 ) as subquery where IsNull(subquery.r0) +explain select 1, r0 as col_754 from ( select format(t4a8656d1.col_74, 1) as r0 from t4a8656d1 join tld47bc815 on t4a8656d1.col_74 = tld47bc815.col_1 where JSON_OVERLAPS(t4a8656d1.col_73, '[0.035131302371695955]') group by t4a8656d1.col_74, t4a8656d1.col_73 ) as subquery where IsNull(subquery.r0); id estRows task access object operator info Projection_14 6.40 root 1->Column#10, Column#9 └─Projection_15 6.40 root format(cast(planner__core__casetest__pushdown__push_down.t4a8656d1.col_74, double BINARY), 1)->Column#9 diff --git a/tests/integrationtest/r/planner/core/integration.result b/tests/integrationtest/r/planner/core/integration.result index ba2ed8060bfc2..f090176e415b0 100644 --- a/tests/integrationtest/r/planner/core/integration.result +++ b/tests/integrationtest/r/planner/core/integration.result @@ -2090,7 +2090,7 @@ b b1 2 22 c c1 3 33 drop database cluster_idx_unique_double_read; set @@tidb_enable_clustered_index = DEFAULT; -use planner__core__integration +use planner__core__integration; drop table if exists t, t2; set @@tidb_enable_clustered_index = 'ON'; create table t(a int, b int, c int, primary key(a, b)); diff --git a/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result b/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result index 3e8ab443908e7..3e7f67279d585 100644 --- a/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result +++ b/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result @@ -34,9 +34,9 @@ describe t ID; Field Type Null Key Default Extra id int YES NULL describe t 'I%'; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 15 near "'I%';" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 15 near "'I%'" describe t I%; -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "%;" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 13 near "%" show columns from t like 'abctime'; Field Type Null Key Default Extra abctime int YES NULL diff --git a/tests/integrationtest/r/session/clustered_index.result b/tests/integrationtest/r/session/clustered_index.result index e51010810a0d8..2f741e4d15888 100644 --- a/tests/integrationtest/r/session/clustered_index.result +++ b/tests/integrationtest/r/session/clustered_index.result @@ -521,13 +521,13 @@ select tidb_pk_type from information_schema.tables where table_schema = 'session tidb_pk_type CLUSTERED create table t (a varchar(255) unique key clustered); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 51 near "clustered);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 51 near "clustered)" create table t (a varchar(255), foreign key (a) reference t1(a) clustered); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "reference t1(a) clustered);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "reference t1(a) clustered)" create table t (a varchar(255), foreign key (a) clustered reference t1(a)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "clustered reference t1(a));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "clustered reference t1(a))" create table t (a varchar(255) clustered); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "clustered);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "clustered)" create table t (a varchar(255), unique key(a) clustered); Error 8200 (HY000): CLUSTERED/NONCLUSTERED keyword is only supported for primary key create table t (a varchar(255), unique key(a) nonclustered); @@ -616,13 +616,13 @@ select tidb_pk_type from information_schema.tables where table_schema = 'session tidb_pk_type CLUSTERED create table t (a varchar(255) unique key clustered); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 51 near "clustered);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 51 near "clustered)" create table t (a varchar(255), foreign key (a) reference t1(a) clustered); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "reference t1(a) clustered);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "reference t1(a) clustered)" create table t (a varchar(255), foreign key (a) clustered reference t1(a)); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "clustered reference t1(a));" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 57 near "clustered reference t1(a))" create table t (a varchar(255) clustered); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "clustered);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "clustered)" create table t (a varchar(255), unique key(a) clustered); Error 8200 (HY000): CLUSTERED/NONCLUSTERED keyword is only supported for primary key create table t (a varchar(255), unique key(a) nonclustered); diff --git a/tests/integrationtest/r/tpch.result b/tests/integrationtest/r/tpch.result index faaab7cd997da..905849349a4f5 100644 --- a/tests/integrationtest/r/tpch.result +++ b/tests/integrationtest/r/tpch.result @@ -125,7 +125,7 @@ This query finds which supplier should be selected to place an order for a given The Minimum Cost Supplier Query finds, in a given region, for each part of a certain type and size, the supplier who can supply it at minimum cost. If several suppliers in that region offer the desired part type and size at the same (minimum) cost, the query lists the parts from suppliers with the 100 highest account balances. For each supplier, -the query lists the supplier's account balance, name and nation; the part's number and manufacturer; the supplier's +the query lists the supplier's account balance, name and nation, the part's number and manufacturer, the supplier's address, phone number and comment information. Planner enhancement: join reorder. */ @@ -1102,7 +1102,7 @@ HashAgg 1.00 root funcs:sum(Column#28)->Column#27 Q20 Potential Part Promotion Query The Potential Part Promotion Query identifies suppliers in a particular nation having selected parts that may be candidates for a promotional offer. -The Potential Part Promotion query identifies suppliers who have an excess of a given part available; an excess is +The Potential Part Promotion query identifies suppliers who have an excess of a given part available, an excess is defined to be more than 50% of the parts like the given part that the supplier shipped in a given year for a given nation. Only parts whose names share a certain naming convention are considered. */ diff --git a/tests/integrationtest/r/types/const.result b/tests/integrationtest/r/types/const.result index b3e9ba87ddb48..24798b975091b 100644 --- a/tests/integrationtest/r/types/const.result +++ b/tests/integrationtest/r/types/const.result @@ -178,7 +178,7 @@ DROP TABLE COUNT; CREATE TABLE `COUNT` (a bigint); DROP TABLE COUNT; CREATE TABLE COUNT(a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 18 near "COUNT(a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 18 near "COUNT(a bigint)" CREATE TABLE types__const.COUNT(a bigint); DROP TABLE COUNT; CREATE TABLE BIT_AND (a bigint); @@ -186,7 +186,7 @@ DROP TABLE BIT_AND; CREATE TABLE `BIT_AND` (a bigint); DROP TABLE BIT_AND; CREATE TABLE BIT_AND(a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 20 near "BIT_AND(a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 20 near "BIT_AND(a bigint)" CREATE TABLE types__const.BIT_AND(a bigint); DROP TABLE BIT_AND; CREATE TABLE NOW (a bigint); @@ -194,32 +194,32 @@ DROP TABLE NOW; CREATE TABLE `NOW` (a bigint); DROP TABLE NOW; CREATE TABLE NOW(a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "NOW(a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "NOW(a bigint)" CREATE TABLE types__const.NOW(a bigint); DROP TABLE NOW; set sql_mode='IGNORE_SPACE'; CREATE TABLE COUNT (a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 19 near "COUNT (a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 19 near "COUNT (a bigint)" CREATE TABLE `COUNT` (a bigint); DROP TABLE COUNT; CREATE TABLE COUNT(a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 18 near "COUNT(a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 18 near "COUNT(a bigint)" CREATE TABLE types__const.COUNT(a bigint); DROP TABLE COUNT; CREATE TABLE BIT_AND (a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 21 near "BIT_AND (a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 21 near "BIT_AND (a bigint)" CREATE TABLE `BIT_AND` (a bigint); DROP TABLE BIT_AND; CREATE TABLE BIT_AND(a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 20 near "BIT_AND(a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 20 near "BIT_AND(a bigint)" CREATE TABLE types__const.BIT_AND(a bigint); DROP TABLE BIT_AND; CREATE TABLE NOW (a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 17 near "NOW (a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 17 near "NOW (a bigint)" CREATE TABLE `NOW` (a bigint); DROP TABLE NOW; CREATE TABLE NOW(a bigint); -Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "NOW(a bigint);" +Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 16 near "NOW(a bigint)" CREATE TABLE types__const.NOW(a bigint); DROP TABLE NOW; set @@sql_mode=default; diff --git a/tests/integrationtest/run-tests.sh b/tests/integrationtest/run-tests.sh index 2ef9d96693658..f57389100c97b 100755 --- a/tests/integrationtest/run-tests.sh +++ b/tests/integrationtest/run-tests.sh @@ -114,7 +114,7 @@ function build_mysql_tester() { echo "building mysql-tester binary: $mysql_tester" rm -rf $mysql_tester - GOBIN=$PWD go install github.com/pingcap/mysql-tester/src@314107b26aa8fce86beb0dd48e75827fb269b365 + GOBIN=$PWD go install github.com/pingcap/mysql-tester/src@0d83955ea569706e5296cd3e2f54efb7f1206d0b mv src mysql_tester } diff --git a/tests/integrationtest/t/ddl/db_change.test b/tests/integrationtest/t/ddl/db_change.test index 2798c0c66d404..5cc66e2830ec3 100644 --- a/tests/integrationtest/t/ddl/db_change.test +++ b/tests/integrationtest/t/ddl/db_change.test @@ -45,4 +45,4 @@ select floor((unix_timestamp() - unix_timestamp(b)) / 2) from t; set @@time_zone='Asia/Tokyo'; alter table t modify column c timestamp not null; select floor((unix_timestamp() - unix_timestamp(c)) / 2) from t; -set @@time_zone='SYSTEM' +set @@time_zone='SYSTEM'; diff --git a/tests/integrationtest/t/executor/delete.test b/tests/integrationtest/t/executor/delete.test index 8ecc547f3e3c0..b44c32508f5e8 100644 --- a/tests/integrationtest/t/executor/delete.test +++ b/tests/integrationtest/t/executor/delete.test @@ -108,14 +108,14 @@ delete from t where cast(id as unsigned) = 1; -- replace_regex /BIGINT UNSIGNED/BIGINT/ -- error 1690 update t set id = '1' where cast(id as unsigned) = 1; -set sql_mode='' +set sql_mode=''; -- enable_warnings -- replace_regex /evaluation failed: // delete from t where cast(id as unsigned) = 1; -- replace_regex /evaluation failed: // update t set id = '1' where cast(id as unsigned) = 1; -- disable_warnings -set sql_mode=DEFAULT +set sql_mode=DEFAULT; # TestDeleteIgnoreWithFK drop table if exists parent, child; diff --git a/tests/integrationtest/t/executor/sample.test b/tests/integrationtest/t/executor/sample.test index 6c270d2ee5b5b..994fc0e4e32d4 100644 --- a/tests/integrationtest/t/executor/sample.test +++ b/tests/integrationtest/t/executor/sample.test @@ -1,4 +1,4 @@ -set @@global.tidb_scatter_region='table' +set @@global.tidb_scatter_region='table'; # TestTableSampleSchema drop table if exists t; diff --git a/tests/integrationtest/t/explain_complex_stats.test b/tests/integrationtest/t/explain_complex_stats.test index 2e792981109b0..9f502a09d765c 100644 --- a/tests/integrationtest/t/explain_complex_stats.test +++ b/tests/integrationtest/t/explain_complex_stats.test @@ -181,4 +181,4 @@ load stats 's/explain_complex_stats_tbl_009.json'; explain format = 'brief' select sum(a) from (select * from tbl_001 union all select * from tbl_002 union all select * from tbl_003 union all select * from tbl_004 union all select * from tbl_005 union all select * from tbl_006 union all select * from tbl_007 union all select * from tbl_008 union all select * from tbl_009) x group by b; -set @@sql_mode=default +set @@sql_mode=default; diff --git a/tests/integrationtest/t/expression/builtin.test b/tests/integrationtest/t/expression/builtin.test index f9dde0906c81c..c1b0fb499a218 100644 --- a/tests/integrationtest/t/expression/builtin.test +++ b/tests/integrationtest/t/expression/builtin.test @@ -699,7 +699,7 @@ select cast(-9223372036854775807 as signed) + cast(9223372036854775806 as unsign -- error 1690 select cast(9223372036854775806 as unsigned) + cast(-9223372036854775807 as signed); select 1 / '2007' div 1; -set sql_mode=default +set sql_mode=default; # TestFuncREPEAT DROP TABLE IF EXISTS table_string; diff --git a/tests/integrationtest/t/planner/core/casetest/index/index.test b/tests/integrationtest/t/planner/core/casetest/index/index.test index 81bad2f3d6f9e..a268fd1f4cbbd 100644 --- a/tests/integrationtest/t/planner/core/casetest/index/index.test +++ b/tests/integrationtest/t/planner/core/casetest/index/index.test @@ -283,7 +283,7 @@ drop table if exists t1, t2; CREATE TABLE `t1` (`a` varchar(488) COLLATE utf8_general_ci DEFAULT NULL, `b` binary(206) DEFAULT '0', `c` json DEFAULT NULL, UNIQUE KEY `idx_29` (`a`,(cast(`c` as signed array)),`b`), UNIQUE KEY `idx_30` ((cast(`c` as signed array)),`a`(5))) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; CREATE TABLE `t2` (`a` float NOT NULL DEFAULT '5217.6055',`b` json NOT NULL,`c` json NOT NULL,`d` varchar(181) COLLATE gbk_bin NOT NULL DEFAULT 'FbVkA~^', KEY `idx_26` (`a`),PRIMARY KEY (`a`,`d`) /*T![clustered_index] NONCLUSTERED */,UNIQUE KEY `idx_28` (`a`,(cast(`b` as binary(64) array)),`d`)) ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_bin; EXPLAIN format='brief' SELECT /*+ inl_join(t1)*/ `t2`.`c` AS `r0` FROM `t1` JOIN `t2` ON `t1`.`a`=`t2`.`d` WHERE `t2`.`d`='' AND NOT (6252179388429456273 MEMBER OF (`t1`.`c`)); -SHOW WARNINGS +SHOW WARNINGS; # TestIndexMergeEliminateRedundantAndPaths DROP table if exists t; diff --git a/tests/integrationtest/t/planner/core/casetest/pushdown/push_down.test b/tests/integrationtest/t/planner/core/casetest/pushdown/push_down.test index 15be563f4d8c1..c32cdec143140 100644 --- a/tests/integrationtest/t/planner/core/casetest/pushdown/push_down.test +++ b/tests/integrationtest/t/planner/core/casetest/pushdown/push_down.test @@ -68,4 +68,4 @@ CREATE TABLE `tld47bc815` ( UNIQUE KEY `idx_3` (`col_1`(5)), KEY `idx_4` (`col_1`(4)) ) ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_chinese_ci; -explain select 1, r0 as col_754 from ( select format(t4a8656d1.col_74, 1) as r0 from t4a8656d1 join tld47bc815 on t4a8656d1.col_74 = tld47bc815.col_1 where JSON_OVERLAPS(t4a8656d1.col_73, '[0.035131302371695955]') group by t4a8656d1.col_74, t4a8656d1.col_73 ) as subquery where IsNull(subquery.r0) +explain select 1, r0 as col_754 from ( select format(t4a8656d1.col_74, 1) as r0 from t4a8656d1 join tld47bc815 on t4a8656d1.col_74 = tld47bc815.col_1 where JSON_OVERLAPS(t4a8656d1.col_73, '[0.035131302371695955]') group by t4a8656d1.col_74, t4a8656d1.col_73 ) as subquery where IsNull(subquery.r0); diff --git a/tests/integrationtest/t/planner/core/integration.test b/tests/integrationtest/t/planner/core/integration.test index a026f91f8d6a9..919a35efcd405 100644 --- a/tests/integrationtest/t/planner/core/integration.test +++ b/tests/integrationtest/t/planner/core/integration.test @@ -727,7 +727,7 @@ insert t values ('a', 'a1', 1, 11), ('b', 'b1', 2, 22), ('c', 'c1', 3, 33); select * from t use index (uuk); drop database cluster_idx_unique_double_read; set @@tidb_enable_clustered_index = DEFAULT; -use planner__core__integration +use planner__core__integration; # TestIssue18984 diff --git a/tests/integrationtest/t/tpch.test b/tests/integrationtest/t/tpch.test index 000e9fffa007b..25caf248c8a57 100644 --- a/tests/integrationtest/t/tpch.test +++ b/tests/integrationtest/t/tpch.test @@ -132,7 +132,7 @@ order by The Minimum Cost Supplier Query finds, in a given region, for each part of a certain type and size, the supplier who can supply it at minimum cost. If several suppliers in that region offer the desired part type and size at the same (minimum) cost, the query lists the parts from suppliers with the 100 highest account balances. For each supplier, - the query lists the supplier's account balance, name and nation; the part's number and manufacturer; the supplier's + the query lists the supplier's account balance, name and nation, the part's number and manufacturer, the supplier's address, phone number and comment information. Planner enhancement: join reorder. @@ -855,7 +855,7 @@ where The Potential Part Promotion Query identifies suppliers in a particular nation having selected parts that may be candidates for a promotional offer. - The Potential Part Promotion query identifies suppliers who have an excess of a given part available; an excess is + The Potential Part Promotion query identifies suppliers who have an excess of a given part available, an excess is defined to be more than 50% of the parts like the given part that the supplier shipped in a given year for a given nation. Only parts whose names share a certain naming convention are considered. */