blob: ad774caa11fe597f031fadce8da4f72ea42cccc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
SHOW TABLES FROM information_schema LIKE 'ENGINES';
Tables_in_information_schema (ENGINES)
ENGINES
#######################################################################
# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT
#######################################################################
DROP VIEW IF EXISTS test.v1;
DROP PROCEDURE IF EXISTS test.p1;
DROP FUNCTION IF EXISTS test.f1;
CREATE VIEW test.v1 AS SELECT * FROM information_schema.ENGINES;
CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ENGINES;
CREATE FUNCTION test.f1() returns BIGINT
BEGIN
DECLARE counter BIGINT DEFAULT NULL;
SELECT COUNT(*) INTO counter FROM information_schema.ENGINES;
RETURN counter;
END//
# Attention: The printing of the next result sets is disabled.
SELECT * FROM information_schema.ENGINES;
SELECT * FROM test.v1;
CALL test.p1;
SELECT test.f1();
DROP VIEW test.v1;
DROP PROCEDURE test.p1;
DROP FUNCTION test.f1;
#########################################################################
# Testcase 3.2.12.1: INFORMATION_SCHEMA.ENGINES layout
#########################################################################
DESCRIBE information_schema.ENGINES;
Field Type Null Key Default Extra
ENGINE varchar(64) NO NULL
SUPPORT varchar(8) NO NULL
COMMENT varchar(160) NO NULL
TRANSACTIONS varchar(3) YES NULL
XA varchar(3) YES NULL
SAVEPOINTS varchar(3) YES NULL
SHOW CREATE TABLE information_schema.ENGINES;
Table Create Table
ENGINES CREATE TEMPORARY TABLE `ENGINES` (
`ENGINE` varchar(64) NOT NULL,
`SUPPORT` varchar(8) NOT NULL,
`COMMENT` varchar(160) NOT NULL,
`TRANSACTIONS` varchar(3),
`XA` varchar(3),
`SAVEPOINTS` varchar(3)
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
SHOW COLUMNS FROM information_schema.ENGINES;
Field Type Null Key Default Extra
ENGINE varchar(64) NO NULL
SUPPORT varchar(8) NO NULL
COMMENT varchar(160) NO NULL
TRANSACTIONS varchar(3) YES NULL
XA varchar(3) YES NULL
SAVEPOINTS varchar(3) YES NULL
########################################################################
# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and
# DDL on INFORMATION_SCHEMA tables are not supported
########################################################################
DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
CREATE TABLE db_datadict.t1 (f1 BIGINT)
ENGINE = <engine_type>;
INSERT INTO information_schema.engines
SELECT * FROM information_schema.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
UPDATE information_schema.engines SET engine = '1234567';
Got one of the listed errors
DELETE FROM information_schema.engines WHERE support IN ('DEFAULT','YES');
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
TRUNCATE information_schema.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
CREATE INDEX my_idx_on_engines ON information_schema.engines(engine);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines DROP PRIMARY KEY;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines ADD f1 INT;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE information_schema.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines RENAME db_datadict.engines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
ALTER TABLE information_schema.engines RENAME information_schema.xengines;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP DATABASE db_datadict;
|