Add information_schema.tables.table_rows

Fixes: #55182
This commit is contained in:
Robert Schulze 2023-10-03 12:21:53 +00:00
parent b67a0fe344
commit 2aefa760c3
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 6 additions and 0 deletions

View File

@ -198,6 +198,8 @@ Columns:
- `FOREIGN TABLE`
- `LOCAL TEMPORARY`
- `SYSTEM VIEW`
- `data_rows` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — The total
number of rows. NULL if it could not be determined.
- `data_length` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — The size of
the data on-disk. NULL if it could not be determined.
- `table_collation` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — The table default collation. Always `utf8mb4_0900_ai_ci`.

View File

@ -61,6 +61,7 @@ static constexpr std::string_view tables = R"(
`table_schema` String,
`table_name` String,
`table_type` String,
`data_rows` Nullable(UInt64),
`data_length` Nullable(UInt64),
`table_collation` Nullable(String),
`table_comment` Nullable(String),
@ -68,6 +69,7 @@ static constexpr std::string_view tables = R"(
`TABLE_SCHEMA` String,
`TABLE_NAME` String,
`TABLE_TYPE` String,
`DATA_ROWS` Nullable(UInt64),
`DATA_LENGTH` Nullable(UInt64),
`TABLE_COLLATION` Nullable(String),
`TABLE_COMMENT` Nullable(String)
@ -82,6 +84,7 @@ static constexpr std::string_view tables = R"(
has_own_data = 0, 'FOREIGN TABLE',
'BASE TABLE'
) AS table_type,
total_rows AS data_rows,
total_bytes AS data_length,
'utf8mb4_0900_ai_ci' AS table_collation,
comment AS table_comment,
@ -89,6 +92,7 @@ static constexpr std::string_view tables = R"(
table_schema AS TABLE_SCHEMA,
table_name AS TABLE_NAME,
table_type AS TABLE_TYPE,
data_rows AS DATA_ROWS,
data_length AS DATA_LENGTH,
table_collation AS TABLE_COLLATION,
table_comment AS TABLE_COMMENT