File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -1063,3 +1063,19 @@ DROP TABLE t1;
1063
1063
#
1064
1064
# End of 5.5 tests
1065
1065
#
1066
+ #
1067
+ # Start of 10.2 test
1068
+ #
1069
+ #
1070
+ # MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET utf8
1071
+ #
1072
+ CREATE TABLE t1 (a TEXT(1431655798) CHARACTER SET utf8);
1073
+ SHOW CREATE TABLE t1;
1074
+ Table Create Table
1075
+ t1 CREATE TABLE `t1` (
1076
+ `a` longtext CHARACTER SET utf8 DEFAULT NULL
1077
+ ) ENGINE=MyISAM DEFAULT CHARSET=latin1
1078
+ DROP TABLE t1;
1079
+ #
1080
+ # End of 10.2 test
1081
+ #
Original file line number Diff line number Diff line change @@ -680,3 +680,21 @@ DROP TABLE t1;
680
680
--echo #
681
681
--echo # End of 5.5 tests
682
682
--echo #
683
+
684
+
685
+ --echo #
686
+ --echo # Start of 10.2 test
687
+ --echo #
688
+
689
+ --echo #
690
+ --echo # MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET utf8
691
+ --echo #
692
+
693
+ CREATE TABLE t1 (a TEXT(1431655798) CHARACTER SET utf8);
694
+ SHOW CREATE TABLE t1;
695
+ DROP TABLE t1;
696
+
697
+
698
+ --echo #
699
+ --echo # End of 10.2 test
700
+ --echo #
Original file line number Diff line number Diff line change @@ -9777,7 +9777,7 @@ void Column_definition::create_length_to_internal_length(void)
9777
9777
case MYSQL_TYPE_STRING:
9778
9778
case MYSQL_TYPE_VARCHAR:
9779
9779
length*= charset->mbmaxlen ;
9780
- DBUG_ASSERT (length <= UINT_MAX32);
9780
+ set_if_smaller (length, UINT_MAX32);
9781
9781
key_length= (uint32)length;
9782
9782
pack_length= calc_pack_length (sql_type, key_length);
9783
9783
break ;
You can’t perform that action at this time.
0 commit comments