1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

remove deprecated since 10.4

This commit is contained in:
Sergei Golubchik
2024-02-16 00:07:33 +01:00
parent 04f0504831
commit eeba940311
30 changed files with 111 additions and 1507 deletions

View File

@ -25,19 +25,13 @@ DROP TABLE t1;
--echo # --echo #
--echo # The following statements return deprecated syntax warnings --echo # The following statements fail by the grammar since 11.5
--echo # --echo #
--enable_prepare_warnings --error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type DEFAULT '' COMPRESSED) --eval CREATE TABLE t1 (a $type DEFAULT '' COMPRESSED)
SHOW CREATE TABLE t1; --error ER_PARSE_ERROR
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type NULL COMPRESSED) --eval CREATE TABLE t1 (a $type NULL COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--disable_prepare_warnings
--echo # --echo #
--echo # The following statements fail by the grammar, --echo # The following statements fail by the grammar,

View File

@ -50,20 +50,15 @@ DROP TABLE t1;
--echo # --echo #
--echo # The following statements return deprecated syntax warnings --echo # The following statements fail by the grammar since 11.5
--echo # --echo #
--enable_prepare_warnings --error ER_PARSE_ERROR
--eval CREATE TABLE t1 (a $type BINARY COMPRESSED) --eval CREATE TABLE t1 (a $type BINARY COMPRESSED)
SHOW CREATE TABLE t1; --error ER_PARSE_ERROR
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type ASCII COMPRESSED) --eval CREATE TABLE t1 (a $type ASCII COMPRESSED)
SHOW CREATE TABLE t1; --error ER_PARSE_ERROR
DROP TABLE t1;
--eval CREATE TABLE t1 (a $type BYTE COMPRESSED) --eval CREATE TABLE t1 (a $type BYTE COMPRESSED)
SHOW CREATE TABLE t1;
DROP TABLE t1;
--disable_prepare_warnings --disable_prepare_warnings

View File

