[MDEV-13647] Mysql Bug#11815557 60269: reject attempts to create system tables in incorrect engine Created: 2017-08-25  Updated: 2017-08-25  Resolved: 2017-08-25

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.0, 10.1, 10.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-13625 Merge InnoDB test cases from MySQL 5.6 Closed

 Description   

Mariadb allows to change to engine of system tables (queries with innodb, merge, memory, heap execute without errors )

--echo # Bug#11815557 60269: MYSQL SHOULD REJECT ATTEMPTS TO CREATE SYSTEM
--echo #                     TABLES IN INCORRECT ENGINE
--echo #
--echo # Note: This test assumes that only MyISAM supports system tables.
--echo #       If other engines are made to support system tables,
--echo #       then this test needs to be updated
--echo #
 
use mysql;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE db ENGINE=innodb;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE user ENGINE=memory;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE proc ENGINE=heap;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE func ENGINE=csv;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE event ENGINE=merge;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE servers ENGINE=innodb;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE procs_priv ENGINE=memory;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE tables_priv ENGINE=heap;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE columns_priv ENGINE=csv;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE time_zone ENGINE=merge;
--error ER_UNSUPPORTED_ENGINE
ALTER TABLE help_topic ENGINE=innodb;
 
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE db (dummy int) ENGINE=innodb;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE user (dummy int) ENGINE=memory;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE proc (dummy int) ENGINE=heap;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE func (dummy int) ENGINE=csv;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE event (dummy int) ENGINE=merge;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE servers (dummy int) ENGINE=innodb;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE procs_priv (dummy int) ENGINE=memory;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE tables_priv (dummy int) ENGINE=heap;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE columns_priv (dummy int) ENGINE=csv;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE time_zone (dummy int) ENGINE=merge;
--error ER_UNSUPPORTED_ENGINE
CREATE TABLE help_topic (dummy int) ENGINE=innodb;
use test;
--echo # End of Bug#11815557

part of a main.alter_table.test, mysql 5.6.37



 Comments   
Comment by Sergei Golubchik [ 2017-08-25 ]

There is no "incorrect engine" for system tables. MySQL added this limitation to avoid crashes when InnoDB was used for system tables. We've fixed plugin loading order instead.

Generated at Thu Feb 08 08:07:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.