mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -9,3 +9,76 @@ INSERT INTO t1 VALUES (REPEAT('a',10000));
|
||||
SELECT DATA_LENGTH<100 AS c FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17363 - Compressed columns cannot be restored from dump
|
||||
--echo #
|
||||
|
||||
--error ER_WRONG_FIELD_SPEC
|
||||
CREATE TABLE t1(a INT NOT NULL COMPRESSED);
|
||||
SHOW WARNINGS;
|
||||
|
||||
CREATE TABLE t1(
|
||||
a JSON COMPRESSED,
|
||||
b VARCHAR(1000) COMPRESSED BINARY,
|
||||
c NVARCHAR(1000) COMPRESSED BINARY,
|
||||
d TINYTEXT COMPRESSED BINARY
|
||||
);
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # VARCHAR and TEXT variants
|
||||
--echo #
|
||||
|
||||
--let type=VARCHAR(10)
|
||||
--source include/column_compression_syntax_varchar.inc
|
||||
|
||||
--let type=VARCHAR2(10)
|
||||
--source include/column_compression_syntax_varchar.inc
|
||||
|
||||
--let type=TINYTEXT
|
||||
--source include/column_compression_syntax_varchar.inc
|
||||
|
||||
--let type=TEXT
|
||||
--source include/column_compression_syntax_varchar.inc
|
||||
|
||||
--let type=MEDIUMTEXT
|
||||
--source include/column_compression_syntax_varchar.inc
|
||||
|
||||
--let type=LONGTEXT
|
||||
--source include/column_compression_syntax_varchar.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # VARBINARY and BLOB variables
|
||||
--echo #
|
||||
|
||||
--let type=VARCHAR(10)
|
||||
--source include/column_compression_syntax_varbinary.inc
|
||||
|
||||
--let type=TINYBLOB
|
||||
--source include/column_compression_syntax_varbinary.inc
|
||||
|
||||
--let type=BLOB
|
||||
--source include/column_compression_syntax_varbinary.inc
|
||||
|
||||
--let type=MEDIUMBLOB
|
||||
--source include/column_compression_syntax_varbinary.inc
|
||||
|
||||
--let type=LONGBLOB
|
||||
--source include/column_compression_syntax_varbinary.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # NVARCHAR
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED);
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED);
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED);
|
||||
|
29
mysql-test/suite/compat/oracle/t/keywords.test
Normal file
29
mysql-test/suite/compat/oracle/t/keywords.test
Normal file
@ -0,0 +1,29 @@
|
||||
SET sql_mode=ORACLE;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17363 Compressed columns cannot be restored from dump
|
||||
--echo # In sql_mode=ORACLE, COMPRESSED is still valid both as an SP label
|
||||
--echo # and an SP variable name.
|
||||
--echo #
|
||||
|
||||
DELIMITER $$;
|
||||
BEGIN
|
||||
IF TRUE THEN
|
||||
GOTO compressed;
|
||||
END IF;
|
||||
SELECT 'This should not be reached' AS warn;
|
||||
<<compressed>>
|
||||
BEGIN
|
||||
SELECT 1 AS a;
|
||||
END;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
DELIMITER $$;
|
||||
DECLARE compressed INT DEFAULT 1;
|
||||
BEGIN
|
||||
SELECT compressed;
|
||||
END
|
||||
$$
|
||||
DELIMITER ;$$
|
30
mysql-test/suite/compat/oracle/t/mysqldump_restore.test
Normal file
30
mysql-test/suite/compat/oracle/t/mysqldump_restore.test
Normal file
@ -0,0 +1,30 @@
|
||||
# See comments in mysql-test/main/mysqldump_restore.test
|
||||
--source include/not_embedded.inc
|
||||
|
||||
SET sql_mode=ORACLE;
|
||||
|
||||
let $mysqldumpfile = $MYSQLTEST_VARDIR/tmp/mysqldumpfile.sql;
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17363 Compressed columns cannot be restored from dump
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL);
|
||||
INSERT INTO `t1` VALUES (REPEAT('a', 256));
|
||||
--exec $MYSQL_DUMP --skip-extended-insert test --skip-comments t1 > $mysqldumpfile
|
||||
let $table_name = test.t1;
|
||||
--source include/mysqldump.inc
|
||||
|
||||
CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL);
|
||||
INSERT INTO `t1` VALUES (REPEAT('a', 256));
|
||||
--exec $MYSQL_DUMP --skip-extended-insert test --skip-comments t1 > $mysqldumpfile
|
||||
let $table_name = test.t1;
|
||||
--source include/mysqldump.inc
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
Reference in New Issue
Block a user