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
0fbf3ab7
Commit
0fbf3ab7
authored
Jun 22, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-root
parents
3d97bb6d
f2dc44d4
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 @
0fbf3ab7
...
...
@@ -756,43 +756,42 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry)
if
(
entry
&&
entry
->
value
)
{
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
:
set_double
(
*
(
double
*
)
entry
->
value
);
break
;
case
INT_RESULT
:
set_int
(
*
(
longlong
*
)
entry
->
value
,
21
);
break
;
case
STRING_RESULT
:
{
CHARSET_INFO
*
fromcs
=
entry
->
collation
.
collation
;
CHARSET_INFO
*
tocs
=
thd
->
variables
.
collation_connection
;
uint32
dummy_offset
;
value
.
cs_info
.
character_set_client
=
fromcs
;
/*
Setup source and destination character sets so that they
are different only if conversion is necessary: this will
make later checks easier.
*/
value
.
cs_info
.
final_character_set_of_str_value
=
String
::
needs_conversion
(
0
,
fromcs
,
tocs
,
&
dummy_offset
)
?
tocs
:
fromcs
;
/*
Exact value of max_length is not known unless data is converted to
charset of connection, so we have to set it later.
*/
item_type
=
Item
::
STRING_ITEM
;
item_result_type
=
STRING_RESULT
;
if
(
set_str
((
const
char
*
)
entry
->
value
,
entry
->
length
))
DBUG_RETURN
(
1
);
}
break
;
default:
DBUG_ASSERT
(
0
);
set_null
();
CHARSET_INFO
*
fromcs
=
entry
->
collation
.
collation
;
CHARSET_INFO
*
tocs
=
thd
->
variables
.
collation_connection
;
uint32
dummy_offset
;
value
.
cs_info
.
character_set_client
=
fromcs
;
/*
Setup source and destination character sets so that they
are different only if conversion is necessary: this will
make later checks easier.
*/
value
.
cs_info
.
final_character_set_of_str_value
=
String
::
needs_conversion
(
0
,
fromcs
,
tocs
,
&
dummy_offset
)
?
tocs
:
fromcs
;
/*
Exact value of max_length is not known unless data is converted to
charset of connection, so we have to set it later.
*/
item_type
=
Item
::
STRING_ITEM
;
item_result_type
=
STRING_RESULT
;
if
(
set_str
((
const
char
*
)
entry
->
value
,
entry
->
length
))
DBUG_RETURN
(
1
);
break
;
}
default:
DBUG_ASSERT
(
0
);
set_null
();
}
}
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