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
e1cb8679
Commit
e1cb8679
authored
Nov 29, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixesd that wrong charset were used
parent
24cf562e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
sql/item.cc
sql/item.cc
+3
-5
No files found.
sql/item.cc
View file @
e1cb8679
...
@@ -775,7 +775,7 @@ int Item::save_in_field(Field *field)
...
@@ -775,7 +775,7 @@ int Item::save_in_field(Field *field)
field
->
result_type
()
==
STRING_RESULT
)
field
->
result_type
()
==
STRING_RESULT
)
{
{
String
*
result
;
String
*
result
;
CHARSET_INFO
*
cs
=
field
->
charset
();
CHARSET_INFO
*
cs
=
charset
();
char
buff
[
MAX_FIELD_WIDTH
];
// Alloc buffer for small columns
char
buff
[
MAX_FIELD_WIDTH
];
// Alloc buffer for small columns
str_value
.
set_quick
(
buff
,
sizeof
(
buff
),
cs
);
str_value
.
set_quick
(
buff
,
sizeof
(
buff
),
cs
);
result
=
val_str
(
&
str_value
);
result
=
val_str
(
&
str_value
);
...
@@ -807,12 +807,11 @@ int Item::save_in_field(Field *field)
...
@@ -807,12 +807,11 @@ int Item::save_in_field(Field *field)
int
Item_string
::
save_in_field
(
Field
*
field
)
int
Item_string
::
save_in_field
(
Field
*
field
)
{
{
String
*
result
;
String
*
result
;
CHARSET_INFO
*
cs
=
field
->
charset
();
result
=
val_str
(
&
str_value
);
result
=
val_str
(
&
str_value
);
if
(
null_value
)
if
(
null_value
)
return
set_field_to_null
(
field
);
return
set_field_to_null
(
field
);
field
->
set_notnull
();
field
->
set_notnull
();
return
(
field
->
store
(
result
->
ptr
(),
result
->
length
(),
c
s
))
?
-
1
:
0
;
return
(
field
->
store
(
result
->
ptr
(),
result
->
length
(),
c
harset
()
))
?
-
1
:
0
;
}
}
int
Item_int
::
save_in_field
(
Field
*
field
)
int
Item_int
::
save_in_field
(
Field
*
field
)
...
@@ -880,11 +879,10 @@ longlong Item_varbinary::val_int()
...
@@ -880,11 +879,10 @@ longlong Item_varbinary::val_int()
int
Item_varbinary
::
save_in_field
(
Field
*
field
)
int
Item_varbinary
::
save_in_field
(
Field
*
field
)
{
{
int
error
;
int
error
;
CHARSET_INFO
*
cs
=
field
->
charset
();
field
->
set_notnull
();
field
->
set_notnull
();
if
(
field
->
result_type
()
==
STRING_RESULT
)
if
(
field
->
result_type
()
==
STRING_RESULT
)
{
{
error
=
field
->
store
(
str_value
.
ptr
(),
str_value
.
length
(),
c
s
);
error
=
field
->
store
(
str_value
.
ptr
(),
str_value
.
length
(),
c
harset
()
);
}
}
else
else
{
{
...
...
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