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
b4a723e4
Commit
b4a723e4
authored
Jul 16, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post merge changes: added safe_charset_converter to other static functions
parent
8aad35f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
sql/item.cc
sql/item.cc
+32
-0
sql/item.h
sql/item.h
+2
-0
No files found.
sql/item.cc
View file @
b4a723e4
...
@@ -638,6 +638,38 @@ Item *Item_num::safe_charset_converter(CHARSET_INFO *tocs)
...
@@ -638,6 +638,38 @@ Item *Item_num::safe_charset_converter(CHARSET_INFO *tocs)
}
}
Item
*
Item_static_int_func
::
safe_charset_converter
(
CHARSET_INFO
*
tocs
)
{
Item_string
*
conv
;
char
buf
[
64
];
String
*
s
,
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
s
=
val_str
(
&
tmp
);
if
((
conv
=
new
Item_static_string_func
(
func_name
,
s
->
ptr
(),
s
->
length
(),
s
->
charset
())))
{
conv
->
str_value
.
copy
();
conv
->
str_value
.
mark_as_const
();
}
return
conv
;
}
Item
*
Item_static_float_func
::
safe_charset_converter
(
CHARSET_INFO
*
tocs
)
{
Item_string
*
conv
;
char
buf
[
64
];
String
*
s
,
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
s
=
val_str
(
&
tmp
);
if
((
conv
=
new
Item_static_string_func
(
func_name
,
s
->
ptr
(),
s
->
length
(),
s
->
charset
())))
{
conv
->
str_value
.
copy
();
conv
->
str_value
.
mark_as_const
();
}
return
conv
;
}
Item
*
Item_string
::
safe_charset_converter
(
CHARSET_INFO
*
tocs
)
Item
*
Item_string
::
safe_charset_converter
(
CHARSET_INFO
*
tocs
)
{
{
Item_string
*
conv
;
Item_string
*
conv
;
...
...
sql/item.h
View file @
b4a723e4
...
@@ -1132,6 +1132,7 @@ class Item_static_int_func :public Item_int
...
@@ -1132,6 +1132,7 @@ class Item_static_int_func :public Item_int
Item_static_int_func
(
const
char
*
str_arg
,
longlong
i
,
uint
length
)
Item_static_int_func
(
const
char
*
str_arg
,
longlong
i
,
uint
length
)
:
Item_int
(
NullS
,
i
,
length
),
func_name
(
str_arg
)
:
Item_int
(
NullS
,
i
,
length
),
func_name
(
str_arg
)
{}
{}
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
};
};
...
@@ -1242,6 +1243,7 @@ class Item_static_float_func :public Item_float
...
@@ -1242,6 +1243,7 @@ class Item_static_float_func :public Item_float
:
Item_float
(
NullS
,
val_arg
,
decimal_par
,
length
),
func_name
(
str
)
:
Item_float
(
NullS
,
val_arg
,
decimal_par
,
length
),
func_name
(
str
)
{}
{}
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
void
print
(
String
*
str
)
{
str
->
append
(
func_name
);
}
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
};
};
...
...
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