diff options
author | unknown <pem@mysql.com> | 2003-12-20 13:10:29 +0100 |
---|---|---|
committer | unknown <pem@mysql.com> | 2003-12-20 13:10:29 +0100 |
commit | 495082a6c97603547c1eda4c1d99e65787dad5a4 (patch) | |
tree | a8664ef2614f6db5f1ae5fcfd9921e0f0a8fb03e /sql/sql_delete.cc | |
parent | e622f6fb0bdf48c7fff4d0819a276f0f6418e0ab (diff) | |
parent | d5708aeb6873611d0b86e27b2540bb9535e40e21 (diff) | |
download | mariadb-git-495082a6c97603547c1eda4c1d99e65787dad5a4.tar.gz |
Merge 4.1 to 5.0 (the prep stmt fixes in particular).
libmysqld/lib_sql.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 03f952f3ff5..662892bafb4 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -27,7 +27,7 @@ #include "ha_innodb.h" #include "sql_select.h" -int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, +int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, ha_rows limit, ulong options) { int error; @@ -116,7 +116,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if (options & OPTION_QUICK) (void) table->file->extra(HA_EXTRA_QUICK); - if (order) + if (order && order->elements) { uint length; SORT_FIELD *sortorder; @@ -130,10 +130,10 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, table->sort.io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); - if (thd->lex->select_lex.setup_ref_array(thd, 0) || - setup_order(thd, thd->lex->select_lex.ref_pointer_array, &tables, - fields, all_fields, order) || - !(sortorder=make_unireg_sortorder(order, &length)) || + if (thd->lex->select_lex.setup_ref_array(thd, order->elements) || + setup_order(thd, thd->lex->select_lex.ref_pointer_array, &tables, + fields, all_fields, (ORDER*) order->first) || + !(sortorder=make_unireg_sortorder((ORDER*) order->first, &length)) || (table->sort.found_records = filesort(thd, table, sortorder, length, select, HA_POS_ERROR, &examined_rows)) @@ -611,7 +611,7 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) { /* Probably InnoDB table */ table_list->lock_type= TL_WRITE; - DBUG_RETURN(mysql_delete(thd, table_list, (COND*) 0, (ORDER*) 0, + DBUG_RETURN(mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0, HA_POS_ERROR, 0)); } if (lock_and_wait_for_table_name(thd, table_list)) |