summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/funcs_1/r/is_engines.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/funcs_1/r/is_engines.result')
-rw-r--r--mysql-test/suite/funcs_1/r/is_engines.result84
1 files changed, 84 insertions, 0 deletions
diff --git a/mysql-test/suite/funcs_1/r/is_engines.result b/mysql-test/suite/funcs_1/r/is_engines.result
new file mode 100644
index 00000000..ad774caa
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_engines.result
@@ -0,0 +1,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;