A fix for multi-table delete with tables optimised away.

Still not able to make a proper test case as this crashes on files 
where key and data pointers are 4 bytes each. Possibly a proper 
test case would require myisampack.


sql/sql_lex.cc:
  Just in case ...
This commit is contained in:
unknown 2002-06-11 22:45:51 +03:00
commit bf95234b05
5 changed files with 17 additions and 12 deletions

View file

@ -273,11 +273,11 @@ multi_delete::initialize_tables(JOIN *join)
if (tab->table->map & tables_to_delete_from)
{
/* We are going to delete from this table */
walk->table=tab->table;
TABLE *tbl=walk->table=tab->table;
tbl->no_keyread=1;
tbl->used_keys=0;
walk=walk->next;
if (tab == join->join_tab)
tab->table->no_keyread=1;
if (!not_trans_safe && !tab->table->file->has_transactions())
if (!not_trans_safe && !tbl->file->has_transactions())
not_trans_safe=true;
}
}