A fix. "(int) var" type cast doesn't work correctly for uint32 var
on some 64-bit platforms (e.g. IRIX, non-debug build).
This commit is contained in:
parent
f7512e756f
commit
9a042c81e7
@ -1645,7 +1645,8 @@ String *Item_func_format::val_str(String *str)
|
|||||||
{
|
{
|
||||||
DBUG_ASSERT(fixed == 1);
|
DBUG_ASSERT(fixed == 1);
|
||||||
double nr =args[0]->val();
|
double nr =args[0]->val();
|
||||||
uint32 diff,length,str_length;
|
int diff;
|
||||||
|
uint32 length, str_length;
|
||||||
uint dec;
|
uint dec;
|
||||||
if ((null_value=args[0]->null_value))
|
if ((null_value=args[0]->null_value))
|
||||||
return 0; /* purecov: inspected */
|
return 0; /* purecov: inspected */
|
||||||
@ -1670,9 +1671,12 @@ String *Item_func_format::val_str(String *str)
|
|||||||
pos[0]= pos[-(int) diff];
|
pos[0]= pos[-(int) diff];
|
||||||
while (diff)
|
while (diff)
|
||||||
{
|
{
|
||||||
pos[0]=pos[-(int) diff]; pos--;
|
*pos= *(pos - diff);
|
||||||
pos[0]=pos[-(int) diff]; pos--;
|
pos--;
|
||||||
pos[0]=pos[-(int) diff]; pos--;
|
*pos= *(pos - diff);
|
||||||
|
pos--;
|
||||||
|
*pos= *(pos - diff);
|
||||||
|
pos--;
|
||||||
pos[0]=',';
|
pos[0]=',';
|
||||||
pos--;
|
pos--;
|
||||||
diff--;
|
diff--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user