[MDEV-373] fix lp bug#1007647 Created: 2012-06-29  Updated: 2012-09-18  Resolved: 2012-09-18

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.2.12
Fix Version/s: 5.2.13

Type: Bug Priority: Critical
Reporter: Oleksandr Byelkin Assignee: Timour Katchaounov (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

https://bugs.launchpad.net/maria/+bug/1009187



 Comments   
Comment by Oleksandr Byelkin [ 2012-06-29 ]

I checked description of the MySQL bug, and tried to merge the patch, it does not work (maybe wrong merge).

Comment by Oleksandr Byelkin [ 2012-07-01 ]

Need to talk to Timour about the problem.

Comment by Oleksandr Byelkin [ 2012-07-06 ]

reassiginig as we decided on IRC

Comment by Timour Katchaounov (Inactive) [ 2012-09-11 ]

I am not sure if MtSQL's fix is correct, but it is incomplete for sure. If the PK is changed to be only over 1 column, MySQL 5.6 produces the same incorrect result.
Example:

CREATE TABLE t1 (pk INT NOT NULL, i INT);
INSERT INTO t1 VALUES (0,10), (1,20), (2,30), (3,40);

CREATE TABLE t2b (pk INT NOT NULL, i INT NOT NULL, PRIMARY KEY);
INSERT INTO t2b VALUES (0,0), (1,1), (2,2), (3,3);

EXPLAIN
SELECT * FROM t1 WHERE NULL NOT IN (SELECT t2b.i FROM t2b WHERE t2b.pk = t1.pk);
SELECT * FROM t1 WHERE NULL NOT IN (SELECT t2b.i FROM t2b WHERE t2b.pk = t1.pk);
SELECT t1.pk, NULL NOT IN (SELECT t2b.i FROM t2b WHERE t2b.pk = t1.pk) FROM t1;

Comment by Timour Katchaounov (Inactive) [ 2012-09-11 ]

I am trying to understand if MySQL's solution is just incomplete, and the above case needs a separate solution, or if there is some generic solution that will address all cases.

Comment by Timour Katchaounov (Inactive) [ 2012-09-18 ]
  • Re-merged after Monty's push
  • Wasted some time to analyze a failure in ps-protocol mode of view.test, found out it fails in main 5.5, at the same time I didn't see the failure in buildbot.
  • Pushed the merge into 5.5
Generated at Thu Feb 08 06:28:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.