mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
This commit is contained in:
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
SQL_LIST *order, ha_rows limit, ulonglong options,
|
||||
SQL_I_List<ORDER> *order, ha_rows limit, ulonglong options,
|
||||
bool reset_auto_increment)
|
||||
{
|
||||
bool will_batch;
|
||||
@ -98,7 +98,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
|
||||
if (select_lex->setup_ref_array(thd, order->elements) ||
|
||||
setup_order(thd, select_lex->ref_pointer_array, &tables,
|
||||
fields, all_fields, (ORDER*) order->first))
|
||||
fields, all_fields, order->first))
|
||||
{
|
||||
delete select;
|
||||
free_underlaid_joins(thd, &thd->lex->select_lex);
|
||||
@ -243,14 +243,14 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
|
||||
ha_rows examined_rows;
|
||||
|
||||
if ((!select || table->quick_keys.is_clear_all()) && limit != HA_POS_ERROR)
|
||||
usable_index= get_index_for_order(table, (ORDER*)(order->first), limit);
|
||||
usable_index= get_index_for_order(table, order->first, limit);
|
||||
|
||||
if (usable_index == MAX_KEY)
|
||||
{
|
||||
table->sort.io_cache= (IO_CACHE *) my_malloc(sizeof(IO_CACHE),
|
||||
MYF(MY_FAE | MY_ZEROFILL));
|
||||
|
||||
if (!(sortorder= make_unireg_sortorder((ORDER*) order->first,
|
||||
if (!(sortorder= make_unireg_sortorder(order->first,
|
||||
&length, NULL)) ||
|
||||
(table->sort.found_records = filesort(thd, table, sortorder, length,
|
||||
select, HA_POS_ERROR, 1,
|
||||
@ -546,7 +546,7 @@ extern "C" int refpos_order_cmp(void* arg, const void *a,const void *b)
|
||||
int mysql_multi_delete_prepare(THD *thd)
|
||||
{
|
||||
LEX *lex= thd->lex;
|
||||
TABLE_LIST *aux_tables= (TABLE_LIST *)lex->auxiliary_table_list.first;
|
||||
TABLE_LIST *aux_tables= lex->auxiliary_table_list.first;
|
||||
TABLE_LIST *target_tbl;
|
||||
DBUG_ENTER("mysql_multi_delete_prepare");
|
||||
|
||||
|
Reference in New Issue
Block a user