[MDEV-567] Wrong result from a query with correlated subquery if ICP is allowed Created: 2012-10-01 Updated: 2014-04-07 Resolved: 2014-04-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The following test case produces a wrong result set in MariaDB 5.3:
The returned result for the above query is:
The EXPLAIN output for this query is:
If ICP is turned off the result returned by the query is correct:
The above test case is a simplified version of the test case for Oracle's bug#12667154 that can be found in http://lists.mysql.com/commits/143149 |
| Comments |
| Comment by Patryk Pomykalski [ 2012-10-08 ] | ||||||||||||
|
The fix introduced other bug: | ||||||||||||
| Comment by Sergei Petrunia [ 2012-10-10 ] | ||||||||||||
|
Fix backported and pushed into 5.3 | ||||||||||||
| Comment by Sergei Petrunia [ 2012-10-10 ] | ||||||||||||
|
Sorry, somehow missed comment by Patryk. Note that lp:~maria-captains/maria/5.5-show-explain, which is based on 5.5.27 and has alternative fix developed for use with SHOW EXPLAIN, doesn't produce a wrong result. | ||||||||||||
| Comment by Sergei Petrunia [ 2012-11-02 ] | ||||||||||||
|
have made a patch that takes out Olav's fix As a result of that, I've got a patch that can handle subqueries with pushed <quote> </quote> will not function correctly when using DS-MRR. With DS-MRR, | ||||||||||||
| Comment by Sergei Petrunia [ 2012-11-04 ] | ||||||||||||
|
Finished, pushed the fix into 5.5 | ||||||||||||
| Comment by Igor Babaev [ 2012-11-04 ] | ||||||||||||
|
Sergey, Do you plan to back-port the fix into 5.3:? The bug was reported against 5.3. | ||||||||||||
| Comment by Elena Stepanova [ 2014-04-07 ] | ||||||||||||
|
The initial reported problem was fixed in 5.3.10 by the backport of the Oracle fix:
So, the test case from the description does not fail anymore. |