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
592d8f8d
Commit
592d8f8d
authored
Jun 06, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b10539
parents
417447ae
44a20071
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
mysql-test/r/type_bit.result
mysql-test/r/type_bit.result
+8
-0
mysql-test/t/type_bit.test
mysql-test/t/type_bit.test
+9
-0
sql/field.cc
sql/field.cc
+3
-2
No files found.
mysql-test/r/type_bit.result
View file @
592d8f8d
...
...
@@ -458,3 +458,11 @@ select h from t1;
h
a
drop table t1;
create table t1 (a bit(8)) engine=heap;
insert into t1 values ('1111100000');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
select a+0 from t1;
a+0
255
drop table t1;
mysql-test/t/type_bit.test
View file @
592d8f8d
...
...
@@ -162,3 +162,12 @@ create table t1 (a int, b time, c tinyint, d bool, e char(10), f bit(1),
insert
into
t1
set
a
=
1
;
select
h
from
t1
;
drop
table
t1
;
#
# Bug #10539
#
create
table
t1
(
a
bit
(
8
))
engine
=
heap
;
insert
into
t1
values
(
'1111100000'
);
select
a
+
0
from
t1
;
drop
table
t1
;
sql/field.cc
View file @
592d8f8d
...
...
@@ -7835,7 +7835,7 @@ int Field_bit::store(const char *from, uint length, CHARSET_INFO *cs)
int
Field_bit
::
store
(
double
nr
)
{
return
(
Field_bit
::
store
((
longlong
)
nr
)
);
return
store
((
longlong
)
nr
);
}
...
...
@@ -8018,6 +8018,7 @@ int Field_bit_as_char::store(const char *from, uint length, CHARSET_INFO *cs)
(
delta
==
0
&&
bits
&&
(
uint
)
(
uchar
)
*
from
>=
(
uint
)
(
1
<<
bits
)))
{
memset
(
ptr
,
0xff
,
field_length
);
if
(
bits
)
*
ptr
&=
((
1
<<
bits
)
-
1
);
/* set first byte */
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_WARN_DATA_OUT_OF_RANGE
,
1
);
return
1
;
...
...
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