@ -1293,7 +1293,7 @@ DROP TABLE t1;
CREATE TABLE t1(a CHAR(100) COMPRESSED); CREATE TABLE t1(a CHAR(100) COMPRESSED);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
CREATE TABLE t1(a CHAR(100) NOT NULL COMPRESSED); CREATE TABLE t1(a CHAR(100) NOT NULL COMPRESSED);
ERROR 42000: Incorrect column specifier for column 'a' ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
CREATE TABLE t1(a INT COMPRESSED); CREATE TABLE t1(a INT COMPRESSED);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
CREATE TABLE t1(a BLOB COMPRESSED=unknown); CREATE TABLE t1(a BLOB COMPRESSED=unknown);
@ -1304,7 +1304,7 @@ CREATE TABLE t1(a INT);
ALTER TABLE t1 MODIFY a INT COMPRESSED; ALTER TABLE t1 MODIFY a INT COMPRESSED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED' at line 1
ALTER TABLE t1 MODIFY a INT NOT NULL COMPRESSED; ALTER TABLE t1 MODIFY a INT NOT NULL COMPRESSED;
ERROR 42000: Incorrect column specifier for column 'a' ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED' at line 1
DROP TABLE t1; DROP TABLE t1;
# Test CSV # Test CSV
CREATE TABLE t1(a BLOB COMPRESSED NOT NULL) ENGINE=CSV; CREATE TABLE t1(a BLOB COMPRESSED NOT NULL) ENGINE=CSV;
@ -1494,10 +1494,10 @@ DROP TABLE t1;
# MDEV-17363 - Compressed columns cannot be restored from dump # MDEV-17363 - Compressed columns cannot be restored from dump
# #
CREATE TABLE t1(a INT NOT NULL COMPRESSED); CREATE TABLE t1(a INT NOT NULL COMPRESSED);
ERROR 42000: Incorrect column specifier for column 'a' ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Error 1063 Incorrect column specifier for column 'a' Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
CREATE TABLE t1( CREATE TABLE t1(
a JSON COMPRESSED, a JSON COMPRESSED,
b VARCHAR(1000) COMPRESSED BINARY, b VARCHAR(1000) COMPRESSED BINARY,
@ -1609,35 +1609,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a VARCHAR(10) BINARY COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -1760,35 +1739,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a TINYTEXT BINARY COMPRESSED); CREATE TABLE t1 (a TINYTEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED); CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED); CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -1911,35 +1869,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a TEXT BINARY COMPRESSED); CREATE TABLE t1 (a TEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a TEXT ASCII COMPRESSED); CREATE TABLE t1 (a TEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a TEXT BYTE COMPRESSED); CREATE TABLE t1 (a TEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` blob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2062,35 +1999,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a MEDIUMTEXT BINARY COMPRESSED); CREATE TABLE t1 (a MEDIUMTEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED); CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED); CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2213,35 +2129,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a LONGTEXT BINARY COMPRESSED); CREATE TABLE t1 (a LONGTEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED); CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED); CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2310,26 +2205,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a VARCHAR(10) DEFAULT '' COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2385,26 +2266,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a TINYBLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a TINYBLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyblob /*!100301 COMPRESSED*/ DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED); CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2460,26 +2327,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a BLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a BLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` blob /*!100301 COMPRESSED*/ DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a BLOB NULL COMPRESSED); CREATE TABLE t1 (a BLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` blob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2535,26 +2388,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a MEDIUMBLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a MEDIUMBLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumblob /*!100301 COMPRESSED*/ DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED); CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -2610,26 +2449,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a LONGBLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a LONGBLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longblob /*!100301 COMPRESSED*/ DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED); CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.

View File

@ -33,7 +33,7 @@ let $typeu= BLOB;
--enable_prepare_warnings --enable_prepare_warnings
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
CREATE TABLE t1(a CHAR(100) COMPRESSED); CREATE TABLE t1(a CHAR(100) COMPRESSED);
--error ER_WRONG_FIELD_SPEC --error ER_PARSE_ERROR
CREATE TABLE t1(a CHAR(100) NOT NULL COMPRESSED); CREATE TABLE t1(a CHAR(100) NOT NULL COMPRESSED);
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
CREATE TABLE t1(a INT COMPRESSED); CREATE TABLE t1(a INT COMPRESSED);
@ -44,7 +44,7 @@ CREATE TABLE t1(a BLOB COMPRESSED COMPRESSED);
CREATE TABLE t1(a INT); CREATE TABLE t1(a INT);
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
ALTER TABLE t1 MODIFY a INT COMPRESSED; ALTER TABLE t1 MODIFY a INT COMPRESSED;
--error ER_WRONG_FIELD_SPEC --error ER_PARSE_ERROR
ALTER TABLE t1 MODIFY a INT NOT NULL COMPRESSED; ALTER TABLE t1 MODIFY a INT NOT NULL COMPRESSED;
DROP TABLE t1; DROP TABLE t1;
@ -192,7 +192,7 @@ DROP TABLE t1;
--echo # --echo #
--echo # MDEV-17363 - Compressed columns cannot be restored from dump --echo # MDEV-17363 - Compressed columns cannot be restored from dump
--echo # --echo #
--error ER_WRONG_FIELD_SPEC --error ER_PARSE_ERROR
CREATE TABLE t1(a INT NOT NULL COMPRESSED); CREATE TABLE t1(a INT NOT NULL COMPRESSED);
SHOW WARNINGS; SHOW WARNINGS;

View File

@ -11,10 +11,10 @@ DROP TABLE t1;
# MDEV-17363 - Compressed columns cannot be restored from dump # MDEV-17363 - Compressed columns cannot be restored from dump
# #
CREATE TABLE t1(a INT NOT NULL COMPRESSED); CREATE TABLE t1(a INT NOT NULL COMPRESSED);
ERROR 42000: Incorrect column specifier for column 'a' ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Error 1063 Incorrect column specifier for column 'a' Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
CREATE TABLE t1( CREATE TABLE t1(
a JSON COMPRESSED, a JSON COMPRESSED,
b VARCHAR(1000) COMPRESSED BINARY, b VARCHAR(1000) COMPRESSED BINARY,
@ -126,35 +126,14 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a VARCHAR(10) BINARY COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -277,35 +256,14 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a VARCHAR2(10) BINARY COMPRESSED); CREATE TABLE t1 (a VARCHAR2(10) BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR2(10) ASCII COMPRESSED); CREATE TABLE t1 (a VARCHAR2(10) ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR2(10) BYTE COMPRESSED); CREATE TABLE t1 (a VARCHAR2(10) BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -428,35 +386,14 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a TINYTEXT BINARY COMPRESSED); CREATE TABLE t1 (a TINYTEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED); CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED); CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -579,35 +516,14 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a TEXT BINARY COMPRESSED); CREATE TABLE t1 (a TEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a TEXT ASCII COMPRESSED); CREATE TABLE t1 (a TEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" text /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a TEXT BYTE COMPRESSED); CREATE TABLE t1 (a TEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -730,35 +646,14 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a MEDIUMTEXT BINARY COMPRESSED); CREATE TABLE t1 (a MEDIUMTEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED); CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED); CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -881,35 +776,14 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a LONGTEXT BINARY COMPRESSED); CREATE TABLE t1 (a LONGTEXT BINARY COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED); CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED); CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -978,26 +852,12 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a VARCHAR(10) DEFAULT '' COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT ''
)
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED); CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -1053,26 +913,12 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a TINYBLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a TINYBLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" tinyblob /*!100301 COMPRESSED*/ DEFAULT ''
)
DROP TABLE t1;
CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED); CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -1128,26 +974,12 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a BLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a BLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longblob /*!100301 COMPRESSED*/ DEFAULT ''
)
DROP TABLE t1;
CREATE TABLE t1 (a BLOB NULL COMPRESSED); CREATE TABLE t1 (a BLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -1203,26 +1035,12 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a MEDIUMBLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a MEDIUMBLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" mediumblob /*!100301 COMPRESSED*/ DEFAULT ''
)
DROP TABLE t1;
CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED); CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.
@ -1278,26 +1096,12 @@ t1 CREATE TABLE "t1" (
) )
DROP TABLE t1; DROP TABLE t1;
# #
# The following statements return deprecated syntax warnings # The following statements fail by the grammar since 11.5
# #
CREATE TABLE t1 (a LONGBLOB DEFAULT '' COMPRESSED); CREATE TABLE t1 (a LONGBLOB DEFAULT '' COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longblob /*!100301 COMPRESSED*/ DEFAULT ''
)
DROP TABLE t1;
CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED); CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED);
Warnings: ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecated and will be removed in a future release. Please use '<data type> COMPRESSED... <character set clause> ...' instead
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
# #
# The following statements fail by the grammar, # The following statements fail by the grammar,
# because COMPRESSED immediately follows 'field_type'. # because COMPRESSED immediately follows 'field_type'.

View File

@ -15,7 +15,7 @@ DROP TABLE t1;
--echo # MDEV-17363 - Compressed columns cannot be restored from dump --echo # MDEV-17363 - Compressed columns cannot be restored from dump
--echo # --echo #
--error ER_WRONG_FIELD_SPEC --error ER_PARSE_ERROR
CREATE TABLE t1(a INT NOT NULL COMPRESSED); CREATE TABLE t1(a INT NOT NULL COMPRESSED);
SHOW WARNINGS; SHOW WARNINGS;

View File

@ -33,7 +33,6 @@ WSREP_FORCED_BINLOG_FORMAT NONE
WSREP_GTID_DOMAIN_ID 0 WSREP_GTID_DOMAIN_ID 0
WSREP_GTID_MODE OFF WSREP_GTID_MODE OFF
WSREP_IGNORE_APPLY_ERRORS 7 WSREP_IGNORE_APPLY_ERRORS 7
WSREP_LOAD_DATA_SPLITTING OFF
WSREP_LOG_CONFLICTS OFF WSREP_LOG_CONFLICTS OFF
WSREP_MAX_WS_ROWS 0 WSREP_MAX_WS_ROWS 0
WSREP_MAX_WS_SIZE 2147483647 WSREP_MAX_WS_SIZE 2147483647

View File

@ -1,22 +0,0 @@
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_load_data_splitting = TRUE;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
connection node_2;
SELECT COUNT(*) = 95000 FROM t1;
COUNT(*) = 95000
1
wsrep_last_committed_diff
1
connection node_1;
SET GLOBAL wsrep_load_data_splitting = 0;;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
connection node_2;
SET GLOBAL wsrep_load_data_splitting = 0;;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
DROP TABLE t1;

View File

@ -115,40 +115,7 @@ DROP TABLE t1, p1;
# MDEV-5146: Bulk loads into partitioned table not working # MDEV-5146: Bulk loads into partitioned table not working
# #
connection node_1; connection node_1;
# Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 # Case 1: LOAD DATA with 20002 entries.
# entries.
SET GLOBAL wsrep_load_data_splitting = ON;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
20002
wsrep_last_committed_diff
AS_EXPECTED_3_or_5
DROP TABLE t1;
# Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries.
connection node_1;
SET GLOBAL wsrep_load_data_splitting = ON;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
101
wsrep_last_committed_diff
1
DROP TABLE t1;
# Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002
# entries.
connection node_1;
SET GLOBAL wsrep_load_data_splitting = OFF;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (pk INT PRIMARY KEY) CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2; connection node_2;
@ -158,10 +125,18 @@ COUNT(*)
wsrep_last_committed_diff wsrep_last_committed_diff
AS_EXPECTED_1_or_2 AS_EXPECTED_1_or_2
DROP TABLE t1; DROP TABLE t1;
# Case 2: LOAD DATA with 101 entries.
connection node_1;
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
101
wsrep_last_committed_diff
1
DROP TABLE t1;
connection node_1; connection node_1;
SET GLOBAL wsrep_load_data_splitting = 0;;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
disconnect node_2; disconnect node_2;
disconnect node_1; disconnect node_1;
# End of test # End of test

View File

@ -1,42 +0,0 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting`
# Create a file for LOAD DATA with 95K entries
--perl
open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_var_load_data_splitting.csv") or die;
foreach my $i (1..95000) {
print FILE "$i\n";
}
EOF
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
# Record wsrep_last_committed as it was before LOAD DATA
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SET GLOBAL wsrep_load_data_splitting = TRUE;
--disable_query_log
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_var_load_data_splitting.csv' INTO TABLE t1;
--enable_query_log
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SELECT COUNT(*) = 95000 FROM t1;
# LOAD-ing 95K rows causes 10 commits to be registered
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 10 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
--connection node_2
--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
DROP TABLE t1;

View File

@ -109,12 +109,7 @@ EOF
--connection node_1 --connection node_1
--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting` --echo # Case 1: LOAD DATA with 20002 entries.
--echo # Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002
--echo # entries.
SET GLOBAL wsrep_load_data_splitting = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY) CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
@ -138,18 +133,16 @@ SELECT COUNT(*) FROM t1;
# 3 commits to be registered when the Galera library does not support streaming replication and # 3 commits to be registered when the Galera library does not support streaming replication and
# 5 commits to be registered when the Galera library supports streaming replication # 5 commits to be registered when the Galera library supports streaming replication
--disable_query_log --disable_query_log
--replace_result 3 AS_EXPECTED_3_or_5 5 AS_EXPECTED_3_or_5 --replace_result 1 AS_EXPECTED_1_or_2 2 AS_EXPECTED_1_or_2
--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff; --eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log --enable_query_log
DROP TABLE t1; DROP TABLE t1;
--echo # Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. --echo # Case 2: LOAD DATA with 101 entries.
--connection node_1 --connection node_1
SET GLOBAL wsrep_load_data_splitting = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY) CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
@ -175,44 +168,8 @@ SELECT COUNT(*) FROM t1;
DROP TABLE t1; DROP TABLE t1;
--echo # Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002
--echo # entries.
--connection node_1 --connection node_1
SET GLOBAL wsrep_load_data_splitting = OFF;
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
# Record wsrep_last_committed as it was before LOAD DATA
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat' INTO TABLE t1;
--enable_query_log
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
# LOAD-ing 20002 rows causes
# 1 commit to be registered when the Galera library does not support streaming replication and
# 2 commits to be registered when the Galera library supports streaming replication
--disable_query_log
--replace_result 1 AS_EXPECTED_1_or_2 2 AS_EXPECTED_1_or_2
--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
--connection node_1
# Restore the original value
--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
# Cleanup # Cleanup
remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat'; remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat';
remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-2.dat'; remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-2.dat';

View File

@ -9,6 +9,6 @@ SELECT COUNT(*) = 20000 FROM t1;
COUNT(*) = 20000 COUNT(*) = 20000
1 1
wsrep_last_committed_diff wsrep_last_committed_diff
1 0
connection node_1; connection node_1;
DROP TABLE t1; DROP TABLE t1;

View File

@ -1,19 +0,0 @@
connection node_2;
connection node_1;
SET SESSION wsrep_trx_fragment_size = 512;
SET GLOBAL wsrep_load_data_splitting = TRUE;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
connection node_1;
connection node_2;
SELECT COUNT(*) = 95000 FROM t1;
COUNT(*) = 95000
1
wsrep_last_committed_diff
1
connection node_1;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
DROP TABLE t1;

View File

@ -24,9 +24,6 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_1 --connection node_1
--disable_query_log --disable_query_log
--disable_warnings
set global wsrep_load_data_splitting=ON;
--enable_warnings
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1; --eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1;
--enable_query_log --enable_query_log
@ -40,10 +37,5 @@ SELECT COUNT(*) = 20000 FROM t1;
--enable_query_log --enable_query_log
--connection node_1 --connection node_1
--disable_query_log
--disable_warnings
set global wsrep_load_data_splitting=OFF;
--enable_warnings
--enable_query_log
DROP TABLE t1; DROP TABLE t1;

View File

@ -1,50 +0,0 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
#
# Test Streaming Replication and LOAD DATA splitting operating at the same time
#
--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting`
SET SESSION wsrep_trx_fragment_size = 512;
SET GLOBAL wsrep_load_data_splitting = TRUE;
# Create a file for LOAD DATA with 95K entries
--perl
open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_sr_load_data.csv") or die;
foreach my $i (1..95000) {
print FILE "$i\n";
}
EOF
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
# Record wsrep_last_committed as it was before LOAD DATA
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
--disable_query_log
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1;
--enable_query_log
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SELECT COUNT(*) = 95000 FROM t1;
# LOAD-ing 95K rows causes 10 'commits' to be registered
--disable_query_log
--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before = 10 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
--disable_query_log
--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
--enable_query_log
DROP TABLE t1;

View File

@ -271,21 +271,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED COMMAND_LINE_ARGUMENT REQUIRED
GLOBAL_VALUE_PATH NULL GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_LOAD_DATA_SPLITTING
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT To commit LOAD DATA transaction after every 10K rows inserted (deprecated)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_LOG_CONFLICTS VARIABLE_NAME WSREP_LOG_CONFLICTS
SESSION_VALUE NULL SESSION_VALUE NULL
GLOBAL_VALUE OFF GLOBAL_VALUE OFF

View File

@ -1,57 +0,0 @@
#
# wsrep_load_data_splitting
#
# save the initial value
SET @wsrep_load_data_splitting_global_saved = @@global.wsrep_load_data_splitting;
# default
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
# scope
SELECT @@session.wsrep_load_data_splitting;
ERROR HY000: Variable 'wsrep_load_data_splitting' is a GLOBAL variable
SET @@global.wsrep_load_data_splitting=OFF;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
SET @@global.wsrep_load_data_splitting=ON;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
# valid values
SET @@global.wsrep_load_data_splitting='OFF';
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
SET @@global.wsrep_load_data_splitting=ON;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
1
SET @@global.wsrep_load_data_splitting=default;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SELECT @@global.wsrep_load_data_splitting;
@@global.wsrep_load_data_splitting
0
# invalid values
SET @@global.wsrep_load_data_splitting=NULL;
ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of 'NULL'
SET @@global.wsrep_load_data_splitting='junk';
ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of 'junk'
# restore the initial value
SET @@global.wsrep_load_data_splitting = @wsrep_load_data_splitting_global_saved;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
# End of test

View File

@ -1,42 +0,0 @@
--source include/have_wsrep.inc
--echo #
--echo # wsrep_load_data_splitting
--echo #
--echo # save the initial value
SET @wsrep_load_data_splitting_global_saved = @@global.wsrep_load_data_splitting;
--echo # default
SELECT @@global.wsrep_load_data_splitting;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=OFF;
SELECT @@global.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=ON;
SELECT @@global.wsrep_load_data_splitting;
--echo
--echo # valid values
SET @@global.wsrep_load_data_splitting='OFF';
SELECT @@global.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=ON;
SELECT @@global.wsrep_load_data_splitting;
SET @@global.wsrep_load_data_splitting=default;
SELECT @@global.wsrep_load_data_splitting;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_load_data_splitting=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.wsrep_load_data_splitting='junk';
--echo
--echo # restore the initial value
SET @@global.wsrep_load_data_splitting = @wsrep_load_data_splitting_global_saved;
--echo # End of test

View File

@ -105,7 +105,6 @@ WSREP_GTID_DOMAIN_ID
WSREP_GTID_MODE WSREP_GTID_MODE
WSREP_GTID_SEQ_NO WSREP_GTID_SEQ_NO
WSREP_IGNORE_APPLY_ERRORS WSREP_IGNORE_APPLY_ERRORS
WSREP_LOAD_DATA_SPLITTING
WSREP_LOG_CONFLICTS WSREP_LOG_CONFLICTS
WSREP_MAX_WS_ROWS WSREP_MAX_WS_ROWS
WSREP_MAX_WS_SIZE WSREP_MAX_WS_SIZE

View File

@ -106,7 +106,6 @@ WSREP_GTID_DOMAIN_ID
WSREP_GTID_MODE WSREP_GTID_MODE
WSREP_GTID_SEQ_NO WSREP_GTID_SEQ_NO
WSREP_IGNORE_APPLY_ERRORS WSREP_IGNORE_APPLY_ERRORS
WSREP_LOAD_DATA_SPLITTING
WSREP_LOG_CONFLICTS WSREP_LOG_CONFLICTS
WSREP_MAX_WS_ROWS WSREP_MAX_WS_ROWS
WSREP_MAX_WS_SIZE WSREP_MAX_WS_SIZE

View File

@ -11133,41 +11133,6 @@ bool Column_definition::set_compressed(const char *method)
} }
bool Column_definition::set_compressed_deprecated(THD *thd, const char *method)
{
warn_deprecated<1004>(thd,
"<data type> <character set clause> ... COMPRESSED...",
"'<data type> COMPRESSED... <character set clause> ...'");
return set_compressed(method);
}
bool
Column_definition::set_compressed_deprecated_column_attribute(THD *thd,
const char *pos,
const char *method)
{
if (compression_method_ptr)
{
/*
Compression method has already been set, e.g.:
a VARCHAR(10) COMPRESSED DEFAULT 10 COMPRESSED
*/
thd->parse_error(ER_SYNTAX_ERROR, pos);
return true;
}
enum enum_field_types sql_type= real_field_type();
/* We can't use f_is_blob here as pack_flag is not yet set */
if (sql_type == MYSQL_TYPE_VARCHAR || sql_type == MYSQL_TYPE_TINY_BLOB ||
sql_type == MYSQL_TYPE_BLOB || sql_type == MYSQL_TYPE_MEDIUM_BLOB ||
sql_type == MYSQL_TYPE_LONG_BLOB)
return set_compressed_deprecated(thd, method);
else
my_error(ER_WRONG_FIELD_SPEC, MYF(0), field_name.str);
return true;
}
bool Column_definition::check_vcol_for_key(THD *thd) const bool Column_definition::check_vcol_for_key(THD *thd) const
{ {
if (vcol_info && (vcol_info->flags & VCOL_NOT_STRICTLY_DETERMINISTIC)) if (vcol_info && (vcol_info->flags & VCOL_NOT_STRICTLY_DETERMINISTIC))

View File

@ -5518,10 +5518,6 @@ public:
*this= *def; *this= *def;
} }
bool set_compressed(const char *method); bool set_compressed(const char *method);
bool set_compressed_deprecated(THD *thd, const char *method);
bool set_compressed_deprecated_column_attribute(THD *thd,
const char *pos,
const char *method);
void set_compression_method(Compression_method *compression_method_arg) void set_compression_method(Compression_method *compression_method_arg)
{ compression_method_ptr= compression_method_arg; } { compression_method_ptr= compression_method_arg; }
Compression_method *compression_method() const Compression_method *compression_method() const

