| 1858 | */ |
| 1859 | |
| 1860 | bool 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 |
| 1887 | wsrep_error_label: |
| 1888 | #endif |
| 1889 | return true; |
| 1890 | } |
| 1891 | |
| 1892 | |
| 1893 | /** |
nothing calls this directly
no test coverage detected