Skip to content

Commit 2fd2fd7

Browse files
committed
Fix wrong merge of commit d218d1a
1 parent 8c67fff commit 2fd2fd7

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

mysql-test/r/index_merge_innodb.result

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,6 @@ SET @save_sort_buffer_size=@@sort_buffer_size;
815815
SET @save_innodb_file_format= @@innodb_file_format;
816816
SET @save_innodb_large_prefix= @@innodb_large_prefix;
817817
SET sort_buffer_size=2048;
818-
SET GLOBAL innodb_file_format = BARRACUDA;
819-
SET GLOBAL innodb_large_prefix = ON;
820818
CREATE TABLE t1 (
821819
a VARCHAR(1024) CHARACTER SET UTF8 PRIMARY KEY,
822820
b INT,
@@ -826,15 +824,13 @@ INDEX (b)
826824
INSERT INTO t1 SELECT seq, seq, seq from seq_1_to_100;
827825
EXPLAIN SELECT * FROM t1 WHERE a='1' OR b < 5;
828826
id select_type table type possible_keys key key_len ref rows Extra
829-
1 SIMPLE t1 index_merge PRIMARY,b b,PRIMARY 5,3074 NULL 4 Using sort_union(b,PRIMARY); Using where
827+
1 SIMPLE t1 index_merge PRIMARY,b b,PRIMARY 5,3074 NULL 5 Using sort_union(b,PRIMARY); Using where
830828
SELECT * FROM t1 WHERE a='1' OR b < 5;
831829
a b c
832830
2 2 2
833831
3 3 3
834832
4 4 4
835833
1 1 1
836834
DROP TABLE t1;
837-
SET GLOBAL innodb_file_format = @save_innodb_file_format;
838-
SET GLOBAL innodb_large_prefix = @save_innodb_large_prefix;
839835
SET sort_buffer_size= @save_sort_buffer_size;
840836
disconnect disable_purge;

mysql-test/t/index_merge_innodb.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ SET @save_sort_buffer_size=@@sort_buffer_size;
208208
SET @save_innodb_file_format= @@innodb_file_format;
209209
SET @save_innodb_large_prefix= @@innodb_large_prefix;
210210
SET sort_buffer_size=2048;
211-
SET GLOBAL innodb_file_format = BARRACUDA;
212-
SET GLOBAL innodb_large_prefix = ON;
213211

214212
CREATE TABLE t1 (
215213
a VARCHAR(1024) CHARACTER SET UTF8 PRIMARY KEY,
@@ -222,8 +220,6 @@ EXPLAIN SELECT * FROM t1 WHERE a='1' OR b < 5;
222220
SELECT * FROM t1 WHERE a='1' OR b < 5;
223221
DROP TABLE t1;
224222

225-
SET GLOBAL innodb_file_format = @save_innodb_file_format;
226-
SET GLOBAL innodb_large_prefix = @save_innodb_large_prefix;
227223
SET sort_buffer_size= @save_sort_buffer_size;
228224

229225
disconnect disable_purge;

sql/uniques.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class Unique :public Sql_alloc
8585
{
8686
size_t max_elems_in_tree=
8787
max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size);
88+
89+
if (max_elems_in_tree == 0)
90+
max_elems_in_tree= 1;
8891
return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
8992
}
9093

0 commit comments

Comments
 (0)