Skip to content

Commit 312ed79

Browse files
authored
session: extend the length of action column to fix the truncation (#56109)
close #56106
1 parent 1acbbec commit 312ed79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/session/bootstrap.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ const (
624624
start_time TIMESTAMP NOT NULL,
625625
repeats int default 1,
626626
match_type varchar(12) NOT NULL,
627-
action varchar(12) NOT NULL,
627+
action varchar(64) NOT NULL,
628628
sample_sql TEXT NOT NULL,
629629
sql_digest varchar(64) NOT NULL,
630630
plan_digest varchar(64) NOT NULL,
@@ -3131,6 +3131,8 @@ func upgradeToVer212(s sessiontypes.Session, ver int64) {
31313131
doReentrantDDL(s, "ALTER TABLE mysql.tidb_runaway_queries RENAME COLUMN `original_sql` TO `sample_sql`")
31323132
// modify column type of `plan_digest`.
31333133
doReentrantDDL(s, "ALTER TABLE mysql.tidb_runaway_queries MODIFY COLUMN `plan_digest` varchar(64) DEFAULT '';", infoschema.ErrColumnExists)
3134+
// modify column length of `action`.
3135+
doReentrantDDL(s, "ALTER TABLE mysql.tidb_runaway_queries MODIFY COLUMN `action` VARCHAR(64) NOT NULL;", infoschema.ErrColumnExists)
31343136
}
31353137

31363138
func upgradeToVer213(s sessiontypes.Session, ver int64) {

0 commit comments

Comments
 (0)