Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1ca547f5
Commit
1ca547f5
authored
Feb 22, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
parents
11e22dc0
c9425804
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
mysql-test/r/index_merge_ror_cpk.result
mysql-test/r/index_merge_ror_cpk.result
+1
-1
mysql-test/t/index_merge_ror_cpk.test
mysql-test/t/index_merge_ror_cpk.test
+1
-0
sql/opt_range.cc
sql/opt_range.cc
+5
-2
No files found.
mysql-test/r/index_merge_ror_cpk.result
View file @
1ca547f5
...
@@ -59,7 +59,7 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -59,7 +59,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
explain select * from t1 where pk1 < 7500 and key1 = 10;
explain select * from t1 where pk1 < 7500 and key1 = 10;
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,key1 key1,PRIMARY 4,4 NULL
38
Using intersect(key1,PRIMARY); Using where
1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL
ROWS
Using intersect(key1,PRIMARY); Using where
explain select * from t1 where pktail1ok=1 and key1=10;
explain select * from t1 where pktail1ok=1 and key1=10;
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 key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where
1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where
...
...
mysql-test/t/index_merge_ror_cpk.test
View file @
1ca547f5
...
@@ -63,6 +63,7 @@ select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
...
@@ -63,6 +63,7 @@ select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
# Verify that CPK is always used for index intersection scans
# Verify that CPK is always used for index intersection scans
# (this is because it is used as a filter, not for retrieval)
# (this is because it is used as a filter, not for retrieval)
explain
select
*
from
t1
where
badkey
=
1
and
key1
=
10
;
explain
select
*
from
t1
where
badkey
=
1
and
key1
=
10
;
--
replace_result
38
ROWS
37
ROWS
explain
select
*
from
t1
where
pk1
<
7500
and
key1
=
10
;
explain
select
*
from
t1
where
pk1
<
7500
and
key1
=
10
;
# Verify that keys with 'tails' of PK members are ok.
# Verify that keys with 'tails' of PK members are ok.
...
...
sql/opt_range.cc
View file @
1ca547f5
...
@@ -2562,7 +2562,8 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info,
...
@@ -2562,7 +2562,8 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info,
char
*
key_ptr
=
(
char
*
)
key_val
;
char
*
key_ptr
=
(
char
*
)
key_val
;
SEL_ARG
*
sel_arg
,
*
tuple_arg
=
NULL
;
SEL_ARG
*
sel_arg
,
*
tuple_arg
=
NULL
;
bool
cur_covered
;
bool
cur_covered
;
bool
prev_covered
=
bitmap_is_set
(
&
info
->
covered_fields
,
key_part
->
fieldnr
);
bool
prev_covered
=
(
bitmap_is_set
(
&
info
->
covered_fields
,
key_part
->
fieldnr
))
?
1
:
0
;
key_range
min_range
;
key_range
min_range
;
key_range
max_range
;
key_range
max_range
;
min_range
.
key
=
(
byte
*
)
key_val
;
min_range
.
key
=
(
byte
*
)
key_val
;
...
@@ -2575,7 +2576,9 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info,
...
@@ -2575,7 +2576,9 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info,
for
(
i
=
0
,
sel_arg
=
scan
->
sel_arg
;
sel_arg
;
for
(
i
=
0
,
sel_arg
=
scan
->
sel_arg
;
sel_arg
;
i
++
,
sel_arg
=
sel_arg
->
next_key_part
)
i
++
,
sel_arg
=
sel_arg
->
next_key_part
)
{
{
cur_covered
=
bitmap_is_set
(
&
info
->
covered_fields
,
(
key_part
+
i
)
->
fieldnr
);
DBUG_PRINT
(
"info"
,(
"sel_arg step"
));
cur_covered
=
(
bitmap_is_set
(
&
info
->
covered_fields
,
(
key_part
+
i
)
->
fieldnr
))
?
1
:
0
;
if
(
cur_covered
!=
prev_covered
)
if
(
cur_covered
!=
prev_covered
)
{
{
/* create (part1val, ..., part{n-1}val) tuple. */
/* create (part1val, ..., part{n-1}val) tuple. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment