summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/ctype_ucs.result22
-rw-r--r--mysql-test/r/ctype_utf32.result15
-rw-r--r--mysql-test/r/ctype_utf8.result22
-rw-r--r--mysql-test/r/errors.result2
-rw-r--r--mysql-test/r/myisam.result9
-rw-r--r--mysql-test/r/partition_datatype.result8
-rw-r--r--mysql-test/r/show_check.result4
-rw-r--r--mysql-test/r/strict.result4
-rw-r--r--mysql-test/r/type_blob.result2
-rw-r--r--mysql-test/r/type_varchar.result69
-rw-r--r--mysql-test/suite/maria/maria.result9
-rw-r--r--mysql-test/suite/maria/maria.test3
-rw-r--r--mysql-test/t/ctype_ucs.test16
-rw-r--r--mysql-test/t/ctype_utf32.test13
-rw-r--r--mysql-test/t/ctype_utf8.test16
-rw-r--r--mysql-test/t/myisam.test3
-rw-r--r--mysql-test/t/partition_datatype.test8
-rw-r--r--mysql-test/t/type_varchar.test44
-rw-r--r--sql/sql_const.h13
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_blob.result2
20 files changed, 266 insertions, 18 deletions
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index d55d308c694..1bbd3af4af7 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -4375,5 +4375,27 @@ SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2))
Warnings:
Warning 1292 Truncated incorrect time value: '77760000'
#
+# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+#
+CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2);
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 varchar(32766) YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2);
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 text YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2);
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 mediumtext YES NULL
+DROP TABLE t1;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index 9b062f9480f..02683bc66e6 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -1283,5 +1283,20 @@ NO_ENGINE_SUBSTITUTION
SET sql_mode=DEFAULT;
SET NAMES utf8;
#
+# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+#
+CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32);
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 varchar(16383) YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32);
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 mediumtext YES NULL
+DROP TABLE t1;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 74fed6a3162..fee27ef177f 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -5933,5 +5933,27 @@ Warnings:
SET sql_mode=DEFAULT;
DROP TABLE t1;
#
+# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+#
+CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8);
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 varchar(21844) YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8);
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 text YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8);
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 mediumtext YES NULL
+DROP TABLE t1;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result
index 23c77d3978c..d71759cb128 100644
--- a/mysql-test/r/errors.result
+++ b/mysql-test/r/errors.result
@@ -27,7 +27,7 @@ create table t1 (a int(256));
ERROR 42000: Display width out of range for 'a' (max = 255)
set sql_mode='traditional';
create table t1 (a varchar(66000));
-ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
+ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
set sql_mode=default;
CREATE TABLE t1 (a INT);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 85af643387e..81a2001c28c 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -1697,7 +1697,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (v varchar(65535));
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
+Warnings:
+Note 1246 Converting column 'v' from VARCHAR to TEXT
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` text
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
set storage_engine=MyISAM;
set @save_concurrent_insert=@@concurrent_insert;
set global concurrent_insert=1;
diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result
index 1151a1cb1fe..879b603c5ad 100644
--- a/mysql-test/r/partition_datatype.result
+++ b/mysql-test/r/partition_datatype.result
@@ -314,12 +314,14 @@ bbbb
drop table t1;
create table t1 (a varchar(3070)) partition by key (a);
ERROR HY000: The total length of the partitioning fields is too large
+create table t1 (a varchar(65532) not null) partition by key (a);
+ERROR HY000: The total length of the partitioning fields is too large
create table t1 (a varchar(65533)) partition by key (a);
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
+ERROR HY000: A BLOB field is not allowed in partition function
create table t1 (a varchar(65534) not null) partition by key (a);
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
+ERROR HY000: A BLOB field is not allowed in partition function
create table t1 (a varchar(65535)) partition by key (a);
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
+ERROR HY000: A BLOB field is not allowed in partition function
create table t1 (a bit(27), primary key (a)) engine=myisam
partition by hash (a)
(partition p0, partition p1, partition p2);
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 0e4cf6c6775..8d4c3feb100 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -959,7 +959,7 @@ def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N
def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33
-def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589815 0 Y 16 0 33
+def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589788 0 Y 16 0 33
def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33
def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33
def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 96 0 Y 0 0 33
@@ -984,7 +984,7 @@ def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33
def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
-def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
+def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 16 0 33
def information_schema COLUMNS COLUMNS EXTRA Extra 253 81 0 N 1 0 33
Field Type Null Key Default Extra
c int(11) NO PRI NULL
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index da3c658b5a4..a3262ca5caa 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1240,9 +1240,9 @@ Warning 1364 Field 'i' doesn't have a default value
DROP TABLE t1;
set @@sql_mode='traditional';
create table t1(a varchar(65537));
-ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
+ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
create table t1(a varbinary(65537));
-ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
+ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
set @@sql_mode='traditional';
create table t1(a int, b date not null);
alter table t1 modify a bigint unsigned not null;
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index f49b2a7d5ef..9b20ddeb1df 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -37,7 +37,7 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT
CREATE TABLE t2 (a char(256));
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
CREATE TABLE t1 (a varchar(70000) default "hello");
-ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
+ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
CREATE TABLE t2 (a blob default "hello");
ERROR 42000: BLOB/TEXT column 'a' can't have a default value
drop table if exists t1,t2;
diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result
index 38ed8a47339..0ab13be113e 100644
--- a/mysql-test/r/type_varchar.result
+++ b/mysql-test/r/type_varchar.result
@@ -510,3 +510,72 @@ SELECT 5 = a FROM t1;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's '
DROP TABLE t1;
+#
+# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+#
+CREATE TABLE t1 (c1 VARBINARY(65532));
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 varbinary(65532) YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARBINARY(65533));
+Warnings:
+Note 1246 Converting column 'c1' from VARBINARY to BLOB
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 blob YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARBINARY(65534));
+Warnings:
+Note 1246 Converting column 'c1' from VARBINARY to BLOB
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 blob YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARBINARY(65535));
+Warnings:
+Note 1246 Converting column 'c1' from VARBINARY to BLOB
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 blob YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARBINARY(65536));
+Warnings:
+Note 1246 Converting column 'c1' from VARBINARY to BLOB
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 mediumblob YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(65532));
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 varchar(65532) YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(65533));
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 text YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(65534));
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 text YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(65535));
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 text YES NULL
+DROP TABLE t1;
+CREATE TABLE t1 (c1 VARCHAR(65536));
+Warnings:
+Note 1246 Converting column 'c1' from VARCHAR to TEXT
+DESCRIBE t1;
+Field Type Null Key Default Extra
+c1 mediumtext YES NULL
+DROP TABLE t1;
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result
index 0de42a9e7fe..890f6bbfaf5 100644
--- a/mysql-test/suite/maria/maria.result
+++ b/mysql-test/suite/maria/maria.result
@@ -1586,7 +1586,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
drop table t1;
create table t1 (v varchar(65535));
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
+Warnings:
+Note 1246 Converting column 'v' from VARCHAR to TEXT
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` text
+) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
+drop table t1;
set @save_concurrent_insert=@@concurrent_insert;
set global concurrent_insert=1;
create table t1 (a int) ROW_FORMAT=FIXED;
diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test
index 3fa7d755fe4..b6a3e2784b6 100644
--- a/mysql-test/suite/maria/maria.test
+++ b/mysql-test/suite/maria/maria.test
@@ -924,8 +924,9 @@ show create table t1;
drop table t1;
# ARIA specific varchar tests
---error 1118
create table t1 (v varchar(65535));
+show create table t1;
+drop table t1;
#
# Test concurrent insert
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 62890d0cd1b..b3d0be4432f 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -868,6 +868,22 @@ SET NAMES utf8;
SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2));
+--echo #
+--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+--echo #
+
+CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2);
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2);
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2);
+DESCRIBE t1;
+DROP TABLE t1;
+
--echo #
--echo # End of 5.5 tests
diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test
index 2b3d3b3bdc5..fced2838273 100644
--- a/mysql-test/t/ctype_utf32.test
+++ b/mysql-test/t/ctype_utf32.test
@@ -891,5 +891,18 @@ SET sql_mode=DEFAULT;
SET NAMES utf8;
--echo #
+--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+--echo #
+
+CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32);
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32);
+DESCRIBE t1;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 75581ede8fa..592e3a3b662 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1696,5 +1696,21 @@ SET sql_mode=DEFAULT;
DROP TABLE t1;
--echo #
+--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+--echo #
+
+CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8);
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8);
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8);
+DESCRIBE t1;
+DROP TABLE t1;
+
+--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 43c12b42bc9..c4bb93b6bfe 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1030,8 +1030,9 @@ show create table t1;
drop table t1;
# MyISAM specific varchar tests
---error 1118
create table t1 (v varchar(65535));
+show create table t1;
+drop table t1;
eval set storage_engine=$default;
diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test
index a6035fcb592..4ec0232718e 100644
--- a/mysql-test/t/partition_datatype.test
+++ b/mysql-test/t/partition_datatype.test
@@ -217,11 +217,13 @@ select * from t1 where a = 'bbbb';
drop table t1;
-- error ER_PARTITION_FIELDS_TOO_LONG
create table t1 (a varchar(3070)) partition by key (a);
--- error ER_TOO_BIG_ROWSIZE
+-- error ER_PARTITION_FIELDS_TOO_LONG
+create table t1 (a varchar(65532) not null) partition by key (a);
+-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
create table t1 (a varchar(65533)) partition by key (a);
--- error ER_TOO_BIG_ROWSIZE
+-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
create table t1 (a varchar(65534) not null) partition by key (a);
--- error ER_TOO_BIG_ROWSIZE
+-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
create table t1 (a varchar(65535)) partition by key (a);
#
diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test
index 33b84266118..ed8218208c3 100644
--- a/mysql-test/t/type_varchar.test
+++ b/mysql-test/t/type_varchar.test
@@ -217,3 +217,47 @@ CREATE TABLE t1 (a CHAR(16));
INSERT INTO t1 VALUES ('5'), ('s'), ('');
SELECT 5 = a FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
+--echo #
+
+CREATE TABLE t1 (c1 VARBINARY(65532));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARBINARY(65533));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARBINARY(65534));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARBINARY(65535));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARBINARY(65536));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(65532));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(65533));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(65534));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(65535));
+DESCRIBE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 VARCHAR(65536));
+DESCRIBE t1;
+DROP TABLE t1;
diff --git a/sql/sql_const.h b/sql/sql_const.h
index abe2a496045..e8385b537a8 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -41,7 +41,18 @@
#define MAX_MBWIDTH 3 /* Max multibyte sequence */
#define MAX_FIELD_CHARLENGTH 255
-#define MAX_FIELD_VARCHARLENGTH 65535
+/*
+ In MAX_FIELD_VARCHARLENGTH we reserve extra bytes for the overhead:
+ - 2 bytes for the length
+ - 1 byte for NULL bits
+ to avoid the "Row size too large" error for these three corner definitions:
+ CREATE TABLE t1 (c VARBINARY(65533));
+ CREATE TABLE t1 (c VARBINARY(65534));
+ CREATE TABLE t1 (c VARBINARY(65535));
+ Like VARCHAR(65536), they will be converted to BLOB automatically
+ in non-sctict mode.
+*/
+#define MAX_FIELD_VARCHARLENGTH (65535-2-1)
#define MAX_FIELD_BLOBLENGTH UINT_MAX32 /* cf field_blob::get_length() */
#define CONVERT_IF_BIGGER_TO_BLOB 512 /* Threshold *in characters* */
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_blob.result b/storage/tokudb/mysql-test/tokudb/r/type_blob.result
index 2c8ba56fe0f..2c4e364f3b7 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_blob.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_blob.result
@@ -38,7 +38,7 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT
CREATE TABLE t2 (a char(256));
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
CREATE TABLE t1 (a varchar(70000) default "hello");
-ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
+ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead
CREATE TABLE t2 (a blob default "hello");
ERROR 42000: BLOB/TEXT column 'a' can't have a default value
drop table if exists t1,t2;