Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: “EricZequan” <zequany33@gmail.com>
  • Loading branch information
EricZequan committed Sep 4, 2024
1 parent 1834ecf commit d39aebf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tests/integrationtest/r/infoschema/infoschema.result
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,4 @@ sequence_schema sequence_name
Db1 s1
dB2 s2
drop database db1;
drop database db2;
drop database db2;
3 changes: 2 additions & 1 deletion tests/integrationtest/r/planner/core/integration.result
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ KEY IDXM (COL3,COL2));
insert into PK_MULTI_COL_5177(col1, col2, col3) values(0x00000000000000000000, 0x002B200DF5BA03E59F82, 1);
select col1, col2 from PK_MULTI_COL_5177 where col1 = 0x00000000000000000000 and col2 in (0x002B200DF5BA03E59F82, 0x002B200DF5BA03E59F82, 0x002B200DF5BA03E59F82);
col1 col2
??埂 +
+
��埂
select col1, col2 from PK_MULTI_COL_5177 where col1 = 0x00000000000000000000 and col2 = 0x002B200DF5BA03E59F82;
col1 col2
+
Expand Down
9 changes: 5 additions & 4 deletions tests/integrationtest/r/planner/core/plan_cache.result
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,8 @@ prepare stmt from 'select * from UK_NO_PRECISION_19392 where col1 between ? and
set @a=0x01, @b=0x01, @c=-3088380202191555887, @d="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈", @e="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈", @f="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈";
execute stmt using @a,@b,@c,@d,@e,@f;
COL1 COL2 COL4 COL3 COL5
缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈 9294-12-26 06:50:40 -3088380202191555887 -3.33294e38
冑溜畁脊乤纊繳蟥哅稐奺躁悼貘飗昹槐速玃沮 1272-01-19 23:03:27 -8014797887128775012 1.48868e38
缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈 9294-12-26 06:50:40 -3088380202191555887 -3.33294e38
 冑溜畁脊乤纊繳蟥哅稐奺躁悼貘飗昹槐速玃沮 1272-01-19 23:03:27 -8014797887128775012 1.48868e38
set @a=NULL, @b=NULL, @c=-4016793239832666288, @d="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈", @e="仲膩蕦圓猴洠飌镂喵疎偌嫺荂踖Ƕ藨蜿諪軁笞", @f="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈";
execute stmt using @a,@b,@c,@d,@e,@f;
COL1 COL2 COL4 COL3 COL5
Expand All @@ -1152,7 +1152,8 @@ select @@last_plan_from_cache;
set @a=0x01, @b=0x01, @c=-3088380202191555887, @d="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈", @e="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈", @f="缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈";
execute stmt using @a,@b,@c,@d,@e,@f;
COL1 COL2 COL4 COL3 COL5

缎馗惫砲兣肬憵急鳸嫅稩邏蠧鄂艘腯灩專妴粈 9294-12-26 06:50:40 -3088380202191555887 -3.33294e38
 冑溜畁脊乤纊繳蟥哅稐奺躁悼貘飗昹槐速玃沮 1272-01-19 23:03:27 -8014797887128775012 1.48868e38
