diff options
author | Sachin <sachin.setiya@mariadb.com> | 2020-06-03 13:36:36 +0530 |
---|---|---|
committer | Sachin <sachin.setiya@mariadb.com> | 2020-06-07 12:07:41 +0530 |
commit | eb14e073ea121954fb5be6fac92fd84b7d57bb07 (patch) | |
tree | 8bd3404730de0fe9f8e806bb172cbea11c4552e4 /mysql-test/main/long_unique_bugs.test | |
parent | e208f91ba8e8d674b276d52ba1645e4fef1f974a (diff) | |
download | mariadb-git-eb14e073ea121954fb5be6fac92fd84b7d57bb07.tar.gz |
MDEV-22719 Long unique keys are not created when individual key_part->length < max_key_length but SUM(key_parts->length) > max_key_length
Make UNIQUE HASH key in case when key_info->key_length > max_key_length
Diffstat (limited to 'mysql-test/main/long_unique_bugs.test')
-rw-r--r-- | mysql-test/main/long_unique_bugs.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index e91c46ca90c..34d02b1c8f4 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -356,3 +356,15 @@ INSERT INTO t2 VALUES (1, 'foo', default); # Cleanup DROP TABLE t1, t2; SET binlog_row_image= FULL; + +# +# MDEV-22719 Long unique keys are not created when individual key_part->length < max_key_length but SUM(key_parts->length) > max_key_length +# + +CREATE TABLE t1 (a int, b VARCHAR(1000), UNIQUE (a,b)) ENGINE=MyISAM; +show index from t1; +CREATE TABLE t2 (a varchar(900), b VARCHAR(900), UNIQUE (a,b)) ENGINE=MyISAM; +show index from t2; + +# Cleanup +DROP TABLE t1,t2; |