[MDEV-7930] Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed in handler::ha_index_read_map Created: 2015-04-07 Updated: 2015-10-28 Resolved: 2015-10-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.0, 10.1 |
| Fix Version/s: | 10.0.22, 10.1.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream, verified | ||
| Sprint: | 10.0.22 |
| Description |
|
See also https://bugs.mysql.com/bug.php?id=74448 – different test case, same assertion failure. And the test case above fails on 5.6 too. |
| Comments |
| Comment by Oleksandr Byelkin [ 2015-10-22 ] | |
|
the t2 unlocked by mysql_unlock_some_tables() in JOIN::optimize() (WHY???). Naturally it can't be used anymore... | |
| Comment by Oleksandr Byelkin [ 2015-10-22 ] | |
|
The table is closed because it is constant | |
| Comment by Oleksandr Byelkin [ 2015-10-22 ] | |
|
revision-id: 77b075f69e0e45baaf145efd90d79be34d78bde9 (mariadb-10.0.21-44-g77b075f)
Processing of constant tables added to max/min optimization. — | |
| Comment by Sergei Petrunia [ 2015-10-23 ] | |
|
Note that "v2" is the table from top-level select. Optimization proceeds as follows: | |
| Comment by Sergei Petrunia [ 2015-10-23 ] | |
|
Ok the fix removes the crash. But the question is, what is it we are trying to calculate here? What is the meaning of MIN(v2.f2) in the subquery? Does it mean "minimum of v2.f2" within the group as defined by upper query's GROUP BY clause" ? However, GROUP BY clause in the upper query is the subquery itself. | |
| Comment by Oleksandr Byelkin [ 2015-10-26 ] | |
|
revision-id: 9eff48713d5eada610138e415a047d418e33e580 (mariadb-10.0.21-44-g9eff487)
Processing of constant tables added to max/min optimization. — | |
| Comment by Oleksandr Byelkin [ 2015-10-26 ] | |
|
revision-id: 72bb358c2ba98e6e0d4a15b92af514a45751fe8d (mariadb-10.0.21-44-g72bb358)
In optimizing aggregate function do not try to touch tables from outer — | |
| Comment by Sergei Petrunia [ 2015-10-27 ] | |
|
Review feedback provided over email |