MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / compare_decimal

Method compare_decimal

sql/item_cmpfunc.cc:448–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448int Arg_comparator::compare_decimal()
449{
450 my_decimal decimal1;
451 my_decimal *val1= (*a)->val_decimal(&decimal1);
452 if (!(*a)->null_value)
453 {
454 my_decimal decimal2;
455 my_decimal *val2= (*b)->val_decimal(&decimal2);
456 if (!(*b)->null_value)
457 {
458 if (set_null)
459 owner->null_value= 0;
460 return my_decimal_cmp(val1, val2);
461 }
462 }
463 if (set_null)
464 owner->null_value= 1;
465 return -1;
466}
467
468int Arg_comparator::compare_e_real()
469{

Callers

nothing calls this directly

Calls 2

my_decimal_cmpFunction · 0.85
val_decimalMethod · 0.45

Tested by

no test coverage detected