View File

@ -5282,6 +5282,9 @@ static int init_server_components()
MARIADB_REMOVED_OPTION("time-format"), MARIADB_REMOVED_OPTION("time-format"),
MARIADB_REMOVED_OPTION("wsrep-causal-reads"), MARIADB_REMOVED_OPTION("wsrep-causal-reads"),
/* removed in 11.5 */
MARIADB_REMOVED_OPTION("wsrep-load-data-splitting"),
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
/* /*

View File

@ -348,7 +348,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%ifdef MARIADB %ifdef MARIADB
%expect 62 %expect 62
%else %else
%expect 63 %expect 62
%endif %endif
/* /*
@ -1775,8 +1775,6 @@ rule:
ref_list opt_match_clause opt_on_update_delete use ref_list opt_match_clause opt_on_update_delete use
opt_delete_options opt_delete_option varchar nchar nvarchar opt_delete_options opt_delete_option varchar nchar nvarchar
opt_outer table_list table_name table_alias_ref_list table_alias_ref opt_outer table_list table_name table_alias_ref_list table_alias_ref
compressed_deprecated_data_type_attribute
compressed_deprecated_column_attribute
grant_list grant_list
user_list user_and_role_list user_list user_and_role_list
rename_list table_or_tables rename_list table_or_tables
@ -6050,13 +6048,6 @@ opt_asrow_attribute_list:
field_def: field_def:
/* empty */ { $$.init(); } /* empty */ { $$.init(); }
| attribute_list | attribute_list
| attribute_list compressed_deprecated_column_attribute { $$= $1; }
| attribute_list compressed_deprecated_column_attribute attribute_list
{
if (($$= $1).merge_column_collate_clause_and_collate_clause(
thd, thd->variables.character_set_collations, $3))
MYSQL_YYABORT;
}
| opt_generated_always AS virtual_column_func | opt_generated_always AS virtual_column_func
{ {
Lex->last_field->vcol_info= $3; Lex->last_field->vcol_info= $3;
@ -6286,7 +6277,6 @@ field_type_numeric:
opt_binary_and_compression: opt_binary_and_compression:
/* empty */ { $$.init(); } /* empty */ { $$.init(); }
| binary { $$= $1; } | binary { $$= $1; }
| binary compressed_deprecated_data_type_attribute { $$= $1; }
| compressed opt_binary { $$= $2; } | compressed opt_binary { $$= $2; }
; ;
@ -6592,23 +6582,6 @@ compressed:
} }
; ;
compressed_deprecated_data_type_attribute:
COMPRESSED_SYM opt_compression_method
{
if (unlikely(Lex->last_field->set_compressed_deprecated(thd, $2)))
MYSQL_YYABORT;
}
;
compressed_deprecated_column_attribute:
COMPRESSED_SYM opt_compression_method
{
if (unlikely(Lex->last_field->
set_compressed_deprecated_column_attribute(thd, $1.pos(), $2)))
MYSQL_YYABORT;
}
;
asrow_attribute: asrow_attribute:
not NULL_SYM opt_enable not NULL_SYM opt_enable
{ {

View File

@ -6345,13 +6345,6 @@ static Sys_var_ulong Sys_wsrep_mysql_replication_bundle(
GLOBAL_VAR(wsrep_mysql_replication_bundle), CMD_LINE(REQUIRED_ARG), GLOBAL_VAR(wsrep_mysql_replication_bundle), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, 1000), DEFAULT(0), BLOCK_SIZE(1)); VALID_RANGE(0, 1000), DEFAULT(0), BLOCK_SIZE(1));
static Sys_var_mybool Sys_wsrep_load_data_splitting(
"wsrep_load_data_splitting", "To commit LOAD DATA "
"transaction after every 10K rows inserted (deprecated)",
GLOBAL_VAR(wsrep_load_data_splitting),
CMD_LINE(OPT_ARG), DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(0), ON_UPDATE(0), DEPRECATED(1004, ""));
static Sys_var_mybool Sys_wsrep_slave_FK_checks( static Sys_var_mybool Sys_wsrep_slave_FK_checks(
"wsrep_slave_FK_checks", "Should slave thread do " "wsrep_slave_FK_checks", "Should slave thread do "
"foreign key constraint checks", "foreign key constraint checks",

View File

@ -41,10 +41,6 @@
#include <my_global.h> #include <my_global.h>
#define MYSQL_SERVER 1 // to have THD #define MYSQL_SERVER 1 // to have THD
/* For the moment, include code to deal with integer latches.
* I have wrapped it with this #ifdef to make it easier to find and remove in the future.
*/
#define RETAIN_INT_LATCH_COMPATIBILITY // for the time being, recognise integer latches to simplify upgrade.
#include <mysql/plugin.h> #include <mysql/plugin.h>
#include <mysql_version.h> #include <mysql_version.h>
@ -66,17 +62,6 @@
#define DBUG_PRINT(x,y) #define DBUG_PRINT(x,y)
#endif #endif
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
/* In normal operation, no new tables using an integer latch can be created,
* but they can still be used if they already exist, to allow for upgrades.
*
* However to ensure the legacy function is properly tested, we add a
* server variable "oggraph_allow_create_integer_latch" which if set to TRUE
* allows new engine tables to be created with integer latches.
*/
static my_bool g_allow_create_integer_latch = FALSE;
#endif
using namespace open_query; using namespace open_query;
@ -305,16 +290,6 @@ int ha_oqgraph::oqgraph_check_table_structure (TABLE *table_arg)
bool isLatchColumn = strcmp(skel[i].colname, "latch")==0; bool isLatchColumn = strcmp(skel[i].colname, "latch")==0;
bool isStringLatch = true; bool isStringLatch = true;
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
if (g_allow_create_integer_latch && isLatchColumn && ((*field)->type() == MYSQL_TYPE_SHORT))
{
DBUG_PRINT( "oq-debug", ("Allowing integer latch anyway!"));
isStringLatch = false;
/* Make a warning */
warn_deprecated<1004>(current_thd,
"latch SMALLINT UNSIGNED NULL", "'latch VARCHAR(32) NULL'");
} else
#endif
if (isLatchColumn && ((*field)->type() == MYSQL_TYPE_SHORT)) if (isLatchColumn && ((*field)->type() == MYSQL_TYPE_SHORT))
{ {
DBUG_PRINT( "oq-debug", ("Allowing integer no more!")); DBUG_PRINT( "oq-debug", ("Allowing integer no more!"));
@ -922,11 +897,6 @@ int ha_oqgraph::index_read_idx(byte * buf, uint index, const byte * key,
String latchFieldValue; String latchFieldValue;
if (!field[0]->is_null()) if (!field[0]->is_null())
{ {
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
if (field[0]->type() == MYSQL_TYPE_SHORT) {
latch= (int) field[0]->val_int();
} else
#endif
{ {
field[0]->val_str(&latchFieldValue, &latchFieldValue); field[0]->val_str(&latchFieldValue, &latchFieldValue);
if (!parse_latch_string_to_legacy_int(latchFieldValue, latch)) { if (!parse_latch_string_to_legacy_int(latchFieldValue, latch)) {
@ -1025,12 +995,6 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
if (field[0]->type() == MYSQL_TYPE_VARCHAR) { if (field[0]->type() == MYSQL_TYPE_VARCHAR) {
field[0]->store(row.latchStringValue, row.latchStringValueLen, &my_charset_latin1); field[0]->store(row.latchStringValue, row.latchStringValueLen, &my_charset_latin1);
} }
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
else if (field[0]->type() == MYSQL_TYPE_SHORT) {
field[0]->store((longlong) row.latch, 0);
}
#endif
} }
if (row.orig_indicator) if (row.orig_indicator)
@ -1261,19 +1225,6 @@ ha_rows ha_oqgraph::records_in_range(uint inx,
// what if someone did something dumb, like mismatching the latches? // what if someone did something dumb, like mismatching the latches?
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
else if (key->key_part[0].field->type() == MYSQL_TYPE_SHORT) {
// If not null, and zero ...
// Note, the following code relies on the fact that the three bytes
// at beginning of min_key just happen to be the null indicator and the
// 16-bit value of the latch ...
// this will fall through if the user alter-tabled to not null
if (key->key_part[0].null_bit && !min_key->key[0] &&
!min_key->key[1] && !min_key->key[2]) {
latch = oqgraph::NO_SEARCH;
}
}
#endif
if (latch != oqgraph::NO_SEARCH) { if (latch != oqgraph::NO_SEARCH) {
// Invalid key type... // Invalid key type...
// Don't assert, in case the user used alter table on us // Don't assert, in case the user used alter table on us
@ -1341,11 +1292,7 @@ static const char *oqgraph_status_verbose_debug =
#endif #endif
static const char *oqgraph_status_latch_compat_mode = static const char *oqgraph_status_latch_compat_mode =
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
"Legacy tables with integer latches are supported.";
#else
"Legacy tables with integer latches are not supported."; "Legacy tables with integer latches are not supported.";
#endif
static struct st_mysql_show_var oqgraph_status[]= static struct st_mysql_show_var oqgraph_status[]=
{ {
@ -1356,16 +1303,8 @@ static struct st_mysql_show_var oqgraph_status[]=
{ 0, 0, SHOW_UNDEF } { 0, 0, SHOW_UNDEF }
}; };
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
static MYSQL_SYSVAR_BOOL( allow_create_integer_latch, g_allow_create_integer_latch, PLUGIN_VAR_RQCMDARG,
"Allow creation of integer latches so the upgrade logic can be tested. Not for normal use.",
NULL, NULL, FALSE);
#endif
static struct st_mysql_sys_var* oqgraph_sysvars[]= { static struct st_mysql_sys_var* oqgraph_sysvars[]= {
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
MYSQL_SYSVAR(allow_create_integer_latch),
#endif
0 0
}; };

View File

@ -1,150 +0,0 @@
DROP TABLE IF EXISTS not_backing;
DROP TABLE IF EXISTS backing;
DROP TABLE IF EXISTS oqtable;
CREATE TABLE `not_backing` (
id int(10) unsigned NOT NULL DEFAULT '0',
info varchar(20) DEFAULT NULL,
KEY name (info)
) DEFAULT CHARSET=latin1;
CREATE TABLE backing (
id int(10) unsigned NOT NULL DEFAULT '0',
nullparent int(10) unsigned DEFAULT NULL,
parent int(10) unsigned DEFAULT 1 NOT NULL,
weight real(10,4) NOT NULL DEFAULT 0.0,
info varchar(20) DEFAULT NULL,
not_id_type varchar(20) DEFAULT NULL,
not_weight_type varchar(20) DEFAULT NULL,
PRIMARY KEY (id),
KEY name (info)
) DEFAULT CHARSET=latin1;
SET GLOBAL oqgraph_allow_create_integer_latch=true;
The next warnings 1287 are expected
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH;
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty data_table attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='bogus';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='Ω Ohms Tennis Ball 〄';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='not_backing', ORIGID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='bogus';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='not_id_type';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store description (unspecified or empty destid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='bogus';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('oqtable.destid' attribute not set to a valid column of 'backing')' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='not_id_type';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Column 'backing.not_id_type' (destid) is not a not-null integer type or is a different type to origid attribute.' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='bogus',DESTID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('oqtable.origid' attribute not set to a valid column of 'backing')' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='not_id_type',DESTID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Column 'backing.not_id_type' (origid) is not a not-null integer type' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('oqtable.destid' attribute set to same column as origid attribute)' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='bogus';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Invalid OQGRAPH backing store ('oqtable.weight' attribute not set to a valid column of 'backing')' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='not_weight_type';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Column 'backing.not_weight_type' (weight) is not a not-null real type' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='nullparent',DESTID='id',WEIGHT='weight';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Column 'backing.nullparent' (origid) is not a not-null integer type' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='nullparent',WEIGHT='weight';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
ERROR HY000: Got error -1 'Column 'backing.nullparent' (destid) is not a not-null integer type or is a different type to origid attribute.' from OQGRAPH
DROP TABLE IF EXISTS oqtable;
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='weight';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
DESCRIBE oqtable;
Field Type Null Key Default Extra
latch smallint(5) unsigned YES MUL NULL
origid bigint(20) unsigned YES NULL
destid bigint(20) unsigned YES NULL
weight double YES NULL
seq bigint(20) unsigned YES NULL
linkid bigint(20) unsigned YES NULL
DROP TABLE IF EXISTS oqtable;
DROP TABLE IF EXISTS backing;
DROP TABLE IF EXISTS not_backing;
SET GLOBAL oqgraph_allow_create_integer_latch=false;

View File

@ -1,202 +0,0 @@
--disable_warnings
DROP TABLE IF EXISTS not_backing;
DROP TABLE IF EXISTS backing;
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE `not_backing` (
id int(10) unsigned NOT NULL DEFAULT '0',
info varchar(20) DEFAULT NULL,
KEY name (info)
) DEFAULT CHARSET=latin1;
CREATE TABLE backing (
id int(10) unsigned NOT NULL DEFAULT '0',
nullparent int(10) unsigned DEFAULT NULL,
parent int(10) unsigned DEFAULT 1 NOT NULL,
weight real(10,4) NOT NULL DEFAULT 0.0,
info varchar(20) DEFAULT NULL,
not_id_type varchar(20) DEFAULT NULL,
not_weight_type varchar(20) DEFAULT NULL,
PRIMARY KEY (id),
KEY name (info)
) DEFAULT CHARSET=latin1;
# Here we enable scaffolding to let us create a deprecated table
# so we can check that the new code will still allow queries to be performed
# on a legacy database
# It should still generate a warning (1287) - but I don't know how to test for that
#
# latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future
# release. Please use 'latch VARCHAR(32) NULL' instead
#
SET GLOBAL oqgraph_allow_create_integer_latch=true;
--echo The next warnings 1287 are expected
# oqgraph v2 create table should fail (missing attributes)
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH;
--error 1296
DESCRIBE oqtable;
# attributes test
# empty table reference
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='';
--error 1296
DESCRIBE oqtable;
# non-existent table reference
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='bogus';
--error 1296
DESCRIBE oqtable;
# UTF in table name, make sure it doesnt crash
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='Ω Ohms Tennis Ball 〄';
--error 1296
DESCRIBE oqtable;
# Invalid backing table (backing table has no primary key)
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='not_backing', ORIGID='id';
--error 1296
DESCRIBE oqtable;
# table with empty origid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='';
--error 1296
DESCRIBE oqtable;
# invalid origid reference
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='bogus';
--error 1296
DESCRIBE oqtable;
# wrong type origid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='not_id_type';
--error 1296
DESCRIBE oqtable;
# missing destid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id';
--error 1296
DESCRIBE oqtable;
# empty destid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='';
--error 1296
DESCRIBE oqtable;
# invalid destid reference
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='bogus';
--error 1296
DESCRIBE oqtable;
# wrong type destid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='not_id_type';
--error 1296
DESCRIBE oqtable;
# invalid origid with valid destid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='bogus',DESTID='id';
--error 1296
DESCRIBE oqtable;
# wrong type origid with valid destid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='not_id_type',DESTID='id';
--error 1296
DESCRIBE oqtable;
# same origid and destid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='id';
--error 1296
DESCRIBE oqtable;
# invalid weight reference
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='bogus';
--error 1296
DESCRIBE oqtable;
# wrong type weight
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='not_weight_type';
--error 1296
DESCRIBE oqtable;
# NULLABLE ORIGID
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='nullparent',DESTID='id',WEIGHT='weight';
--error 1296
DESCRIBE oqtable;
# NULLABLE DESTID
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='nullparent',WEIGHT='weight';
--error 1296
DESCRIBE oqtable;
# all valid
--disable_warnings
DROP TABLE IF EXISTS oqtable;
--enable_warnings
CREATE TABLE oqtable ( latch SMALLINT UNSIGNED NULL, origid BIGINT UNSIGNED NULL, destid BIGINT UNSIGNED NULL, weight DOUBLE NULL, seq BIGINT UNSIGNED NULL, linkid BIGINT UNSIGNED NULL, KEY (latch, origid, destid) USING HASH, KEY (latch, destid, origid) USING HASH ) ENGINE=OQGRAPH, DATA_TABLE='backing',ORIGID='id',DESTID='parent',WEIGHT='weight';
DESCRIBE oqtable;
# cleanup
--disable_warnings
DROP TABLE IF EXISTS oqtable;
DROP TABLE IF EXISTS backing;
DROP TABLE IF EXISTS not_backing;
--enable_warnings
SET GLOBAL oqgraph_allow_create_integer_latch=false;

View File

@ -1,99 +0,0 @@
DROP TABLE IF EXISTS graph_base;
DROP TABLE IF EXISTS graph;
CREATE TABLE graph_base (
from_id INT UNSIGNED NOT NULL,
to_id INT UNSIGNED NOT NULL,
PRIMARY KEY (from_id,to_id),
INDEX (to_id)
) ENGINE=MyISAM;
The next error 140 + 1005 is expected
CREATE TABLE graph (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
destid BIGINT UNSIGNED NULL,
weight DOUBLE NULL,
seq BIGINT UNSIGNED NULL,
linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
ERROR HY000: Can't create table `test`.`graph` (errno: 140 "Wrong create options")
SET GLOBAL oqgraph_allow_create_integer_latch=true;
The next warning 1287 is expected
CREATE TABLE graph (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
destid BIGINT UNSIGNED NULL,
weight DOUBLE NULL,
seq BIGINT UNSIGNED NULL,
linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
Warnings:
Warning 1287 'latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future release. Please use 'latch VARCHAR(32) NULL' instead
SET GLOBAL oqgraph_allow_create_integer_latch=false;
The next error 140 + 1005 is expected
CREATE TABLE graph_again (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
destid BIGINT UNSIGNED NULL,
weight DOUBLE NULL,
seq BIGINT UNSIGNED NULL,
linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
ERROR HY000: Can't create table `test`.`graph_again` (errno: 140 "Wrong create options")
# Populating base table
INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1);
INSERT INTO graph_base(from_id, to_id) VALUES (1,3), (3,1);
INSERT INTO graph_base(from_id, to_id) VALUES (3,4), (4,3);
INSERT INTO graph_base(from_id, to_id) VALUES (5,6), (6,5);
# Exercising latch==2
SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND weight = 1;
latch origid destid weight seq linkid
2 1 NULL 1 3 3
2 1 NULL 1 2 2
SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND weight = 2;
latch origid destid weight seq linkid
2 1 NULL 2 4 4
SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND (weight = 1 OR weight = 2);
latch origid destid weight seq linkid
2 1 NULL 2 4 4
2 1 NULL 1 3 3
2 1 NULL 1 2 2
# Exercising latch==1
SELECT * FROM graph WHERE latch=1 AND origid=1 AND destid=6;
latch origid destid weight seq linkid
SELECT * FROM graph WHERE latch=1 AND origid=1 AND destid=4;
latch origid destid weight seq linkid
1 1 4 NULL 0 1
1 1 4 1 1 3
1 1 4 1 2 4
SELECT * FROM graph WHERE latch=1 AND origid=4 AND destid=1;
latch origid destid weight seq linkid
1 4 1 NULL 0 4
1 4 1 1 1 3
1 4 1 1 2 1
SELECT * FROM graph WHERE latch=0 and destid=2 and origid=1;
latch origid destid weight seq linkid
0 1 2 1 3 1
0 1 2 1 2 3
0 1 2 1 1 2
# Adding new row to base table
INSERT INTO graph_base (from_id,to_id) VALUES (4,6);
# Deleting rows from base table
DELETE FROM graph_base WHERE from_id=5;
DELETE FROM graph_base WHERE from_id=3 AND to_id=5;
# Execising latch==1 on new data
SELECT * FROM graph WHERE latch=1 AND origid=1 AND destid=6;
latch origid destid weight seq linkid
1 1 6 NULL 0 1
1 1 6 1 1 3
1 1 6 1 2 4
1 1 6 1 3 6
SELECT * FROM graph WHERE latch=1 AND origid=6 AND destid=1;
latch origid destid weight seq linkid
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph_base;

View File

@ -1,106 +0,0 @@
--disable_warnings
DROP TABLE IF EXISTS graph_base;
DROP TABLE IF EXISTS graph;
--enable_warnings
CREATE TABLE graph_base (
from_id INT UNSIGNED NOT NULL,
to_id INT UNSIGNED NOT NULL,
PRIMARY KEY (from_id,to_id),
INDEX (to_id)
) ENGINE=MyISAM;
# Backwards compatibility test
# First we ensure the scaffolding is disabled (default situation)
# and check we cant create a table with an integer latch
# Assume this is the default, so don't explicity set false yet:
# SET GLOBAL oqgraph_allow_create_integer_latch=false;
--echo The next error 140 + 1005 is expected
--error 140
--error 1005
CREATE TABLE graph (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
destid BIGINT UNSIGNED NULL,
weight DOUBLE NULL,
seq BIGINT UNSIGNED NULL,
linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
# Here we enable scaffolding to let us create a deprecated table
# so we can check that the new code will still allow queries to be performed
# on a legacy database
# It should still generate a warning (1287) - but I don't know how to test for that
#
# latch SMALLINT UNSIGNED NULL' is deprecated and will be removed in a future
# release. Please use 'latch VARCHAR(32) NULL' instead
#
SET GLOBAL oqgraph_allow_create_integer_latch=true;
--echo The next warning 1287 is expected
CREATE TABLE graph (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
destid BIGINT UNSIGNED NULL,
weight DOUBLE NULL,
seq BIGINT UNSIGNED NULL,
linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
# Prevent further tables being create this way again
# and make sure the set is effective ...
SET GLOBAL oqgraph_allow_create_integer_latch=false;
--echo The next error 140 + 1005 is expected
--error 140
--error 1005
CREATE TABLE graph_again (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
destid BIGINT UNSIGNED NULL,
weight DOUBLE NULL,
seq BIGINT UNSIGNED NULL,
linkid BIGINT UNSIGNED NULL,
KEY (latch, origid, destid) USING HASH,
KEY (latch, destid, origid) USING HASH
) ENGINE=OQGRAPH DATA_TABLE='graph_base' ORIGID='from_id', DESTID='to_id';
# Regression test expected v2 behaviour in this situation
--echo # Populating base table
INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1);
INSERT INTO graph_base(from_id, to_id) VALUES (1,3), (3,1);
INSERT INTO graph_base(from_id, to_id) VALUES (3,4), (4,3);
INSERT INTO graph_base(from_id, to_id) VALUES (5,6), (6,5);
--echo # Exercising latch==2
SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND weight = 1;
SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND weight = 2;
SELECT * FROM graph WHERE latch = 2 AND origid = 1 AND (weight = 1 OR weight = 2);
--echo # Exercising latch==1
SELECT * FROM graph WHERE latch=1 AND origid=1 AND destid=6;
SELECT * FROM graph WHERE latch=1 AND origid=1 AND destid=4;
SELECT * FROM graph WHERE latch=1 AND origid=4 AND destid=1;
SELECT * FROM graph WHERE latch=0 and destid=2 and origid=1;
--echo # Adding new row to base table
INSERT INTO graph_base (from_id,to_id) VALUES (4,6);
--echo # Deleting rows from base table
DELETE FROM graph_base WHERE from_id=5;
DELETE FROM graph_base WHERE from_id=3 AND to_id=5;
--echo # Execising latch==1 on new data
SELECT * FROM graph WHERE latch=1 AND origid=1 AND destid=6;
SELECT * FROM graph WHERE latch=1 AND origid=6 AND destid=1;
# FIXME - if the following DROPs are missing then mysql will segfault on exit
# indicating an ordering dependency on destruction somewhere...
DROP TABLE IF EXISTS graph;
DROP TABLE IF EXISTS graph_base;