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
aedd6004
Commit
aedd6004
authored
Jan 01, 2003
by
ram@mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for QUOTE() function.
parent
c7a02249
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+3
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
No files found.
mysql-test/r/func_str.result
View file @
aedd6004
...
...
@@ -170,6 +170,9 @@ quote(concat('abc\'', '\\cba'))
select quote(1/0), quote('\0\Z');
quote(1/0) quote('\0\Z')
NULL '\0\Z'
select length(quote(concat(char(0), "test")));
length(quote(concat(char(0), "test")))
8
select reverse("");
reverse("")
...
...
mysql-test/t/func_str.test
View file @
aedd6004
...
...
@@ -69,7 +69,7 @@ select decode(encode("abcdef","monty"),"monty")="abcdef";
select
quote
(
'\'\"\\test'
);
select
quote
(
concat
(
'abc\''
,
'\\cba'
));
select
quote
(
1
/
0
),
quote
(
'\0\Z'
);
select
length
(
quote
(
concat
(
char
(
0
),
"test"
)));
#
# Wrong usage of functions
#
...
...
sql/item_strfunc.cc
View file @
aedd6004
...
...
@@ -2398,7 +2398,7 @@ String *Item_func_quote::val_str(String *str)
*/
to
=
(
char
*
)
str
->
ptr
()
+
new_length
-
1
;
*
to
--=
'\''
;
for
(
start
=
(
char
*
)
arg
->
ptr
()
;
end
--
!=
start
;
to
--
)
for
(
start
=
(
char
*
)
arg
->
ptr
()
,
end
=
start
+
arg_length
;
end
--
!=
start
;
to
--
)
{
/*
We can't use the bitmask here as we want to replace \O and ^Z with 0
...
...
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