[MDEV-14293] MyRocks lacks basic functionality Created: 2017-11-06 Updated: 2017-12-16 Resolved: 2017-12-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - RocksDB |
| Affects Version/s: | 10.2.10 |
| Fix Version/s: | 10.2.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip orleans | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Compatibility | ||
| Environment: |
Centos 7 |
||
| Issue Links: |
|
||||||||
| Description |
|
As it is right now, it is useless 100% for one reason: the only collation available is binary and that does not allow to case-insensitive searches. It breaks any application that was working with innodb or tokudb. |
| Comments |
| Comment by Elena Stepanova [ 2017-11-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Assigned to psergey for commenting, if not fixing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Keremidarski [ 2017-11-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Where do you see that "the only collation available is binary and that does not allow to case-insensitive searches."? > SELECT @@version;
---------------------
--------------------- > CREATE TABLE t(x CHAR(3)) ENGINE=RocksDB; > INSERT INTO t VALUES('foo'),('Foo'); MariaDB [bugs]> SELECT x FROM t WHERE x = 'foo';
------
------ > SHOW CREATE TABLE t\G
Same with explicit case insensitive collation: > ALTER TABLE t COLLATE utf8_unicode_ci; > SELECT x FROM t WHERE x = 'foo';
------
------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2017-11-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
philip_38, I assume this bug was filed because you saw an error like this:
The wording is misleading there. MyRocks actually supports any collation now (although some are more space-efficient than others). You can make this warning go away by setting (either in console or my.cnf):
You can also enable it for individual tables/indexes by setting rocksdb_strict_collation_exceptions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2017-11-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Keeping the bug open and assigned to me as:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip orleans [ 2017-11-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This option should be set by default. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip orleans [ 2017-11-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I found another issue with Rocksdb. Please correct me if I am wrong
------
------ SELECT class, state,account_id, flagv from userbusy where account_id='16356' and class='W' and state='NJ' and not flagv limit 11;
------
------ Please tell me I am confused.
-----------
----------- I just created the same tables with create table userbusy_in engine=innodb as select * from userbusy, and IT WORKS fine. So the implementation of RocksDB is not working. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrii Nikitin (Inactive) [ 2017-11-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
philip_38 While 10.2 is GA, particular plugins/Engines may have non-GA status as described at https://mariadb.com/kb/en/library/list-of-plugins/
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip orleans [ 2017-11-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip orleans [ 2017-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Let me save some time. If I do not have an index on the field, then limit works fine, bit it is of course slow. If I add an index on that BOOL field, then limit does not work. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrii Nikitin (Inactive) [ 2017-11-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
philip_38 Thank you for requested outputs. Indeed behavior is very strange and I suspect that it is compound primary key (on varchar?) which triggers the problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2017-12-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello, Ok the fix for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip orleans [ 2017-12-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry to ask, but how do I get the code to test? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2017-12-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
philip_38, it is currently available as source code on github, in the 10.2 branch: https://github.com/MariaDB/server/tree/10.2 . The fix will also be in the next release of MariaDB 10.2 (which should be 10.2.12). I am not sure about when that release will happen, though. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2017-12-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Changed the confusing error to be a warning and re-worded it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2017-12-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Also added https://mariadb.com/kb/en/library/myrocks-and-index-only-scans/ |