summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-08-06 18:02:03 +0400
committerAlexander Barkov <bar@mariadb.com>2019-08-06 18:02:03 +0400
commita8def12e8a65cee915029de46d6e37b338ee9289 (patch)
tree4b0ca466bcf24c25a8d3d34a4a99a299c240ff88 /mysql-test/suite
parentf36c0189b15b7ba0bd2de187223fe59f2359186e (diff)
downloadmariadb-git-a8def12e8a65cee915029de46d6e37b338ee9289.tar.gz
MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/compat/oracle/r/column_compression.result6
-rw-r--r--mysql-test/suite/compat/oracle/r/sp.result2
-rw-r--r--mysql-test/suite/compat/oracle/r/type_blob.result18
-rw-r--r--mysql-test/suite/compat/oracle/t/type_blob.test13
4 files changed, 35 insertions, 4 deletions
diff --git a/mysql-test/suite/compat/oracle/r/column_compression.result b/mysql-test/suite/compat/oracle/r/column_compression.result
index 1b828ca17b0..7a12c7b8233 100644
--- a/mysql-test/suite/compat/oracle/r/column_compression.result
+++ b/mysql-test/suite/compat/oracle/r/column_compression.result
@@ -515,7 +515,7 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "a" blob /*!100301 COMPRESSED*/ DEFAULT NULL
+ "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
CREATE TABLE t1 (a TEXT COMPRESSED ASCII);
@@ -547,7 +547,7 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT '');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "a" blob /*!100301 COMPRESSED*/ DEFAULT ''
+ "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT ''
)
DROP TABLE t1;
CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT '');
@@ -605,7 +605,7 @@ Warning 1287 '<data type> <character set clause> ... COMPRESSED...' is deprecate
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "a" blob /*!100301 COMPRESSED*/ DEFAULT NULL
+ "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL
)
DROP TABLE t1;
#
diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result
index 8fa49c4092a..2d4244110f9 100644
--- a/mysql-test/suite/compat/oracle/r/sp.result
+++ b/mysql-test/suite/compat/oracle/r/sp.result
@@ -2072,7 +2072,7 @@ t1 CREATE TABLE "t1" (
"tables_table_name" varchar(64) CHARACTER SET utf8 DEFAULT NULL,
"tables_table_rows" bigint(21) unsigned DEFAULT NULL,
"processlist_info" longtext CHARACTER SET utf8 DEFAULT NULL,
- "processlist_info_binary" blob DEFAULT NULL
+ "processlist_info_binary" blob(65535) DEFAULT NULL
)
DROP TABLE t1;
DROP PROCEDURE p1;
diff --git a/mysql-test/suite/compat/oracle/r/type_blob.result b/mysql-test/suite/compat/oracle/r/type_blob.result
index fe0a78e6ceb..27740947a10 100644
--- a/mysql-test/suite/compat/oracle/r/type_blob.result
+++ b/mysql-test/suite/compat/oracle/r/type_blob.result
@@ -6,3 +6,21 @@ t1 CREATE TABLE "t1" (
"a" longblob DEFAULT NULL
)
DROP TABLE t1;
+#
+# MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
+#
+CREATE TABLE t1 (
+c1 BLOB(100),
+c2 BLOB(65535),
+c3 BLOB(16777215),
+c4 BLOB(16777216)
+);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE "t1" (
+ "c1" tinyblob DEFAULT NULL,
+ "c2" blob(65535) DEFAULT NULL,
+ "c3" mediumblob DEFAULT NULL,
+ "c4" longblob DEFAULT NULL
+)
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/type_blob.test b/mysql-test/suite/compat/oracle/t/type_blob.test
index 2bfaa77560d..989581ee4f6 100644
--- a/mysql-test/suite/compat/oracle/t/type_blob.test
+++ b/mysql-test/suite/compat/oracle/t/type_blob.test
@@ -2,3 +2,16 @@ SET sql_mode=ORACLE;
CREATE TABLE t1 (a BLOB);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB
+--echo #
+
+CREATE TABLE t1 (
+ c1 BLOB(100),
+ c2 BLOB(65535),
+ c3 BLOB(16777215),
+ c4 BLOB(16777216)
+);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;