select @@last_plan_from_cache;
@@last_plan_from_cache
0
Expand Down Expand Up @@ -2595,4 +2596,4 @@ INSERT INTO t VALUES (1, current_date());
PREPARE stmt FROM 'SELECT a FROM t WHERE b=current_date()';
EXECUTE stmt;
a
1
1
6 changes: 2 additions & 4 deletions tests/integrationtest/r/planner/core/point_get_plan.result
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Point_Get 1.00 root table:t, index:idx(a)
explain format='brief' select t.*, _tidb_rowid, date_format(a, "") from t where a = 1;
id estRows task access object operator info
Projection 1.00 root planner__core__point_get_plan.t.a, planner__core__point_get_plan.t.b, planner__core__point_get_plan.t._tidb_rowid, date_format(cast(planner__core__point_get_plan.t.a, datetime BINARY), "")->Column#4
└─Point_Get 1.00 root table:t, index:idx(a)
└─Point_Get 1.00 root table:t, index:idx(a)
begin;
insert into t values (1, 1);
explain format='brief' select t.*, _tidb_rowid from t where a = 1;
Expand All @@ -19,13 +19,11 @@ Point_Get 1.00 root table:t, index:idx(a)
commit;
explain format='brief' select count(_tidb_rowid) from t where a=1;
id estRows task access object operator info
Projection 1.00 root planner__core__point_get_plan.t.a, planner__core__point_get_plan.t.b, planner__core__point_get_plan.t._tidb_rowid, date_format(cast(planner__core__point_get_plan.t.a, datetime BINARY), "")->Column#4
└─Point_Get 1.00 root table:t, index:idx(a)
StreamAgg 1.00 root funcs:count(planner__core__point_get_plan.t._tidb_rowid)->Column#4
└─Point_Get 1.00 root table:t, index:idx(a)
explain format='brief' select *, date_format(b, "") from t where a =1 for update;
id estRows task access object operator info
Projection 1.00 root planner__core__point_get_plan.t.a, planner__core__point_get_plan.t.b, date_format(cast(planner__core__point_get_plan.t.b, datetime BINARY), )->Column#4
Projection 1.00 root planner__core__point_get_plan.t.a, planner__core__point_get_plan.t.b, date_format(cast(planner__core__point_get_plan.t.b, datetime BINARY), "")->Column#4
└─SelectLock 1.00 root for update 0
└─Point_Get 1.00 root table:t, index:idx(a)
create table t1 (pk int, a int, b int, primary key(pk), unique key(a));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ COL1 COL2 COL3 COL4
set @a=-27225, @b='-836:46:08';
execute stmt using @a,@b;
COL1 COL2 COL3 COL4
O۠?Bٙ?0???LJ???F ?t -836:46:08 735655453
O۠�Bٙ�0���LJ���F �t -836:46:08 735655453
select @@last_plan_from_cache;
@@last_plan_from_cache
0
execute stmt using @a,@b;
COL1 COL2 COL3 COL4
O۠?Bٙ?0???LJ???F ?t -836:46:08 735655453
O۠�Bٙ�0���LJ���F �t -836:46:08 735655453
select @@last_plan_from_cache;
@@last_plan_from_cache
1
Expand Down Expand Up @@ -100,15 +100,15 @@ count(*)
set @a=-7235178122860450591;
execute stmt using @a;
count(*)
0
1
set @a=9860178624005968368;
execute stmt using @a;
count(*)
0
set @a=-7235178122860450591;
execute stmt using @a;
count(*)
0
1
DROP TABLE IF EXISTS `t`;
CREATE TABLE `t` (`COL1` char(20) DEFAULT NULL, `COL2` bit(16),`COL3` date, KEY `U_M_COL5` (`COL3`,`COL2`));
insert into t values ('','>d','9901-06-17');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set tidb_enable_prepared_plan_cache=1;
drop table if exists UK_MU15569;
CREATE TABLE `UK_MU15569` (`COL1` varbinary(20) DEFAULT NULL,`COL2` bit(16) DEFAULT NULL,`COL3` time DEFAULT NULL,`COL4` int(11) DEFAULT NULL,UNIQUE KEY `U_M_COL4` (`COL1`(10),`COL2`),UNIQUE KEY `U_M_COL5` (`COL3`,`COL2`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
insert into UK_MU15569 values(0x1C4FDBA09B42D999AC3019B6A9C0C787FBA08446, 0xCA74, '-836:46:08', 735655453);
insert into UK_MU15569 values(BINARY 'ABCDEFG', 0xCA74, '-836:46:08', 735655453);
prepare stmt from 'select * from UK_MU15569 where col2 >= ? and col1 is not null and col3 = ?;';
set @a=-32373, @b='545:50:46.85487';
execute stmt using @a,@b;
Expand Down

0 comments on commit d39aebf

Please sign in to comment.