[MDEV-5811] Server crashes in best_access_path with materialization+semijoin and big_tables=ON Created: 2014-03-10 Updated: 2014-03-18 Resolved: 2014-03-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.3.12, 5.5.36, 10.0.9 |
| Fix Version/s: | 5.5.37, 10.0.10, 5.3.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
Stack trace from:
EXPLAIN also crashes. |
| Comments |
| Comment by Sergei Petrunia [ 2014-03-13 ] |
|
I'm debugging the SELECT with big_tables=ON and big_tables=OFF: Breakpoint 4, best_access_path (join=0x7fffcd04b9d0, s=0x7fffcd0c6280, remaining_tables=1, idx=0, disable_jbuf=false, record_count=1, pos=0x7fffcd0c67b0, loose_scan_pos=0x7ffff7ee8a90) at /home/psergey/dev2/5.5/sql/sql_select.cc:5379 Breakpoint 4, best_access_path (join=0x7fffcd04b0b0, s=0x7fffcd0f4040, remaining_tables=7, idx=0, disable_jbuf=false, record_count=1, pos=0x7fffcd0f4be0, loose_scan_pos=0x7ffff7ee8d40) at /home/psergey/dev2/5.5/sql/sql_select.cc:5379 Breakpoint 4, best_access_path (join=0x7fffcd04b0b0, s=0x7fffcd0f4680, remaining_tables=6, idx=1, disable_jbuf=false, record_count=2, pos=0x7fffcd0f4ce0, loose_scan_pos=0x7ffff7ee8b50) at /home/psergey/dev2/5.5/sql/sql_select.cc:5379 The execution starts to differ in this best_access_path() call. Here, we consider a ref access to table <subquery2>. The WHERE has IN-equalities: the prefix has only table t1_1. without big_tables, the temp.table is a ha_heap table and it has (table->file->index_flags(key, 0, 0) & HA_ONLY_WHOLE_INDEX) With big_tables=1, partial index reads are allowed, and we proceed further and then crash because key_info->rec_per_key=NULL. |
| Comment by Sergei Petrunia [ 2014-03-13 ] |
|
Committed a patch. |
| Comment by Sergei Petrunia [ 2014-03-18 ] |
|
Pushed into 5.3. |