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
00a560c7
Commit
00a560c7
authored
Mar 03, 2005
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bugs
parents
20fe3934
eeae2c4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
0 deletions
+79
-0
mysql-test/r/bigint.result
mysql-test/r/bigint.result
+39
-0
mysql-test/t/bigint.test
mysql-test/t/bigint.test
+33
-0
sql/item.h
sql/item.h
+7
-0
No files found.
mysql-test/r/bigint.result
View file @
00a560c7
...
...
@@ -87,3 +87,42 @@ drop table t1;
SELECT '0x8000000000000001'+0;
'0x8000000000000001'+0
0
create table t1 (
value64 bigint unsigned not null,
value32 integer not null,
primary key(value64, value32)
);
create table t2 (
value64 bigint unsigned not null,
value32 integer not null,
primary key(value64, value32)
);
insert into t1 values(17156792991891826145, 1);
insert into t1 values( 9223372036854775807, 2);
insert into t2 values(17156792991891826145, 3);
insert into t2 values( 9223372036854775807, 4);
select * from t1;
value64 value32
9223372036854775807 2
17156792991891826145 1
select * from t2;
value64 value32
9223372036854775807 4
17156792991891826145 3
select * from t1, t2 where t1.value64=17156792991891826145 and
t2.value64=17156792991891826145;
value64 value32 value64 value32
17156792991891826145 1 17156792991891826145 3
select * from t1, t2 where t1.value64=17156792991891826145 and
t2.value64=t1.value64;
value64 value32 value64 value32
17156792991891826145 1 17156792991891826145 3
select * from t1, t2 where t1.value64= 9223372036854775807 and
t2.value64=9223372036854775807;
value64 value32 value64 value32
9223372036854775807 2 9223372036854775807 4
select * from t1, t2 where t1.value64= 9223372036854775807 and
t2.value64=t1.value64;
value64 value32 value64 value32
9223372036854775807 2 9223372036854775807 4
drop table t1, t2;
mysql-test/t/bigint.test
View file @
00a560c7
...
...
@@ -71,3 +71,36 @@ drop table t1;
# atof() behaviour is different of different systems. to be fixed in 4.1
SELECT
'0x8000000000000001'
+
0
;
# Test for BUG#8562: joins over BIGINT UNSIGNED value + constant propagation
create
table
t1
(
value64
bigint
unsigned
not
null
,
value32
integer
not
null
,
primary
key
(
value64
,
value32
)
);
create
table
t2
(
value64
bigint
unsigned
not
null
,
value32
integer
not
null
,
primary
key
(
value64
,
value32
)
);
insert
into
t1
values
(
17156792991891826145
,
1
);
insert
into
t1
values
(
9223372036854775807
,
2
);
insert
into
t2
values
(
17156792991891826145
,
3
);
insert
into
t2
values
(
9223372036854775807
,
4
);
select
*
from
t1
;
select
*
from
t2
;
select
*
from
t1
,
t2
where
t1
.
value64
=
17156792991891826145
and
t2
.
value64
=
17156792991891826145
;
select
*
from
t1
,
t2
where
t1
.
value64
=
17156792991891826145
and
t2
.
value64
=
t1
.
value64
;
select
*
from
t1
,
t2
where
t1
.
value64
=
9223372036854775807
and
t2
.
value64
=
9223372036854775807
;
select
*
from
t1
,
t2
where
t1
.
value64
=
9223372036854775807
and
t2
.
value64
=
t1
.
value64
;
drop
table
t1
,
t2
;
sql/item.h
View file @
00a560c7
...
...
@@ -997,6 +997,8 @@ public:
The following class is used to optimize comparing of date and bigint columns
We need to save the original item, to be able to set the field to the
original value in 'opt_range'.
An instance of Item_int_with_ref may refer to a signed or an unsigned
integer.
*/
class
Item_int_with_ref
:
public
Item_int
...
...
@@ -1011,6 +1013,11 @@ public:
{
return
ref
->
save_in_field
(
field
,
no_conversions
);
}
Item
*
new_item
()
{
return
(
ref
->
unsigned_flag
)
?
new
Item_uint
(
ref
->
name
,
ref
->
max_length
)
:
new
Item_int
(
ref
->
name
,
ref
->
max_length
);
}
};
...
...
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