mirror of
https://github.com/MariaDB/server.git
synced 2026-05-05 14:45:31 +02:00
Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN:
FAILING ASSERTION: FLEN == LEN
Problem:
Broken invariant triggered when building a unique index on a
binary column and the input data contains duplicate keys. This was broken
in debug builds only.
Fix:
Fixed length of the binary datatype can be greater than length of
the shorter prefix on which index is being created.
This commit is contained in:
parent
c187840b6b
commit
255e450651
3 changed files with 22 additions and 2 deletions
9
mysql-test/suite/innodb/r/create-index.result
Normal file
9
mysql-test/suite/innodb/r/create-index.result
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
|
||||
# ASSERTION: FLEN == LEN
|
||||
#
|
||||
create table t1 (f1 binary(5)) engine=innodb;
|
||||
insert into t1 values ('w'), ('w');
|
||||
create unique index index_t1 on t1(f1(4));
|
||||
ERROR 23000: Duplicate entry 'w' for key 'index_t1'
|
||||
drop table t1;
|
||||
11
mysql-test/suite/innodb/t/create-index.test
Normal file
11
mysql-test/suite/innodb/t/create-index.test
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #18010711 UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
|
||||
--echo # ASSERTION: FLEN == LEN
|
||||
--echo #
|
||||
create table t1 (f1 binary(5)) engine=innodb;
|
||||
insert into t1 values ('w'), ('w');
|
||||
--error ER_DUP_ENTRY
|
||||
create unique index index_t1 on t1(f1(4));
|
||||
drop table t1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue