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
2f040528
Commit
2f040528
authored
Oct 03, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
parents
55badb12
f0cd4a83
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
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
+8
-0
sql/field.cc
sql/field.cc
+1
-1
No files found.
mysql-test/r/type_bit.result
View file @
2f040528
...
@@ -602,4 +602,12 @@ NULL NULL
...
@@ -602,4 +602,12 @@ NULL NULL
0 0
0 0
11111111 11111111
11111111 11111111
drop table bug15583;
drop table bug15583;
create table t1(a bit(1), b smallint unsigned);
insert into t1 (b, a) values ('2', '1');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
select hex(a), b from t1;
hex(a) b
1 2
drop table t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/type_bit.test
View file @
2f040528
...
@@ -252,5 +252,13 @@ select hex(b + 0), bin(b + 0), oct(b + 0), hex(n), bin(n), oct(n) from bug15583;
...
@@ -252,5 +252,13 @@ select hex(b + 0), bin(b + 0), oct(b + 0), hex(n), bin(n), oct(n) from bug15583;
select
conv
(
b
,
10
,
2
),
conv
(
b
+
0
,
10
,
2
)
from
bug15583
;
select
conv
(
b
,
10
,
2
),
conv
(
b
+
0
,
10
,
2
)
from
bug15583
;
drop
table
bug15583
;
drop
table
bug15583
;
#
# Bug #22271: data casting may affect data stored in the next column(s?)
#
create
table
t1
(
a
bit
(
1
),
b
smallint
unsigned
);
insert
into
t1
(
b
,
a
)
values
(
'2'
,
'1'
);
select
hex
(
a
),
b
from
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
sql/field.cc
View file @
2f040528
...
@@ -7933,7 +7933,7 @@ int Field_bit::store(const char *from, uint length, CHARSET_INFO *cs)
...
@@ -7933,7 +7933,7 @@ int Field_bit::store(const char *from, uint length, CHARSET_INFO *cs)
(
delta
==
-
1
&&
(
uchar
)
*
from
>
((
1
<<
bit_len
)
-
1
))
||
(
delta
==
-
1
&&
(
uchar
)
*
from
>
((
1
<<
bit_len
)
-
1
))
||
(
!
bit_len
&&
delta
<
0
))
(
!
bit_len
&&
delta
<
0
))
{
{
set_rec_bits
(
0xff
,
bit_ptr
,
bit_ofs
,
bit_len
);
set_rec_bits
(
(
1
<<
bit_len
)
-
1
,
bit_ptr
,
bit_ofs
,
bit_len
);
memset
(
ptr
,
0xff
,
bytes_in_rec
);
memset
(
ptr
,
0xff
,
bytes_in_rec
);
if
(
table
->
in_use
->
really_abort_on_warning
())
if
(
table
->
in_use
->
really_abort_on_warning
())
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_DATA_TOO_LONG
,
1
);
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_DATA_TOO_LONG
,
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