Commit 1fadf097 authored by unknown's avatar unknown

small addition to fix of truncating in replace


sql/item_strfunc.cc:
  uint is better here
parent d93df08b
......@@ -813,7 +813,7 @@ void Item_func_replace::fix_length_and_dec()
int diff=(int) (args[2]->max_length - args[1]->max_length);
if (diff > 0 && args[1]->max_length)
{ // Calculate of maxreplaces
int max_substrs= max_length/args[1]->max_length;
uint max_substrs= max_length/args[1]->max_length;
max_length+= max_substrs*(uint) diff;
}
if (max_length > MAX_BLOB_WIDTH)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment