You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set @@tidb_slow_log_threshold=30;
begin;
select*from t where a=1and (select sleep(0.03)) is null;
Check the related slow-log of last SQL:
# Time: 2021-01-06T17:52:17.927353+08:00# Txn_start_ts: 422032634769833985# Query_time: 0.051914883# Wait_TS: 0.051791473
...
begin;
# Time: 2021-01-06T17:52:24.252546+08:00# Txn_start_ts: 422032634769833985# Query_time: 0.032830658# Wait_TS: 0.051791473
....
select*from t where a=1and (select sleep(0.03)) is null;
As you can see, the Query_time is 0.032630017 second, but the Wait_TS is 0.050233804, it's wired, since Wait_TS should be 0 for the query select ..., and the Wait_TS should only emerging in the slow log of the SQL begin.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
mock a delay in TiDB code:
then:
Check the related slow-log of last SQL:
As you can see, the
Query_time
is0.032630017
second, but theWait_TS
is0.050233804
, it's wired, sinceWait_TS
should be 0 for the queryselect ...
, and theWait_TS
should only emerging in the slow log of the SQLbegin
.2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: