Skip to content
Permalink
Browse files
MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET…
… utf8
  • Loading branch information
abarkov committed Jun 21, 2018
1 parent 635c5e3 commit fe3f9fa
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
@@ -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;

0 comments on commit fe3f9fa

Please sign in to comment.