mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
40c0b4c3c1
ChangeSet@1.2561, 2008-03-07 17:44:03+01:00, mleich@five.local.lan +132 -0 Merge five.local.lan:/work/merge/mysql-5.0-funcs_1 into five.local.lan:/work/merge/mysql-5.1-funcs_1 MERGE: 1.1810.3473.24 ChangeSet@1.1810.3473.24, 2008-03-07 WL#4203 Reorganize and fix the data dictionary tests of testsuite funcs_1 1. Adjustment of expected results to modified server properties 2. Add some tests of information_schema views 3. Minor corrections and improvements
84 lines
3.9 KiB
Text
84 lines
3.9 KiB
Text
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
|
|
SUPPORT varchar(8) NO
|
|
COMMENT varchar(80) NO
|
|
TRANSACTIONS varchar(3) NO
|
|
XA varchar(3) NO
|
|
SAVEPOINTS varchar(3) NO
|
|
SHOW CREATE TABLE information_schema.ENGINES;
|
|
Table Create Table
|
|
ENGINES CREATE TEMPORARY TABLE `ENGINES` (
|
|
`ENGINE` varchar(64) NOT NULL DEFAULT '',
|
|
`SUPPORT` varchar(8) NOT NULL DEFAULT '',
|
|
`COMMENT` varchar(80) NOT NULL DEFAULT '',
|
|
`TRANSACTIONS` varchar(3) NOT NULL DEFAULT '',
|
|
`XA` varchar(3) NOT NULL DEFAULT '',
|
|
`SAVEPOINTS` varchar(3) NOT NULL DEFAULT ''
|
|
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
|
SHOW COLUMNS FROM information_schema.ENGINES;
|
|
Field Type Null Key Default Extra
|
|
ENGINE varchar(64) NO
|
|
SUPPORT varchar(8) NO
|
|
COMMENT varchar(80) NO
|
|
TRANSACTIONS varchar(3) NO
|
|
XA varchar(3) NO
|
|
SAVEPOINTS varchar(3) NO
|
|
########################################################################
|
|
# 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';
|
|
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
|
|
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;
|