Bug #50231 Select shows different outputs for 'bigint' column containing 'null' values

Submitted: 11 Jan 2010 13:10 Modified: 15 Jan 2010 7:51
Reporter: Nirbhay Choubey Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:5.1-bugteam OS:Any
Assigned to: Ramil Kalimullin CPU Architecture:Any
Tags: regression

[11 Jan 2010 13:10] Nirbhay Choubey
Description:
Following set of statements shows invalid output when the 'BIGINT' column contains 'NULL' :

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 BIGINT);
INSERT INTO t1 VALUES (1),(null),(2);

5.1-bugteam build produces :

SELECT * FROM t1 WHERE c1 <> 2;
+------+
| c1   |
+------+
|    1 |
| NULL |
+------+

While 5.1-main tree build gives :

+------+
| c1   |
+------+
|    1 |
+------+

How to repeat:
See the description above.
[11 Jan 2010 15:02] Nirbhay Choubey
Changed the synopsis from 'invalid' to 'different outputs' as its unclear which of the 2 outputs should be considered as correct/expected output.

TIME, YEAR data types show the same difference,
while <, <= operators also behave similar to <>, as described in the bug.
[11 Jan 2010 23:45] Sveta Smirnova
Thank you for the report.

Verified as described.
[15 Jan 2010 5:21] Ramil Kalimullin
couldn't repeat using the latest mysql-5.1-bugteam.

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

Page generated in 0.054 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.