mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
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
This commit is contained in:
parent
7bdf94993e
commit
d8010263a5
4 changed files with 13 additions and 14 deletions
|
@ -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
|
||||
6 6 6 6 6 6 6 1018 6 6 6 6
|
||||
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
|
||||
10 10 10 10 10 10 10 1014 10 10 10 10
|
||||
11 11 11 11 11 11 11 1013 11 11 11 11
|
||||
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;
|
||||
|
|
|
@ -24,8 +24,8 @@ key1 key2
|
|||
0 200
|
||||
1 199
|
||||
2 198
|
||||
4 196
|
||||
3 197
|
||||
4 196
|
||||
alter table t1 add str1 char (255) not null,
|
||||
add zeroval int not null default 0,
|
||||
add str2 char (255) not null,
|
||||
|
@ -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
|
||||
select * from t1 where key1 < 5 or key2 > 197;
|
||||
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
|
||||
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;
|
||||
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
|
||||
select * from t1 where key1 < 3 or key2 > 195;
|
||||
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
|
||||
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;
|
||||
|
|
|
@ -1169,9 +1169,9 @@ end:
|
|||
DBUG_EXECUTE("info",
|
||||
{
|
||||
if (quick_imerge)
|
||||
print_quick_sel_imerge(quick_imerge, needed_reg);
|
||||
print_quick_sel_imerge(quick_imerge, &needed_reg);
|
||||
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)
|
|||
uint flag=0;
|
||||
if (*key1 || *key2)
|
||||
{
|
||||
trees_have_key = true;
|
||||
if (*key1 && !(*key1)->simple_key())
|
||||
flag|=CLONE_KEY1_MAYBE;
|
||||
if (*key2 && !(*key2)->simple_key())
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
QUICK_SELECT_I();
|
||||
virtual ~QUICK_SELECT_I(){};
|
||||
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 bool reverse_sorted() = 0;
|
||||
virtual bool unique_key_range() { return false; }
|
||||
|
@ -140,7 +140,7 @@ public:
|
|||
MEM_ROOT *parent_alloc=NULL);
|
||||
~QUICK_RANGE_SELECT();
|
||||
|
||||
void reset(void) { next=0; it.rewind(); }
|
||||
int reset(void) { next=0; it.rewind(); return 0; }
|
||||
int init();
|
||||
int get_next();
|
||||
bool reverse_sorted() { return 0; }
|
||||
|
|
Loading…
Reference in a new issue