diff options
author | bell@sanja.is.com.ua <> | 2002-11-25 21:27:14 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-11-25 21:27:14 +0200 |
commit | b8f5fc3a139c1411aa6ecd6f727864a0c0016789 (patch) | |
tree | f7de0958810c8e567d83564ff9a09bbaf6b694ac /sql/sql_delete.cc | |
parent | f5dab36a63c4eda2a0492f33a56f195af1199ea4 (diff) | |
download | mariadb-git-b8f5fc3a139c1411aa6ecd6f727864a0c0016789.tar.gz |
subselet in delete (SCRUM)
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 16d6b6d4631..5b97b2f7750 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -37,14 +37,18 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, bool using_limit=limit != HA_POS_ERROR; bool transactional_table, log_delayed, safe_update, const_cond; ha_rows deleted; + TABLE_LIST *delete_table_list= (TABLE_LIST*) + thd->lex.select_lex.table_list.first; DBUG_ENTER("mysql_delete"); - if (!(table = open_ltable(thd, table_list, table_list->lock_type))) + if ((open_and_lock_tables(thd, table_list))) DBUG_RETURN(-1); + fix_tables_pointers(&thd->lex.select_lex); + table= table_list->table; table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); thd->proc_info="init"; table->map=1; - if (setup_conds(thd,table_list,&conds) || + if (setup_conds(thd, delete_table_list, &conds) || setup_ftfuncs(&thd->lex.select_lex)) DBUG_RETURN(-1); |