1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixed bug mdev-9628.

In the function create_key_parts_for_pseudo_indexes()
the key part structures of pseudo-indexes created for
BLOB fields were set incorrectly.
Also the key parts for long fields must be 'truncated'
up to the maximum length acceptable for key parts.
This commit is contained in:
Igor Babaev
2016-10-26 10:59:38 -07:00
parent 9d4a0dde0a
commit d451d772fd
5 changed files with 198 additions and 1 deletions

View File

@@ -109,6 +109,31 @@ where t1.child_user_id=t3.id and t1.child_group_id is null and t2.lower_group_na
drop table t1,t2,t3;
--echo #
--echo # MDEV-9187: duplicate of bug mdev-9628
--echo #
set use_stat_tables = preferably;
set optimizer_use_condition_selectivity=3;
CREATE TABLE t1 (f1 char(32)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('foo'),('bar'),('qux');
ANALYZE TABLE t1;
SELECT * FROM t1 WHERE f1 < 'm';
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE f1 < 'm';
CREATE TABLE t2 (f1 TEXT) ENGINE=InnoDB;
INSERT INTO t2 VALUES ('foo'),('bar'),('qux');
ANALYZE TABLE t2;
SELECT * FROM t2 WHERE f1 <> 'qux';
EXPLAIN EXTENDED
SELECT * FROM t2 WHERE f1 <> 'qux';
DROP TABLE t1,t2;
--echo #
--echo # End of 10.0 tests
--echo #