Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unstable test TestNonPreparedPlanTypeRandomly #43852

Closed
Tracked by #41316
hawkingrei opened this issue May 16, 2023 · 3 comments · Fixed by #43875
Closed
Tracked by #41316

unstable test TestNonPreparedPlanTypeRandomly #43852

hawkingrei opened this issue May 16, 2023 · 3 comments · Fixed by #43875
Assignees
Labels
affects-7.1 epic/plan-cache feature/developing the related feature is in development severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

[2023/05/16 11:22:41.306 +08:00] [INFO] [callback.go:128] ["performing DDL change, must reload"]

[2023/05/16 11:22:41.306 +08:00] [WARN] [2pc.go:1783] ["schemaLeaseChecker is not set for this transaction"] [sessionID=6] [startTS=441504854522200067] [checkTS=441504854522200068]

[2023/05/16 11:22:41.307 +08:00] [WARN] [2pc.go:1783] ["schemaLeaseChecker is not set for this transaction"] [sessionID=6] [startTS=441504854522462210] [checkTS=441504854522462211]

[2023/05/16 11:22:41.308 +08:00] [WARN] [2pc.go:1783] ["schemaLeaseChecker is not set for this transaction"] [sessionID=6] [startTS=441504854522724354] [checkTS=441504854522724355]

[2023/05/16 11:22:41.309 +08:00] [WARN] [2pc.go:1783] ["schemaLeaseChecker is not set for this transaction"] [sessionID=6] [startTS=441504854522986497] [checkTS=441504854522986498]

[2023/05/16 11:22:41.310 +08:00] [WARN] [2pc.go:1783] ["schemaLeaseChecker is not set for this transaction"] [sessionID=6] [startTS=441504854523248642] [checkTS=441504854523248643]

[2023/05/16 11:22:41.311 +08:00] [WARN] [2pc.go:1783] ["schemaLeaseChecker is not set for this transaction"] [sessionID=6] [startTS=441504854523510786] [checkTS=441504854523510787]

    result.go:49: 

        	Error Trace:	testkit/result.go:49

        	            				planner/core/plan_cache_test.go:910

        	Error:      	Not equal: 

        	            	expected: ""

        	            	actual  : "[2023-01-16 2023-01-15]\n[2023-01-16 2023-01-20]\n"

        	            	

        	            	Diff:

        	            	--- Expected

        	            	+++ Actual

        	            	@@ -1 +1,3 @@

        	            	+[2023-01-16 2023-01-15]

        	            	+[2023-01-16 2023-01-20]

        	            	 

        	Test:       	TestNonPreparedPlanTypeRandomly

        	Messages:   	sql:select * from t6 where a in ('2023-01-16', 2022), args:[]

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label May 16, 2023
@qw4990
Copy link
Contributor

qw4990 commented May 16, 2023

The minimal reproducible case:

create table t6 (a date, b date, key(a));
insert into t6 values ('2023-01-21', '2023-01-05');

set tidb_enable_non_prepared_plan_cache=1;
select * from t6 where a in (2015, '8');
select * from t6 where a in (2009, '2023-01-21');

+-------------------------+---------+---------+-----------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------+--------+------+
| id                      | estRows | actRows | task      | access object | execution info                                                                                                                                                                              | operator info                                    | memory | disk |
+-------------------------+---------+---------+-----------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------+--------+------+
| TableReader_7           | 0.80    | 0       | root      |               | time:472µs, loops:1, cop_task: {num: 1, max: 406.5µs, proc_keys: 0, rpc_num: 1, rpc_time: 379.7µs, copr_cache_hit_ratio: 0.00, build_task_duration: 7.42µs, max_distsql_concurrency: 1}     | data:Selection_6                                 | N/A    | N/A  |
| └─Selection_6           | 0.80    | 0       | cop[tikv] |               | tikv_task:{time:360µs, loops:0}                                                                                                                                                             | or(eq(cast(test.t6.a, double BINARY), 2009), 0)  | N/A    | N/A  |
|   └─TableFullScan_5     | 1.00    | 1       | cop[tikv] | table:t6      | tikv_task:{time:360µs, loops:0}                                                                                                                                                             | keep order:false, stats:partial[a:unInitialized] | N/A    | N/A  |
+-------------------------+---------+---------+-----------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------+--------+------+

@qw4990
Copy link
Contributor

qw4990 commented May 16, 2023

Introduced by #43009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 epic/plan-cache feature/developing the related feature is in development severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
2 participants