Bug #41257 Please Provide Native Boolean Support
Submitted: 5 Dec 2008 11:43 Modified: 5 Dec 2008 18:23
Reporter: Louis Breda van Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Data Types Severity:S4 (Feature request)
Version:Server 5.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: boolean

[5 Dec 2008 11:43] Louis Breda van
Description:
Hello,

I frequently use Booleans in expresions but also as DataBase Field Type.

Problem is that MySQL despite some "emulation" statements in the manual
does not support Booleans as datatypes as well.

More over, if you do use Booleans in your querys, the browser does accept the query, but treads it wronly without even giving a warning!!! 
(==> wrong query results :>) 

As said I would highly appriciate full boolean field type support. 

Sincerely,

Louis

How to repeat:
Just some notes:

- try to create a boolean field with the administrator, you will get a tinyint
- try to use MyBoolean (= tinyint) = False Or True see what is going wrong!
- see what happens when using the migration wizzard

- also note that the boolean should support not only "True" and "False" but also Null just like every data type.
[5 Dec 2008 13:16] Valeriy Kravchuk
I think this feature request is actually covered by bug #24531, bug #22361 and bug #11881. Please, check.
[5 Dec 2008 15:52] Louis Breda van
Valery,

I looked at those three bugs, and they are at least related.
Where I should add that IMHO desctiption #24531 is the best
(clearly stating null should be supported etc, by the way that also holds for bittype).

Where I also would like to add:
- it is very very desturbing that MySQL is claiming some form of boolean support here and there and in the manual but in fact the support is realy ZERO NULL !!
- even worse, some querys SEEMS to handle booleans, but do infact return WRONG  query results;
- also using the table edditor give problems'
- and ODBC give problems
And all that mostly without warnings!!

So, time to add full boolean support and also time to add warnings if something is not supported

As example:
If MyBoolean is a tinyint then a query containing where Myboolean = true is definitly wrong and should NOT run Better then providing a wrong query result!!
 
As far as me is conserned, you can perhabs combine all remarks under one bug number.

I personaly think the boolean type, is far more importent than a whole lot of other types.
 

Sincerely,

Louis
[5 Dec 2008 18:23] Valeriy Kravchuk
Let's consider this a duplicate of bug #24531 that is already verified then. Thank you for the additional comments.