Details
-
Technical task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
MySQL [test]> CREATE TABLE t1 (pk INT PRIMARY KEY, c1 CHAR(1), c2 CHAR(1), KEY(c1)) ENGINE=LevelDB CHARSET utf8 COLLATE utf8_bin; |
Query OK, 0 rows affected (0.21 sec) |
|
MySQL [test]> INSERT INTO t1 VALUES (1,'h','h'); |
Query OK, 1 row affected (0.00 sec)
|
|
MySQL [test]> SELECT * FROM t1; |
+----+------+------+ |
| pk | c1 | c2 |
|
+----+------+------+ |
| 1 | h | h |
|
+----+------+------+ |
1 row in set (0.00 sec) |
|
MySQL [test]> SELECT c1 FROM t1; |
+------+ |
| c1 |
|
+------+ |
| h? |
|
+------+ |
1 row in set (0.00 sec) |
|
MySQL [test]> EXPLAIN EXTENDED SELECT c1 FROM t1; |
+----+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra | |
+----+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ |
| 1 | SIMPLE | t1 | index | NULL | c1 | 4 | NULL | 1000 | 100.00 | Using index | |
+----+-------------+-------+-------+---------------+------+---------+------+------+----------+-------------+ |
1 row in set, 1 warning (0.00 sec) |
I'm not quite sure if index-only scans for utf8_bin are currently supported (the wiki page is unclear about it, it says " possibly support utf8_bin"), but I suppose in either case it should not return wrong results.
Test case (same as above, for copy-paste):
CREATE TABLE t1 (pk INT PRIMARY KEY, c1 CHAR(1), c2 CHAR(1), KEY(c1)) ENGINE=LevelDB CHARSET utf8 COLLATE utf8_bin; |
INSERT INTO t1 VALUES (1,'h','h'); |
SELECT c1 FROM t1; |
revision-id: psergey@askmonty.org-20130319094846-yze9xy3qeb5g6hrc
|
revno: 4610
|
branch-nick: mysql-5.6-leveldb
|