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
ebc68a17
Commit
ebc68a17
authored
Jan 09, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.0-opt
parents
5cd4ba4e
ac48c8ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
mysql-test/r/type_binary.result
mysql-test/r/type_binary.result
+9
-0
mysql-test/t/type_binary.test
mysql-test/t/type_binary.test
+8
-0
sql/field.h
sql/field.h
+2
-1
No files found.
mysql-test/r/type_binary.result
View file @
ebc68a17
...
...
@@ -136,4 +136,13 @@ insert into t1 values(NULL, 0x412020);
ERROR 22001: Data too long for column 'vb' at row 1
drop table t1;
set @@sql_mode= @old_sql_mode;
create table t1(f1 int, f2 binary(2) not null, f3 char(2) not null);
insert into t1 set f1=1;
Warnings:
Warning 1364 Field 'f2' doesn't have a default value
Warning 1364 Field 'f3' doesn't have a default value
select hex(f2), hex(f3) from t1;
hex(f2) hex(f3)
0000
drop table t1;
End of 5.0 tests
mysql-test/t/type_binary.test
View file @
ebc68a17
...
...
@@ -91,4 +91,12 @@ insert into t1 values(NULL, 0x412020);
drop
table
t1
;
set
@@
sql_mode
=
@
old_sql_mode
;
#
# Bug#14171: Wrong default value for a BINARY field
#
create
table
t1
(
f1
int
,
f2
binary
(
2
)
not
null
,
f3
char
(
2
)
not
null
);
insert
into
t1
set
f1
=
1
;
select
hex
(
f2
),
hex
(
f3
)
from
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
sql/field.h
View file @
ebc68a17
...
...
@@ -1034,7 +1034,8 @@ class Field_string :public Field_longstr {
bool
zero_pack
()
const
{
return
0
;
}
int
reset
(
void
)
{
charset
()
->
cset
->
fill
(
charset
(),
ptr
,
field_length
,
' '
);
charset
()
->
cset
->
fill
(
charset
(),
ptr
,
field_length
,
(
has_charset
()
?
' '
:
0
));
return
0
;
}
int
store
(
const
char
*
to
,
uint
length
,
CHARSET_INFO
*
charset
);
...
...
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