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
19616945
Commit
19616945
authored
Jun 22, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style fixes
parent
892d859f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
36 deletions
+35
-36
sql/item.cc
sql/item.cc
+35
-36
No files found.
sql/item.cc
View file @
19616945
...
@@ -756,43 +756,42 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
...
@@ -756,43 +756,42 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
if
(
entry
&&
entry
->
value
)
if
(
entry
&&
entry
->
value
)
{
{
item_result_type
=
entry
->
type
;
item_result_type
=
entry
->
type
;
switch
(
entry
->
type
)
switch
(
entry
->
type
)
{
case
REAL_RESULT
:
set_double
(
*
(
double
*
)
entry
->
value
);
break
;
case
INT_RESULT
:
set_int
(
*
(
longlong
*
)
entry
->
value
,
21
);
break
;
case
STRING_RESULT
:
{
{
case
REAL_RESULT
:
CHARSET_INFO
*
fromcs
=
entry
->
collation
.
collation
;
set_double
(
*
(
double
*
)
entry
->
value
);
CHARSET_INFO
*
tocs
=
thd
->
variables
.
collation_connection
;
break
;
uint32
dummy_offset
;
case
INT_RESULT
:
set_int
(
*
(
longlong
*
)
entry
->
value
,
21
);
value
.
cs_info
.
character_set_client
=
fromcs
;
break
;
/*
case
STRING_RESULT
:
Setup source and destination character sets so that they
{
are different only if conversion is necessary: this will
CHARSET_INFO
*
fromcs
=
entry
->
collation
.
collation
;
make later checks easier.
CHARSET_INFO
*
tocs
=
thd
->
variables
.
collation_connection
;
*/
uint32
dummy_offset
;
value
.
cs_info
.
final_character_set_of_str_value
=
String
::
needs_conversion
(
0
,
fromcs
,
tocs
,
&
dummy_offset
)
?
value
.
cs_info
.
character_set_client
=
fromcs
;
tocs
:
fromcs
;
/*
/*
Setup source and destination character sets so that they
Exact value of max_length is not known unless data is converted to
are different only if conversion is necessary: this will
charset of connection, so we have to set it later.
make later checks easier.
*/
*/
item_type
=
Item
::
STRING_ITEM
;
value
.
cs_info
.
final_character_set_of_str_value
=
item_result_type
=
STRING_RESULT
;
String
::
needs_conversion
(
0
,
fromcs
,
tocs
,
&
dummy_offset
)
?
tocs
:
fromcs
;
if
(
set_str
((
const
char
*
)
entry
->
value
,
entry
->
length
))
/*
DBUG_RETURN
(
1
);
Exact value of max_length is not known unless data is converted to
break
;
charset of connection, so we have to set it later.
}
*/
default:
item_type
=
Item
::
STRING_ITEM
;
DBUG_ASSERT
(
0
);
item_result_type
=
STRING_RESULT
;
set_null
();
if
(
set_str
((
const
char
*
)
entry
->
value
,
entry
->
length
))
DBUG_RETURN
(
1
);
}
break
;
default:
DBUG_ASSERT
(
0
);
set_null
();
}
}
}
}
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