Skip to content

Commit

Permalink
tests: update mysql-tester and fix some syntax problem (#58464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Defined2014 authored Dec 25, 2024
1 parent 444a1b9 commit e1c78f2
Show file tree
Hide file tree
Showing 35 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion tests/integrationtest/r/ddl/db_change.result
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion tests/integrationtest/r/ddl/db_integration.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions tests/integrationtest/r/ddl/db_partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand All @@ -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 (
Expand All @@ -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')));
Expand All @@ -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` (
Expand Down Expand Up @@ -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);
Expand All @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions tests/integrationtest/r/ddl/db_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions tests/integrationtest/r/ddl/foreign_key.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions tests/integrationtest/r/ddl/partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/integrationtest/r/executor/aggregate.result
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/integrationtest/r/executor/delete.result
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
12 changes: 6 additions & 6 deletions tests/integrationtest/r/executor/executor.result
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/integrationtest/r/executor/grant.result
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Loading

0 comments on commit e1c78f2

Please sign in to comment.