-
Bug
-
Resolution: Done
-
Major
-
1.9.4.Final, 2.0.0.Alpha3
-
None
-
False
-
None
-
False
The TinyIntOneToBooleanConverter is applied based on the type name and length.
For signed type this works as expected. The issue is on MySQL with unsigned type.
The SHOW CREATE command drops the length for unsigned type like
CREATE TABLE `DBZ5236` ( `id` int NOT NULL AUTO_INCREMENT, `ti1` tinyint unsigned NOT NULL DEFAULT '0', `ti2` tinyint unsigned NOT NULL DEFAULT '0', `ti3` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3
But on the 5.7 the length is kept like
CREATE TABLE `DBZ5236` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ti1` tinyint(3) unsigned NOT NULL DEFAULT '0', `ti2` tinyint(1) unsigned NOT NULL DEFAULT '0', `ti3` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
See ti2 - this means that the converter is not applied at 8.0 server as the length is not defined.
- relates to
-
DBZ-5236 Cannot convert field type tinyint(1) unsigned to boolean
- Closed