66
66
String *Item_func_rpad::val_str(String *str)
69
70
uint32_t res_byte_length,res_char_length,pad_char_length,pad_byte_length;
72
72
/* must be int64_t to avoid truncation */
73
73
int64_t count= args[1]->val_int();
75
74
String *res= args[0]->val_str(str);
76
75
String *rpad= args[2]->val_str(&rpad_str);
82
79
/* Assumes that the maximum length of a String is < INT32_MAX. */
83
80
/* Set here so that rest of code sees out-of-bound value as such. */
84
81
if ((uint64_t) count > INT32_MAX)