[MDEV-2958] LP:997747 - Assertion `join->best_read < ((double)1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys Created: 2012-05-10 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
mysqld: sql_select.cc:5216: bool greedy_search(JOIN*, table_map, uint, uint): Assertion `join->best_read < ((double)1.79769313486231570815e+308L)' failed. #8 0xb7530014 in __assert_fail () from /lib/libc.so.6 maria-5.1: Also reproducible on maria-5.2 (revno 3149). EXPLAIN also fails. minimal optimizer_switch: table_elimination=on Test case: SET optimizer_switch = 'table_elimination=on'; CREATE TABLE A (a1 INT); INSERT INTO A VALUES (1),(2); SELECT a1 FROM A LEFT JOIN B LEFT JOIN C LEFT JOIN D
|
| Comments |
| Comment by Sergei Petrunia [ 2012-05-11 ] |
|
Re: Assertion `join->best_read < ((double)1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys Optimization considers a join prefix of {A, B} This is so, because we've "entered" a join nest for table B and have never left it. Will need to check why it works in 5.3 |
| Comment by Sergei Petrunia [ 2012-05-11 ] |
|
Re: Assertion `join->best_read < ((double)1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys ->nested_join has n_tables==1 (correct value after table elimination). 5.2 has n_tables==2, which is the cause of the bug. |
| Comment by Sergei Petrunia [ 2012-05-11 ] |
|
Re: Assertion `join->best_read < ((double)1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys |
| Comment by Sergei Petrunia [ 2012-05-11 ] |
|
Re: Assertion `join->best_read < ((double)1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys === modified file 'sql/sql_select.cc'
Should I back-port it? |
| Comment by Sergei Petrunia [ 2012-05-12 ] |
|
Re: Assertion `join->best_read < ((double)1.79..5e+308L)' failed in greedy_search with LEFT JOINs and unique keys |
| Comment by Rasmus Johansson (Inactive) [ 2012-05-12 ] |
|
Launchpad bug id: 997747 |