File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4450,6 +4450,12 @@ func (ex *connExecutor) serialize() serverpb.Session {
4450
4450
sql := truncateSQL (query .stmt .SQL )
4451
4451
progress := math .Float64frombits (atomic .LoadUint64 (& query .progressAtomic ))
4452
4452
elapsedTime := crtime .MonoFromTime (timeNow ).Sub (query .start )
4453
+ var isolationLevel string
4454
+ if activeTxnInfo != nil && query .txnID == activeTxnInfo .ID {
4455
+ isolationLevel = activeTxnInfo .IsolationLevel
4456
+ } else {
4457
+ isolationLevel = tree .IsolationLevel (ex .sessionData ().DefaultTxnIsolationLevel ).String ()
4458
+ }
4453
4459
activeQueries = append (activeQueries , serverpb.ActiveQuery {
4454
4460
TxnID : query .txnID ,
4455
4461
ID : id .String (),
@@ -4465,7 +4471,7 @@ func (ex *connExecutor) serialize() serverpb.Session {
4465
4471
IsFullScan : query .isFullScan ,
4466
4472
PlanGist : query .planGist ,
4467
4473
Database : query .database ,
4468
- IsolationLevel : activeTxnInfo . IsolationLevel ,
4474
+ IsolationLevel : isolationLevel ,
4469
4475
})
4470
4476
}
4471
4477
lastActiveQuery := ""
You can’t perform that action at this time.
0 commit comments