ENUM is treated differently in MySQL and MariaDB
Posted: Wed  07 Oct 2015 03:30
				
				When you add fields to the field editor (you know, right click on Query component and select Fields Editor, then add all) Field definition is different between MySQL and MariaDB for EMUM columns. 
I'm not talking about straight field mapping of ENUMs, but I'm talking about when you want the integer value of the ENUM, so you add 0 to it.
Here is the table creation
and here is the select statement:
The problem is in mapping (enumfield+0)
in mysql it is mapped to Float, and in MariaDB it is mapped to Largeint
I think this is a BUG!
NOTE 1: I know many are against using ENUM all together. But till I have time to change, I need this fixed.
NOTE 2: I know I can do field mapping and force both of them to integer.
			I'm not talking about straight field mapping of ENUMs, but I'm talking about when you want the integer value of the ENUM, so you add 0 to it.
Here is the table creation
Code: Select all
CREATE TABLE `enumtest` (
	`enumfield` ENUM('Y','N') NULL DEFAULT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM;Code: Select all
select enumfield, (enumfield+0) as enumfieldI from enumtestin mysql it is mapped to Float, and in MariaDB it is mapped to Largeint
I think this is a BUG!
NOTE 1: I know many are against using ENUM all together. But till I have time to change, I need this fixed.
NOTE 2: I know I can do field mapping and force both of them to integer.