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

Method cmp

sql/item_cmpfunc.cc:970–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968}
969
970int cmp_item_row::cmp(Item *arg)
971{
972 arg->null_value= 0;
973 if (arg->cols() != n)
974 {
975 my_error(ER_OPERAND_COLUMNS, MYF(0), n);
976 return 1;
977 }
978 bool was_null= 0;
979 arg->bring_value();
980 for (uint i=0; i < n; i++)
981 {
982 if (comparators[i]->cmp(arg->element_index(i)))
983 {
984 if (!arg->element_index(i)->null_value)
985 return 1;
986 was_null= 1;
987 }
988 }
989 return (arg->null_value= was_null);
990}
991
992
993int cmp_item_row::compare(cmp_item *c)

Callers

nothing calls this directly

Calls 5

my_errorFunction · 0.85
get_datetime_valueFunction · 0.85
colsMethod · 0.45
bring_valueMethod · 0.45
element_indexMethod · 0.45

Tested by

no test coverage detected