mirror of
https://github.com/MariaDB/server.git
synced 2025-07-11 15:22:09 +03:00
Fix max_key_length and max_unique_length to take into account varchar and null extra lengths
This fixes a bug found by bdb.test Fixes a portability issue with bdb tables mysql-test/include/varchar.inc: Fix test to be reproducable (Either key v or v_2 could be used here) mysql-test/r/bdb.result: Fix test to be reproducable (Either key v or v_2 could be used here) mysql-test/r/myisam.result: Fix test to be reproducable (Either key v or v_2 could be used here) sql/table.cc: Fix max_key_length and max_unique_length to take into account varchar and null extra lengths This fixes a bug found by bdb.test
This commit is contained in:
@ -77,6 +77,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a '
|
||||
alter table t1 add unique(v);
|
||||
alter table t1 add key(v);
|
||||
select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
|
||||
--replace_column 6 #
|
||||
explain select * from t1 where v='a';
|
||||
|
||||
# GROUP BY
|
||||
|
@ -1445,7 +1445,7 @@ qq
|
||||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v,v_2 v 13 const 10 Using where
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const 10 Using where
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
@ -716,7 +716,7 @@ qq
|
||||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v,v_2 v_2 13 const 7 Using where
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const 7 Using where
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
Reference in New Issue
Block a user