[MDEV-475] 5.3 invokes records_in_range() with both ends being open Created: 2012-08-22 Updated: 2012-08-23 Due: 2012-08-23 Resolved: 2012-08-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.3.7 |
| Fix Version/s: | 5.3.8 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
after merging with the latest 5.1 XtraDB, we've got a new assert that verifies that records_in_range() is never used for completely open ranges, with neither min or max end set. In 5.3 two tests fails this assert: main.innodb_icp and main.range_vs_index_merge_innodb |
| Comments |
| Comment by Sergei Petrunia [ 2012-08-22 ] |
|
The assert was added by Add debug assertions to catch Bug#13345378 earlier. In all callers of row_sel_convert_mysql_key_to_innobase(), assert |
| Comment by Sergei Petrunia [ 2012-08-23 ] |
|
MySQL-5.1 does that also: #4 0x00000000008b541c in ha_innobase::records_in_range (this=0x7fffe0014468, keynr=0, min_key=0x0, max_key=0x0) at handler/ha_innodb.cc:6174 |
| Comment by Sergei Petrunia [ 2012-08-23 ] |
|
It will also crash. |
| Comment by Sergei Petrunia [ 2012-08-23 ] |
|
Bazaar history looks weird: there is a changeset that adds an assert for while-domain ranges, but there is no changeset with an actual fix. [psergey@pylon-fedora15 mysql-5.6-new]$ bzr log --include-merges | grep -A2 -B5 13345378 In all callers of row_sel_convert_mysql_key_to_innobase(), assert |
| Comment by Sergei Petrunia [ 2012-08-23 ] |
|
The problem can be replicated as follows: create table t1 (a char(2) charset utf8,b double, primary key (a(1)),key (b)); When executing the select, the condition a<>'' causes construction of two ranges, |
| Comment by Sergei Petrunia [ 2012-08-23 ] |
|
... which is incorrect because the constant of '' (empty string) was not included in either range. This is not going to cause any visible problems, though: the only effect will be that range access will read some un-necessary rows (which will be then discarded when re-checking the WHERE clause). |
| Comment by Sergei Petrunia [ 2012-08-23 ] |
|
Decided to remove the assert, after all. |