Skip to content

The SQLs generated by Sync Load should be InRestrictedSQL #39511

@Reminiscent

Description

@Reminiscent

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Add the following part to the DoOptimize function to record some running SQLs.

if sctx.GetSessionVars().InRestrictedSQL {
 	logutil.BgLogger().Info("Record the running SQL",
 		zap.String("SQL", sctx.GetSessionVars().StmtCtx.OriginalSQL))

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

One SQL one log.

3. What did you see instead (Required)

When we enable the sync load and execute some SQLs which not have the stats. But the SQLs generated by sync load will be logged.

4. What is your TiDB version? (Required)

latest master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions