mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint sql/item_strfunc.cc: Auto merged
This commit is contained in:
commit
65fc58524f
3 changed files with 39 additions and 1 deletions
|
|
@ -2251,8 +2251,10 @@ String *Item_func_repeat::val_str(String *str)
|
|||
if (args[0]->null_value || args[1]->null_value)
|
||||
goto err; // string and/or delim are null
|
||||
null_value= 0;
|
||||
if ((count <= 0) && !args[1]->unsigned_flag) // For nicer SQL code
|
||||
|
||||
if (count == 0 || count < 0 && !args[1]->unsigned_flag)
|
||||
return &my_empty_string;
|
||||
|
||||
/* Assumes that the maximum length of a String is < INT_MAX32. */
|
||||
/* Bounds check on count: If this is triggered, we will error. */
|
||||
if ((ulonglong) count > INT_MAX32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue