Commit d8010263 authored by unknown's avatar unknown

Post-merge fixes for index_merge/Unique/5.0


mysql-test/r/index_merge.result:
  Post-merge fixes
mysql-test/r/index_merge_innodb.result:
  Post-merge fixes
sql/opt_range.cc:
  Post-merge fixes
sql/opt_range.h:
  Post-merge fixes
parent 7bdf9499
...@@ -304,9 +304,9 @@ key1 key2 key3 key4 key5 key6 key7 key8 key9 keyA keyB keyC ...@@ -304,9 +304,9 @@ key1 key2 key3 key4 key5 key6 key7 key8 key9 keyA keyB keyC
5 5 5 5 5 5 5 1019 5 5 5 5 5 5 5 5 5 5 5 1019 5 5 5 5
6 6 6 6 6 6 6 1018 6 6 6 6 6 6 6 6 6 6 6 1018 6 6 6 6
7 7 7 7 7 7 7 1017 7 7 7 7 7 7 7 7 7 7 7 1017 7 7 7 7
1016 1016 1016 1016 1016 1016 1016 8 1016 1016 1016 1016
9 9 9 9 9 9 9 1015 9 9 9 9 9 9 9 9 9 9 9 1015 9 9 9 9
10 10 10 10 10 10 10 1014 10 10 10 10 10 10 10 10 10 10 10 1014 10 10 10 10
11 11 11 11 11 11 11 1013 11 11 11 11 11 11 11 11 11 11 11 1013 11 11 11 11
12 12 12 12 12 12 12 1012 12 12 12 12 12 12 12 12 12 12 12 1012 12 12 12 12
1016 1016 1016 1016 1016 1016 1016 8 1016 1016 1016 1016
drop table t0, t1, t2, t3, t4; drop table t0, t1, t2, t3, t4;
...@@ -24,8 +24,8 @@ key1 key2 ...@@ -24,8 +24,8 @@ key1 key2
0 200 0 200
1 199 1 199
2 198 2 198
4 196
3 197 3 197
4 196
alter table t1 add str1 char (255) not null, alter table t1 add str1 char (255) not null,
add zeroval int not null default 0, add zeroval int not null default 0,
add str2 char (255) not null, add str2 char (255) not null,
...@@ -37,19 +37,19 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -37,19 +37,19 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using where 1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using where
select * from t1 where key1 < 5 or key2 > 197; select * from t1 where key1 < 5 or key2 > 197;
key1 key2 str1 zeroval str2 str3 key1 key2 str1 zeroval str2 str3
0 200 aaa 0 bbb 200-0_a
1 199 aaa 0 bbb 199-0_A
2 198 aaa 0 bbb 198-1_a
3 197 aaa 0 bbb 197-1_A
4 196 aaa 0 bbb 196-2_a 4 196 aaa 0 bbb 196-2_a
3 197 aaa 0 bbb 197-1_A
2 198 aaa 0 bbb 198-1_a
1 199 aaa 0 bbb 199-0_A
0 200 aaa 0 bbb 200-0_a
explain select * from t1 where key1 < 3 or key2 > 195; explain select * from t1 where key1 < 3 or key2 > 195;
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 i1,i2 i1,i2 4,4 NULL 8 Using where 1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using where
select * from t1 where key1 < 3 or key2 > 195; select * from t1 where key1 < 3 or key2 > 195;
key1 key2 str1 zeroval str2 str3 key1 key2 str1 zeroval str2 str3
0 200 aaa 0 bbb 200-0_a
1 199 aaa 0 bbb 199-0_A
2 198 aaa 0 bbb 198-1_a
4 196 aaa 0 bbb 196-2_a 4 196 aaa 0 bbb 196-2_a
3 197 aaa 0 bbb 197-1_A 3 197 aaa 0 bbb 197-1_A
2 198 aaa 0 bbb 198-1_a
1 199 aaa 0 bbb 199-0_A
0 200 aaa 0 bbb 200-0_a
drop table t1; drop table t1;
...@@ -1169,9 +1169,9 @@ imerge_fail:; ...@@ -1169,9 +1169,9 @@ imerge_fail:;
DBUG_EXECUTE("info", DBUG_EXECUTE("info",
{ {
if (quick_imerge) if (quick_imerge)
print_quick_sel_imerge(quick_imerge, needed_reg); print_quick_sel_imerge(quick_imerge, &needed_reg);
else else
print_quick_sel_range((QUICK_RANGE_SELECT*)quick, needed_reg); print_quick_sel_range((QUICK_RANGE_SELECT*)quick, &needed_reg);
} }
); );
...@@ -1720,7 +1720,6 @@ tree_and(PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2) ...@@ -1720,7 +1720,6 @@ tree_and(PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2)
uint flag=0; uint flag=0;
if (*key1 || *key2) if (*key1 || *key2)
{ {
trees_have_key = true;
if (*key1 && !(*key1)->simple_key()) if (*key1 && !(*key1)->simple_key())
flag|=CLONE_KEY1_MAYBE; flag|=CLONE_KEY1_MAYBE;
if (*key2 && !(*key2)->simple_key()) if (*key2 && !(*key2)->simple_key())
......
...@@ -88,7 +88,7 @@ class QUICK_SELECT_I ...@@ -88,7 +88,7 @@ class QUICK_SELECT_I
QUICK_SELECT_I(); QUICK_SELECT_I();
virtual ~QUICK_SELECT_I(){}; virtual ~QUICK_SELECT_I(){};
virtual int init() = 0; virtual int init() = 0;
virtual void reset(void) = 0; virtual int reset(void) = 0;
virtual int get_next() = 0; /* get next record to retrieve */ virtual int get_next() = 0; /* get next record to retrieve */
virtual bool reverse_sorted() = 0; virtual bool reverse_sorted() = 0;
virtual bool unique_key_range() { return false; } virtual bool unique_key_range() { return false; }
...@@ -140,7 +140,7 @@ class QUICK_RANGE_SELECT : public QUICK_SELECT_I ...@@ -140,7 +140,7 @@ class QUICK_RANGE_SELECT : public QUICK_SELECT_I
MEM_ROOT *parent_alloc=NULL); MEM_ROOT *parent_alloc=NULL);
~QUICK_RANGE_SELECT(); ~QUICK_RANGE_SELECT();
void reset(void) { next=0; it.rewind(); } int reset(void) { next=0; it.rewind(); return 0; }
int init(); int init();
int get_next(); int get_next();
bool reverse_sorted() { return 0; } bool reverse_sorted() { return 0; }
......
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