MCPcopy Create free account
hub / github.com/MariaDB/server / check_pushable_cond

Method check_pushable_cond

sql/item.cc:8138–8166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8136*/
8137
8138void Item::check_pushable_cond(Pushdown_checker checker, uchar *arg)
8139{
8140 clear_extraction_flag();
8141 if (type() == Item::COND_ITEM)
8142 {
8143 bool and_cond= ((Item_cond*) this)->functype() == Item_func::COND_AND_FUNC;
8144 List_iterator<Item> li(*((Item_cond*) this)->argument_list());
8145 uint count= 0;
8146 Item *item;
8147 while ((item=li++))
8148 {
8149 item->check_pushable_cond(checker, arg);
8150 if (item->get_extraction_flag() != MARKER_NO_EXTRACTION)
8151 count++;
8152 else if (!and_cond)
8153 break;
8154 }
8155 if ((and_cond && count == 0) || item)
8156 {
8157 set_extraction_flag(MARKER_NO_EXTRACTION);
8158 if (and_cond)
8159 li.rewind();
8160 while ((item= li++))
8161 item->clear_extraction_flag();
8162 }
8163 }
8164 else if (!((this->*checker) (arg)))
8165 set_extraction_flag(MARKER_NO_EXTRACTION);
8166}
8167
8168
8169/**

Callers 2

Calls 6

typeEnum · 0.85
argument_listMethod · 0.80
get_extraction_flagMethod · 0.80
clear_extraction_flagMethod · 0.80
functypeMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected