Bug #52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4
Submitted: 19 Mar 2010 6:30 Modified: 24 Aug 2010 18:41
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.5.6, 5.6.99-m4, 6.0.14 OS:Any
Assigned to: Marko Mäkelä CPU Architecture:Any
Tags: assertion, utf32

[19 Mar 2010 6:30] Shane Bester
Description:
Get messages when creating tables using utf16 or utf32 charset:

InnoDB: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4
InnoDB: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4

How to repeat:
drop table if exists t1;
create table `t1` (`a` char(1) character set utf32) engine=innodb;
[19 Mar 2010 6:36] MySQL Verification Team
testfor all collations of utf32

Attachment: bug52199_utf32_collations_test.sql (application/octet-stream, text), 2.38 KiB.

[19 Mar 2010 6:38] MySQL Verification Team
tiny correct. utf16 doesn't produce the errors. only utf32 does.
[19 Mar 2010 7:05] Valeriy Kravchuk
Thank you for the problem report. Verified just as described:

...
100319  9:02:48 [Note] /home2/openxs/dbs/next-mr/libexec/mysqld: ready for connections.
Version: '5.6.99-m4-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
100319  9:04:24  InnoDB: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4
100319  9:04:24  InnoDB: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4
[29 Mar 2010 6:48] MySQL Verification Team
6.0.14 crashes when hitting a debug assertion:

set old_alter_table=1;
drop table if exists `t1`;
create table `t1`(`col189` char (1) charset utf32 collate utf32_polish_ci not null)engine=innodb;

Version: '6.0.14-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
100114  9:44:39  InnoDB: Assertion failure in thread 1258912064 in file ../../storage/innobase/include/data0type.ic line 499
InnoDB: Failing assertion: mbminlen > 0
[24 Jun 2010 8:31] MySQL Verification Team
the error message is repeatable on 5.5.5-debug with innodb 1.1.1

valgrind-3.5.0
gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)
bzr+ssh://XXX@bk-internal.mysql.com/bzrroot/server/mysql-trunk/
Now on revision 3072
[24 Jun 2010 10:49] MySQL Verification Team
this bug seriously hinders testing of random tables. 5.5.6-debug:

Version: '5.5.6-m3-debug'  socket: ''  port: 3306  Source distribution

100624 12:49:16  InnoDB: Assertion failure in thread 4292 in file E:\builds\bzr\mysql-trunk\storage\innobase\include\data0type.ic line 534
InnoDB: Failing assertion: mbminlen > 0

mysqld.exe!dtype_get_min_size_low()[data0type.ic:534]
mysqld.exe!dict_col_get_min_size()[dict0dict.ic:88]
mysqld.exe!dict_index_get_min_size()[dict0dict.ic:632]
mysqld.exe!row_merge_buf_create()[row0merge.c:215]
mysqld.exe!row_merge_read_clustered_index()[row0merge.c:1170]
mysqld.exe!row_merge_build_indexes()[row0merge.c:2599]
mysqld.exe!ha_innobase::add_index()[handler0alter.cc:823]
mysqld.exe!mysql_alter_table()[sql_table.cc:7270]
mysqld.exe!mysql_execute_command()[sql_parse.cc:2815]
mysqld.exe!mysql_parse()[sql_parse.cc:5911]
mysqld.exe!dispatch_command()[sql_parse.cc:1138]
mysqld.exe!do_command()[sql_parse.cc:807]
mysqld.exe!do_handle_one_connection()[sql_connect.cc:1196]
mysqld.exe!handle_one_connection()[sql_connect.cc:1136]
mysqld.exe!pthread_start()[my_winthread.c:62]
mysqld.exe!_callthreadstartex()[threadex.c:348]
mysqld.exe!_threadstartex()[threadex.c:331]
kernel32.dll!BaseThreadStart()

testcase:

set old_alter_table=0;
drop table if exists `t1`;
create table `t1` (`a` int not null,
`b` char(125) character set utf32 collate utf32_bin not null
)engine=innodb;
create unique index `idx` on `t1`(`a`);
[29 Jun 2010 11:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/112444
[29 Jun 2010 11:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/112445
[27 Jul 2010 23:39] Calvin Sun
bug#34391 is marked as a duplicate.
[4 Aug 2010 7:50] Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100629125518-m3am4ia1ffjr0d0j) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:10] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100629125518-m3am4ia1ffjr0d0j) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:25] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:marko.makela@oracle.com-20100629125518-m3am4ia1ffjr0d0j) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 9:04] Bugs System
Pushed into mysql-next-mr (revid:alik@ibmvm-20100804081630-ntapn8bf9pko9vj3) (version source revid:marko.makela@oracle.com-20100629125518-m3am4ia1ffjr0d0j) (pib:20)
[24 Aug 2010 18:41] Paul DuBois
Noted in 5.5.6, 5.6.0 changelogs.

InnoDB could not create tables that used the utf32 character set.
[9 Oct 2015 6:41] Roel Van de Paar
See bug 78732