diff options
author | unknown <monty@mysql.com> | 2003-12-19 20:18:18 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-12-19 20:18:18 +0200 |
commit | 4e8c381029f5d787791e044a6871768177a32ab6 (patch) | |
tree | 3e4d0229c4fc62d5fa014b1d33a69ec9c17ccd1b /sql | |
parent | 8d987f9e532689545becf521aa6a6aa6b23bf330 (diff) | |
parent | 7592a73658ff04ddbf09e4c9edfb1613323dc6e9 (diff) | |
download | mariadb-git-4e8c381029f5d787791e044a6871768177a32ab6.tar.gz |
merge with lex pointer change patch
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql_priv.h | 2 | ||||
-rw-r--r-- | sql/sql_delete.cc | 13 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 863c1bdd419..9e5ccf1dc9d 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -537,7 +537,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields, List<List_item> &values, List<Item> &update_fields, List<Item> &update_values, enum_duplicates flag); void kill_delayed_threads(void); -int mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, ORDER *order, +int mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, SQL_LIST *order, ha_rows rows, ulong options); int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok=0); TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 72d92d83e57..78512f705a9 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,9 @@ 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) || + 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)) @@ -613,7 +612,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)) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3f2325de703..5cbf41cd9e5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2626,7 +2626,7 @@ mysql_execute_command(THD *thd) // Set privilege for the WHERE clause tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege); res = mysql_delete(thd,tables, select_lex->where, - (ORDER*) select_lex->order_list.first, + &select_lex->order_list, select_lex->select_limit, select_lex->options); if (thd->net.report_error) res= -1; |