summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-06-11 22:45:51 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2002-06-11 22:45:51 +0300
commitbf95234b05d479edc481445a175db959e6cba6f2 (patch)
tree486244434432866056db35237ee164d19478a16d /sql/sql_delete.cc
parent70aa7424c41c45a8fb171bbdd9e24d74b70a7765 (diff)
downloadmariadb-git-bf95234b05d479edc481445a175db959e6cba6f2.tar.gz
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 ...
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 5f6cce147b7..78df12c3606 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -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;
}
}