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

Method precheck

sql/sql_delete.cc:1860–1890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1858*/
1859
1860bool Sql_cmd_delete::precheck(THD *thd)
1861{
1862 if (!multitable)
1863 {
1864 if (delete_precheck(thd, lex->query_tables))
1865 return true;
1866 }
1867 else
1868 {
1869 if (multi_delete_precheck(thd, lex->query_tables))
1870 return true;
1871
1872 SELECT_LEX *select_lex= lex->first_select_lex();
1873 /* condition will be TRUE on SP re-excuting */
1874 if (select_lex->item_list.elements != 0)
1875 select_lex->item_list.empty();
1876 if (add_item_to_list(thd, new (thd->mem_root) Item_null(thd)))
1877 return true;
1878 }
1879
1880#ifdef WITH_WSREP
1881 WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
1882#endif
1883
1884 return false;
1885
1886#ifdef WITH_WSREP
1887wsrep_error_label:
1888#endif
1889 return true;
1890}
1891
1892
1893/**

Callers

nothing calls this directly

Calls 5

delete_precheckFunction · 0.85
multi_delete_precheckFunction · 0.85
add_item_to_listFunction · 0.85
first_select_lexMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected