Commit fe3f9fa9 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET utf8

parent 635c5e32
......@@ -1063,3 +1063,19 @@ DROP TABLE t1;
#
# End of 5.5 tests
#
#
# Start of 10.2 test
#
#
# MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET utf8
#
CREATE TABLE t1 (a TEXT(1431655798) CHARACTER SET utf8);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# End of 10.2 test
#
......@@ -680,3 +680,21 @@ DROP TABLE t1;
--echo #
--echo # End of 5.5 tests
--echo #
--echo #
--echo # Start of 10.2 test
--echo #
--echo #
--echo # MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET utf8
--echo #
CREATE TABLE t1 (a TEXT(1431655798) CHARACTER SET utf8);
SHOW CREATE TABLE t1;
DROP TABLE t1;
--echo #
--echo # End of 10.2 test
--echo #
......@@ -9777,7 +9777,7 @@ void Column_definition::create_length_to_internal_length(void)
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_VARCHAR:
length*= charset->mbmaxlen;
DBUG_ASSERT(length <= UINT_MAX32);
set_if_smaller(length, UINT_MAX32);
key_length= (uint32)length;
pack_length= calc_pack_length(sql_type, key_length);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment