mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
75344d3d3b
Static disabled plugins|engines and dynamic plugins which installed but disabled are not visible in I_S PLUGINS|ENGINES tables because they are not stored into global plugin array. The fix: add such plugins|engines to plugin array with PLUGIN_IS_DISABLED status. I_S.ENGINES 'Transactions', 'XA', 'Savepoints' fields have NULL value in this case. mysql-test/r/warnings_engine_disabled.result: test result mysql-test/suite/funcs_1/r/is_columns_is.result: result fix mysql-test/suite/funcs_1/r/is_engines.result: result fix mysql-test/t/warnings_engine_disabled.test: test case sql/sql_plugin.cc: store disabled plugins|engines into plugin array sql/sql_plugin.h: added PLUGIN_IS_DISABLED flag sql/sql_show.cc: added filling of 'engines'&'plugins' tables with disabled engines|plugins
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) 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 DEFAULT '',
|
|
`SUPPORT` varchar(8) NOT NULL DEFAULT '',
|
|
`COMMENT` varchar(80) NOT NULL DEFAULT '',
|
|
`TRANSACTIONS` varchar(3) DEFAULT NULL,
|
|
`XA` varchar(3) DEFAULT NULL,
|
|
`SAVEPOINTS` varchar(3) DEFAULT NULL
|
|
) 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) 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';
|
|
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;
|