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
164397e7
Commit
164397e7
authored
Mar 28, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my51-bug25197
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents
631476e1
bed4cb75
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+9
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+4
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
No files found.
mysql-test/r/func_str.result
View file @
164397e7
...
@@ -2297,6 +2297,15 @@ A B tire
...
@@ -2297,6 +2297,15 @@ A B tire
0
0
# # 1
# # 1
## ## 2
## ## 2
SELECT REPEAT('0', CAST(0 AS UNSIGNED));
REPEAT('0', CAST(0 AS UNSIGNED))
SELECT REPEAT('0', -2);
REPEAT('0', -2)
SELECT REPEAT('0', 2);
REPEAT('0', 2)
00
DROP TABLE t1;
DROP TABLE t1;
SELECT UNHEX('G');
SELECT UNHEX('G');
UNHEX('G')
UNHEX('G')
...
...
mysql-test/t/func_str.test
View file @
164397e7
...
@@ -1145,6 +1145,10 @@ INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2);
...
@@ -1145,6 +1145,10 @@ INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2);
SELECT
REPEAT
(
'#'
,
tire
)
AS
A
,
SELECT
REPEAT
(
'#'
,
tire
)
AS
A
,
REPEAT
(
'#'
,
tire
%
999
)
AS
B
,
tire
FROM
`t1`
;
REPEAT
(
'#'
,
tire
%
999
)
AS
B
,
tire
FROM
`t1`
;
SELECT
REPEAT
(
'0'
,
CAST
(
0
AS
UNSIGNED
));
SELECT
REPEAT
(
'0'
,
-
2
);
SELECT
REPEAT
(
'0'
,
2
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
#
...
...
sql/item_strfunc.cc
View file @
164397e7
...
@@ -2271,7 +2271,7 @@ String *Item_func_repeat::val_str(String *str)
...
@@ -2271,7 +2271,7 @@ String *Item_func_repeat::val_str(String *str)
goto
err
;
// string and/or delim are null
goto
err
;
// string and/or delim are null
null_value
=
0
;
null_value
=
0
;
if
(
count
==
0
||
count
<
0
&&
!
args
[
1
]
->
unsigned_flag
)
if
(
count
<=
0
&&
(
count
==
0
||
!
args
[
1
]
->
unsigned_flag
)
)
return
&
my_empty_string
;
return
&
my_empty_string
;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
...
...
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