mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 04:05:32 +02:00
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint mysql-test/r/func_str.result: Auto merged mysql-test/t/func_str.test: Auto merged sql/item_strfunc.cc: Auto merged
This commit is contained in:
commit
031e62ecee
3 changed files with 39 additions and 1 deletions
|
|
@ -2274,8 +2274,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