Bug #8485 BOOLEAN: Silent data type change to TINYINT

Submitted: 13 Feb 2005 0:40 Modified: 29 Sep 2008 21:29
Reporter: Trudy Pelzer Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:5.0.3-alpha-debug OS:Linux (SuSE 9.1)
Assigned to: Assigned Account CPU Architecture:Any

[13 Feb 2005 0:40] Trudy Pelzer
Description:
MySQL should never change the data type of a column.
But in the case of BOOLEAN column definitions, the server
changes the data type to TINYINT.

How to repeat:
mysql> create table t1 (col1 boolean);
Query OK, 0 rows affected (0.00 sec)

mysql> show create table t1;
+-------+---------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                |
+-------+---------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `col1` tinyint(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+---------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
-- This is incorrect. The data type chosen for the column was
BOOLEAN and this should be reflected in the SHOW statement.
[13 Feb 2005 2:12] MySQL Verification Team
Thank you for the bug report.
[29 Sep 2008 21:29] Konstantin Osipov
No reason to keep this not fixed.
[10 Jun 2009 11:23] Susanne Ebrecht
Bug #22361 and bug #45181 are duplicates of this bug here.
[17 Aug 2009 3:01] Susanne Ebrecht
Bug #46734 is set as duplicate of this bug here
[19 Oct 2009 10:44] Susanne Ebrecht
Bug #38154 is depending on this bug here.
[26 Feb 2010 6:27] Susanne Ebrecht
Bug #51491 is a duplicate of this bug here.
[22 Apr 2010 19:55] shimon doodkin
quote "Severity:	S3 (Non-critical)"

actually it is very critical

for adaptation of mysql as a replacement for 

ms access and any other database for vb
[23 Apr 2010 6:56] Kai Sautter
Implementation of this feature would be highly desirable to improve interoperability with third-party tools as well as to make a true Boolean data type available to application programmers (reducing the need for cast operations in applications).

If native implementation is taking too much effort, an implementation using a "wrapper" data type (wrapping and restricting the actual storage data type TINYINT to (optionally) change its external visibility to BOOLEAN) would probably be sufficient to start with.
[5 Dec 2011 15:16] Peter Laursen
Once a SQL99 compliant BOOLEAN gets implemented please als oconsider http://bugs.mysql.com/bug.php?id=63583
[11 Nov 2017 21:21] Federico Razzoli
Still in 8.0.3.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.073 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.