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
bbfb5f24
Commit
bbfb5f24
authored
Oct 20, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the test moved from range.test to innodb.test - it should not be run when innodb is disabled
parent
0b7f26d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
54 deletions
+56
-54
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+34
-0
mysql-test/r/range.result
mysql-test/r/range.result
+0
-35
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+22
-0
mysql-test/t/range.test
mysql-test/t/range.test
+0
-19
No files found.
mysql-test/r/innodb.result
View file @
bbfb5f24
...
...
@@ -1630,3 +1630,37 @@ show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
drop table t1;
create table t1 (x bigint unsigned not null primary key) engine=innodb;
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
select * from t1;
x
18446744073709551600
18446744073709551601
select count(*) from t1 where x>0;
count(*)
2
select count(*) from t1 where x=0;
count(*)
0
select count(*) from t1 where x<0;
count(*)
0
select count(*) from t1 where x < -16;
count(*)
0
select count(*) from t1 where x = -16;
count(*)
0
explain select count(*) from t1 where x > -16;
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
select count(*) from t1 where x > -16;
count(*)
1
select * from t1 where x > -16;
x
18446744073709551601
select count(*) from t1 where x = 18446744073709551601;
count(*)
1
drop table t1;
mysql-test/r/range.result
View file @
bbfb5f24
...
...
@@ -537,38 +537,3 @@ select count(*) from t2 where x = 18446744073709551601;
count(*)
0
drop table t1;
create table t1 (x bigint unsigned not null primary key) engine=innodb;
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
select * from t1;
x
18446744073709551600
18446744073709551601
select count(*) from t1 where x>0;
count(*)
2
select count(*) from t1 where x=0;
count(*)
0
select count(*) from t1 where x<0;
count(*)
0
select count(*) from t1 where x < -16;
count(*)
0
select count(*) from t1 where x = -16;
count(*)
0
explain select count(*) from t1 where x > -16;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using where; Using index
select count(*) from t1 where x > -16;
count(*)
2
select * from t1 where x > -16;
x
18446744073709551600
18446744073709551601
select count(*) from t1 where x = 18446744073709551601;
count(*)
1
drop table t1;
mysql-test/t/innodb.test
View file @
bbfb5f24
...
...
@@ -1155,5 +1155,27 @@ delete from t1;
commit
;
show
status
like
"binlog_cache_use"
;
show
status
like
"binlog_cache_disk_use"
;
drop
table
t1
;
#
# range optimizer problem
#
create
table
t1
(
x
bigint
unsigned
not
null
primary
key
)
engine
=
innodb
;
insert
into
t1
(
x
)
values
(
0xfffffffffffffff0
),(
0xfffffffffffffff1
);
select
*
from
t1
;
select
count
(
*
)
from
t1
where
x
>
0
;
select
count
(
*
)
from
t1
where
x
=
0
;
select
count
(
*
)
from
t1
where
x
<
0
;
select
count
(
*
)
from
t1
where
x
<
-
16
;
select
count
(
*
)
from
t1
where
x
=
-
16
;
explain
select
count
(
*
)
from
t1
where
x
>
-
16
;
# The following result should be (2). To be fixed when we add 'unsigned flag' to
# Field::store(longlong)
select
count
(
*
)
from
t1
where
x
>
-
16
;
select
*
from
t1
where
x
>
-
16
;
select
count
(
*
)
from
t1
where
x
=
18446744073709551601
;
drop
table
t1
;
mysql-test/t/range.test
View file @
bbfb5f24
...
...
@@ -414,23 +414,4 @@ select count(*) from t2 where x > -16;
select
count
(
*
)
from
t2
where
x
=
18446744073709551601
;
drop
table
t1
;
--
disable_warnings
create
table
t1
(
x
bigint
unsigned
not
null
primary
key
)
engine
=
innodb
;
--
enable_warnings
insert
into
t1
(
x
)
values
(
0xfffffffffffffff0
),(
0xfffffffffffffff1
);
select
*
from
t1
;
select
count
(
*
)
from
t1
where
x
>
0
;
select
count
(
*
)
from
t1
where
x
=
0
;
select
count
(
*
)
from
t1
where
x
<
0
;
select
count
(
*
)
from
t1
where
x
<
-
16
;
select
count
(
*
)
from
t1
where
x
=
-
16
;
explain
select
count
(
*
)
from
t1
where
x
>
-
16
;
# The following result should be (2). To be fixed when we add 'unsigned flag' to
# Field::store(longlong)
select
count
(
*
)
from
t1
where
x
>
-
16
;
select
*
from
t1
where
x
>
-
16
;
select
count
(
*
)
from
t1
where
x
=
18446744073709551601
;
drop
table
t1
;
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