142
142
switch (cmp_type) {
145
int64_t nr=val_int();
148
str->set_int(nr, unsigned_flag, &my_charset_bin);
145
int64_t nr=val_int();
148
str->set_int(nr, unsigned_flag, &my_charset_bin);
151
152
case DECIMAL_RESULT:
153
my_decimal dec_buf, *dec_val= val_decimal(&dec_buf);
156
my_decimal2string(E_DEC_FATAL_ERROR, dec_val, 0, 0, 0, str);
154
my_decimal dec_buf, *dec_val= val_decimal(&dec_buf);
157
my_decimal2string(E_DEC_FATAL_ERROR, dec_val, 0, 0, 0, str);
159
161
case REAL_RESULT:
161
double nr= val_real();
164
str->set_real(nr,decimals,&my_charset_bin);
163
double nr= val_real();
166
str->set_real(nr,decimals,&my_charset_bin);
167
170
case STRING_RESULT:
171
for (uint32_t i=0; i < arg_count ; i++)
174
res=args[i]->val_str(str);
174
for (uint32_t i=0; i < arg_count ; i++)
178
res2= args[i]->val_str(res == str ? &tmp_value : str);
181
int cmp= sortcmp(res,res2,collation.collation);
182
if ((cmp_sign < 0 ? cmp : -cmp) < 0)
177
res=args[i]->val_str(str);
181
res2= args[i]->val_str(res == str ? &tmp_value : str);
184
int cmp= sortcmp(res,res2,collation.collation);
185
if ((cmp_sign < 0 ? cmp : -cmp) < 0)
189
if ((null_value= args[i]->null_value))
186
if ((null_value= args[i]->null_value))
192
res->set_charset(collation.collation);
189
res->set_charset(collation.collation);
194
197
// This case should never be chosen
198
202
return 0; // Keep compiler happy