Bug #16248 WHERE (col1,col2) IN ((?,?)) gives wrong results

Submitted: 6 Jan 2006 9:16 Modified: 8 Apr 2006 12:25
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Prepared statements Severity:S3 (Non-critical)
Version:4.1.16 OS:
Assigned to: Konstantin Osipov CPU Architecture:Any

[6 Jan 2006 9:16] Hartmut Holzgraefe
Description:
this fails in 4.1 but works in 5.0 ...

How to repeat:
CREATE TABLE tbl1 (col1 INTEGER, col2 INTEGER);
INSERT INTO tbl1 VALUES(100,100),(101,101),(102,102),(103,103);
PREPARE stmt1 FROM 'SELECT col1,col2 FROM tbl1 WHERE (col1,col2) IN ((?,?))';
SET @a=100;
SET @b=100;
EXECUTE stmt1 USING @a,@b;
+------+------+
| col1 | col2 |
+------+------+
| 100 | 100 |
| 101 | 101 |
| 102 | 102 |
| 103 | 103 |
+------+------+
SELECT col1,col2 FROM tbl1 WHERE (col1,col2) IN ((100,100));
+------+------+
| col1 | col2 |
+------+------+
| 100 | 100 |
+------+------+
[28 Mar 2006 17:36] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4248
[7 Apr 2006 18:31] Konstantin Osipov
Pushed into 4.1.19 and merged up into 5.0.21.
[8 Apr 2006 12:25] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented in 4.1.19 and 5.0.21 changelogs. Closed.

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

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