[MDEV-11321] MariaRocks: type_binary_indexes, type_blob_indexes fail due to different index statistics Created: 2016-11-21 Updated: 2016-12-02 Resolved: 2016-12-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - RocksDB |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
They fail like this
...
The difference in results doesn't look like a failure, but we need to investigate why it happens. |
| Comments |
| Comment by Sergei Petrunia [ 2016-11-21 ] | ||||||||||||||||
|
Note that these are not real stats.
and then display stats for empty tables:
| ||||||||||||||||
| Comment by Sergei Petrunia [ 2016-11-21 ] | ||||||||||||||||
|
The stat numbers are calculated here in ha_rocksdb.cc
In both servers, j=0. The issue is that MariaDB has k->ext_key_parts==1, while MySQL has k->actual_key_parts==2 | ||||||||||||||||
| Comment by Sergei Petrunia [ 2016-11-21 ] | ||||||||||||||||
|
MariaDB:
MySQL:
So, MariaDB thinks that the key is not "extended" with PK. | ||||||||||||||||
| Comment by Sergei Petrunia [ 2016-11-21 ] | ||||||||||||||||
|
I already saw this thing, this is MariaDB not using extended keys for partially-covered columns: | ||||||||||||||||
| Comment by Sergei Petrunia [ 2016-12-02 ] | ||||||||||||||||
|
Debugged this - MyRocks already has the code to handle unique secondary indexes. For these, SQL layer also thinks they are not "extended". In MariaRocks, that code will handle the keys with partially-covered columns. | ||||||||||||||||
| Comment by Sergei Petrunia [ 2016-12-02 ] | ||||||||||||||||
|
|