Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
The patch for MDEV-19772 earlier introduced a number of helper classes to define INFORMATION_SCHEMA tables, and changed definitions in /sql and /plugins.
This task is to make INFORMATION_SCHEMA definitions in /storage/innobase use these new classes.
So for example this table definition:
static ST_FIELD_INFO innodb_lock_waits_fields_info[] = |
{
|
#define IDX_REQUESTING_TRX_ID 0
|
{STRUCT_FLD(field_name, "requesting_trx_id"), |
STRUCT_FLD(field_length, TRX_ID_MAX_LEN + 1),
|
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
STRUCT_FLD(value, 0),
|
STRUCT_FLD(field_flags, 0),
|
STRUCT_FLD(old_name, ""), |
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
|
#define IDX_REQUESTED_LOCK_ID 1
|
{STRUCT_FLD(field_name, "requested_lock_id"), |
STRUCT_FLD(field_length, TRX_I_S_LOCK_ID_MAX_LEN + 1),
|
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
STRUCT_FLD(value, 0),
|
STRUCT_FLD(field_flags, 0),
|
STRUCT_FLD(old_name, ""), |
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
|
#define IDX_BLOCKING_TRX_ID 2
|
{STRUCT_FLD(field_name, "blocking_trx_id"), |
STRUCT_FLD(field_length, TRX_ID_MAX_LEN + 1),
|
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
STRUCT_FLD(value, 0),
|
STRUCT_FLD(field_flags, 0),
|
STRUCT_FLD(old_name, ""), |
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
|
#define IDX_BLOCKING_LOCK_ID 3
|
{STRUCT_FLD(field_name, "blocking_lock_id"), |
STRUCT_FLD(field_length, TRX_I_S_LOCK_ID_MAX_LEN + 1),
|
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
STRUCT_FLD(value, 0),
|
STRUCT_FLD(field_flags, 0),
|
STRUCT_FLD(old_name, ""), |
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
|
END_OF_ST_FIELD_INFO
|
};
|
will turn into:
namespace Show { |
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
|
static ST_FIELD_INFO innodb_lock_waits_fields_info[] = |
{
|
#define IDX_REQUESTING_TRX_ID 0
|
Column("requesting_trx_id", Varchar(TRX_ID_MAX_LEN + 1), NOT_NULL), |
|
#define IDX_REQUESTED_LOCK_ID 1
|
Column("requested_lock_id", Varchar(TRX_I_S_LOCK_ID_MAX_LEN + 1), NOT_NULL), |
|
#define IDX_BLOCKING_TRX_ID 2
|
Column("blocking_trx_id", Varchar(TRX_ID_MAX_LEN + 1), NOT_NULL), |
|
#define IDX_BLOCKING_LOCK_ID 3
|
Column("blocking_lock_id", Varchar(TRX_I_S_LOCK_ID_MAX_LEN + 1), NOT_NULL), |
CEnd()
|
};
|
} // namespace Show |
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed
-
MDEV-19843 Modify ST_FIELD_INFO to use Type_handler and LEX_CSTRING
- Closed
- is blocked by
-
MDEV-19772 Add helper classes for ST_FIELD_INFO
- Closed
- relates to
-
MDEV-19832 Reuse new I_S table definition helper classes for Spider
- Closed
-
MDEV-19818 Reuse new I_S table definition helper classes for TokuDB
- Closed
-
MDEV-19833 Reuse new I_S table definition helper classes for Mronga
- Closed
-
MDEV-19836 Reuse new I_S table definition helper classes for RocksDB
- Closed