mirror of
https://github.com/MariaDB/server.git
synced 2025-05-13 01:01:44 +03:00
Some result updates necessary due to extra tables and columns added in information_schema in MariaDB (XtraDB, PBXT, microsec_process). Also fix bad merge of two result files; apparently the test case was merged, but the result file was not. mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Handle the new TIME_MS column in information_schema.processlist. mysql-test/suite/funcs_1/datadict/processlist_val.inc: Handle the new TIME_MS column in information_schema.processlist. mysql-test/suite/funcs_1/r/is_columns_is.result: Handle new tables in information_schema. mysql-test/suite/funcs_1/r/is_tables_is.result: Handle new tables in information_schema. mysql-test/suite/funcs_1/r/is_tables_myisam.result: Fix previous bad merge; apparently this file was not merged along with test changes. mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Handle the new TIME_MS column in information_schema.processlist. mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Fix previous bad merge; apparently this file was not merged along with test changes. Also handle the new TIME_MS column in INFORMATION_SCHEMA.PROCESSLIST. mysql-test/suite/funcs_1/t/is_columns_is.test: Since result file includes PBXT information_schema tables, we need PBXT to run this test.
169 lines
4.1 KiB
Plaintext
169 lines
4.1 KiB
Plaintext
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
|
DROP DATABASE IF EXISTS test1;
|
|
DROP DATABASE IF EXISTS test2;
|
|
CREATE DATABASE test1;
|
|
CREATE DATABASE test2;
|
|
CREATE TABLE test1.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
|
|
CREATE TABLE test1.t2 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
|
|
CREATE TABLE test2.t1 (f1 VARCHAR(20)) ENGINE = <engine_to_be_used>;
|
|
SELECT *,
|
|
LEFT( table_comment,
|
|
IF(INSTR(table_comment,'InnoDB free') = 0
|
|
AND INSTR(table_comment,'number_of_replicas') = 0,
|
|
LENGTH(table_comment),
|
|
INSTR(table_comment,'InnoDB free')
|
|
+ INSTR(table_comment,'number_of_replicas') - 1))
|
|
AS "user_comment",
|
|
'-----------------------------------------------------' AS "Separator"
|
|
FROM information_schema.tables
|
|
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
|
|
ORDER BY table_schema,table_name;
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t2
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test2
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
SHOW TABLES FROM test1;
|
|
Tables_in_test1
|
|
t1
|
|
t2
|
|
SHOW TABLES FROM test2;
|
|
Tables_in_test2
|
|
t1
|
|
DROP USER testuser1@localhost;
|
|
CREATE USER testuser1@localhost;
|
|
GRANT SELECT ON test1.* TO testuser1@localhost;
|
|
# Establish connection testuser1 (user=testuser1)
|
|
SELECT *,
|
|
LEFT( table_comment,
|
|
IF(INSTR(table_comment,'InnoDB free') = 0
|
|
AND INSTR(table_comment,'number_of_replicas') = 0,
|
|
LENGTH(table_comment),
|
|
INSTR(table_comment,'InnoDB free')
|
|
+ INSTR(table_comment,'number_of_replicas') - 1))
|
|
AS "user_comment",
|
|
'-----------------------------------------------------' AS "Separator"
|
|
FROM information_schema.tables
|
|
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
|
|
ORDER BY table_schema,table_name;
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t1
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
TABLE_CATALOG NULL
|
|
TABLE_SCHEMA test1
|
|
TABLE_NAME t2
|
|
TABLE_TYPE BASE TABLE
|
|
ENGINE MYISAM_OR_MARIA
|
|
VERSION 10
|
|
ROW_FORMAT DYNAMIC_OR_PAGE
|
|
TABLE_ROWS #TBLR#
|
|
AVG_ROW_LENGTH #ARL#
|
|
DATA_LENGTH #DL#
|
|
MAX_DATA_LENGTH #MDL#
|
|
INDEX_LENGTH #IL#
|
|
DATA_FREE #DF#
|
|
AUTO_INCREMENT NULL
|
|
CREATE_TIME #CRT#
|
|
UPDATE_TIME #UT#
|
|
CHECK_TIME #CT#
|
|
TABLE_COLLATION latin1_swedish_ci
|
|
CHECKSUM NULL
|
|
CREATE_OPTIONS #CO#
|
|
TABLE_COMMENT #TC#
|
|
user_comment
|
|
Separator -----------------------------------------------------
|
|
SHOW TABLES FROM test1;
|
|
Tables_in_test1
|
|
t1
|
|
t2
|
|
SHOW TABLES FROM test2;
|
|
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'test2'
|
|
# Switch to connection default and close connection testuser1
|
|
DROP USER testuser1@localhost;
|
|
DROP DATABASE test1;
|
|
DROP DATABASE test2;
|