Commit 2fd2fd77 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Fix wrong merge of commit d218d1aa

parent 8c67ffff
...@@ -815,8 +815,6 @@ SET @save_sort_buffer_size=@@sort_buffer_size; ...@@ -815,8 +815,6 @@ SET @save_sort_buffer_size=@@sort_buffer_size;
SET @save_innodb_file_format= @@innodb_file_format; SET @save_innodb_file_format= @@innodb_file_format;
SET @save_innodb_large_prefix= @@innodb_large_prefix; SET @save_innodb_large_prefix= @@innodb_large_prefix;
SET sort_buffer_size=2048; SET sort_buffer_size=2048;
SET GLOBAL innodb_file_format = BARRACUDA;
SET GLOBAL innodb_large_prefix = ON;
CREATE TABLE t1 ( CREATE TABLE t1 (
a VARCHAR(1024) CHARACTER SET UTF8 PRIMARY KEY, a VARCHAR(1024) CHARACTER SET UTF8 PRIMARY KEY,
b INT, b INT,
...@@ -826,7 +824,7 @@ INDEX (b) ...@@ -826,7 +824,7 @@ INDEX (b)
INSERT INTO t1 SELECT seq, seq, seq from seq_1_to_100; INSERT INTO t1 SELECT seq, seq, seq from seq_1_to_100;
EXPLAIN SELECT * FROM t1 WHERE a='1' OR b < 5; EXPLAIN SELECT * FROM t1 WHERE a='1' OR b < 5;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,b b,PRIMARY 5,3074 NULL 4 Using sort_union(b,PRIMARY); Using where 1 SIMPLE t1 index_merge PRIMARY,b b,PRIMARY 5,3074 NULL 5 Using sort_union(b,PRIMARY); Using where
SELECT * FROM t1 WHERE a='1' OR b < 5; SELECT * FROM t1 WHERE a='1' OR b < 5;
a b c a b c
2 2 2 2 2 2
...@@ -834,7 +832,5 @@ a b c ...@@ -834,7 +832,5 @@ a b c
4 4 4 4 4 4
1 1 1 1 1 1
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL innodb_file_format = @save_innodb_file_format;
SET GLOBAL innodb_large_prefix = @save_innodb_large_prefix;
SET sort_buffer_size= @save_sort_buffer_size; SET sort_buffer_size= @save_sort_buffer_size;
disconnect disable_purge; disconnect disable_purge;
...@@ -208,8 +208,6 @@ SET @save_sort_buffer_size=@@sort_buffer_size; ...@@ -208,8 +208,6 @@ SET @save_sort_buffer_size=@@sort_buffer_size;
SET @save_innodb_file_format= @@innodb_file_format; SET @save_innodb_file_format= @@innodb_file_format;
SET @save_innodb_large_prefix= @@innodb_large_prefix; SET @save_innodb_large_prefix= @@innodb_large_prefix;
SET sort_buffer_size=2048; SET sort_buffer_size=2048;
SET GLOBAL innodb_file_format = BARRACUDA;
SET GLOBAL innodb_large_prefix = ON;
CREATE TABLE t1 ( CREATE TABLE t1 (
a VARCHAR(1024) CHARACTER SET UTF8 PRIMARY KEY, a VARCHAR(1024) CHARACTER SET UTF8 PRIMARY KEY,
...@@ -222,8 +220,6 @@ EXPLAIN SELECT * FROM t1 WHERE a='1' OR b < 5; ...@@ -222,8 +220,6 @@ EXPLAIN SELECT * FROM t1 WHERE a='1' OR b < 5;
SELECT * FROM t1 WHERE a='1' OR b < 5; SELECT * FROM t1 WHERE a='1' OR b < 5;
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL innodb_file_format = @save_innodb_file_format;
SET GLOBAL innodb_large_prefix = @save_innodb_large_prefix;
SET sort_buffer_size= @save_sort_buffer_size; SET sort_buffer_size= @save_sort_buffer_size;
disconnect disable_purge; disconnect disable_purge;
...@@ -85,6 +85,9 @@ class Unique :public Sql_alloc ...@@ -85,6 +85,9 @@ class Unique :public Sql_alloc
{ {
size_t max_elems_in_tree= size_t max_elems_in_tree=
max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size); max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size);
if (max_elems_in_tree == 0)
max_elems_in_tree= 1;
return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree)); return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment