diff --git a/pkg/config/config.go b/pkg/config/config.go index 8aa2d2b8f4f5b..56f6fd66a2a5f 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1056,7 +1056,7 @@ var defaultConf = Config{ AuthTokenRefreshInterval: DefAuthTokenRefreshInterval.String(), DisconnectOnExpiredPassword: true, }, - DeprecateIntegerDisplayWidth: false, + DeprecateIntegerDisplayWidth: true, EnableEnumLengthLimit: true, StoresRefreshInterval: defTiKVCfg.StoresRefreshInterval, EnableForwarding: defTiKVCfg.EnableForwarding, diff --git a/pkg/config/config.toml.example b/pkg/config/config.toml.example index 07bc23f56ac80..29dffb79dfdf4 100644 --- a/pkg/config/config.toml.example +++ b/pkg/config/config.toml.example @@ -101,7 +101,7 @@ enable-telemetry = false # deprecate-integer-display-length is used to be compatible with MySQL 8.0 in which the integer declared with display length will be returned with # a warning like `Integer display width is deprecated and will be removed in a future release`. -deprecate-integer-display-length = false +deprecate-integer-display-length = true # enable-enum-length-limit is used to deal with compatibility issues. When true, the enum/set element length is limited. # According to MySQL 8.0 Refman: diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index cc905b26025ba..5055b5a7acc57 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -291,7 +291,7 @@ enable-telemetry = true # deprecate-integer-display-length is used to be compatible with MySQL 8.0 in which the integer declared with display length will be returned with # -deprecate-integer-display-length = false +deprecate-integer-display-length = true # enable-enum-length-limit is used to deal with compatibility issues. When true, the enum/set element length is limited. # According to MySQL 8.0 Refman: diff --git a/tests/integrationtest/r/cte.result b/tests/integrationtest/r/cte.result index 31b1cfd7349f2..10aaa081a63b5 100644 --- a/tests/integrationtest/r/cte.result +++ b/tests/integrationtest/r/cte.result @@ -449,7 +449,7 @@ MergeJoin_36 8001.00 root inner join, left key:cte.t1.c1, right key:cte.t1.c1 CTE_0 8001.00 root Recursive CTE ├─TableReader_18(Seed Part) 10000.00 root data:TableFullScan_17 │ └─TableFullScan_17 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_19(Recursive Part) 8000.00 root cast(plus(cte.t1.c1, 1), int(11))->cte.t1.c1 +└─Projection_19(Recursive Part) 8000.00 root cast(plus(cte.t1.c1, 1), int)->cte.t1.c1 └─Selection_20 8000.00 root lt(cte.t1.c1, 3) └─CTETable_21 10000.00 root Scan on CTE_0 with recursive cte1 as (select c1 from t1 union select c1 +1 c1 from cte1 where c1 < 3) select /*+ MERGE_JOIN(dt1, dt2) */ * from t1 dt1 inner join cte1 dt2 on dt2.c1 = dt1.c1 order by 1, 2; @@ -472,7 +472,7 @@ MergeJoin_36 8001.00 root inner join, left key:cte.t1.c1, right key:cte.tpk.c1 CTE_0 8001.00 root Recursive CTE ├─TableReader_18(Seed Part) 10000.00 root data:TableFullScan_17 │ └─TableFullScan_17 10000.00 cop[tikv] table:tpk keep order:false, stats:pseudo -└─Projection_19(Recursive Part) 8000.00 root cast(plus(cte.tpk.c1, 1), int(11))->cte.tpk.c1 +└─Projection_19(Recursive Part) 8000.00 root cast(plus(cte.tpk.c1, 1), int)->cte.tpk.c1 └─Selection_20 8000.00 root lt(cte.tpk.c1, 3) └─CTETable_21 10000.00 root Scan on CTE_0 with recursive cte1 as (select c1 from tpk union select c1 +1 c1 from cte1 where c1 < 3) select /*+ MERGE_JOIN(dt1, dt2) */ * from t1 dt1 inner join cte1 dt2 on dt2.c1 = dt1.c1 order by 1, 2; @@ -632,7 +632,7 @@ CTE_0 20.00 root Recursive CTE, limit(offset:0, count:1) │ └─Projection_20 10.00 cop[tikv] cte.t2.c1 │ └─Selection_25 10.00 cop[tikv] eq(cte.t2.c2, cte.t1.c2) │ └─TableFullScan_24 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo -└─Projection_27(Recursive Part) 10.00 root cast(plus(cte.t2.c1, 1), int(11))->cte.t2.c1 +└─Projection_27(Recursive Part) 10.00 root cast(plus(cte.t2.c1, 1), int)->cte.t2.c1 └─CTETable_28 10.00 root Scan on CTE_0 select * from t1 where c1 > all(with recursive cte1 as (select c1 from t2 where t2.c2 = t1.c2 union all select c1+1 as c1 from cte1 limit 1) select c1 from cte1); c1 c2 @@ -649,7 +649,7 @@ CTE_0 20.00 root Recursive CTE, limit(offset:0, count:10) │ └─Projection_18 10.00 cop[tikv] cte.t2.c1 │ └─Selection_23 10.00 cop[tikv] eq(cte.t2.c2, cte.t1.c2) │ └─TableFullScan_22 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo -└─Projection_25(Recursive Part) 10.00 root cast(plus(cte.t2.c1, 1), int(11))->cte.t2.c1 +└─Projection_25(Recursive Part) 10.00 root cast(plus(cte.t2.c1, 1), int)->cte.t2.c1 └─CTETable_26 10.00 root Scan on CTE_0 select * from t1 where exists(with recursive cte1 as (select c1 from t2 where t2.c2 = t1.c2 union all select c1+1 as c1 from cte1 limit 10) select c1 from cte1); c1 c2 @@ -668,7 +668,7 @@ Projection_24 10000.00 root cte.t1.c1, cte.t1.c2 CTE_0 18000.00 root Recursive CTE ├─TableReader_19(Seed Part) 10000.00 root data:TableFullScan_18 │ └─TableFullScan_18 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo -└─Projection_20(Recursive Part) 8000.00 root cast(plus(cte.t2.c1, 1), int(11))->cte.t2.c1, cast(plus(cte.t2.c2, 1), int(11))->cte.t2.c2 +└─Projection_20(Recursive Part) 8000.00 root cast(plus(cte.t2.c1, 1), int)->cte.t2.c1, cast(plus(cte.t2.c2, 1), int)->cte.t2.c2 └─Selection_21 8000.00 root eq(cte.t2.c2, cte.t1.c2) └─CTETable_22 10000.00 root Scan on CTE_0 select * from t1 where c1 > all(with recursive cte1 as (select c1, c2 from t2 union all select c1+1 as c1, c2+1 as c2 from cte1 where cte1.c2=t1.c2) select c1 from cte1); @@ -682,7 +682,7 @@ Apply_23 10000.00 root CARTESIAN semi join CTE_0 18000.00 root Recursive CTE ├─TableReader_17(Seed Part) 10000.00 root data:TableFullScan_16 │ └─TableFullScan_16 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo -└─Projection_18(Recursive Part) 8000.00 root cast(plus(cte.t2.c1, 1), int(11))->cte.t2.c1, cast(plus(cte.t2.c2, 1), int(11))->cte.t2.c2 +└─Projection_18(Recursive Part) 8000.00 root cast(plus(cte.t2.c1, 1), int)->cte.t2.c1, cast(plus(cte.t2.c2, 1), int)->cte.t2.c2 └─Selection_19 8000.00 root eq(cte.t2.c2, cte.t1.c2) └─CTETable_20 10000.00 root Scan on CTE_0 select * from t1 where exists(with recursive cte1 as (select c1, c2 from t2 union all select c1+1 as c1, c2+1 as c2 from cte1 where cte1.c2=t1.c2) select c1 from cte1); diff --git a/tests/integrationtest/r/db_integration.result b/tests/integrationtest/r/db_integration.result index 9016f1a912925..f052fbcf99daa 100644 --- a/tests/integrationtest/r/db_integration.result +++ b/tests/integrationtest/r/db_integration.result @@ -20,14 +20,14 @@ IS_UUID(BIN_TO_UUID(c1)) SHOW CREATE TABLE u1; Table Create Table u1 CREATE TABLE `u1` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `c1` varchar(36) DEFAULT (uuid()), PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin SHOW CREATE TABLE u2; Table Create Table u2 CREATE TABLE `u2` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `c1` varbinary(16) DEFAULT (uuid_to_bin(uuid())), PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin diff --git a/tests/integrationtest/r/ddl/column.result b/tests/integrationtest/r/ddl/column.result index 58390a1ee92e5..8ca8082543310 100644 --- a/tests/integrationtest/r/ddl/column.result +++ b/tests/integrationtest/r/ddl/column.result @@ -43,8 +43,8 @@ CREATE TABLE t1(id INTEGER PRIMARY KEY, authorId INTEGER AUTO_INCREMENT UNIQUE); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `id` int(11) NOT NULL, - `authorId` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL, + `authorId` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, UNIQUE KEY `authorId` (`authorId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -52,8 +52,8 @@ CREATE TABLE `t2`( `id` INTEGER PRIMARY KEY, `authorId` int(11) AUTO_INCREMENT, show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL, - `authorId` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL, + `authorId` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, UNIQUE KEY `authorIdx` (`authorId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin diff --git a/tests/integrationtest/r/ddl/column_modify.result b/tests/integrationtest/r/ddl/column_modify.result index 3bbfb128efbd2..a56e69e121fc1 100644 --- a/tests/integrationtest/r/ddl/column_modify.result +++ b/tests/integrationtest/r/ddl/column_modify.result @@ -2,15 +2,15 @@ drop table if exists test_gv_ddl, table_with_gen_col_blanks, table_with_gen_col_ CREATE TABLE test_gv_ddl(a int, b int as (a+8) virtual, c int as (b + 2) stored); DESC test_gv_ddl; Field Type Null Key Default Extra -a int(11) YES NULL -b int(11) YES NULL VIRTUAL GENERATED -c int(11) YES NULL STORED GENERATED +a int YES NULL +b int YES NULL VIRTUAL GENERATED +c int YES NULL STORED GENERATED show create table test_gv_ddl; Table Create Table test_gv_ddl CREATE TABLE `test_gv_ddl` ( - `a` int(11) DEFAULT NULL, - `b` int(11) GENERATED ALWAYS AS (`a` + 8) VIRTUAL, - `c` int(11) GENERATED ALWAYS AS (`b` + 2) STORED + `a` int DEFAULT NULL, + `b` int GENERATED ALWAYS AS (`a` + 8) VIRTUAL, + `c` int GENERATED ALWAYS AS (`b` + 2) STORED ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create table table_with_gen_col_blanks (a int, b char(20) as (cast( a @@ -18,9 +18,9 @@ as char)), c int as (a+100)); show create table table_with_gen_col_blanks; Table Create Table table_with_gen_col_blanks CREATE TABLE `table_with_gen_col_blanks` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(20) GENERATED ALWAYS AS (cast(`a` as char)) VIRTUAL, - `c` int(11) GENERATED ALWAYS AS (`a` + 100) VIRTUAL + `c` int GENERATED ALWAYS AS (`a` + 100) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create table table_with_gen_col_latin1 (a int, b char(20) as (cast( a @@ -28,9 +28,9 @@ as char charset latin1)), c int as (a+100)); show create table table_with_gen_col_latin1; Table Create Table table_with_gen_col_latin1 CREATE TABLE `table_with_gen_col_latin1` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(20) GENERATED ALWAYS AS (cast(`a` as char charset latin1)) VIRTUAL, - `c` int(11) GENERATED ALWAYS AS (`a` + 100) VIRTUAL + `c` int GENERATED ALWAYS AS (`a` + 100) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create table table_with_gen_col_string (first_name varchar(10), last_name varchar(10), full_name varchar(255) AS (CONCAT(first_name,' ',last_name))); show create table table_with_gen_col_string; @@ -90,15 +90,15 @@ alter table test_gv_ddl modify column c bigint as (b+200) stored; Error 3106 (HY000): 'modifying a stored column' is not supported for generated columns. DESC test_gv_ddl; Field Type Null Key Default Extra -a int(11) YES NULL -b int(11) YES NULL VIRTUAL GENERATED -c int(11) YES NULL STORED GENERATED +a int YES NULL +b int YES NULL VIRTUAL GENERATED +c int YES NULL STORED GENERATED alter table test_gv_ddl change column c cnew bigint; DESC test_gv_ddl; Field Type Null Key Default Extra -a int(11) YES NULL -b int(11) YES NULL VIRTUAL GENERATED -cnew bigint(20) YES NULL +a int YES NULL +b int YES NULL VIRTUAL GENERATED +cnew bigint YES NULL drop table if exists t; CREATE TABLE t(c0 TEXT AS ('\\')); insert into t values (); @@ -117,7 +117,7 @@ alter table t change a a int default 0.00; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT '0' + `a` int DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; create table t (a int default 1.25); @@ -125,7 +125,7 @@ alter table t change a a int default 2.8; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT '3' + `a` int DEFAULT '3' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; create table t (a float default 1.25); @@ -255,16 +255,16 @@ alter table test_rename_column rename column col1 to col1; show create table test_rename_column; Table Create Table test_rename_column CREATE TABLE `test_rename_column` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `col1` int(11) DEFAULT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `col1` int DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table test_rename_column rename column col1 to col2; show create table test_rename_column; Table Create Table test_rename_column CREATE TABLE `test_rename_column` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `col2` int(11) DEFAULT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `col2` int DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table test_rename_column rename column non_exist_col to col3; @@ -277,15 +277,15 @@ alter table test_rename_column rename column col1 to col2; show create table test_rename_column; Table Create Table test_rename_column CREATE TABLE `test_rename_column` ( - `id` int(11) DEFAULT NULL, - `col2` int(11) GENERATED ALWAYS AS (`id` + 1) VIRTUAL + `id` int DEFAULT NULL, + `col2` int GENERATED ALWAYS AS (`id` + 1) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table test_rename_column rename column col2 to col1; show create table test_rename_column; Table Create Table test_rename_column CREATE TABLE `test_rename_column` ( - `id` int(11) DEFAULT NULL, - `col1` int(11) GENERATED ALWAYS AS (`id` + 1) VIRTUAL + `id` int DEFAULT NULL, + `col1` int GENERATED ALWAYS AS (`id` + 1) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table test_rename_column rename column id to id1; Error 3108 (HY000): Column 'id' has a generated column dependency. @@ -307,9 +307,9 @@ alter table test2 change c2 a int not null; show create table test2; Table Create Table test2 CREATE TABLE `test2` ( - `c1` int(11) DEFAULT NULL, - `a` int(11) NOT NULL, - `c3` int(11) DEFAULT '1', + `c1` int DEFAULT NULL, + `a` int NOT NULL, + `c3` int DEFAULT '1', KEY `c1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists test2; diff --git a/tests/integrationtest/r/ddl/column_type_change.result b/tests/integrationtest/r/ddl/column_type_change.result index b487931c85fea..d9515ad546eae 100644 --- a/tests/integrationtest/r/ddl/column_type_change.result +++ b/tests/integrationtest/r/ddl/column_type_change.result @@ -54,11 +54,11 @@ show create table t; Table Create Table t CREATE TABLE `t` ( `a` varchar(10) DEFAULT NULL, - `b` smallint(6) DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `b` smallint DEFAULT NULL, + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select a from t; a @@ -69,10 +69,10 @@ Table Create Table t CREATE TABLE `t` ( `a` varchar(10) DEFAULT NULL, `b` char(10) DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select b from t; b @@ -84,9 +84,9 @@ t CREATE TABLE `t` ( `a` varchar(10) DEFAULT NULL, `b` char(10) DEFAULT NULL, `c` binary(10) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select hex(c) from t; hex(c) @@ -99,8 +99,8 @@ t CREATE TABLE `t` ( `b` char(10) DEFAULT NULL, `c` binary(10) DEFAULT NULL, `d` varbinary(10) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select d from t; d @@ -114,7 +114,7 @@ t CREATE TABLE `t` ( `c` binary(10) DEFAULT NULL, `d` varbinary(10) DEFAULT NULL, `e` tinyblob DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select e from t; e @@ -141,11 +141,11 @@ show create table t; Table Create Table t CREATE TABLE `t` ( `a` decimal(2,1) DEFAULT NULL, - `b` smallint(6) DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `b` smallint DEFAULT NULL, + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select a from t; a @@ -156,10 +156,10 @@ Table Create Table t CREATE TABLE `t` ( `a` decimal(2,1) DEFAULT NULL, `b` year(4) DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select b from t; b @@ -171,9 +171,9 @@ t CREATE TABLE `t` ( `a` decimal(2,1) DEFAULT NULL, `b` year(4) DEFAULT NULL, `c` time DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select c from t; c @@ -186,8 +186,8 @@ t CREATE TABLE `t` ( `b` year(4) DEFAULT NULL, `c` time DEFAULT NULL, `d` date DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select d from t; d @@ -202,7 +202,7 @@ t CREATE TABLE `t` ( `c` time DEFAULT NULL, `d` date DEFAULT NULL, `e` timestamp NULL DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select e from t; e @@ -229,11 +229,11 @@ show create table t; Table Create Table t CREATE TABLE `t` ( `a` float DEFAULT NULL, - `b` smallint(6) DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `b` smallint DEFAULT NULL, + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select a from t; a @@ -244,10 +244,10 @@ Table Create Table t CREATE TABLE `t` ( `a` float DEFAULT NULL, `b` double DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select b from t; b @@ -259,9 +259,9 @@ t CREATE TABLE `t` ( `a` float DEFAULT NULL, `b` double DEFAULT NULL, `c` bit(10) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select hex(c) from t; hex(c) @@ -274,8 +274,8 @@ t CREATE TABLE `t` ( `b` double DEFAULT NULL, `c` bit(10) DEFAULT NULL, `d` json DEFAULT NULL, - `e` bigint(20) DEFAULT NULL, - `f` bigint(20) DEFAULT NULL + `e` bigint DEFAULT NULL, + `f` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select d from t; d @@ -288,10 +288,10 @@ show create table t; Table Create Table t CREATE TABLE `t` ( `a` enum('a','b') DEFAULT NULL, - `b` smallint(6) DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL + `b` smallint DEFAULT NULL, + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select a from t; a @@ -302,9 +302,9 @@ Table Create Table t CREATE TABLE `t` ( `a` enum('a','b') DEFAULT NULL, `b` set('a','b') DEFAULT NULL, - `c` mediumint(9) DEFAULT NULL, - `d` int(11) DEFAULT NULL, - `e` bigint(20) DEFAULT NULL + `c` mediumint DEFAULT NULL, + `d` int DEFAULT NULL, + `e` bigint DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select b from t; b @@ -2061,8 +2061,8 @@ alter table orders modify user_id int null; show create table orders; Table Create Table orders CREATE TABLE `orders` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `user_id` int DEFAULT NULL, `doc` json DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `fk_user_id` (`user_id`), @@ -2075,8 +2075,8 @@ alter table orders change user_id user_id2 int null; show create table orders; Table Create Table orders CREATE TABLE `orders` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id2` int(11) DEFAULT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `user_id2` int DEFAULT NULL, `doc` json DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `fk_user_id` (`user_id2`), @@ -2089,8 +2089,8 @@ alter table orders modify user_id int default -1 comment "haha"; show create table orders; Table Create Table orders CREATE TABLE `orders` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT '-1' COMMENT 'haha', + `id` int NOT NULL AUTO_INCREMENT, + `user_id` int DEFAULT '-1' COMMENT 'haha', `doc` json DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `fk_user_id` (`user_id`), @@ -2217,7 +2217,7 @@ alter table t modify column a int; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, UNIQUE KEY `idx` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; @@ -2236,7 +2236,7 @@ show create table t; Table Create Table t CREATE TABLE `t` ( `a` char(255) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `b` int DEFAULT NULL, UNIQUE KEY `idx` (`a`(2),`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; diff --git a/tests/integrationtest/r/ddl/constraint.result b/tests/integrationtest/r/ddl/constraint.result index 386daa4d7f291..43b8bb5049d7a 100644 --- a/tests/integrationtest/r/ddl/constraint.result +++ b/tests/integrationtest/r/ddl/constraint.result @@ -5,8 +5,8 @@ alter table t drop column a; show create table t; Table Create Table t CREATE TABLE `t` ( - `b` int(11) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `b` int DEFAULT NULL, + `c` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`c` > 0)), CONSTRAINT `t_chk_2` CHECK ((`b` > `c`)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -213,9 +213,9 @@ create table s like t; show create table s; Table Create Table s CREATE TABLE `s` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, + `c` int DEFAULT NULL, CONSTRAINT `s_chk_1` CHECK ((`c` < 0)), CONSTRAINT `s_chk_2` CHECK ((`a` > 10)), CONSTRAINT `s_chk_3` CHECK ((`b` > 5)) @@ -231,9 +231,9 @@ alter table s add constraint aaa check(a > 0); show create table s; Table Create Table s CREATE TABLE `s` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, + `c` int DEFAULT NULL, CONSTRAINT `s_chk_1` CHECK ((`c` < 0)), CONSTRAINT `s_chk_2` CHECK ((`a` > 10)), CONSTRAINT `s_chk_3` CHECK ((`b` > 5)), @@ -416,8 +416,8 @@ Error 3819 (HY000): Check constraint 't_chk_1' is violated. show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) GENERATED ALWAYS AS (`a` + 1) VIRTUAL, + `a` int DEFAULT NULL, + `b` int GENERATED ALWAYS AS (`a` + 1) VIRTUAL, CONSTRAINT `t_chk_1` CHECK ((`b` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t alter constraint t_chk_1 not enforced; @@ -538,8 +538,8 @@ create table t(a int check (a>1), b int, constraint my_constr check(a<10)); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, CONSTRAINT `my_constr` CHECK ((`a` < 10)), CONSTRAINT `t_chk_1` CHECK ((`a` > 1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -547,8 +547,8 @@ alter table t add constraint my_constr2 check (a 1)), CONSTRAINT `my_constr2` CHECK ((`a` < `b`)) /*!80016 NOT ENFORCED */ @@ -557,8 +557,8 @@ alter table t drop constraint t_chk_1; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, CONSTRAINT `my_constr` CHECK ((`a` < 10)), CONSTRAINT `my_constr2` CHECK ((`a` < `b`)) /*!80016 NOT ENFORCED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -579,7 +579,7 @@ Level Code Message show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t; @@ -590,7 +590,7 @@ Level Code Message show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t add constraint chk check(true); @@ -614,7 +614,7 @@ Warning 1105 tidb_enable_check_constraint is off show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin set @@global.tidb_enable_check_constraint = 1; @@ -623,7 +623,7 @@ create table t(a int not null check(a>0)); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t; @@ -631,8 +631,8 @@ create table t(a bigint key constraint my_constr check(a<10), b int constraint c show create table t; Table Create Table t CREATE TABLE `t` ( - `a` bigint(20) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` bigint NOT NULL, + `b` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, CONSTRAINT `my_constr` CHECK ((`a` < 10)), CONSTRAINT `t_chk_1` CHECK ((`b` > 1)) /*!80016 NOT ENFORCED */ @@ -642,7 +642,7 @@ create table t(a int constraint check(a > 1) not enforced, constraint my_constr show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `my_constr` CHECK ((`a` < 10)), CONSTRAINT `t_chk_1` CHECK ((`a` > 1)) /*!80016 NOT ENFORCED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -657,8 +657,8 @@ create table t(a int not null check(a>0), b int, constraint check(a>b)); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > `b`)), CONSTRAINT `t_chk_2` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -667,7 +667,7 @@ create table t(a int not null check(a > '12345')); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > _utf8mb4'12345')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t; @@ -675,7 +675,7 @@ create table t(a int not null primary key check(a > '12345')); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, CONSTRAINT `t_chk_1` CHECK ((`a` > _utf8mb4'12345')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -695,7 +695,7 @@ alter table t add constraint haha check(a<10); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)), CONSTRAINT `haha` CHECK ((`a` < 10)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -703,7 +703,7 @@ alter table t add constraint check(a<11) not enforced; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)), CONSTRAINT `haha` CHECK ((`a` < 10)), CONSTRAINT `t_chk_2` CHECK ((`a` < 11)) /*!80016 NOT ENFORCED */ @@ -725,8 +725,8 @@ create table t(a int not null check(a>0), b int, constraint haha check(a < b), c show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `haha` CHECK ((`a` < `b`)), CONSTRAINT `t_chk_1` CHECK ((`a` < `b` + 1)), CONSTRAINT `t_chk_2` CHECK ((`a` > 0)) @@ -737,8 +737,8 @@ alter table t drop constraint haha; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` < `b` + 1)), CONSTRAINT `t_chk_2` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -746,8 +746,8 @@ alter table t drop constraint t_chk_2; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK ((`a` < `b` + 1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t; @@ -762,8 +762,8 @@ create table t(a int not null check(a>0) not enforced, b int, constraint haha ch show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `haha` CHECK ((`a` < `b`)), CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) /*!80016 NOT ENFORCED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -773,8 +773,8 @@ alter table t alter constraint haha not enforced; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `haha` CHECK ((`a` < `b`)) /*!80016 NOT ENFORCED */, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) /*!80016 NOT ENFORCED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -782,8 +782,8 @@ alter table t alter constraint t_chk_1 enforced; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, CONSTRAINT `haha` CHECK ((`a` < `b`)) /*!80016 NOT ENFORCED */, CONSTRAINT `t_chk_1` CHECK ((`a` > 0)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -796,7 +796,7 @@ CREATE TABLE `t` (`a` int(11) DEFAULT NULL); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin insert t values(1); select * from t; @@ -812,14 +812,14 @@ Error 3819 (HY000): Check constraint 'chk' is violated. show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `chk` CHECK ((`a` > 1)) /*!80016 NOT ENFORCED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t drop CONSTRAINT chk; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin set @@global.tidb_enable_check_constraint = 1; drop table if exists t; @@ -827,14 +827,14 @@ create table t(a int, check((test.t.a > 1))); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK (((`a` > 1))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t add constraint chk check((test.t.a < 100)); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, CONSTRAINT `t_chk_1` CHECK (((`a` > 1))), CONSTRAINT `chk` CHECK (((`a` < 100))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin diff --git a/tests/integrationtest/r/ddl/db.result b/tests/integrationtest/r/ddl/db.result index 962407a1edafc..ca08b65de983b 100644 --- a/tests/integrationtest/r/ddl/db.result +++ b/tests/integrationtest/r/ddl/db.result @@ -359,7 +359,7 @@ create global temporary table global_temp_auto_id(id int primary key auto_increm show create table global_temp_auto_id; Table Create Table global_temp_auto_id CREATE GLOBAL TEMPORARY TABLE `global_temp_auto_id` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=100 ON COMMIT DELETE ROWS show table global_temp_auto_id next_row_id; @@ -380,7 +380,7 @@ commit; show create table global_temp_auto_id; Table Create Table global_temp_auto_id CREATE GLOBAL TEMPORARY TABLE `global_temp_auto_id` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=100 ON COMMIT DELETE ROWS show table global_temp_auto_id next_row_id; @@ -414,7 +414,7 @@ create temporary table local_temp_auto_id(id int primary key auto_increment) aut show create table local_temp_auto_id; Table Create Table local_temp_auto_id CREATE TEMPORARY TABLE `local_temp_auto_id` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=100 insert into local_temp_auto_id value(null); @@ -427,7 +427,7 @@ id show create table local_temp_auto_id; Table Create Table local_temp_auto_id CREATE TEMPORARY TABLE `local_temp_auto_id` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=101 drop table if exists t_23473; @@ -435,8 +435,8 @@ create table t_23473 (k int primary key, v int); alter table t_23473 change column k k bigint; show columns from t_23473; Field Type Null Key Default Extra -k bigint(20) NO PRI NULL -v int(11) YES NULL +k bigint NO PRI NULL +v int YES NULL drop table if exists t0; create table t0(c0 Blob(254), c1 Blob(65534), c2 Blob(16777214), c3 Blob(4294967294)); show columns from t0; diff --git a/tests/integrationtest/r/ddl/db_cache.result b/tests/integrationtest/r/ddl/db_cache.result index 1803949195364..18aaa88a41ea8 100644 --- a/tests/integrationtest/r/ddl/db_cache.result +++ b/tests/integrationtest/r/ddl/db_cache.result @@ -34,14 +34,14 @@ alter table nocache_t1 cache; show create table nocache_t1; Table Create Table nocache_t1 CREATE TABLE `nocache_t1` ( - `n` int(11) NOT NULL AUTO_INCREMENT, + `n` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`n`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /* CACHED ON */ alter table nocache_t1 nocache; show create table nocache_t1; Table Create Table nocache_t1 CREATE TABLE `nocache_t1` ( - `n` int(11) NOT NULL AUTO_INCREMENT, + `n` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`n`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t1; diff --git a/tests/integrationtest/r/ddl/db_integration.result b/tests/integrationtest/r/ddl/db_integration.result index 926c6bcc88dfd..e49534d1601d7 100644 --- a/tests/integrationtest/r/ddl/db_integration.result +++ b/tests/integrationtest/r/ddl/db_integration.result @@ -392,7 +392,7 @@ create table t (a int default b'1'); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT '1' + `a` int DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; drop table if exists t; @@ -406,7 +406,7 @@ count(distinct c1) show create table t; Table Create Table t CREATE TABLE `t` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (uuid()) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t1; @@ -667,9 +667,9 @@ alter table t add index idx((a+c)); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` varchar(100) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `idx` ((`a` + `c`)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`a`) @@ -689,7 +689,7 @@ create table t(a int auto_increment key clustered) auto_id_cache 100; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL AUTO_INCREMENT, + `a` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_id_cache] AUTO_ID_CACHE=100 */ insert into t values(); @@ -733,8 +733,8 @@ alter table t1 auto_id_cache 200; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) NOT NULL AUTO_INCREMENT, + `a` int DEFAULT NULL, + `b` int NOT NULL AUTO_INCREMENT, UNIQUE KEY `b` (`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=101 /*T![auto_id_cache] AUTO_ID_CACHE=200 */ insert into t1(b) values(NULL); @@ -754,7 +754,7 @@ create table t(a int auto_increment key clustered) auto_id_cache 3; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL AUTO_INCREMENT, + `a` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_id_cache] AUTO_ID_CACHE=3 */ insert into t(a) values(NULL),(NULL),(NULL); @@ -860,26 +860,26 @@ create global temporary table db2.tplacement3 (id int) on commit delete rows; show create table db2.tplacement3; Table Create Table tplacement3 CREATE GLOBAL TEMPORARY TABLE `tplacement3` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ON COMMIT DELETE ROWS create temporary table db2.tplacement4 (id int); show create table db2.tplacement4; Table Create Table tplacement4 CREATE TEMPORARY TABLE `tplacement4` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create table db2.t1 (a int) placement policy 'default'; create global temporary table db2.tplacement5 like db2.t1 on commit delete rows; show create table db2.tplacement5; Table Create Table tplacement5 CREATE GLOBAL TEMPORARY TABLE `tplacement5` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ON COMMIT DELETE ROWS create temporary table db2.tplacement6 like db2.t1; show create table db2.tplacement6; Table Create Table tplacement6 CREATE TEMPORARY TABLE `tplacement6` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table db2.tplacement6; drop table db2.tplacement5; diff --git a/tests/integrationtest/r/ddl/db_partition.result b/tests/integrationtest/r/ddl/db_partition.result index 74193bf7af9fc..7c1992a7408b0 100644 --- a/tests/integrationtest/r/ddl/db_partition.result +++ b/tests/integrationtest/r/ddl/db_partition.result @@ -241,7 +241,7 @@ Error 8200 (HY000): Unsupported ADD List partition, already contains DEFAULT par show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`id`) (PARTITION `p0` VALUES IN (1,2), @@ -359,7 +359,7 @@ Error 1064 (42000): You have an error in your SQL syntax; check the manual that show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `name` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS(`id`,`name`) @@ -380,7 +380,7 @@ pDef 6 LIST COLUMNS `id`,`name` (9,'d'),DEFAULT,(10,'d') NULL show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `name` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS(`id`,`name`) @@ -452,7 +452,7 @@ p2 LIST `a` 2,7,10 1 show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` varchar(255) DEFAULT NULL, UNIQUE KEY `a` (`a`), KEY `b` (`b`) @@ -513,7 +513,7 @@ create table t (b int, a varchar(255)) partition by list columns (a) (partition show create table t; Table Create Table t CREATE TABLE `t` ( - `b` int(11) DEFAULT NULL, + `b` int DEFAULT NULL, `a` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS(`a`) @@ -681,7 +681,7 @@ insert into t values (2); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`a`) (PARTITION `p0` DEFAULT) @@ -704,7 +704,7 @@ NULL show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`id`) (PARTITION `p0` VALUES IN (1,2), @@ -735,7 +735,7 @@ NULL NULL show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `name` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS(`id`,`name`) @@ -766,7 +766,7 @@ partition p5 values less than MAXVALUE show create table employees; Table Create Table employees CREATE TABLE `employees` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `hired` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (YEAR(`hired`)) @@ -877,8 +877,8 @@ alter table employees drop partition p3; show create table employees; Table Create Table employees CREATE TABLE `employees` ( - `id` int(11) NOT NULL, - `hired` int(11) NOT NULL + `id` int NOT NULL, + `hired` int NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`hired`) (PARTITION `p1` VALUES LESS THAN (1991), @@ -921,7 +921,7 @@ alter table table4 drop partition p2; show create table table4; Table Create Table table4 CREATE TABLE `table4` ( - `id` int(11) NOT NULL + `id` int NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) (PARTITION `p1` VALUES LESS THAN (10), @@ -1472,7 +1472,7 @@ alter table t coalesce partition 4; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `signed` date DEFAULT NULL @@ -1513,7 +1513,7 @@ alter table t coalesce partition 4; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `signed` date DEFAULT NULL @@ -1575,13 +1575,13 @@ alter table t add partition partitions 8; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`store_id`) PARTITIONS 12 alter table t coalesce partition 0; @@ -1597,13 +1597,13 @@ alter table t coalesce partition 1; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`store_id`) (PARTITION `p0`, @@ -1625,13 +1625,13 @@ alter table t coalesce partition 2; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`store_id`) (PARTITION `p0`, @@ -1655,13 +1655,13 @@ alter table t coalesce partition 1; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`store_id`) PARTITIONS 12 alter table t add partition (partition p12 comment 'p12' placement policy tworeplicas); @@ -1670,13 +1670,13 @@ alter table t add partition partitions 1; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![placement] PLACEMENT POLICY=`fourreplicas` */ PARTITION BY HASH (`store_id`) (PARTITION `p0`, @@ -1697,13 +1697,13 @@ alter table t remove partitioning; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![placement] PLACEMENT POLICY=`fourreplicas` */ select sum(store_id), avg(store_id), max(store_id), min(store_id), sum(id) from t; sum(store_id) avg(store_id) max(store_id) min(store_id) sum(id) @@ -1729,13 +1729,13 @@ alter table t add partition partitions 8; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY KEY (`hired`) PARTITIONS 12 alter table t add partition (partition p13); @@ -1744,13 +1744,13 @@ Error 1517 (HY000): Duplicate partition name p13 show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY KEY (`hired`) (PARTITION `p0`, @@ -1770,13 +1770,13 @@ alter table t coalesce partition 2; show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `fname` varchar(30) DEFAULT NULL, `lname` varchar(30) DEFAULT NULL, `hired` date NOT NULL DEFAULT '1970-01-01', `separated` date DEFAULT NULL, - `job_code` int(11) DEFAULT NULL, - `store_id` int(11) DEFAULT NULL + `job_code` int DEFAULT NULL, + `store_id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY KEY (`hired`) PARTITIONS 11 drop database if exists test_db_with_partition_const; @@ -1873,7 +1873,7 @@ alter table test_1465 partition by hash(a); show create table test_1465; Table Create Table test_1465 CREATE TABLE `test_1465` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`a`) PARTITIONS 1 alter table test_1465 drop partition p0; @@ -2045,7 +2045,7 @@ a Show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`a`) (PARTITION `p2` VALUES IN (2), @@ -2070,7 +2070,7 @@ PARTITION `p_Maxvalue` VALUES LESS THAN (MAXVALUE)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) (PARTITION `pNull` VALUES LESS THAN (-9223372036854775808), @@ -2105,7 +2105,7 @@ PARTITION `p_Maxvalue` VALUES LESS THAN (MAXVALUE)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) (PARTITION `pNull` VALUES LESS THAN (-9223372036854775808), @@ -2140,7 +2140,7 @@ PARTITION `pMaxvalue` VALUES LESS THAN (MAXVALUE)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`id`) (PARTITION `pNull` VALUES LESS THAN (-2147483648), @@ -2175,7 +2175,7 @@ PARTITION `pMaxvalue` VALUES LESS THAN (MAXVALUE)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`id`) (PARTITION `pNull` VALUES LESS THAN (-2147483648), @@ -2195,7 +2195,7 @@ create table t (id int) partition by range (id) interval (10000000) first partit show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) (PARTITION `P_NULL` VALUES LESS THAN (-9223372036854775808), @@ -2230,7 +2230,7 @@ PARTITION `P_MAXVALUE` VALUES LESS THAN (MAXVALUE)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) (PARTITION `P_NULL` VALUES LESS THAN (-9223372036854775808), @@ -2250,7 +2250,7 @@ create table t (id int) partition by range columns (id) interval (10000000) firs show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`id`) (PARTITION `P_NULL` VALUES LESS THAN (-2147483648), @@ -2285,7 +2285,7 @@ PARTITION `P_MAXVALUE` VALUES LESS THAN (MAXVALUE)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`id`) (PARTITION `P_NULL` VALUES LESS THAN (-2147483648), @@ -2317,7 +2317,7 @@ insert into ipt select id + 100, concat('10', val) FROM ipt where id < 10; SHOW CREATE TABLE ipt; Table Create Table ipt CREATE TABLE `ipt` ( - `id` bigint(20) unsigned NOT NULL, + `id` bigint unsigned NOT NULL, `val` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `val` (`val`) @@ -2342,7 +2342,7 @@ count(*) SHOW CREATE TABLE ipt; Table Create Table ipt CREATE TABLE `ipt` ( - `id` bigint(20) unsigned NOT NULL, + `id` bigint unsigned NOT NULL, `val` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `val` (`val`) @@ -2443,7 +2443,7 @@ Error 8200 (HY000): Unsupported SPLIT LAST PARTITION show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` bigint(20) unsigned NOT NULL, + `id` bigint unsigned NOT NULL, `val` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `val` (`val`) @@ -2513,7 +2513,7 @@ create table t (id tinyint, val varchar(255)) partition by range (id) interval ( show create table t; Table Create Table t CREATE TABLE `t` ( - `id` tinyint(4) DEFAULT NULL, + `id` tinyint DEFAULT NULL, `val` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) @@ -2555,7 +2555,7 @@ create table t (id int, val varchar(255), comment varchar(255)) partition by ran show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `val` varchar(255) DEFAULT NULL, `comment` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2630,7 +2630,7 @@ PARTITION p1 VALUES IN ((10,'10'),(11,'11'))); show create table t; Table Create Table t CREATE TABLE "t" ( - "a" int(11) DEFAULT NULL, + "a" int DEFAULT NULL, "b" varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS("a","b") @@ -2785,7 +2785,7 @@ partition p1 values less than maxvalue); show create table t6; Table Create Table t6 CREATE TABLE `t6` ( - `colint` int(11) DEFAULT NULL, + `colint` int DEFAULT NULL, `col1` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`colint`) @@ -2800,7 +2800,7 @@ insert into tRange values (0, "Zero"), (999999, "999999"), (1000000, "1000000"), show create table tRange; Table Create Table tRange CREATE TABLE `tRange` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2811,7 +2811,7 @@ alter table tRange remove partitioning; show create table tRange; Table Create Table tRange CREATE TABLE `tRange` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2824,7 +2824,7 @@ insert into tRange values (0, "Zero"), (999999, "999999"), (1000000, "1000000"), show create table tRange; Table Create Table tRange CREATE TABLE `tRange` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2835,7 +2835,7 @@ alter table tRange remove partitioning; show create table tRange; Table Create Table tRange CREATE TABLE `tRange` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2849,7 +2849,7 @@ insert into tRange values (0, "Zero"), (999999, "999999"), (1000000, "1000000"), show create table tRange; Table Create Table tRange CREATE TABLE `tRange` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2860,7 +2860,7 @@ alter table tRange remove partitioning; show create table tRange; Table Create Table tRange CREATE TABLE `tRange` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -2932,7 +2932,7 @@ alter table t remove partitioning; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` varchar(255) DEFAULT NULL, KEY `a` (`a`,`b`), KEY `b` (`b`) @@ -3276,7 +3276,7 @@ execute stmt; show create table aaa; Table Create Table aaa CREATE TABLE `aaa` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) @@ -3290,7 +3290,7 @@ execute stmt2; show create table aaa; Table Create Table aaa CREATE TABLE `aaa` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) @@ -3305,7 +3305,7 @@ execute stmt3; show create table aaa; Table Create Table aaa CREATE TABLE `aaa` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) @@ -3319,7 +3319,7 @@ execute stmt; show create table aaa; Table Create Table aaa CREATE TABLE `aaa` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) @@ -3334,7 +3334,7 @@ execute stmt; show create table aaa; Table Create Table aaa CREATE TABLE `aaa` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id`) diff --git a/tests/integrationtest/r/ddl/default_as_expression.result b/tests/integrationtest/r/ddl/default_as_expression.result index 54217f2d428f5..721c193e26cde 100644 --- a/tests/integrationtest/r/ddl/default_as_expression.result +++ b/tests/integrationtest/r/ddl/default_as_expression.result @@ -46,19 +46,19 @@ count(1) show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (date_format(now(), _utf8mb4'%Y-%m')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` datetime DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d %H.%i.%s')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t0 add column c2 date default (date_format(now(),'%Y-%m')); @@ -74,7 +74,7 @@ insert into t1 values (3, default); show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (date_format(now(), _utf8mb4'%Y-%m')), `c2` date DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), `c4` blob DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), @@ -83,7 +83,7 @@ t0 CREATE TABLE `t0` ( show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` datetime DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -94,7 +94,7 @@ insert into t1 values (4, default); show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(30) DEFAULT 'xx', `c2` date DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), `c4` blob DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), @@ -103,7 +103,7 @@ t0 CREATE TABLE `t0` ( show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(30) DEFAULT 'xx', KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -121,7 +121,7 @@ alter table t1 drop index idx; show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(30) DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), `c2` date DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), `c4` blob DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) @@ -129,7 +129,7 @@ t0 CREATE TABLE `t0` ( show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` datetime DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin SELECT count(1) FROM t0 WHERE c1 = date_format(@x,'%Y-%m') OR c1 = date_format(@x,'%Y-%m-%d') OR c1 = "xx"; @@ -168,21 +168,21 @@ count(1) show create table t; Table Create Table t CREATE TABLE `t` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')), KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, - `c1` int(11) DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')), + `c` int DEFAULT NULL, + `c1` int DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')), KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (replace(convert(upper(uuid()) using 'utf8mb4'), _utf8mb4'-', _utf8mb4'')), KEY `idx` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -191,14 +191,14 @@ alter table t drop index idx; show create table t; Table Create Table t CREATE TABLE `t` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT 'xx' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin insert into t values (5, default); show create table t; Table Create Table t CREATE TABLE `t` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT 'xx' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t add unique index idx(c, c1); @@ -210,7 +210,7 @@ count(1) show create table t; Table Create Table t CREATE TABLE `t` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(32) DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')), UNIQUE KEY `idx` (`c`,`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -277,25 +277,25 @@ c c1 c2 show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(32) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), `c2` date DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), `c3` datetime DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c4` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c4` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), KEY `idx` (`c`,`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, - `c1` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c2` int(11) DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), + `c` int DEFAULT NULL, + `c1` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c2` int DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), UNIQUE KEY `idx` (`c`,`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), `c2` blob DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -306,20 +306,20 @@ insert into t1 values (5, default, default); show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(32) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), `c2` date DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), `c3` datetime DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c4` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c4` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), KEY `idx` (`c`,`c1`), KEY `idx1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, - `c1` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c2` int(11) DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), + `c` int DEFAULT NULL, + `c1` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c2` int DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), UNIQUE KEY `idx` (`c`,`c1`), UNIQUE KEY `idx1` (`c`,`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -330,20 +330,20 @@ insert into t1 values (6, default, default); show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(32) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), `c2` date DEFAULT (CURRENT_DATE), `c3` datetime DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c4` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c4` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), KEY `idx` (`c`,`c1`), KEY `idx1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(30) DEFAULT 'xx', - `c2` int(11) DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), + `c2` int DEFAULT (str_to_date(_utf8mb4'9999-01-01', _utf8mb4'%Y-%m-%d')), UNIQUE KEY `idx` (`c`,`c1`), UNIQUE KEY `idx1` (`c`,`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -383,10 +383,10 @@ alter table t0 drop column c2; show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(32), `c3` datetime DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c4` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c4` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), KEY `idx` (`c`,`c1`), KEY `idx1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -411,21 +411,21 @@ Error 1292 (22007): Truncated incorrect DOUBLE value: 'ROOT' show create table t; Table Create Table t CREATE TABLE `t` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(256) DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))), UNIQUE KEY `idx` (`c`,`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, - `c1` int(11) DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))) + `c` int DEFAULT NULL, + `c1` int DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t1 modify column c1 varchar(30) default 'xx'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(30) DEFAULT 'xx' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t1 modify column c1 varchar(32) default (upper(substring_index(user(),'@',1))); @@ -433,7 +433,7 @@ alter table t1 add index idx1(c1); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` varchar(32) DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))), KEY `idx1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -471,25 +471,25 @@ c c1 show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` json DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` enum('y','n') DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` set('y','n') DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin SELECT column_default, extra FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='test' AND TABLE_NAME='t0' AND COLUMN_NAME='c1'; @@ -521,25 +521,25 @@ INSERT INTO t0 values (3, DEFAULT); show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` json DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` enum('y','n') DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` set('y','n') DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin alter table t0 alter column c1 drop default; @@ -549,25 +549,25 @@ alter table t3 alter column c1 drop default; show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` json ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` enum('y','n') ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` set('y','n') ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select count(1) from t0 where c1 = date_format(now(), '%Y-%m-%d'); @@ -610,25 +610,25 @@ c c1 show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` json DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` enum('y','n') DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` set('y','n') DEFAULT (replace(upper(uuid()), _utf8mb4'-', _utf8mb4'')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin SELECT column_default, extra FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='test' AND TABLE_NAME='t0' AND COLUMN_NAME='c1'; @@ -675,25 +675,25 @@ c c1 show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` json DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` enum('y','n') DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` set('y','n') DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin SELECT column_default, extra FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='test' AND TABLE_NAME='t0' AND COLUMN_NAME='c1'; @@ -740,25 +740,25 @@ c c1 show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` json DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` enum('y','n') DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` set('y','n') DEFAULT (upper(substring_index(user(), _utf8mb4'@', 1))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t0, t1, t2, t3; @@ -788,17 +788,17 @@ CREATE INDEX idx2 ON t1 ((c+1)); CREATE INDEX idx3 ON t1 ((d+1)); SHOW COLUMNS FROM t1; Field Type Null Key Default Extra -i int(11) YES NULL -b int(11) YES str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d') DEFAULT_GENERATED -c int(11) YES NULL VIRTUAL GENERATED -d int(11) YES NULL STORED GENERATED +i int YES NULL +b int YES str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d') DEFAULT_GENERATED +c int YES NULL VIRTUAL GENERATED +d int YES NULL STORED GENERATED show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL, - `b` int(11) DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), - `c` int(11) GENERATED ALWAYS AS (`b` + 2) VIRTUAL, - `d` int(11) GENERATED ALWAYS AS (`b` + 10) STORED, + `i` int DEFAULT NULL, + `b` int DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), + `c` int GENERATED ALWAYS AS (`b` + 2) VIRTUAL, + `d` int GENERATED ALWAYS AS (`b` + 10) STORED, KEY `idx1` ((`b` + 1)), KEY `idx2` ((`c` + 1)), KEY `idx3` ((`d` + 1)) @@ -820,7 +820,7 @@ c c1 1 19800101 show columns from test.t0 where field='c1'; Field Type Null Key Default Extra -c1 int(11) NO PRI str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d') DEFAULT_GENERATED +c1 int NO PRI str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d') DEFAULT_GENERATED create table t1 (c int(10), c1 BLOB default (date_format(now(),'%Y-%m-%d')), c2 JSON default (str_to_date('1980-01-01','%Y-%m-%d')), primary key(c1(32), c2)); Error 3152 (42000): JSON column 'c2' cannot be used in key specification. create table t1 (c int(10), c1 BLOB default (date_format(now(),'%Y-%m-%d')), c2 JSON default (str_to_date('1980-01-01','%Y-%m-%d')), primary key(c1(32))); @@ -834,7 +834,7 @@ count(1) show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) DEFAULT NULL, + `c` int DEFAULT NULL, `c1` blob NOT NULL DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), `c2` json DEFAULT (str_to_date(_utf8mb4'1980-01-01', _utf8mb4'%Y-%m-%d')), PRIMARY KEY (`c1`(32)) /*T![clustered_index] NONCLUSTERED */, @@ -865,7 +865,7 @@ id show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `c` date DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d %H:%i:%s')), `d` datetime DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d %H:%i:%s')), UNIQUE KEY `idx` (`id`,`c`), @@ -885,7 +885,7 @@ PRIMARY KEY(id, c) show create table t0; Table Create Table t0 CREATE TEMPORARY TABLE `t0` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, `c` date NOT NULL DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d %H:%i:%s')), PRIMARY KEY (`id`,`c`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -897,7 +897,7 @@ count(1) show create table t0; Table Create Table t0 CREATE TEMPORARY TABLE `t0` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, `c` date NOT NULL DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d %H:%i:%s')), PRIMARY KEY (`id`,`c`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -917,7 +917,7 @@ count(1) show create table t0; Table Create Table t0 CREATE TABLE `t0` ( - `id` bigint(20) NOT NULL, + `id` bigint NOT NULL, `c` date NOT NULL DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d %H:%i:%s')), PRIMARY KEY (`id`,`c`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /* CACHED ON */ @@ -949,7 +949,7 @@ count(1) show create table child; Table Create Table child CREATE TABLE `child` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `cc` date DEFAULT (date_format(now(), _utf8mb4'%Y-%m-%d')), KEY `idx` (`cc`), CONSTRAINT `fk_1` FOREIGN KEY (`cc`) REFERENCES `parent` (`c`) ON DELETE CASCADE @@ -959,7 +959,7 @@ CREATE TABLE jd1 (id SERIAL, j JSON DEFAULT (JSON_OBJECT("foo", "bar"))); SHOW CREATE TABLE jd1; Table Create Table jd1 CREATE TABLE `jd1` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, `j` json DEFAULT (json_object(_utf8mb4'foo', _utf8mb4'bar')), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -987,7 +987,7 @@ CREATE TABLE jd2 (id SERIAL, j JSON DEFAULT (JSON_ARRAY("foo", "bar"))); SHOW CREATE TABLE jd2; Table Create Table jd2 CREATE TABLE `jd2` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, `j` json DEFAULT (json_array(_utf8mb4'foo', _utf8mb4'bar')), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -1000,7 +1000,7 @@ CREATE TABLE jd3 (id SERIAL, j JSON DEFAULT (JSON_QUOTE("foobar"))); SHOW CREATE TABLE jd3; Table Create Table jd3 CREATE TABLE `jd3` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, `j` json DEFAULT (json_quote(_utf8mb4'foobar')), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -1013,14 +1013,14 @@ CREATE TABLE jd4 (id SERIAL); SHOW CREATE TABLE jd4; Table Create Table jd4 CREATE TABLE `jd4` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ALTER TABLE jd4 ADD COLUMN j JSON; SHOW CREATE TABLE jd4; Table Create Table jd4 CREATE TABLE `jd4` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, `j` json DEFAULT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -1028,7 +1028,7 @@ ALTER TABLE jd4 MODIFY COLUMN j JSON DEFAULT (JSON_QUOTE("foobar")); SHOW CREATE TABLE jd4; Table Create Table jd4 CREATE TABLE `jd4` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `id` bigint unsigned NOT NULL AUTO_INCREMENT, `j` json DEFAULT (json_quote(_utf8mb4'foobar')), UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -1068,7 +1068,7 @@ CREATE TABLE jd6 (id INT PRIMARY KEY); SHOW CREATE TABLE jd6; Table Create Table jd6 CREATE TABLE `jd6` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ALTER TABLE jd6 ADD COLUMN j JSON DEFAULT (JSON_ARRAY(41, 42, 43)); diff --git a/tests/integrationtest/r/ddl/foreign_key.result b/tests/integrationtest/r/ddl/foreign_key.result index 849ebf11448db..eb88db3e15c8b 100644 --- a/tests/integrationtest/r/ddl/foreign_key.result +++ b/tests/integrationtest/r/ddl/foreign_key.result @@ -128,8 +128,8 @@ alter table t2 add foreign key (a) references t1(id), add foreign key (b) refere show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, KEY `fk_1` (`a`), KEY `fk_2` (`b`), CONSTRAINT `fk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`id`), diff --git a/tests/integrationtest/r/ddl/multi_schema_change.result b/tests/integrationtest/r/ddl/multi_schema_change.result index ae93d25f72883..33511710a02a9 100644 --- a/tests/integrationtest/r/ddl/multi_schema_change.result +++ b/tests/integrationtest/r/ddl/multi_schema_change.result @@ -432,7 +432,7 @@ alter table t add index i(a), add primary key (a); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, KEY `i` (`a`), PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin diff --git a/tests/integrationtest/r/ddl/partition.result b/tests/integrationtest/r/ddl/partition.result index e3cedd6449e44..adfec8fb8846a 100644 --- a/tests/integrationtest/r/ddl/partition.result +++ b/tests/integrationtest/r/ddl/partition.result @@ -19,7 +19,7 @@ insert into t values (1,"a"),(2,"bye"),(3,"Hi"); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(100) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`) @@ -29,7 +29,7 @@ ALTER TABLE t REMOVE PARTITIONING; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(100) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`) @@ -49,7 +49,7 @@ Warning 1105 The statistics of new partitions will be outdated after reorganizin show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`) @@ -62,7 +62,7 @@ alter table t partition by hash(a) partitions 7; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`) @@ -72,7 +72,7 @@ alter table t partition by key(a) partitions 5; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`) @@ -85,20 +85,20 @@ CREATE TABLE test.issue50972_3 (id3 int) PARTITION BY LIST (test.issue50972_3.id show create table test.issue50972_1; Table Create Table issue50972_1 CREATE TABLE `issue50972_1` ( - `id1` int(11) DEFAULT NULL + `id1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`id1`) PARTITIONS 4 show create table test.issue50972_2; Table Create Table issue50972_2 CREATE TABLE `issue50972_2` ( - `id2` int(11) DEFAULT NULL + `id2` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id2`) (PARTITION `p0` VALUES LESS THAN (6)) show create table test.issue50972_3; Table Create Table issue50972_3 CREATE TABLE `issue50972_3` ( - `id3` int(11) DEFAULT NULL + `id3` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`id3`) (PARTITION `p0` VALUES IN (1,2)) @@ -112,20 +112,20 @@ ALTER TABLE test.issue50972_3 PARTITION BY LIST (test.issue50972_3.id3) ( PARTIT show create table test.issue50972_1; Table Create Table issue50972_1 CREATE TABLE `issue50972_1` ( - `id1` int(11) DEFAULT NULL + `id1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`id1`) PARTITIONS 4 show create table test.issue50972_2; Table Create Table issue50972_2 CREATE TABLE `issue50972_2` ( - `id2` int(11) DEFAULT NULL + `id2` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`id2`) (PARTITION `p0` VALUES LESS THAN (6)) show create table test.issue50972_3; Table Create Table issue50972_3 CREATE TABLE `issue50972_3` ( - `id3` int(11) DEFAULT NULL + `id3` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`id3`) (PARTITION `p0` VALUES IN (1,2)) @@ -139,7 +139,7 @@ PARTITIONS 2; show create table k1; Table Create Table k1 CREATE TABLE `k1` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `name` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -153,7 +153,7 @@ PARTITIONS 2; show create table k2; Table Create Table k2 CREATE TABLE `k2` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `name` varchar(20) DEFAULT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -167,7 +167,7 @@ PARTITIONS 2; show create table k3; Table Create Table k3 CREATE TABLE `k3` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `name` varchar(20) DEFAULT NULL, UNIQUE KEY `id` (`id`), PRIMARY KEY (`id`) /*T![clustered_index] NONCLUSTERED */ diff --git a/tests/integrationtest/r/ddl/reorg_partition.result b/tests/integrationtest/r/ddl/reorg_partition.result index 2f3bbad1059ad..09d1a95a14651 100644 --- a/tests/integrationtest/r/ddl/reorg_partition.result +++ b/tests/integrationtest/r/ddl/reorg_partition.result @@ -11,9 +11,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`), KEY `c` (`c`,`b`) @@ -70,9 +70,9 @@ a b c show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`), KEY `c` (`c`,`b`) @@ -104,9 +104,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`), KEY `c` (`c`,`b`) @@ -130,9 +130,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (`a`) @@ -156,9 +156,9 @@ Error 1526 (HY000): Table has no partition for value 56 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -172,9 +172,9 @@ admin check table t2; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(10) unsigned NOT NULL, + `a` int unsigned NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -191,9 +191,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`), KEY `c` (`c`,`b`) @@ -217,9 +217,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(255) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */, KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -260,9 +260,9 @@ ADMIN CHECK TABLE t; SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(3) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`a`,`b`) @@ -302,9 +302,9 @@ ADMIN CHECK TABLE t; SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(3) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`b`,`a`) @@ -324,9 +324,9 @@ ADMIN CHECK TABLE t; SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(3) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`b`,`a`) @@ -361,7 +361,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -387,7 +387,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`a`,`b`) @@ -426,7 +426,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -452,7 +452,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE COLUMNS(`b`,`a`) @@ -477,9 +477,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` varchar(55) DEFAULT NULL, - `c` int(11) DEFAULT NULL + `c` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (`a`) (PARTITION `p0` VALUES IN (12,51,13), @@ -492,9 +492,9 @@ admin check table t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(55) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */, KEY `b` (`b`), KEY `c` (`c`,`b`) @@ -526,9 +526,9 @@ a b c show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` varchar(55) DEFAULT NULL, - `c` int(11) DEFAULT NULL + `c` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST (ABS(`a`)) (PARTITION `p0` VALUES IN (0,1,2,12,51,13), @@ -552,9 +552,9 @@ a b c show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(55) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */, KEY `b` (`b`), KEY `c` (`c`,`b`) @@ -603,9 +603,9 @@ ADMIN CHECK TABLE t; SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(3) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -659,9 +659,9 @@ ADMIN CHECK TABLE t; SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(3) DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -713,7 +713,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -739,7 +739,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS(`a`,`b`) @@ -782,7 +782,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `b` (`b`), KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -808,7 +808,7 @@ Table Create Table t CREATE TABLE `t` ( `a` date DEFAULT NULL, `b` datetime DEFAULT NULL, - `c` int(11) DEFAULT NULL, + `c` int DEFAULT NULL, KEY `c` (`c`,`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY LIST COLUMNS(`b`,`a`) diff --git a/tests/integrationtest/r/ddl/sequence.result b/tests/integrationtest/r/ddl/sequence.result index a887999d17fdd..4de1f8c47f527 100644 --- a/tests/integrationtest/r/ddl/sequence.result +++ b/tests/integrationtest/r/ddl/sequence.result @@ -50,7 +50,7 @@ grant select on ddl__sequence.t to 'myuser'@'localhost'; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin show create sequence seq; Error 1142 (42000): SHOW command denied to user 'myuser'@'localhost' for table 'seq' diff --git a/tests/integrationtest/r/ddl/table_modify.result b/tests/integrationtest/r/ddl/table_modify.result index 86f7621b5d4a8..d1595896b130c 100644 --- a/tests/integrationtest/r/ddl/table_modify.result +++ b/tests/integrationtest/r/ddl/table_modify.result @@ -13,7 +13,7 @@ CREATE TABLE `collateTest` (`a` int, `b` varchar(10)) ENGINE=InnoDB DEFAULT CHAR show create table collateTest; Table Create Table collateTest CREATE TABLE `collateTest` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` varchar(10) COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci CREATE TABLE `collateTest2` (`a` int) CHARSET utf8 COLLATE utf8mb4_unicode_ci; @@ -24,7 +24,7 @@ CREATE TABLE `collateTest4` (`a` int) COLLATE utf8_uniCOde_ci; show create table collateTest4; Table Create Table collateTest4 CREATE TABLE `collateTest4` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci create database test2 default charset utf8 collate utf8_general_ci; use test2; diff --git a/tests/integrationtest/r/executor/ddl.result b/tests/integrationtest/r/executor/ddl.result index fcb645e82954a..b7c75847b74b1 100644 --- a/tests/integrationtest/r/executor/ddl.result +++ b/tests/integrationtest/r/executor/ddl.result @@ -209,7 +209,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![ttl] TTL=`updated_at` + INTERVAL 2 YEAR */ /*T![ttl] TTL_ENABLE='ON' */ /*T![ttl] TTL_JOB_INTERVAL='1h' */ ALTER TABLE t TTL_ENABLE = 'OFF'; SHOW CREATE TABLE t; @@ -217,7 +217,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![ttl] TTL=`updated_at` + INTERVAL 2 YEAR */ /*T![ttl] TTL_ENABLE='OFF' */ /*T![ttl] TTL_JOB_INTERVAL='1h' */ ALTER TABLE t TTL_JOB_INTERVAL = '1d'; SHOW CREATE TABLE t; @@ -225,7 +225,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![ttl] TTL=`updated_at` + INTERVAL 2 YEAR */ /*T![ttl] TTL_ENABLE='OFF' */ /*T![ttl] TTL_JOB_INTERVAL='1d' */ ALTER TABLE t TTL = `not_exist` + INTERVAL 2 YEAR; Error 1054 (42S22): Unknown column 'not_exist' in 'TTL config' @@ -241,7 +241,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at_2` datetime DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![ttl] TTL=`updated_at_2` + INTERVAL 2 YEAR */ /*T![ttl] TTL_ENABLE='OFF' */ /*T![ttl] TTL_JOB_INTERVAL='1d' */ ALTER TABLE t CHANGE `updated_at_2` `updated_at_3` date; SHOW CREATE TABLE t; @@ -249,7 +249,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at_3` date DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![ttl] TTL=`updated_at_3` + INTERVAL 2 YEAR */ /*T![ttl] TTL_ENABLE='OFF' */ /*T![ttl] TTL_JOB_INTERVAL='1d' */ ALTER TABLE t TTL = `updated_at_3` + INTERVAL 3 YEAR; SHOW CREATE TABLE t; @@ -257,7 +257,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at_3` date DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![ttl] TTL=`updated_at_3` + INTERVAL 3 YEAR */ /*T![ttl] TTL_ENABLE='OFF' */ /*T![ttl] TTL_JOB_INTERVAL='1d' */ ALTER TABLE t TTL_ENABLE = 'OFF' REMOVE TTL; Error 8200 (HY000): Unsupported multi schema change for alter table ttl @@ -267,7 +267,7 @@ Table Create Table t CREATE TABLE `t` ( `created_at` datetime DEFAULT NULL, `updated_at_3` date DEFAULT NULL, - `wrong_type` int(11) DEFAULT NULL + `wrong_type` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ALTER TABLE t TTL_ENABLE = 'OFF'; Error 8150 (HY000): Cannot set TTL_ENABLE on a table without TTL config diff --git a/tests/integrationtest/r/executor/foreign_key.result b/tests/integrationtest/r/executor/foreign_key.result index 3174c54565408..c8ebd19599ed0 100644 --- a/tests/integrationtest/r/executor/foreign_key.result +++ b/tests/integrationtest/r/executor/foreign_key.result @@ -109,9 +109,9 @@ create table t1 (id int key, leader int, leader2 int, index(leader), index(leade show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `id` int(11) NOT NULL, - `leader` int(11) DEFAULT NULL, - `leader2` int(11) DEFAULT NULL, + `id` int NOT NULL, + `leader` int DEFAULT NULL, + `leader2` int DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `leader` (`leader`), KEY `leader2` (`leader2`), @@ -122,9 +122,9 @@ alter table t1 add constraint fk2 foreign key (leader2) references t1 (id); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `id` int(11) NOT NULL, - `leader` int(11) DEFAULT NULL, - `leader2` int(11) DEFAULT NULL, + `id` int NOT NULL, + `leader` int DEFAULT NULL, + `leader2` int DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `leader` (`leader`), KEY `leader2` (`leader2`), @@ -467,8 +467,8 @@ alter table orders modify user_id int null; show create table orders; Table Create Table orders CREATE TABLE `orders` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `user_id` int DEFAULT NULL, `doc` json DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `fk_user_id` (`user_id`), diff --git a/tests/integrationtest/r/executor/show.result b/tests/integrationtest/r/executor/show.result index da6645fc60869..186e4540e7974 100644 --- a/tests/integrationtest/r/executor/show.result +++ b/tests/integrationtest/r/executor/show.result @@ -3,7 +3,7 @@ create table auto_random_tbl1 (a bigint primary key auto_random(3), b varchar(25 show create table `auto_random_tbl1`; Table Create Table auto_random_tbl1 CREATE TABLE `auto_random_tbl1` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(3) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(3) */, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -12,7 +12,7 @@ create table auto_random_tbl2 (a bigint auto_random primary key, b char); show create table auto_random_tbl2; Table Create Table auto_random_tbl2 CREATE TABLE `auto_random_tbl2` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, `b` char(1) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -21,7 +21,7 @@ create table auto_random_tbl3 (a bigint /*T![auto_rand] auto_random */ primary k show create table auto_random_tbl3; Table Create Table auto_random_tbl3 CREATE TABLE `auto_random_tbl3` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists auto_random_tbl4; @@ -29,7 +29,7 @@ create table auto_random_tbl4 (a bigint primary key auto_random(5), b varchar(25 show create table `auto_random_tbl4`; Table Create Table auto_random_tbl4 CREATE TABLE `auto_random_tbl4` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_rand_base] AUTO_RANDOM_BASE=100 */ @@ -38,7 +38,7 @@ create table auto_random_tbl5 (a bigint auto_random primary key, b char) auto_ra show create table auto_random_tbl5; Table Create Table auto_random_tbl5 CREATE TABLE `auto_random_tbl5` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, `b` char(1) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_rand_base] AUTO_RANDOM_BASE=50 */ @@ -47,7 +47,7 @@ create table auto_random_tbl6 (a bigint /*T![auto_rand] auto_random */ primary k show create table auto_random_tbl6; Table Create Table auto_random_tbl6 CREATE TABLE `auto_random_tbl6` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(5) */, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_rand_base] AUTO_RANDOM_BASE=200 */ drop table if exists auto_random_tbl7; @@ -55,7 +55,7 @@ create table auto_random_tbl7 (a bigint primary key auto_random(4, 32), b varcha show create table auto_random_tbl7; Table Create Table auto_random_tbl7 CREATE TABLE `auto_random_tbl7` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(4, 32) */, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(4, 32) */, `b` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -64,7 +64,7 @@ create table t(a int auto_increment key) auto_id_cache = 10; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL AUTO_INCREMENT, + `a` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_id_cache] AUTO_ID_CACHE=10 */ drop table if exists t; @@ -72,8 +72,8 @@ create table t(a int auto_increment unique, b int key) auto_id_cache 100; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL AUTO_INCREMENT, - `b` int(11) NOT NULL, + `a` int NOT NULL AUTO_INCREMENT, + `b` int NOT NULL, PRIMARY KEY (`b`) /*T![clustered_index] CLUSTERED */, UNIQUE KEY `a` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_id_cache] AUTO_ID_CACHE=100 */ @@ -82,7 +82,7 @@ create table t(a int key) auto_id_cache 5; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![auto_id_cache] AUTO_ID_CACHE=5 */ drop table if exists t2; @@ -108,8 +108,8 @@ CREATE TABLE `test1` (`id` int(0) NOT NULL,`num` int(0) DEFAULT NULL) ENGINE=Inn create or replace view test1_v as(select id,row_number() over (partition by num) from test1); desc test1_v; Field Type Null Key Default Extra -id int(0) NO NULL -row_number() over (partition by num) bigint(21) YES NULL +id int NO NULL +row_number() over (partition by num) bigint YES NULL drop table if exists t; create table t(created_at datetime) ttl = `created_at` + INTERVAL 100 YEAR; show create table t; @@ -191,16 +191,16 @@ create table t(c int, b int as (c + 1))ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COL show create table `t`; Table Create Table t CREATE TABLE `t` ( - `c` int(11) DEFAULT NULL, - `b` int(11) GENERATED ALWAYS AS (`c` + 1) VIRTUAL + `c` int DEFAULT NULL, + `b` int GENERATED ALWAYS AS (`c` + 1) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t; create table t(c int, b int as (c + 1) not null)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; show create table `t`; Table Create Table t CREATE TABLE `t` ( - `c` int(11) DEFAULT NULL, - `b` int(11) GENERATED ALWAYS AS (`c` + 1) VIRTUAL NOT NULL + `c` int DEFAULT NULL, + `b` int GENERATED ALWAYS AS (`c` + 1) VIRTUAL NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t; create table t ( a char(10) charset utf8 collate utf8_bin, b char(10) as (rtrim(a))); @@ -246,8 +246,8 @@ create table t (a int, b int) shard_row_id_bits = 4 pre_split_regions=3; show create table `t`; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL + `a` int DEFAULT NULL, + `b` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T! SHARD_ROW_ID_BITS=4 PRE_SPLIT_REGIONS=3 */ drop table t; drop table if exists t1; @@ -255,20 +255,20 @@ create table t1(c int unsigned default 0); show create table `t1`; Table Create Table t1 CREATE TABLE `t1` ( - `c` int(10) unsigned DEFAULT '0' + `c` int unsigned DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table t1; CREATE TABLE `log` (`LOG_ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,`ROUND_ID` bigint(20) UNSIGNED NOT NULL,`USER_ID` int(10) UNSIGNED NOT NULL,`USER_IP` int(10) UNSIGNED DEFAULT NULL,`END_TIME` datetime NOT NULL,`USER_TYPE` int(11) DEFAULT NULL,`APP_ID` int(11) DEFAULT NULL,PRIMARY KEY (`LOG_ID`,`END_TIME`) NONCLUSTERED,KEY `IDX_EndTime` (`END_TIME`),KEY `IDX_RoundId` (`ROUND_ID`),KEY `IDX_UserId_EndTime` (`USER_ID`,`END_TIME`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=505488 PARTITION BY RANGE ( month(`end_time`) ) (PARTITION `p1` VALUES LESS THAN (2),PARTITION `p2` VALUES LESS THAN (3),PARTITION `p3` VALUES LESS THAN (4),PARTITION `p4` VALUES LESS THAN (5),PARTITION `p5` VALUES LESS THAN (6),PARTITION `p6` VALUES LESS THAN (7),PARTITION `p7` VALUES LESS THAN (8),PARTITION `p8` VALUES LESS THAN (9),PARTITION `p9` VALUES LESS THAN (10),PARTITION `p10` VALUES LESS THAN (11),PARTITION `p11` VALUES LESS THAN (12),PARTITION `p12` VALUES LESS THAN (MAXVALUE)); show create table log; Table Create Table log CREATE TABLE `log` ( - `LOG_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `ROUND_ID` bigint(20) unsigned NOT NULL, - `USER_ID` int(10) unsigned NOT NULL, - `USER_IP` int(10) unsigned DEFAULT NULL, + `LOG_ID` bigint unsigned NOT NULL AUTO_INCREMENT, + `ROUND_ID` bigint unsigned NOT NULL, + `USER_ID` int unsigned NOT NULL, + `USER_IP` int unsigned DEFAULT NULL, `END_TIME` datetime NOT NULL, - `USER_TYPE` int(11) DEFAULT NULL, - `APP_ID` int(11) DEFAULT NULL, + `USER_TYPE` int DEFAULT NULL, + `APP_ID` int DEFAULT NULL, PRIMARY KEY (`LOG_ID`,`END_TIME`) /*T![clustered_index] NONCLUSTERED */, KEY `IDX_EndTime` (`END_TIME`), KEY `IDX_RoundId` (`ROUND_ID`), @@ -305,7 +305,7 @@ alter table t add index expr_idx((a*b+1)); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` double DEFAULT NULL, KEY `expr_idx` ((`a` * `b` + 1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -340,7 +340,7 @@ create table default_num(a int default 11); show create table default_num; Table Create Table default_num CREATE TABLE `default_num` ( - `a` int(11) DEFAULT '11' + `a` int DEFAULT '11' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists default_varchar; create table default_varchar(a varchar(10) default "haha"); @@ -354,7 +354,7 @@ create table default_sequence(a int default nextval(seq)); show create table default_sequence; Table Create Table default_sequence CREATE TABLE `default_sequence` ( - `a` int(11) DEFAULT (nextval(`executor__show`.`seq`)) + `a` int DEFAULT (nextval(`executor__show`.`seq`)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin set @@foreign_key_checks=0; DROP TABLE IF EXISTS parent, child; @@ -363,8 +363,8 @@ CREATE TABLE parent ( id INT NOT NULL PRIMARY KEY auto_increment ); show create table child; Table Create Table child CREATE TABLE `child` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `parent_id` int(11) NOT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `parent_id` int NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `par_ind` (`parent_id`), CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) @@ -374,8 +374,8 @@ CREATE TABLE child (id INT NOT NULL PRIMARY KEY auto_increment, parent_id INT NO show create table child; Table Create Table child CREATE TABLE `child` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `parent_id` int(11) NOT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `parent_id` int NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `par_ind` (`parent_id`), CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE @@ -387,8 +387,8 @@ create table test2.t2 (id int key, b int, foreign key fk(b) references test1.t1( show create table test2.t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `id` int NOT NULL, + `b` int DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `fk` (`b`), CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `test1`.`t1` (`id`) @@ -400,7 +400,7 @@ create table t(a int, b char(10) as ('a')); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(10) GENERATED ALWAYS AS (_utf8mb4'a') VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; @@ -408,7 +408,7 @@ create table t(a int, b char(10) as (_utf8'a')); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, `b` char(10) GENERATED ALWAYS AS (_utf8'a') VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin DROP TABLE IF EXISTS t; @@ -421,7 +421,7 @@ partition p3 values in (7,8,15,16,null) show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `name` varchar(10) DEFAULT NULL, UNIQUE KEY `idx` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -440,7 +440,7 @@ partition p3 values in (7,8,15,16,null) show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `name` varchar(10) DEFAULT NULL, UNIQUE KEY `idx` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -456,7 +456,7 @@ partition p1 values in ((1, '1'))); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `name` varchar(10) DEFAULT NULL, UNIQUE KEY `idx` (`id`,`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -468,7 +468,7 @@ create table t (id int primary key, v varchar(255) not null, key idx_v (v) comme show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `v` varchar(255) NOT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `idx_v` (`v`) COMMENT 'foo''bar' @@ -484,7 +484,7 @@ PARTITION pOdd COMMENT = "Odd ids"); show create table `thash`; Table Create Table thash CREATE TABLE `thash` ( - `id` bigint(20) unsigned NOT NULL, + `id` bigint unsigned NOT NULL, `data` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -501,7 +501,7 @@ PARTITION BY HASH (`id`); show create table `thash`; Table Create Table thash CREATE TABLE `thash` ( - `id` bigint(20) unsigned NOT NULL, + `id` bigint unsigned NOT NULL, `data` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -511,7 +511,7 @@ create table t(a int primary key, b varchar(20) default '\\'); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, + `a` int NOT NULL, `b` varchar(20) DEFAULT '\\', PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -573,7 +573,7 @@ create temporary table v1 (a int); show create table v1; Table Create Table v1 CREATE TEMPORARY TABLE `v1` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop view v1; show create view v1; @@ -902,13 +902,13 @@ create global temporary table t3 (i int primary key, j int) on commit delete row show create table t1; Table Create Table t1 CREATE GLOBAL TEMPORARY TABLE `t1` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ON COMMIT DELETE ROWS show create table t3; Table Create Table t3 CREATE GLOBAL TEMPORARY TABLE `t3` ( - `i` int(11) NOT NULL, - `j` int(11) DEFAULT NULL, + `i` int NOT NULL, + `j` int DEFAULT NULL, PRIMARY KEY (`i`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ON COMMIT DELETE ROWS CREATE GLOBAL TEMPORARY TABLE `t4` ( @@ -925,8 +925,8 @@ KEY b (b)) ON COMMIT DELETE ROWS; show create table t5; Table Create Table t5 CREATE GLOBAL TEMPORARY TABLE `t5` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `b` int(11) NOT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `b` int NOT NULL, `pad` varbinary(255) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `b` (`b`) @@ -935,8 +935,8 @@ create temporary table t6 (i int primary key, j int); show create table t6; Table Create Table t6 CREATE TEMPORARY TABLE `t6` ( - `i` int(11) NOT NULL, - `j` int(11) DEFAULT NULL, + `i` int NOT NULL, + `j` int DEFAULT NULL, PRIMARY KEY (`i`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create temporary table t7 (i int primary key auto_increment, j int); @@ -950,8 +950,8 @@ i j show create table t7; Table Create Table t7 CREATE TEMPORARY TABLE `t7` ( - `i` int(11) NOT NULL AUTO_INCREMENT, - `j` int(11) DEFAULT NULL, + `i` int NOT NULL AUTO_INCREMENT, + `j` int DEFAULT NULL, PRIMARY KEY (`i`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=3 commit; @@ -961,7 +961,7 @@ alter table t1 cache; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /* CACHED ON */ select create_options from information_schema.tables where table_schema = 'executor__show' and table_name = 't1'; create_options @@ -970,7 +970,7 @@ alter table t1 nocache; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `id` int(11) DEFAULT NULL + `id` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin select create_options from information_schema.tables where table_schema = 'executor__show' and table_name = 't1'; create_options @@ -1137,7 +1137,7 @@ CREATE TABLE `t` (a BIGINT PRIMARY KEY AUTO_RANDOM(2), b INT) PRE_SPLIT_REGIONS= SHOW CREATE TABLE `t`; Table Create Table t CREATE TABLE `t` ( - `a` bigint(20) NOT NULL /*T![auto_rand] AUTO_RANDOM(2) */, - `b` int(11) DEFAULT NULL, + `a` bigint NOT NULL /*T![auto_rand] AUTO_RANDOM(2) */, + `b` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] CLUSTERED */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T! PRE_SPLIT_REGIONS=2 */ diff --git a/tests/integrationtest/r/explain.result b/tests/integrationtest/r/explain.result index 9c299a213be42..6532a554d4fa0 100644 --- a/tests/integrationtest/r/explain.result +++ b/tests/integrationtest/r/explain.result @@ -3,26 +3,26 @@ drop table if exists t; create table t (id int, c1 timestamp); show columns from t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL explain t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL describe t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL desc t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL desc t c1; Field Type Null Key Default Extra c1 timestamp YES NULL desc t id; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL drop table if exists t; create table t(id int primary key, a int, b int); set session tidb_hashagg_partial_concurrency = 1; diff --git a/tests/integrationtest/r/explain_cte.result b/tests/integrationtest/r/explain_cte.result index 99abb87849888..2590f9e78bd75 100644 --- a/tests/integrationtest/r/explain_cte.result +++ b/tests/integrationtest/r/explain_cte.result @@ -25,7 +25,7 @@ CTEFullScan_17 2.00 root CTE:cte data:CTE_0 CTE_0 2.00 root Recursive CTE ├─Projection_11(Seed Part) 1.00 root 1->Column#2 │ └─TableDual_12 1.00 root rows:1 -└─Projection_13(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection_13(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection_14 0.80 root lt(Column#3, 10) └─CTETable_15 1.00 root Scan on CTE_0 explain with recursive cte(a) as (select c2 from t1 union select a+1 from cte where a < 10) select * from cte; @@ -34,7 +34,7 @@ CTEFullScan_20 8001.00 root CTE:cte data:CTE_0 CTE_0 8001.00 root Recursive CTE ├─TableReader_13(Seed Part) 10000.00 root data:TableFullScan_12 │ └─TableFullScan_12 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_16(Recursive Part) 8000.00 root cast(plus(explain_cte.t1.c2, 1), int(11))->explain_cte.t1.c2 +└─Projection_16(Recursive Part) 8000.00 root cast(plus(explain_cte.t1.c2, 1), int)->explain_cte.t1.c2 └─Selection_17 8000.00 root lt(explain_cte.t1.c2, 10) └─CTETable_18 10000.00 root Scan on CTE_0 explain with cte(a) as (with recursive cte1(a) as (select 1 union select a + 1 from cte1 where a < 10) select * from cte1) select * from cte; @@ -43,7 +43,7 @@ CTEFullScan_29 2.00 root CTE:cte1 data:CTE_2 CTE_2 2.00 root Recursive CTE ├─Projection_23(Seed Part) 1.00 root 1->Column#9 │ └─TableDual_24 1.00 root rows:1 -└─Projection_25(Recursive Part) 0.80 root cast(plus(Column#10, 1), bigint(1) BINARY)->Column#12 +└─Projection_25(Recursive Part) 0.80 root cast(plus(Column#10, 1), bigint BINARY)->Column#12 └─Selection_26 0.80 root lt(Column#10, 10) └─CTETable_27 1.00 root Scan on CTE_2 explain with recursive cte(a) as (select 1 union select a+1 from cte where a < 10) select * from cte t1, cte t2; @@ -54,7 +54,7 @@ HashJoin_20 4.00 root CARTESIAN inner join CTE_0 2.00 root Recursive CTE ├─Projection_13(Seed Part) 1.00 root 1->Column#2 │ └─TableDual_14 1.00 root rows:1 -└─Projection_15(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection_15(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection_16 0.80 root lt(Column#3, 10) └─CTETable_17 1.00 root Scan on CTE_0 explain with cte(a) as (with recursive cte1(a) as (select 1 union select a + 1 from cte1 where a < 10) select * from cte1) select * from cte t1, cte t2; @@ -67,7 +67,7 @@ CTE_0 2.00 root Non-Recursive CTE CTE_1 2.00 root Recursive CTE ├─Projection_16(Seed Part) 1.00 root 1->Column#2 │ └─TableDual_17 1.00 root rows:1 -└─Projection_18(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection_18(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection_19 0.80 root lt(Column#3, 10) └─CTETable_20 1.00 root Scan on CTE_1 explain with recursive cte1(a) as (select 1 union select a+1 from cte1 where a < 10), cte2(a) as (select c2 from t1 union select a+1 from cte2 where a < 10) select * from cte1, cte2; @@ -78,13 +78,13 @@ HashJoin_37 16002.00 root CARTESIAN inner join CTE_0 2.00 root Recursive CTE ├─Projection_21(Seed Part) 1.00 root 1->Column#2 │ └─TableDual_22 1.00 root rows:1 -└─Projection_23(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection_23(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection_24 0.80 root lt(Column#3, 10) └─CTETable_25 1.00 root Scan on CTE_0 CTE_1 8001.00 root Recursive CTE ├─TableReader_28(Seed Part) 10000.00 root data:TableFullScan_27 │ └─TableFullScan_27 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_31(Recursive Part) 8000.00 root cast(plus(explain_cte.t1.c2, 1), int(11))->explain_cte.t1.c2 +└─Projection_31(Recursive Part) 8000.00 root cast(plus(explain_cte.t1.c2, 1), int)->explain_cte.t1.c2 └─Selection_32 8000.00 root lt(explain_cte.t1.c2, 10) └─CTETable_33 10000.00 root Scan on CTE_1 explain with q(a,b) as (select * from t1) select /*+ merge(q) no_merge(q1) */ * from q, q q1 where q.a=1 and q1.a=2; @@ -102,7 +102,7 @@ CTEFullScan_17 2.00 root CTE:cte data:CTE_0 CTE_0 2.00 root Recursive CTE ├─Projection_11(Seed Part) 1.00 root 1->Column#3, a1->Column#4 │ └─TableDual_12 1.00 root rows:1 -└─Projection_13(Recursive Part) 0.80 root cast(plus(Column#5, 1), bigint(1) BINARY)->Column#9, cast(concat(Column#6, 1), var_string(21))->Column#10 +└─Projection_13(Recursive Part) 0.80 root cast(plus(Column#5, 1), bigint BINARY)->Column#9, cast(concat(Column#6, 1), var_string(21))->Column#10 └─Selection_14 0.80 root lt(Column#5, 5) └─CTETable_15 1.00 root Scan on CTE_0 explain select * from t1 dt where exists(with recursive qn as (select c1*0+1 as b union all select b+1 from qn where b=0) select * from qn where b=1); @@ -124,7 +124,7 @@ CTEFullScan_19 8001.00 root CTE:cte1 data:CTE_0 CTE_0 8001.00 root Recursive CTE, limit(offset:0, count:1) ├─TableReader_13(Seed Part) 10000.00 root data:TableFullScan_12 │ └─TableFullScan_12 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_16(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int(11))->explain_cte.t1.c1 +└─Projection_16(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int)->explain_cte.t1.c1 └─CTETable_17 10000.00 root Scan on CTE_0 explain with recursive cte1(c1) as (select c1 from t1 union select c1 + 1 c1 from cte1 limit 100 offset 100) select * from cte1; id estRows task access object operator info @@ -132,7 +132,7 @@ CTEFullScan_19 8001.00 root CTE:cte1 data:CTE_0 CTE_0 8001.00 root Recursive CTE, limit(offset:100, count:100) ├─TableReader_13(Seed Part) 10000.00 root data:TableFullScan_12 │ └─TableFullScan_12 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_16(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int(11))->explain_cte.t1.c1 +└─Projection_16(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int)->explain_cte.t1.c1 └─CTETable_17 10000.00 root Scan on CTE_0 explain with recursive cte1(c1) as (select c1 from t1 union select c1 + 1 c1 from cte1 limit 0 offset 0) select * from cte1; id estRows task access object operator info @@ -140,7 +140,7 @@ CTEFullScan_19 8001.00 root CTE:cte1 data:CTE_0 CTE_0 8001.00 root Recursive CTE, limit(offset:0, count:0) ├─TableReader_13(Seed Part) 10000.00 root data:TableFullScan_12 │ └─TableFullScan_12 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_16(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int(11))->explain_cte.t1.c1 +└─Projection_16(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int)->explain_cte.t1.c1 └─CTETable_17 10000.00 root Scan on CTE_0 explain with recursive cte1(c1) as (select c1 from t1 union select c1 + 1 c1 from cte1 limit 1) select * from cte1 dt1 join cte1 dt2 on dt1.c1 = dt2.c1; id estRows task access object operator info @@ -152,7 +152,7 @@ HashJoin_25 6400.80 root inner join, equal:[eq(explain_cte.t1.c1, explain_cte.t CTE_0 8001.00 root Recursive CTE, limit(offset:0, count:1) ├─TableReader_18(Seed Part) 10000.00 root data:TableFullScan_17 │ └─TableFullScan_17 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_21(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int(11))->explain_cte.t1.c1 +└─Projection_21(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int)->explain_cte.t1.c1 └─CTETable_22 10000.00 root Scan on CTE_0 explain with recursive cte1(c1) as (select c1 from t1 union select c1 + 1 c1 from cte1 limit 0 offset 0) select * from cte1 dt1 join cte1 dt2 on dt1.c1 = dt2.c1; id estRows task access object operator info @@ -164,7 +164,7 @@ HashJoin_25 6400.80 root inner join, equal:[eq(explain_cte.t1.c1, explain_cte.t CTE_0 8001.00 root Recursive CTE, limit(offset:0, count:0) ├─TableReader_18(Seed Part) 10000.00 root data:TableFullScan_17 │ └─TableFullScan_17 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_21(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int(11))->explain_cte.t1.c1 +└─Projection_21(Recursive Part) 10000.00 root cast(plus(explain_cte.t1.c1, 1), int)->explain_cte.t1.c1 └─CTETable_22 10000.00 root Scan on CTE_0 CREATE TABLE `customer` ( `c_customer_sk` int(11) NOT NULL, diff --git a/tests/integrationtest/r/explain_easy.result b/tests/integrationtest/r/explain_easy.result index e7b1e5771e56f..7d40b5045437a 100644 --- a/tests/integrationtest/r/explain_easy.result +++ b/tests/integrationtest/r/explain_easy.result @@ -528,27 +528,27 @@ Projection 10000.00 root ifnull(explain_easy.t.a, 0)->Column#5 └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select ifnull(nb, 0) from t; id estRows task access object operator info -Projection 10000.00 root cast(explain_easy.t.nb, bigint(11) BINARY)->Column#5 +Projection 10000.00 root cast(explain_easy.t.nb, bigint BINARY)->Column#5 └─TableReader 10000.00 root data:TableFullScan └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select ifnull(nb, 0), ifnull(nc, 0) from t; id estRows task access object operator info -Projection 10000.00 root cast(explain_easy.t.nb, bigint(11) BINARY)->Column#5, cast(explain_easy.t.nc, bigint(11) BINARY)->Column#6 +Projection 10000.00 root cast(explain_easy.t.nb, bigint BINARY)->Column#5, cast(explain_easy.t.nc, bigint BINARY)->Column#6 └─TableReader 10000.00 root data:TableFullScan └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select ifnull(a, 0), ifnull(nb, 0) from t; id estRows task access object operator info -Projection 10000.00 root ifnull(explain_easy.t.a, 0)->Column#5, cast(explain_easy.t.nb, bigint(11) BINARY)->Column#6 +Projection 10000.00 root ifnull(explain_easy.t.a, 0)->Column#5, cast(explain_easy.t.nb, bigint BINARY)->Column#6 └─TableReader 10000.00 root data:TableFullScan └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select ifnull(nb, 0), ifnull(nb, 0) from t; id estRows task access object operator info -Projection 10000.00 root cast(explain_easy.t.nb, bigint(11) BINARY)->Column#5, cast(explain_easy.t.nb, bigint(11) BINARY)->Column#6 +Projection 10000.00 root cast(explain_easy.t.nb, bigint BINARY)->Column#5, cast(explain_easy.t.nb, bigint BINARY)->Column#6 └─TableReader 10000.00 root data:TableFullScan └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select 1+ifnull(nb, 0) from t; id estRows task access object operator info -Projection 10000.00 root plus(1, cast(explain_easy.t.nb, bigint(11) BINARY))->Column#5 +Projection 10000.00 root plus(1, cast(explain_easy.t.nb, bigint BINARY))->Column#5 └─TableReader 10000.00 root data:TableFullScan └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select 1+ifnull(a, 0) from t; @@ -558,7 +558,7 @@ Projection 10000.00 root plus(1, ifnull(explain_easy.t.a, 0))->Column#5 └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format = 'brief' select 1+ifnull(nb, 0) from t where nb=1; id estRows task access object operator info -Projection 10.00 root plus(1, cast(explain_easy.t.nb, bigint(11) BINARY))->Column#5 +Projection 10.00 root plus(1, cast(explain_easy.t.nb, bigint BINARY))->Column#5 └─TableReader 10.00 root data:Selection └─Selection 10.00 cop[tikv] eq(explain_easy.t.nb, 1) └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo @@ -566,34 +566,34 @@ explain format = 'brief' select * from t ta left outer join t tb on ta.nb = tb.n id estRows task access object operator info HashJoin 10000.00 root left outer join, equal:[eq(explain_easy.t.nb, explain_easy.t.nb)], left cond:[gt(explain_easy.t.a, 1)] ├─TableReader(Build) 8000.00 root data:Selection -│ └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint(11) BINARY), 0) +│ └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint BINARY), 0) │ └─TableFullScan 10000.00 cop[tikv] table:tb keep order:false, stats:pseudo └─TableReader(Probe) 8000.00 root data:Selection - └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint(11) BINARY), 0) + └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint BINARY), 0) └─TableFullScan 10000.00 cop[tikv] table:ta keep order:false, stats:pseudo explain format = 'brief' select * from t ta right outer join t tb on ta.nb = tb.nb and ta.a > 1 where ifnull(tb.nb, 1) or tb.nb is null; id estRows task access object operator info HashJoin 8000.00 root right outer join, equal:[eq(explain_easy.t.nb, explain_easy.t.nb)] ├─TableReader(Build) 2666.67 root data:Selection -│ └─Selection 2666.67 cop[tikv] cast(explain_easy.t.nb, bigint(11) BINARY), gt(explain_easy.t.a, 1) +│ └─Selection 2666.67 cop[tikv] cast(explain_easy.t.nb, bigint BINARY), gt(explain_easy.t.a, 1) │ └─TableFullScan 10000.00 cop[tikv] table:ta keep order:false, stats:pseudo └─TableReader(Probe) 8000.00 root data:Selection - └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint(11) BINARY), 0) + └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint BINARY), 0) └─TableFullScan 10000.00 cop[tikv] table:tb keep order:false, stats:pseudo explain format = 'brief' select * from t ta inner join t tb on ta.nb = tb.nb and ta.a > 1 where ifnull(tb.nb, 1) or tb.nb is null; id estRows task access object operator info HashJoin 3333.33 root inner join, equal:[eq(explain_easy.t.nb, explain_easy.t.nb)] ├─TableReader(Build) 2666.67 root data:Selection -│ └─Selection 2666.67 cop[tikv] cast(explain_easy.t.nb, bigint(11) BINARY), gt(explain_easy.t.a, 1) +│ └─Selection 2666.67 cop[tikv] cast(explain_easy.t.nb, bigint BINARY), gt(explain_easy.t.a, 1) │ └─TableFullScan 10000.00 cop[tikv] table:ta keep order:false, stats:pseudo └─TableReader(Probe) 8000.00 root data:Selection - └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint(11) BINARY), 0) + └─Selection 8000.00 cop[tikv] or(cast(explain_easy.t.nb, bigint BINARY), 0) └─TableFullScan 10000.00 cop[tikv] table:tb keep order:false, stats:pseudo explain format = 'brief' select ifnull(t.nc, 1) in (select count(*) from t s , t t1 where s.a = t.a and s.a = t1.a) from t; id estRows task access object operator info Projection 10000.00 root Column#22 └─Apply 10000.00 root left outer semi join, equal:[eq(Column#23, Column#21)] - ├─Projection(Build) 10000.00 root explain_easy.t.a, cast(explain_easy.t.nc, bigint(11) BINARY)->Column#23 + ├─Projection(Build) 10000.00 root explain_easy.t.a, cast(explain_easy.t.nc, bigint BINARY)->Column#23 │ └─TableReader 10000.00 root data:TableFullScan │ └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo └─HashAgg(Probe) 10000.00 root funcs:count(Column#25)->Column#21 diff --git a/tests/integrationtest/r/explain_stats.result b/tests/integrationtest/r/explain_stats.result index 441150c11ffd0..9e509164aec67 100644 --- a/tests/integrationtest/r/explain_stats.result +++ b/tests/integrationtest/r/explain_stats.result @@ -4,23 +4,23 @@ create table t (id int, c1 timestamp); load stats 's/explain_stats_t.json'; show columns from t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL explain t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL describe t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL desc t; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL c1 timestamp YES NULL desc t c1; Field Type Null Key Default Extra c1 timestamp YES NULL desc t id; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL diff --git a/tests/integrationtest/r/expression/misc.result b/tests/integrationtest/r/expression/misc.result index c6e95ea94f305..547e7d2e965de 100644 --- a/tests/integrationtest/r/expression/misc.result +++ b/tests/integrationtest/r/expression/misc.result @@ -1017,7 +1017,7 @@ SELECT + - (- CASE + col0 WHEN + CAST( col0 AS SIGNED ) THEN col1 WHEN 79 THEN N show create table tab0; Table Create Table tab0 CREATE TABLE `tab0` ( - `col0` int(11) DEFAULT NULL, - `col1` int(11) DEFAULT NULL, - `col2` int(11) DEFAULT NULL + `col0` int DEFAULT NULL, + `col1` int DEFAULT NULL, + `col2` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin diff --git a/tests/integrationtest/r/globalindex/analyze.result b/tests/integrationtest/r/globalindex/analyze.result index a1d95df19af5f..a441d6de0a884 100644 --- a/tests/integrationtest/r/globalindex/analyze.result +++ b/tests/integrationtest/r/globalindex/analyze.result @@ -10,6 +10,9 @@ UNIQUE KEY `idx1` (`c`) global PARTITION BY HASH (`b`) PARTITIONS 4; show warnings; Level Code Message +Warning 1681 Integer display width is deprecated and will be removed in a future release. +Warning 1681 Integer display width is deprecated and will be removed in a future release. +Warning 1681 Integer display width is deprecated and will be removed in a future release. Warning 8265 Auto analyze is not effective for index 'idx', need analyze manually insert into t values (1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); insert into t(a) values (1), (2); diff --git a/tests/integrationtest/r/globalindex/ddl.result b/tests/integrationtest/r/globalindex/ddl.result index 3c2a58b7d799c..e09c4c2af735a 100644 --- a/tests/integrationtest/r/globalindex/ddl.result +++ b/tests/integrationtest/r/globalindex/ddl.result @@ -57,8 +57,8 @@ PARTITION BY HASH (`b`) PARTITIONS 3; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` int(11) DEFAULT NULL, + `a` int NOT NULL, + `b` int DEFAULT NULL, PRIMARY KEY (`a`) /*T![clustered_index] NONCLUSTERED */ /*T![global_index] GLOBAL */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`b`) PARTITIONS 3 diff --git a/tests/integrationtest/r/globalindex/expression_index.result b/tests/integrationtest/r/globalindex/expression_index.result index e55d24a4627f1..d8460fd4d771b 100644 --- a/tests/integrationtest/r/globalindex/expression_index.result +++ b/tests/integrationtest/r/globalindex/expression_index.result @@ -7,6 +7,7 @@ UNIQUE KEY `idx` ((lower(`b`))) global PARTITION BY HASH (`a`) PARTITIONS 5; show warnings; Level Code Message +Warning 1681 Integer display width is deprecated and will be removed in a future release. Warning 8265 Auto analyze is not effective for index 'idx', need analyze manually insert into t values (1, 'a'), (2, 'b'), (3, 'C'), (4, 'd'), (5, 'x'); insert into t values (3, 'c'); diff --git a/tests/integrationtest/r/globalindex/misc.result b/tests/integrationtest/r/globalindex/misc.result index 643fa3fb43d7f..47a090e264099 100644 --- a/tests/integrationtest/r/globalindex/misc.result +++ b/tests/integrationtest/r/globalindex/misc.result @@ -184,8 +184,8 @@ create table t (a int, b int, unique key idx_b (b) global) partition by hash (a) show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, UNIQUE KEY `idx_b` (`b`) /*T![global_index] GLOBAL */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`a`) PARTITIONS 3 @@ -199,8 +199,8 @@ PARTITION BY HASH (`a`) PARTITIONS 3; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, UNIQUE KEY `idx_b` (`b`) /*T![global_index] GLOBAL */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`a`) PARTITIONS 3 @@ -212,8 +212,8 @@ alter table t partition by hash (a) partitions 3 update indexes (idx_b GLOBAL); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, UNIQUE KEY `idx_b` (`b`) /*T![global_index] GLOBAL */ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`a`) PARTITIONS 3 @@ -223,8 +223,8 @@ alter table t partition by hash (b) partitions 3 update indexes(idx_b local); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, UNIQUE KEY `idx_b` (`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY HASH (`b`) PARTITIONS 3 @@ -232,8 +232,8 @@ alter table t partition by key (b) partitions 3; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, UNIQUE KEY `idx_b` (`b`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY KEY (`b`) PARTITIONS 3 diff --git a/tests/integrationtest/r/index_merge.result b/tests/integrationtest/r/index_merge.result index 4665ef9e4809f..5afb9617f0a74 100644 --- a/tests/integrationtest/r/index_merge.result +++ b/tests/integrationtest/r/index_merge.result @@ -823,7 +823,7 @@ CTE_0 7309.33 root Recursive CTE │ ├─IndexRangeScan_17(Build) 3323.33 cop[tikv] table:t1, index:c2(c2) range:[-inf,10), keep order:false, stats:pseudo │ └─Selection_19(Probe) 2250.55 cop[tikv] or(lt(index_merge.t1.c1, 10), and(lt(index_merge.t1.c2, 10), lt(index_merge.t1.c3, 10))) │ └─TableRowIDScan_18 5542.21 cop[tikv] table:t1 keep order:false, stats:pseudo -└─Projection_21(Recursive Part) 3248.59 root cast(plus(index_merge.t1.c1, 100), int(11))->index_merge.t1.c1 +└─Projection_21(Recursive Part) 3248.59 root cast(plus(index_merge.t1.c1, 100), int)->index_merge.t1.c1 └─Selection_22 3248.59 root lt(index_merge.t1.c1, 10) └─CTETable_23 4060.74 root Scan on CTE_0 with recursive cte1 as (select /*+ use_index_merge(t1) */ c1 from t1 where c1 < 10 or c2 < 10 and c3 < 10 UNION ALL select c1 + 100 from cte1 where c1 < 10) select * from cte1 order by 1; @@ -845,7 +845,7 @@ Sort_17 1.80 root Column#16 CTE_0 1.80 root Recursive CTE ├─Projection_12(Seed Part) 1.00 root 1->Column#4, 1->Column#5, 1->Column#6 │ └─TableDual_13 1.00 root rows:1 -└─Projection_14(Recursive Part) 0.80 root cast(plus(Column#7, 1), bigint(1) BINARY)->Column#13, cast(plus(Column#8, 1), bigint(1) BINARY)->Column#14, cast(plus(Column#9, 1), bigint(1) BINARY)->Column#15 +└─Projection_14(Recursive Part) 0.80 root cast(plus(Column#7, 1), bigint BINARY)->Column#13, cast(plus(Column#8, 1), bigint BINARY)->Column#14, cast(plus(Column#9, 1), bigint BINARY)->Column#15 └─Selection_15 0.80 root or(lt(Column#7, 10), and(lt(Column#8, 10), lt(Column#9, 10))) └─CTETable_16 1.00 root Scan on CTE_0 show warnings; diff --git a/tests/integrationtest/r/infoschema/infoschema.result b/tests/integrationtest/r/infoschema/infoschema.result index a4aaa4bd8e207..dc6fce85c2404 100644 --- a/tests/integrationtest/r/infoschema/infoschema.result +++ b/tests/integrationtest/r/infoschema/infoschema.result @@ -10,14 +10,14 @@ i1 comment 10 c1 show create table information_schema.ddl_jobs; Table Create Table DDL_JOBS CREATE TABLE `DDL_JOBS` ( - `JOB_ID` bigint(21) DEFAULT NULL, + `JOB_ID` bigint DEFAULT NULL, `DB_NAME` varchar(64) DEFAULT NULL, `TABLE_NAME` varchar(64) DEFAULT NULL, `JOB_TYPE` varchar(64) DEFAULT NULL, `SCHEMA_STATE` varchar(64) DEFAULT NULL, - `SCHEMA_ID` bigint(21) DEFAULT NULL, - `TABLE_ID` bigint(21) DEFAULT NULL, - `ROW_COUNT` bigint(21) DEFAULT NULL, + `SCHEMA_ID` bigint DEFAULT NULL, + `TABLE_ID` bigint DEFAULT NULL, + `ROW_COUNT` bigint DEFAULT NULL, `CREATE_TIME` datetime(6) DEFAULT NULL, `START_TIME` datetime(6) DEFAULT NULL, `END_TIME` datetime(6) DEFAULT NULL, diff --git a/tests/integrationtest/r/planner/cascades/integration.result b/tests/integrationtest/r/planner/cascades/integration.result index 65b42dde9159c..7bfa97a759085 100644 --- a/tests/integrationtest/r/planner/cascades/integration.result +++ b/tests/integrationtest/r/planner/cascades/integration.result @@ -124,8 +124,8 @@ create table t(a int primary key, b int); set session tidb_enable_cascades_planner = 1; desc t; Field Type Null Key Default Extra -a int(11) NO PRI NULL -b int(11) YES NULL +a int NO PRI NULL +b int YES NULL drop table if exists t; create table t(a int primary key, b int); insert into t values (1, 11), (4, 44), (2, 22), (3, 33); @@ -437,7 +437,7 @@ approx_count_distinct(case when a > 0 and a <= 1000 then b end) explain select count(b), sum(b), avg(b), b, max(b), min(b), bit_and(b), bit_or(b), bit_xor(b) from t group by a having sum(b) >= 0 and count(b) >= 0 order by b; id estRows task access object operator info Projection_13 8000.00 root Column#3->Column#11, Column#4->Column#12, Column#5->Column#13, planner__cascades__integration.t.b, Column#6->Column#15, Column#7->Column#16, Column#8->Column#17, Column#9->Column#18, Column#10->Column#19 -└─Projection_15 8000.00 root if(isnull(planner__cascades__integration.t.b), 0, 1)->Column#3, cast(planner__cascades__integration.t.b, decimal(32,0) BINARY)->Column#4, cast(planner__cascades__integration.t.b, decimal(15,4) BINARY)->Column#5, planner__cascades__integration.t.b, planner__cascades__integration.t.b->Column#6, planner__cascades__integration.t.b->Column#7, ifnull(cast(planner__cascades__integration.t.b, bigint(21) UNSIGNED BINARY), 18446744073709551615)->Column#8, ifnull(cast(planner__cascades__integration.t.b, bigint(21) UNSIGNED BINARY), 0)->Column#9, ifnull(cast(planner__cascades__integration.t.b, bigint(21) UNSIGNED BINARY), 0)->Column#10, cast(planner__cascades__integration.t.b, decimal(32,0) BINARY)->Column#4, if(isnull(planner__cascades__integration.t.b), 0, 1)->Column#3 +└─Projection_15 8000.00 root if(isnull(planner__cascades__integration.t.b), 0, 1)->Column#3, cast(planner__cascades__integration.t.b, decimal(32,0) BINARY)->Column#4, cast(planner__cascades__integration.t.b, decimal(15,4) BINARY)->Column#5, planner__cascades__integration.t.b, planner__cascades__integration.t.b->Column#6, planner__cascades__integration.t.b->Column#7, ifnull(cast(planner__cascades__integration.t.b, bigint UNSIGNED BINARY), 18446744073709551615)->Column#8, ifnull(cast(planner__cascades__integration.t.b, bigint UNSIGNED BINARY), 0)->Column#9, ifnull(cast(planner__cascades__integration.t.b, bigint UNSIGNED BINARY), 0)->Column#10, cast(planner__cascades__integration.t.b, decimal(32,0) BINARY)->Column#4, if(isnull(planner__cascades__integration.t.b), 0, 1)->Column#3 └─Sort_22 8000.00 root planner__cascades__integration.t.b └─TableReader_19 8000.00 root data:Selection_20 └─Selection_20 8000.00 cop[tikv] ge(cast(planner__cascades__integration.t.b, decimal(32,0) BINARY), 0), ge(if(isnull(planner__cascades__integration.t.b), 0, 1), 0) diff --git a/tests/integrationtest/r/planner/core/casetest/expression_rewriter.result b/tests/integrationtest/r/planner/core/casetest/expression_rewriter.result index 673d0c331f814..a20573d54b622 100644 --- a/tests/integrationtest/r/planner/core/casetest/expression_rewriter.result +++ b/tests/integrationtest/r/planner/core/casetest/expression_rewriter.result @@ -64,5 +64,5 @@ explain format = 'brief' select bit_or(a * b) from t; id estRows task access object operator info StreamAgg 1.00 root funcs:bit_or(Column#6)->Column#4 └─TableReader 1.00 root data:StreamAgg - └─StreamAgg 1.00 cop[tikv] funcs:bit_or(cast(mul(cast(planner__core__casetest__expression_rewriter.t.a, double BINARY), cast(planner__core__casetest__expression_rewriter.t.b, double BINARY)), bigint(20) BINARY))->Column#6 + └─StreamAgg 1.00 cop[tikv] funcs:bit_or(cast(mul(cast(planner__core__casetest__expression_rewriter.t.a, double BINARY), cast(planner__core__casetest__expression_rewriter.t.b, double BINARY)), bigint BINARY))->Column#6 └─TableFullScan 1.00 cop[tikv] table:t keep order:false diff --git a/tests/integrationtest/r/planner/core/casetest/integration.result b/tests/integrationtest/r/planner/core/casetest/integration.result index f9391d6b7a9ce..fda44689b3156 100644 --- a/tests/integrationtest/r/planner/core/casetest/integration.result +++ b/tests/integrationtest/r/planner/core/casetest/integration.result @@ -1277,7 +1277,7 @@ id estRows task access object operator info HashAgg 2.00 root group by:Column#3, funcs:firstrow(Column#3)->Column#3 └─Union 2.00 root ├─Point_Get 1.00 root table:t1 handle:1 - └─Projection 1.00 root cast(planner__core__casetest__integration.t2.a, bigint(20) BINARY)->Column#3 + └─Projection 1.00 root cast(planner__core__casetest__integration.t2.a, bigint BINARY)->Column#3 └─Point_Get 1.00 root table:t2 handle:1 select * from v1 where a = 1; -- the condition should be downcast through both side and go get point; a @@ -1286,7 +1286,7 @@ id estRows task access object operator info HashAgg 2.00 root group by:Column#3, funcs:firstrow(Column#3)->Column#3 └─Union 2.00 root ├─Point_Get 1.00 root table:t1 handle:1 - └─Projection 1.00 root cast(planner__core__casetest__integration.t2.a, bigint(20) BINARY)->Column#3 + └─Projection 1.00 root cast(planner__core__casetest__integration.t2.a, bigint BINARY)->Column#3 └─Point_Get 1.00 root table:t2 handle:1 select * from v1 where a = '1test'; -- the condition should be downcast through both side and go get point too; a @@ -1296,7 +1296,7 @@ HashAgg 5333.33 root group by:Column#3, funcs:firstrow(Column#3)->Column#3 └─Union 6666.67 root ├─TableReader 3333.33 root data:TableRangeScan │ └─TableRangeScan 3333.33 cop[tikv] table:t1 range:(1,+inf], keep order:false, stats:pseudo - └─Projection 3333.33 root cast(planner__core__casetest__integration.t2.a, bigint(20) BINARY)->Column#3 + └─Projection 3333.33 root cast(planner__core__casetest__integration.t2.a, bigint BINARY)->Column#3 └─TableReader 3333.33 root data:TableRangeScan └─TableRangeScan 3333.33 cop[tikv] table:t2 range:(1,+inf], keep order:false, stats:pseudo select * from v1 where a > 1; -- the condition should be downcast through both side and go range scan; diff --git a/tests/integrationtest/r/planner/core/casetest/physicalplantest/physical_plan.result b/tests/integrationtest/r/planner/core/casetest/physicalplantest/physical_plan.result index 34b2a496a295f..8a846eb9bd8e7 100644 --- a/tests/integrationtest/r/planner/core/casetest/physicalplantest/physical_plan.result +++ b/tests/integrationtest/r/planner/core/casetest/physicalplantest/physical_plan.result @@ -291,7 +291,7 @@ CTEFullScan 2.00 root CTE:cte1 data:CTE_0 CTE_0 2.00 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#2 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection 0.80 root lt(Column#3, 100) └─CTETable 1.00 root Scan on CTE_0 show warnings; @@ -496,7 +496,7 @@ CTEFullScan 2.00 root CTE:cte1 data:CTE_0 CTE_0 2.00 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#2 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection 0.80 root lt(Column#3, 100) └─CTETable 1.00 root Scan on CTE_0 show warnings; @@ -514,7 +514,7 @@ CTEFullScan 8001.00 root CTE:cte2 data:CTE_0 CTE_0 8001.00 root Recursive CTE ├─TableReader(Seed Part) 10000.00 root data:TableFullScan │ └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo -└─Projection(Recursive Part) 8000.00 root cast(plus(planner__core__casetest__physicalplantest__physical_plan.t.a, 1), int(11))->planner__core__casetest__physicalplantest__physical_plan.t.a +└─Projection(Recursive Part) 8000.00 root cast(plus(planner__core__casetest__physicalplantest__physical_plan.t.a, 1), int)->planner__core__casetest__physicalplantest__physical_plan.t.a └─Selection 8000.00 root lt(planner__core__casetest__physicalplantest__physical_plan.t.a, 100) └─CTETable 10000.00 root Scan on CTE_0 show warnings; @@ -526,7 +526,7 @@ CTEFullScan 2.00 root CTE:cte2 data:CTE_2 CTE_2 2.00 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#9 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 0.80 root cast(plus(Column#10, 1), bigint(1) BINARY)->Column#12 +└─Projection(Recursive Part) 0.80 root cast(plus(Column#10, 1), bigint BINARY)->Column#12 └─Selection 0.80 root lt(Column#10, 100) └─CTETable 1.00 root Scan on CTE_2 show warnings; @@ -552,7 +552,7 @@ CTEFullScan 2.00 root CTE:cte1 data:CTE_0 CTE_0 2.00 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#2 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint(1) BINARY)->Column#5 +└─Projection(Recursive Part) 0.80 root cast(plus(Column#3, 1), bigint BINARY)->Column#5 └─Selection 0.80 root lt(Column#3, 100) └─CTETable 1.00 root Scan on CTE_0 show warnings; @@ -570,7 +570,7 @@ CTEFullScan 8001.00 root CTE:cte2 data:CTE_0 CTE_0 8001.00 root Recursive CTE ├─TableReader(Seed Part) 10000.00 root data:TableFullScan │ └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo -└─Projection(Recursive Part) 8000.00 root cast(plus(planner__core__casetest__physicalplantest__physical_plan.t.a, 1), int(11))->planner__core__casetest__physicalplantest__physical_plan.t.a +└─Projection(Recursive Part) 8000.00 root cast(plus(planner__core__casetest__physicalplantest__physical_plan.t.a, 1), int)->planner__core__casetest__physicalplantest__physical_plan.t.a └─Selection 8000.00 root lt(planner__core__casetest__physicalplantest__physical_plan.t.a, 100) └─CTETable 10000.00 root Scan on CTE_0 show warnings; @@ -581,7 +581,7 @@ CTEFullScan 2.00 root CTE:cte2 data:CTE_2 CTE_2 2.00 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#9 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 0.80 root cast(plus(Column#10, 1), bigint(1) BINARY)->Column#12 +└─Projection(Recursive Part) 0.80 root cast(plus(Column#10, 1), bigint BINARY)->Column#12 └─Selection 0.80 root lt(Column#10, 100) └─CTETable 1.00 root Scan on CTE_2 show warnings; @@ -632,7 +632,7 @@ CTEFullScan 2.00 root CTE:cte data:CTE_3 CTE_3 2.00 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#15 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 1.00 root cast(plus(Column#16, 1), bigint(1) BINARY)->Column#18 +└─Projection(Recursive Part) 1.00 root cast(plus(Column#16, 1), bigint BINARY)->Column#18 └─CTETable 1.00 root Scan on CTE_3 explain format='brief' with cte as (select 1) select * from cte; -- inline cte; id estRows task access object operator info @@ -726,7 +726,7 @@ CTEFullScan 1.64 root CTE:temp data:CTE_4 CTE_4 1.64 root Recursive CTE ├─Projection(Seed Part) 1.00 root 1->Column#14 │ └─TableDual 1.00 root rows:1 -└─Projection(Recursive Part) 0.64 root cast(plus(Column#15, 1), bigint(1) BINARY)->Column#18 +└─Projection(Recursive Part) 0.64 root cast(plus(Column#15, 1), bigint BINARY)->Column#18 └─HashJoin 0.64 root CARTESIAN inner join, other cond:lt(Column#15, Column#16) ├─Selection(Build) 0.80 root not(isnull(Column#16)) │ └─CTEFullScan 1.00 root CTE:maxa data:CTE_1 @@ -743,7 +743,7 @@ CTE_4 20000.00 root Recursive CTE ├─Projection(Seed Part) 10000.00 root 1->Column#26 │ └─IndexReader 10000.00 root index:IndexFullScan │ └─IndexFullScan 10000.00 cop[tikv] table:t1, index:c2(c2) keep order:false, stats:pseudo -└─Projection(Recursive Part) 10000.00 root cast(plus(Column#27, 1), bigint(1) BINARY)->Column#30 +└─Projection(Recursive Part) 10000.00 root cast(plus(Column#27, 1), bigint BINARY)->Column#30 └─HashJoin 10000.00 root CARTESIAN inner join, other cond:lt(plus(Column#27, 1), Column#28) ├─CTEFullScan(Build) 1.00 root CTE:b data:CTE_1 └─CTETable(Probe) 10000.00 root Scan on CTE_4 @@ -762,7 +762,7 @@ CTE_4 1.80 root Recursive CTE │ └─IndexReader 1.00 root index:HashAgg │ └─HashAgg 1.00 cop[tikv] funcs:count(1)->Column#46 │ └─IndexFullScan 10000.00 cop[tikv] table:t1, index:c2(c2) keep order:false, stats:pseudo -└─Projection(Recursive Part) 0.80 root cast(plus(Column#38, 1), bigint(1) BINARY)->Column#40 +└─Projection(Recursive Part) 0.80 root cast(plus(Column#38, 1), bigint BINARY)->Column#40 └─Selection 0.80 root lt(plus(Column#38, 1), 10) └─CTETable 1.00 root Scan on CTE_4 create table test(a int); @@ -780,7 +780,7 @@ CTE_0 8001.00 root Non-Recursive CTE └─Union_27(Seed Part) 8001.00 root ├─Projection_28 1.00 root 1->Column#7 │ └─TableDual_29 1.00 root rows:1 - └─Projection_30 8000.00 root cast(planner__core__casetest__physicalplantest__physical_plan.test.a, bigint(11) BINARY)->Column#7 + └─Projection_30 8000.00 root cast(planner__core__casetest__physicalplantest__physical_plan.test.a, bigint BINARY)->Column#7 └─HashAgg_35 8000.00 root group by:planner__core__casetest__physicalplantest__physical_plan.test.a, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.test.a)->planner__core__casetest__physicalplantest__physical_plan.test.a └─TableReader_36 8000.00 root data:HashAgg_31 └─HashAgg_31 8000.00 cop[tikv] group by:planner__core__casetest__physicalplantest__physical_plan.test.a, @@ -800,7 +800,7 @@ CTE_0 8001.00 root Non-Recursive CTE └─Union_29(Seed Part) 8001.00 root ├─Projection_30 1.00 root 1->Column#7 │ └─TableDual_31 1.00 root rows:1 - └─Projection_32 8000.00 root cast(planner__core__casetest__physicalplantest__physical_plan.test.a, bigint(11) BINARY)->Column#7 + └─Projection_32 8000.00 root cast(planner__core__casetest__physicalplantest__physical_plan.test.a, bigint BINARY)->Column#7 └─HashAgg_37 8000.00 root group by:planner__core__casetest__physicalplantest__physical_plan.test.a, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.test.a)->planner__core__casetest__physicalplantest__physical_plan.test.a └─TableReader_38 8000.00 root data:HashAgg_33 └─HashAgg_33 8000.00 cop[tikv] group by:planner__core__casetest__physicalplantest__physical_plan.test.a, @@ -1354,7 +1354,7 @@ NULL 1 NULL 6.0000 1 6 explain format='brief' select date_format(d,'%Y') as df, sum(a), count(b), count(distinct c) from t group by date_format(d,'%Y'); id estRows task access object operator info -Projection 8000.00 root date_format(planner__core__casetest__physicalplantest__physical_plan.t.d, %Y)->Column#9, Column#6, cast(Column#13, bigint(21) BINARY)->Column#7, Column#8 +Projection 8000.00 root date_format(planner__core__casetest__physicalplantest__physical_plan.t.d, %Y)->Column#9, Column#6, cast(Column#13, bigint BINARY)->Column#7, Column#8 └─HashAgg 8000.00 root group by:Column#23, funcs:sum(Column#19)->Column#6, funcs:sum(Column#20)->Column#13, funcs:count(Column#21)->Column#8, funcs:firstrow(Column#22)->planner__core__casetest__physicalplantest__physical_plan.t.d └─Projection 8000.00 root Column#11->Column#19, cast(Column#12, decimal(20,0) BINARY)->Column#20, planner__core__casetest__physicalplantest__physical_plan.t.c->Column#21, planner__core__casetest__physicalplantest__physical_plan.t.d->Column#22, date_format(planner__core__casetest__physicalplantest__physical_plan.t.d, %Y)->Column#23 └─HashAgg 8000.00 root group by:Column#14, planner__core__casetest__physicalplantest__physical_plan.t.c, funcs:sum(Column#15)->Column#11, funcs:count(Column#16)->Column#12, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.t.c)->planner__core__casetest__physicalplantest__physical_plan.t.c, funcs:firstrow(Column#18)->planner__core__casetest__physicalplantest__physical_plan.t.d @@ -1363,7 +1363,7 @@ Projection 8000.00 root date_format(planner__core__casetest__physicalplantest__ └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format='brief' select d, a, count(*), count(b), count(distinct c) from t group by d, a; id estRows task access object operator info -Projection 8000.00 root planner__core__casetest__physicalplantest__physical_plan.t.d, planner__core__casetest__physicalplantest__physical_plan.t.a, cast(Column#10, bigint(21) BINARY)->Column#6, cast(Column#12, bigint(21) BINARY)->Column#7, Column#8 +Projection 8000.00 root planner__core__casetest__physicalplantest__physical_plan.t.d, planner__core__casetest__physicalplantest__physical_plan.t.a, cast(Column#10, bigint BINARY)->Column#6, cast(Column#12, bigint BINARY)->Column#7, Column#8 └─HashAgg 8000.00 root group by:Column#21, Column#22, funcs:sum(Column#18)->Column#10, funcs:sum(Column#19)->Column#12, funcs:count(Column#20)->Column#8, funcs:firstrow(Column#21)->planner__core__casetest__physicalplantest__physical_plan.t.a, funcs:firstrow(Column#22)->planner__core__casetest__physicalplantest__physical_plan.t.d └─Projection 8000.00 root cast(Column#9, decimal(20,0) BINARY)->Column#18, cast(Column#11, decimal(20,0) BINARY)->Column#19, planner__core__casetest__physicalplantest__physical_plan.t.c->Column#20, planner__core__casetest__physicalplantest__physical_plan.t.a->Column#21, planner__core__casetest__physicalplantest__physical_plan.t.d->Column#22 └─HashAgg 8000.00 root group by:planner__core__casetest__physicalplantest__physical_plan.t.a, planner__core__casetest__physicalplantest__physical_plan.t.c, planner__core__casetest__physicalplantest__physical_plan.t.d, funcs:count(Column#13)->Column#9, funcs:count(Column#14)->Column#11, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.t.c)->planner__core__casetest__physicalplantest__physical_plan.t.c, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.t.a)->planner__core__casetest__physicalplantest__physical_plan.t.a, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.t.d)->planner__core__casetest__physicalplantest__physical_plan.t.d @@ -1372,7 +1372,7 @@ Projection 8000.00 root planner__core__casetest__physicalplantest__physical_pla └─TableFullScan 10000.00 cop[tikv] table:t keep order:false, stats:pseudo explain format='brief' select d, sum(a), count(b), avg(distinct c) from t group by d; id estRows task access object operator info -Projection 8000.00 root planner__core__casetest__physicalplantest__physical_plan.t.d, Column#6, cast(Column#11, bigint(21) BINARY)->Column#7, Column#8 +Projection 8000.00 root planner__core__casetest__physicalplantest__physical_plan.t.d, Column#6, cast(Column#11, bigint BINARY)->Column#7, Column#8 └─HashAgg 8000.00 root group by:Column#19, funcs:sum(Column#16)->Column#6, funcs:sum(Column#17)->Column#11, funcs:avg(Column#18)->Column#8, funcs:firstrow(Column#19)->planner__core__casetest__physicalplantest__physical_plan.t.d └─Projection 8000.00 root Column#9->Column#16, cast(Column#10, decimal(20,0) BINARY)->Column#17, cast(planner__core__casetest__physicalplantest__physical_plan.t.c, decimal(10,0) BINARY)->Column#18, planner__core__casetest__physicalplantest__physical_plan.t.d->Column#19 └─HashAgg 8000.00 root group by:planner__core__casetest__physicalplantest__physical_plan.t.c, planner__core__casetest__physicalplantest__physical_plan.t.d, funcs:sum(Column#12)->Column#9, funcs:count(Column#13)->Column#10, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.t.c)->planner__core__casetest__physicalplantest__physical_plan.t.c, funcs:firstrow(planner__core__casetest__physicalplantest__physical_plan.t.d)->planner__core__casetest__physicalplantest__physical_plan.t.d @@ -3776,7 +3776,7 @@ Limit 1.00 root offset:0, count:1 └─TableRowIDScan(Probe) 1.00 cop[tikv] table:t keep order:false, stats:pseudo show warnings; Level Code Message -Warning 1105 Scalar function 'json_overlaps'(signature: Unspecified, return type: bigint(20)) is not supported to push down to storage layer now. +Warning 1105 Scalar function 'json_overlaps'(signature: Unspecified, return type: bigint) is not supported to push down to storage layer now. explain format = 'brief' select /*+ use_index(t, kj) */ * from t where (1 member of (j) and a=1 ) limit 1; id estRows task access object operator info Limit 0.01 root offset:0, count:1 @@ -3811,7 +3811,7 @@ Limit 1.00 root offset:0, count:1 └─TableRowIDScan 3.00 cop[tikv] table:t keep order:false, stats:pseudo show warnings; Level Code Message -Warning 1105 Scalar function 'json_overlaps'(signature: Unspecified, return type: bigint(20)) is not supported to push down to storage layer now. +Warning 1105 Scalar function 'json_overlaps'(signature: Unspecified, return type: bigint) is not supported to push down to storage layer now. set tidb_cost_model_version=DEFAULT; explain select /*+ USE_INDEX_MERGE(t3, aid_c1, aid_c2) */ * from t3 where (aid = 1 and c1='aaa') or (aid = 1 and c2='bbb') limit 1; id estRows task access object operator info diff --git a/tests/integrationtest/r/planner/core/integration.result b/tests/integrationtest/r/planner/core/integration.result index e7fe60ac775de..5d11834452edd 100644 --- a/tests/integrationtest/r/planner/core/integration.result +++ b/tests/integrationtest/r/planner/core/integration.result @@ -4,23 +4,23 @@ create table t(a varchar(10), b int, c int); show columns from t where true; Field Type Null Key Default Extra a varchar(10) YES NULL -b int(11) YES NULL -c int(11) YES NULL +b int YES NULL +c int YES NULL show columns from t where field = 'b'; Field Type Null Key Default Extra -b int(11) YES NULL +b int YES NULL show columns from t where field in (select 'b'); Field Type Null Key Default Extra -b int(11) YES NULL +b int YES NULL show columns from t where field in (select 'b') and true; Field Type Null Key Default Extra -b int(11) YES NULL +b int YES NULL show columns from t where field in (select 'b') and false; Field Type Null Key Default Extra insert into t values('c', 0, 0); show columns from t where field < all (select a from t); Field Type Null Key Default Extra -b int(11) YES NULL +b int YES NULL a varchar(10) YES NULL insert into t values('b', 0, 0); show columns from t where field < all (select a from t); diff --git a/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result b/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result index 07edaaf17ef23..3e8ab443908e7 100644 --- a/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result +++ b/tests/integrationtest/r/planner/core/memtable_predicate_extractor.result @@ -24,69 +24,69 @@ TABLE_NAME column_name t abctime describe t; Field Type Null Key Default Extra -id int(11) YES NULL -abctime int(11) YES NULL -DATETIME_PRECISION int(11) YES NULL +id int YES NULL +abctime int YES NULL +DATETIME_PRECISION int YES NULL describe t id; Field Type Null Key Default Extra -id int(11) YES NULL +id int YES NULL describe t ID; Field Type Null Key Default Extra -id int(11) YES NULL +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%';" 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 "%;" show columns from t like 'abctime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t like 'ABCTIME'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t like 'abc%'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t like 'ABC%'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t like '%ime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t like '%IME'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns in t like '%ime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns in t like '%IME'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show fields in t like '%ime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show fields in t like '%IME'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t where field like '%time'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns from t where field = 'abctime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show columns in t where field = 'abctime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show fields from t where field = 'abctime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL show fields in t where field = 'abctime'; Field Type Null Key Default Extra -abctime int(11) YES NULL +abctime int YES NULL explain t; Field Type Null Key Default Extra -id int(11) YES NULL -abctime int(11) YES NULL -DATETIME_PRECISION int(11) YES NULL +id int YES NULL +abctime int YES NULL +DATETIME_PRECISION int YES NULL show columns from t like id; Error 1054 (42S22): Unknown column 'id' in 'where clause' show columns from t like `id`; diff --git a/tests/integrationtest/r/planner/core/plan.result b/tests/integrationtest/r/planner/core/plan.result index d70988bae48c7..acddffb38e6a8 100644 --- a/tests/integrationtest/r/planner/core/plan.result +++ b/tests/integrationtest/r/planner/core/plan.result @@ -350,10 +350,10 @@ create index hypo_bc type hypo on t (b, c); show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) DEFAULT NULL, - `d` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, + `c` int DEFAULT NULL, + `d` int DEFAULT NULL, KEY `a` (`a`), KEY `hypo_a` (`a`) /* HYPO INDEX */, KEY `hypo_bc` (`b`,`c`) /* HYPO INDEX */ @@ -363,10 +363,10 @@ drop hypo index hypo_bc on t; show create table t; Table Create Table t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) DEFAULT NULL, - `d` int(11) DEFAULT NULL, + `a` int DEFAULT NULL, + `b` int DEFAULT NULL, + `c` int DEFAULT NULL, + `d` int DEFAULT NULL, KEY `a` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop table if exists t; diff --git a/tests/integrationtest/r/planner/core/rule_constant_propagation.result b/tests/integrationtest/r/planner/core/rule_constant_propagation.result index 898fe2fb0660e..476922478564a 100644 --- a/tests/integrationtest/r/planner/core/rule_constant_propagation.result +++ b/tests/integrationtest/r/planner/core/rule_constant_propagation.result @@ -171,7 +171,7 @@ HashAgg_24 5325.33 root group by:Column#14, Column#15, funcs:firstrow(Column#14 │ └─TableReader_31(Probe) 3333.33 root data:Selection_30 │ └─Selection_30 3333.33 cop[tikv] gt(planner__core__rule_constant_propagation.t.id, 1), not(isnull(planner__core__rule_constant_propagation.t.id)) │ └─TableFullScan_29 10000.00 cop[tikv] table:t keep order:false, stats:pseudo - └─Projection_35 4154.17 root cast(planner__core__rule_constant_propagation.t.id, bigint(20) BINARY)->Column#14, planner__core__rule_constant_propagation.t.name->Column#15 + └─Projection_35 4154.17 root cast(planner__core__rule_constant_propagation.t.id, bigint BINARY)->Column#14, planner__core__rule_constant_propagation.t.name->Column#15 └─HashJoin_36 4154.17 root left outer join, equal:[eq(planner__core__rule_constant_propagation.t.id, planner__core__rule_constant_propagation.s.id)] ├─TableReader_43(Build) 3323.33 root data:Selection_42 │ └─Selection_42 3323.33 cop[tikv] lt(planner__core__rule_constant_propagation.s.id, 3), not(isnull(planner__core__rule_constant_propagation.s.id)) diff --git a/tests/integrationtest/r/planner/core/tests/prepare/prepare.result b/tests/integrationtest/r/planner/core/tests/prepare/prepare.result index 35659a2acb73f..49931b996b1d0 100644 --- a/tests/integrationtest/r/planner/core/tests/prepare/prepare.result +++ b/tests/integrationtest/r/planner/core/tests/prepare/prepare.result @@ -874,7 +874,7 @@ create table t (a int, b int); prepare p2 from "show columns from t where field = 'a'"; execute p2; Field Type Null Key Default Extra -a int(11) YES NULL +a int YES NULL create table t1 (a int, b int); prepare p3 from "show tables where tables_in_planner__core__tests__prepare__prepare = 't1'"; execute p3; diff --git a/tests/integrationtest/r/privilege/privileges.result b/tests/integrationtest/r/privilege/privileges.result index bc0d2f6902bca..8e81e8e4fcb5d 100644 --- a/tests/integrationtest/r/privilege/privileges.result +++ b/tests/integrationtest/r/privilege/privileges.result @@ -335,10 +335,10 @@ privileges select,update desc privilege__privileges.v; Field Type Null Key Default Extra -1 bigint(1) NO NULL +1 bigint NO NULL explain privilege__privileges.v; Field Type Null Key Default Extra -1 bigint(1) NO NULL +1 bigint NO NULL CREATE USER ucorrect1, ucorrect2; CREATE TABLE privilege__privileges.trigger_table (a int); GRANT CREATE TEMPORARY TABLES,DELETE,EXECUTE,INSERT,SELECT,SHOW VIEW,TRIGGER,UPDATE ON privilege__privileges.* TO ucorrect1; diff --git a/tests/integrationtest/r/session/temporary_table.result b/tests/integrationtest/r/session/temporary_table.result index 2cf4db9971a26..ab5fb65cf7c6b 100644 --- a/tests/integrationtest/r/session/temporary_table.result +++ b/tests/integrationtest/r/session/temporary_table.result @@ -650,7 +650,7 @@ create table t1 (a int); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL + `a` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create view v1 as select 1; show create view v1; @@ -670,7 +670,7 @@ create temporary table t1 (ct1 int); show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( - `ct1` int(11) DEFAULT NULL + `ct1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create temporary table v1 (cv1 int); show create view v1; @@ -679,7 +679,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v1` show create table v1; Table Create Table v1 CREATE TEMPORARY TABLE `v1` ( - `cv1` int(11) DEFAULT NULL + `cv1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin create temporary table s1 (cs1 int); show create sequence s1; @@ -688,7 +688,7 @@ s1 CREATE SEQUENCE `s1` start with 1 minvalue 1 maxvalue 9223372036854775806 inc show create table s1; Table Create Table s1 CREATE TEMPORARY TABLE `s1` ( - `cs1` int(11) DEFAULT NULL + `cs1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop view v1; show create view v1; @@ -696,7 +696,7 @@ Error 1146 (42S02): Table 'session__temporary_table.v1' doesn't exist show create table v1; Table Create Table v1 CREATE TEMPORARY TABLE `v1` ( - `cv1` int(11) DEFAULT NULL + `cv1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop sequence s1; show create sequence s1; @@ -704,7 +704,7 @@ Error 1146 (42S02): Table 'session__temporary_table.s1' doesn't exist show create table s1; Table Create Table s1 CREATE TEMPORARY TABLE `s1` ( - `cs1` int(11) DEFAULT NULL + `cs1` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin drop sequence if exists s1; drop view if exists v1; diff --git a/tests/integrationtest/r/table/index.result b/tests/integrationtest/r/table/index.result index 6c07b5e2cc68c..6f3b4b6e0019e 100644 --- a/tests/integrationtest/r/table/index.result +++ b/tests/integrationtest/r/table/index.result @@ -36,7 +36,7 @@ create table t (id int, a varchar(64), b varchar(64), c varchar(64), index idx_a show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `a` varchar(64) DEFAULT NULL, `b` varchar(64) DEFAULT NULL, `c` varchar(64) DEFAULT NULL, @@ -46,7 +46,7 @@ alter table t add index idx_b(b(64)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `a` varchar(64) DEFAULT NULL, `b` varchar(64) DEFAULT NULL, `c` varchar(64) DEFAULT NULL, @@ -57,7 +57,7 @@ alter table t add index idx_c(c(32)); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `a` varchar(64) DEFAULT NULL, `b` varchar(64) DEFAULT NULL, `c` varchar(64) DEFAULT NULL, @@ -69,7 +69,7 @@ alter table t modify column c varchar(32); show create table t; Table Create Table t CREATE TABLE `t` ( - `id` int(11) DEFAULT NULL, + `id` int DEFAULT NULL, `a` varchar(64) DEFAULT NULL, `b` varchar(64) DEFAULT NULL, `c` varchar(32) DEFAULT NULL, diff --git a/tests/integrationtest/r/table/partition.result b/tests/integrationtest/r/table/partition.result index 8a1777b4f631d..8dc1d1327194f 100644 --- a/tests/integrationtest/r/table/partition.result +++ b/tests/integrationtest/r/table/partition.result @@ -126,7 +126,7 @@ PARTITION p9 VALUES LESS THAN (MAXVALUE) ); SHOW CREATE TABLE timezone_test; Table Create Table timezone_test CREATE TABLE `timezone_test` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `creation_dt` timestamp DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (UNIX_TIMESTAMP(`creation_dt`)) @@ -148,7 +148,7 @@ PARTITION p9 VALUES LESS THAN (MAXVALUE) ); SHOW CREATE TABLE timezone_test; Table Create Table timezone_test CREATE TABLE `timezone_test` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `creation_dt` timestamp DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY RANGE (UNIX_TIMESTAMP(`creation_dt`)) @@ -314,10 +314,10 @@ CREATE TABLE tkey1 (col1 INT NOT NULL, col2 DATE NOT NULL,col3 INT NOT NULL, col show create table tkey1; Table Create Table tkey1 CREATE TABLE `tkey1` ( - `col1` int(11) NOT NULL, + `col1` int NOT NULL, `col2` date NOT NULL, - `col3` int(11) NOT NULL, - `col4` int(11) NOT NULL, + `col3` int NOT NULL, + `col4` int NOT NULL, UNIQUE KEY `col3` (`col3`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin PARTITION BY KEY (`col3`) PARTITIONS 4 @@ -355,7 +355,7 @@ CREATE TABLE tkey10 (`col1` int, `col2` char(5),`col3` date)/*!50100 PARTITION B show create table tkey10; Table Create Table tkey10 CREATE TABLE `tkey10` ( - `col1` int(11) DEFAULT NULL, + `col1` int DEFAULT NULL, `col2` char(5) DEFAULT NULL, `col3` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -369,7 +369,7 @@ PARTITION `pp3`) show create table tkey11; Table Create Table tkey11 CREATE TABLE `tkey11` ( - `col1` int(11) DEFAULT NULL, + `col1` int DEFAULT NULL, `col2` char(5) DEFAULT NULL, `col3` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -386,7 +386,7 @@ PARTITION `pp3` comment 'suzhou'); show create table tkey12; Table Create Table tkey12 CREATE TABLE `tkey12` ( - `col1` int(11) DEFAULT NULL, + `col1` int DEFAULT NULL, `col2` char(5) DEFAULT NULL, `col3` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin @@ -402,7 +402,7 @@ PARTITION BY KEY (col1) PARTITIONS 4; show create table tkey13; Table Create Table tkey13 CREATE TABLE `tkey13` ( - `col1` int(11) DEFAULT NULL, + `col1` int DEFAULT NULL, `col2` char(5) DEFAULT NULL, `col3` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T![placement] PLACEMENT POLICY=`fivereplicas` */