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
8c5be6a2
Commit
8c5be6a2
authored
Mar 28, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
parents
2600dade
171e91f1
Changes
3
Hide 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 @
8c5be6a2
...
...
@@ -1964,6 +1964,15 @@ A B tire
0
# # 1
## ## 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;
SELECT UNHEX('G');
UNHEX('G')
...
...
mysql-test/t/func_str.test
View file @
8c5be6a2
...
...
@@ -1038,6 +1038,10 @@ INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2);
SELECT
REPEAT
(
'#'
,
tire
)
AS
A
,
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
;
#
...
...
sql/item_strfunc.cc
View file @
8c5be6a2
...
...
@@ -2242,7 +2242,7 @@ String *Item_func_repeat::val_str(String *str)
goto
err
;
// string and/or delim are null
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
;
/* 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