Display of BIT types broken in 1.1 #2254

sanderv opened this Issue Oct 1, 2015 · 17 comments


None yet

9 participants

sanderv commented Oct 1, 2015

Boolean handling in SP1.1 seems buggy. See screenshot. Sorting on a BIT field gives mixed booleans, not sorted. A value that is set to true shows up as '000000000', false as '10000000'.

screen shot 2015-10-01 at 15 36 50

Querying the database:

SELECT IF (sentDigitally, "y", "n'")
FROM printbill
WHERE id = 23197949;

does work and yields correct y/n values.

This query

SELECT id, sentDigitally, IF (sentDigitally, "j", "n")
FROM printbill
LIMIT 1000

Gives this result:
screen shot 2015-10-01 at 15 44 41

So, alternating display of the 'native' boolean where the IF-function shows all fields are false.

dmoagx commented Oct 1, 2015

Can reproduce the issue in 1.1
It looks like the right-most bit somehow gets moved to be the left-most bit.

So much for 2 years of development and over 3 months of release candidates...

dmoagx commented Oct 1, 2015
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `bitf` bit(3) NOT NULL DEFAULT b'0',
  PRIMARY KEY (`id`)
mysql> SELECT id,BIN(bitf) FROM bits;
| id | BIN(bitf) |
|  1 | 1         |
|  2 | 0         |
|  3 | 101       |
|  4 | 10        |
|  5 | 1         |
|  6 | 111       |

bildschirmfoto 2015-10-01 um 17 58 35 618

@dmoagx dmoagx changed the title from Boolean handling to Display of BIT types broken in 1.1 Oct 2, 2015
dmoagx commented Oct 2, 2015

This was caused by 19bde59
Stuart probably overlooked in which order the commands were executed.

calculate value with i=0 (right side expression)
increment i (++i)
assign to field i=1 (left side expression)

While it is now:

increment i (++i)
calculate value with i=1 (right side expression)
assign to field i=1 (left side expression)
@dmoagx dmoagx closed this in 11f5bf5 Oct 2, 2015
dmoagx commented Oct 2, 2015

Since I can image how this will continue, let's try something different.

@dmoagx dmoagx reopened this Oct 2, 2015
geniuscd commented Oct 5, 2015

I have two columns of type BIT(1) where all their rows are '0' in an InnoDB Table.
but the UI is showing different value, sometimes it shows '100000' as if the value is 1, but its not.
even when i'm running a select statement it shows differently.

running v1.1 on OSX 10.9.2 (mysql 5.1 on cents 6.4 server)

dmoagx commented Oct 6, 2015

Until 1.1.1 is released either downgrade to 1.0.2 (http://www.sequelpro.com/release-archive) or try an experimental nightly build which has this fixed: http://nightly.sequelpro.com/

sanderv commented Oct 6, 2015

Thanks, good to see that bugs are handled this quick!


I cannot provide proof but I have a strong suspicion that a variant of this bug was also present in exported .sql files:

  • all bits at 1 are exported as 10000000 instead of 00000001
  • sometimes bit which are actually at 1 are exported as 0.

Just wanted to point it out so that someone can check it was fixed too.

dmoagx commented Oct 9, 2015

Yes, see #2262


@jstranders As you can see above, the bugs are fixed and awaiting a new release; in the meantime you can either downgrade to 1.0.2 or download a nightly, see the links above.

@dmoagx dmoagx added this to the 1.1.1 milestone Oct 30, 2015

How long until 1.1.1 is released? It would be awesome to have a fix for this issue.


+1 major bug

Shouldn't the minor releases be immediate? One would think milestones are reserved for major releases (new features) and that minor releases (major bugs to an existing release) would be released almost immediately. This bug report is 2 months old ....

rbagchi commented Jan 6, 2016

+1 This is really problematic since ssh tunnels don't work on the old
version after upgrading to El Capitan

On Wed, Jan 6, 2016 at 10:00 AM Marco Nicosia notifications@github.com

Annnnd a [image: 👍] from me as well, just hit this bug as I upgraded
to 1.1 this morning. :(

Reply to this email directly or view it on GitHub
#2254 (comment)

dmoagx commented Feb 8, 2016

This is an issue tracker, not a Google+ page.

If you do not have to add anything productive, do not comment.

@dmoagx dmoagx locked and limited conversation to collaborators Feb 8, 2016
@dmoagx dmoagx unlocked this conversation Feb 13, 2016
dmoagx commented Feb 13, 2016

Btw 1.1.1 RC1 is out now and should fix this issue:

(use the RC1a download)


Just ran into this same issue with a BIT field in a legacy db and 1.1.1 RC1a has solved the issue for me.

dmoagx commented Feb 20, 2016
@dmoagx dmoagx closed this Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment