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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5fd2c489
Commit
5fd2c489
authored
Oct 18, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility fix
test results corrected
parent
f7419aaa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
mysql-test/r/range.result
mysql-test/r/range.result
+6
-2
mysql-test/t/range.test
mysql-test/t/range.test
+1
-0
sql/opt_range.cc
sql/opt_range.cc
+1
-1
No files found.
mysql-test/r/range.result
View file @
5fd2c489
...
@@ -560,10 +560,14 @@ count(*)
...
@@ -560,10 +560,14 @@ count(*)
0
0
explain select count(*) from t1 where x > -16;
explain select count(*) from t1 where x > -16;
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
range PRIMARY PRIMARY 8 NULL 1
Using where; Using index
1 SIMPLE t1
index PRIMARY PRIMARY 8 NULL 2
Using where; Using index
select count(*) from t1 where x > -16;
select count(*) from t1 where x > -16;
count(*)
count(*)
1
2
select * from t1 where x > -16;
x
18446744073709551600
18446744073709551601
select count(*) from t1 where x = 18446744073709551601;
select count(*) from t1 where x = 18446744073709551601;
count(*)
count(*)
1
1
...
...
mysql-test/t/range.test
View file @
5fd2c489
...
@@ -429,6 +429,7 @@ explain select count(*) from t1 where x > -16;
...
@@ -429,6 +429,7 @@ explain select count(*) from t1 where x > -16;
# The following result should be (2). To be fixed when we add 'unsigned flag' to
# The following result should be (2). To be fixed when we add 'unsigned flag' to
# Field::store(longlong)
# Field::store(longlong)
select
count
(
*
)
from
t1
where
x
>
-
16
;
select
count
(
*
)
from
t1
where
x
>
-
16
;
select
*
from
t1
where
x
>
-
16
;
select
count
(
*
)
from
t1
where
x
=
18446744073709551601
;
select
count
(
*
)
from
t1
where
x
=
18446744073709551601
;
drop
table
t1
;
drop
table
t1
;
...
...
sql/opt_range.cc
View file @
5fd2c489
...
@@ -7189,7 +7189,7 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts,
...
@@ -7189,7 +7189,7 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts,
{
{
quick_prefix_selectivity
=
(
double
)
quick_prefix_records
/
quick_prefix_selectivity
=
(
double
)
quick_prefix_records
/
(
double
)
table_records
;
(
double
)
table_records
;
num_groups
=
(
uint
)
r
ound
(
num_groups
*
quick_prefix_selectivity
);
num_groups
=
(
uint
)
r
int
(
num_groups
*
quick_prefix_selectivity
);
}
}
if
(
used_key_parts
>
group_key_parts
)
if
(
used_key_parts
>
group_key_parts
)
...
...
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