(sc *stmtctx.StatementContext, snapshot kv.Snapshot)
| 1301 | } |
| 1302 | |
| 1303 | func setOptionForTopSQL(sc *stmtctx.StatementContext, snapshot kv.Snapshot) { |
| 1304 | if snapshot == nil { |
| 1305 | return |
| 1306 | } |
| 1307 | // pipelined dml may already flush in background, don't touch it to avoid race. |
| 1308 | if txn, ok := snapshot.(kv.Transaction); ok && txn.IsPipelined() { |
| 1309 | return |
| 1310 | } |
| 1311 | snapshot.SetOption(kv.ResourceGroupTagger, sc.GetResourceGroupTagger()) |
| 1312 | if sc.KvExecCounter != nil { |
| 1313 | snapshot.SetOption(kv.RPCInterceptor, sc.KvExecCounter.RPCInterceptor()) |
| 1314 | } |
| 1315 | } |
| 1316 | |
| 1317 | func isWeakConsistencyRead(ctx sessionctx.Context, node ast.Node) bool { |
| 1318 | sessionVars := ctx.GetSessionVars() |
no test coverage detected