From 6900a46221aa986732103328cf7635f8ca7d68ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E6=96=B9=E6=B7=9E?= Date: Thu, 3 Jun 2021 19:06:26 +0800 Subject: [PATCH] infoschema, executor, txn: change some field name in TIDB_TRX table (#25061) --- docs/design/2021-04-26-lock-view.md | 3 ++- infoschema/tables.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/design/2021-04-26-lock-view.md b/docs/design/2021-04-26-lock-view.md index 814294c8e9..79afbce94a 100644 --- a/docs/design/2021-04-26-lock-view.md +++ b/docs/design/2021-04-26-lock-view.md @@ -49,7 +49,8 @@ Several tables will be provided in `information_schema`. Some tables has both lo | `DB` | `varchar` | | | `SET_COUNT` | `int` | Modified keys of the current transaction | | `LOCKED_COUNT` | `int` | Locked keys of the current transaction | -| `MEM_BUFFER_SIZE` | `int` | Size occupied by the transaction's membuffer | +| `MEM_BUFFER_KEYS` | `int` | Entries in transaction's membuffer | +| `MEM_BUFFER_BYTES` | `int` | Size occupied by the transaction's membuffer | * Life span of rows: * Create on first writing or locking operation in a transaction diff --git a/infoschema/tables.go b/infoschema/tables.go index d320c633d2..df6c926b63 100644 --- a/infoschema/tables.go +++ b/infoschema/tables.go @@ -1356,8 +1356,8 @@ var tableTiDBTrxCols = []columnInfo{ {name: "CURRENT_SQL_DIGEST", tp: mysql.TypeVarchar, size: 64, comment: "Digest of the sql the transaction are currently running"}, {name: "STATE", tp: mysql.TypeEnum, enumElems: txninfo.TxnRunningStateStrs, comment: "Current running state of the transaction"}, {name: "WAITING_START_TIME", tp: mysql.TypeTimestamp, decimal: 6, size: 26, comment: "Current lock waiting's start time"}, - {name: "LEN", tp: mysql.TypeLonglong, size: 64, comment: "How many entries are in MemDB"}, - {name: "SIZE", tp: mysql.TypeLonglong, size: 64, comment: "MemDB used memory"}, + {name: "MEM_BUFFER_KEYS", tp: mysql.TypeLonglong, size: 64, comment: "How many entries are in MemDB"}, + {name: "MEM_BUFFER_BYTES", tp: mysql.TypeLonglong, size: 64, comment: "MemDB used memory"}, {name: "SESSION_ID", tp: mysql.TypeLonglong, size: 21, flag: mysql.UnsignedFlag, comment: "Which session this transaction belongs to"}, {name: "USER", tp: mysql.TypeVarchar, size: 16, comment: "The user who open this session"}, {name: "DB", tp: mysql.TypeVarchar, size: 64, comment: "The schema this transaction works on"},