Tue 3 Oct 2006
I was playing with the new BIT data type in MySQL 5.0.24 and found that it does not work as expected. It does not accept data in a single quoted field as in
INSERT INTO TABLE VALUE(’1′);
I get a Data Too Long error.
I found this article that explains how it works, and that you should avoid it.
Why you should not use BIT columns in MySQL - Xaprb
Why you should not use BIT columns in MySQL
MySQL implements the BIT data type differently in different versions, and the behavior is not what one might expect. In this article I’ll explain how MySQL’s behavior has changed over time, what strange things can happen as a result, and how to understand and work around display issues. I’ll tell you about a serious bug I’ve found, and discuss differences in the BIT data type between MySQL and Microsoft SQL Server.
Leave a Reply
You must be logged in to post a comment.
