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
1263105c
Commit
1263105c
authored
Nov 28, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.0.param
parents
8d6811de
4ac260ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
sql/item.cc
sql/item.cc
+10
-16
sql/item.h
sql/item.h
+4
-0
No files found.
sql/item.cc
View file @
1263105c
...
@@ -700,23 +700,15 @@ Item *Item_param::safe_charset_converter(CHARSET_INFO *tocs)
...
@@ -700,23 +700,15 @@ Item *Item_param::safe_charset_converter(CHARSET_INFO *tocs)
{
{
if
(
const_item
())
if
(
const_item
())
{
{
Item_string
*
conv
;
uint
cnv_errors
;
uint
cnv_errors
;
char
buf
[
MAX_FIELD_WIDTH
];
String
*
ostr
=
val_str
(
&
cnvstr
);
String
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
cnvitem
->
str_value
.
copy
(
ostr
->
ptr
(),
ostr
->
length
(),
String
cstr
,
*
ostr
=
val_str
(
&
tmp
);
ostr
->
charset
(),
tocs
,
&
cnv_errors
);
/*
if
(
cnv_errors
)
As safe_charset_converter is not executed for
return
NULL
;
a parameter bound to NULL, ostr should never be 0.
cnvitem
->
str_value
.
mark_as_const
();
*/
cnvitem
->
max_length
=
cnvitem
->
str_value
.
numchars
()
*
tocs
->
mbmaxlen
;
cstr
.
copy
(
ostr
->
ptr
(),
ostr
->
length
(),
ostr
->
charset
(),
tocs
,
&
cnv_errors
);
return
cnvitem
;
if
(
cnv_errors
||
!
(
conv
=
new
Item_string
(
cstr
.
ptr
(),
cstr
.
length
(),
cstr
.
charset
(),
collation
.
derivation
)))
return
NULL
;
conv
->
str_value
.
copy
();
conv
->
str_value
.
mark_as_const
();
return
conv
;
}
}
return
NULL
;
return
NULL
;
}
}
...
@@ -2104,6 +2096,8 @@ Item_param::Item_param(unsigned pos_in_query_arg) :
...
@@ -2104,6 +2096,8 @@ Item_param::Item_param(unsigned pos_in_query_arg) :
value is set.
value is set.
*/
*/
maybe_null
=
1
;
maybe_null
=
1
;
cnvitem
=
new
Item_string
(
""
,
0
,
&
my_charset_bin
,
DERIVATION_COERCIBLE
);
cnvstr
.
set
(
cnvbuf
,
sizeof
(
cnvbuf
),
&
my_charset_bin
);
}
}
...
...
sql/item.h
View file @
1263105c
...
@@ -1084,7 +1084,11 @@ public:
...
@@ -1084,7 +1084,11 @@ public:
class
Item_param
:
public
Item
class
Item_param
:
public
Item
{
{
char
cnvbuf
[
MAX_FIELD_WIDTH
];
String
cnvstr
;
Item
*
cnvitem
;
public:
public:
enum
enum_item_param_state
enum
enum_item_param_state
{
{
NO_VALUE
,
NULL_VALUE
,
INT_VALUE
,
REAL_VALUE
,
NO_VALUE
,
NULL_VALUE
,
INT_VALUE
,
REAL_VALUE
,
...
...
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