mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
9e1fb104a3
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF39AEP5WyjM2MAMF8WVvJMdM0dgFAmck77AACgkQ8WVvJMdM 0dgccQ/+Lls8fWt4D+gMPP7x+drJSO/IE/gZFt3ugbWF+/p3B2xXAs5AAE83wxEh QSbp4DCkb/9PnuakhLmzg0lFbxMUlh4rsJ1YyiuLB2J+YgKbAc36eQQf+rtYSipd DT5uRk36c9wOcOXo/mMv4APEvpPXBIBdIL4VvpKFbIOE7xT24Sp767zWXdXqrB1f JgOQdM2ct+bvSPC55oZ5p1kqyxwvd6K6+3RB3CIpwW9zrVSLg7enT3maLjj/761s jvlRae+Cv+r+Hit9XpmEH6n2FYVgIJ3o3WhdAHwN0kxKabXYTg7OCB7QxDZiUHI9 C/5goKmKaPB1PCQyuTQyLSyyK9a8nPfgn6tqw/p/ZKDQhKT9sWJv/5bSWecrVndx LLYifSTrFC/eXLzgPvCnNv/U8SjsZaAdMIKS681+qDJ0P5abghUIlGnMYTjYXuX1 1B6Vrr0bdrQ3V1CLB3tpkRjpUvicrsabtuAUAP65QnEG2G9UJXklOer+DE291Gsl f1I0o6C1zVGAOkUUD3QEYaHD8w7hlvyfKme5oXKUm3DOjaAar5UUKLdr6prxRZL4 ebhmGEy42Mf8fBYoeohIxmxgvv6h2Xd9xCukgPp8hFpqJGw8abg7JNZTTKH4h2IY J51RpD10h4eoi6WRn3opEcjexTGvZ+xNR7yYO5WxWw6VIre9IUA= =s+WW -----END PGP SIGNATURE----- Merge tag '11.4' into 11.6 MariaDB 11.4.4 release
169 lines
5.8 KiB
Text
169 lines
5.8 KiB
Text
set local sql_mode="";
|
|
set global sql_mode="";
|
|
drop table if exists t1;
|
|
SET SESSION enforce_storage_engine=MyISAM;
|
|
select @@session.enforce_storage_engine;
|
|
@@session.enforce_storage_engine
|
|
MyISAM
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
|
|
Warnings:
|
|
Note 1266 Using storage engine MyISAM for table 't1'
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
INSERT INTO t1 values (1,'abba');
|
|
CREATE TABLE t2 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
|
|
ERROR HY000: The MariaDB server is running with the NO_ENGINE_SUBSTITUTION option so it cannot execute this statement
|
|
SET SESSION sql_mode='';
|
|
SET SESSION enforce_storage_engine=MyISAM;
|
|
select @@session.enforce_storage_engine;
|
|
@@session.enforce_storage_engine
|
|
MyISAM
|
|
select * from t1;
|
|
c1 c2
|
|
1 abba
|
|
drop table t1;
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
SET SESSION enforce_storage_engine=FooBar;
|
|
ERROR 42000: Unknown storage engine 'FooBar'
|
|
select @@session.enforce_storage_engine;
|
|
@@session.enforce_storage_engine
|
|
MyISAM
|
|
connect con1,localhost,user_1,,;
|
|
connection con1;
|
|
SET SESSION enforce_storage_engine=MyISAM;
|
|
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
|
|
disconnect con1;
|
|
connection default;
|
|
SET SESSION enforce_storage_engine=NULL;
|
|
SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
SET GLOBAL enforce_storage_engine=Memory;
|
|
SET SESSION sql_mode='';
|
|
connect con1,localhost,root,,;
|
|
connection con1;
|
|
select @@session.enforce_storage_engine;
|
|
@@session.enforce_storage_engine
|
|
MEMORY
|
|
select @@global.enforce_storage_engine;
|
|
@@global.enforce_storage_engine
|
|
MEMORY
|
|
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
|
|
Warnings:
|
|
Note 1266 Using storage engine MEMORY for table 't1'
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t1;
|
|
connection default;
|
|
disconnect con1;
|
|
set global sql_mode=default;
|
|
SET SESSION enforce_storage_engine=NULL;
|
|
SET GLOBAL enforce_storage_engine=NULL;
|
|
CREATE TABLE t3 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
|
|
INSERT INTO t3 values (NULL, 'test');
|
|
SET SESSION enforce_storage_engine=Memory;
|
|
ALTER TABLE t3 ENGINE=MyISAM;
|
|
Warnings:
|
|
Note 1266 Using storage engine MEMORY for table 't3'
|
|
SHOW CREATE TABLE t3;
|
|
Table Create Table
|
|
t3 CREATE TABLE `t3` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MEMORY AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t3;
|
|
SET SESSION enforce_storage_engine=NULL;
|
|
CREATE TABLE t3 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
|
|
INSERT INTO t3 values (NULL, 'test');
|
|
SET SESSION enforce_storage_engine=Memory;
|
|
ALTER TABLE t3 ADD COLUMN c3 INT;
|
|
SHOW CREATE TABLE t3;
|
|
Table Create Table
|
|
t3 CREATE TABLE `t3` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` varchar(10) DEFAULT NULL,
|
|
`c3` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
|
DROP TABLE t3;
|
|
#
|
|
# MDEV-21618 CREATE UNIQUE INDEX fails with "ERROR 1286 (42000): Unknown storage engine 'partition'"
|
|
#
|
|
SET SESSION enforce_storage_engine=MyISAM;
|
|
CREATE TABLE t4 (a INT) ENGINE=MyISAM PARTITION BY HASH(a);
|
|
CREATE INDEX x on t4 (a);
|
|
DROP TABLE t4;
|
|
SET SESSION enforce_storage_engine=NULL;
|
|
SET GLOBAL enforce_storage_engine=NULL;
|