| 372 | */ |
| 373 | |
| 374 | int Arg_comparator::compare_binary_string() |
| 375 | { |
| 376 | String *res1,*res2; |
| 377 | if ((res1= (*a)->val_str(&value1))) |
| 378 | { |
| 379 | if ((res2= (*b)->val_str(&value2))) |
| 380 | { |
| 381 | if (set_null) |
| 382 | owner->null_value= 0; |
| 383 | uint res1_length= res1->length(); |
| 384 | uint res2_length= res2->length(); |
| 385 | int cmp= memcmp(res1->ptr(), res2->ptr(), min(res1_length,res2_length)); |
| 386 | return cmp ? cmp : (int) (res1_length - res2_length); |
| 387 | } |
| 388 | } |
| 389 | if (set_null) |
| 390 | owner->null_value= 1; |
| 391 | return -1; |
| 392 | } |
| 393 | |
| 394 | |
| 395 | /** |