summaryrefslogtreecommitdiff
path: root/innobase/include/dict0crea.h
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-03-01 19:42:59 +0200
committerunknown <marko@hundin.mysql.fi>2005-03-01 19:42:59 +0200
commit39cf45fd54247ca02554a2ecfedcbfbd996b9060 (patch)
tree87a9487085f2946b718777b52b8cfc500bea903b /innobase/include/dict0crea.h
parent91fa4862c07354a7ac65055758ca21cf21296245 (diff)
downloadmariadb-git-39cf45fd54247ca02554a2ecfedcbfbd996b9060.tar.gz
After review fixes. Fix bugs in TRUNCATE.
innobase/dict/dict0crea.c: dict_truncate_index_tree(): Commit the mtr after deleting the index tree. Add diagnostics for error cases. Let the caller update SYS_INDEXES.PAGE_NO to the new root page number. Return the new root page number, or FIL_NULL on error. innobase/include/dict0crea.h: dict_truncate_index_tree(): Commit the mtr after deleting the index tree. Add diagnostics for error cases. Let the caller update SYS_INDEXES.PAGE_NO to the new root page number. Return the new root page number, or FIL_NULL on error. innobase/include/page0page.ic: page_mem_free(): Disable the memset() call, to make it possible to recover some data if someone accidentally deletes a large number of records from a table. innobase/log/log0recv.c: Do not disable InnoDB Hot Backup specific code in MySQL builds. innobase/row/row0mysql.c: row_truncate_table_for_mysql(): Remove an infinite loop in case a SYS_INDEXES record has been deleted. Avoid deadlocks by committing and restarting the mini-transaction. sql/ha_innodb.cc: ha_innobase::delete_all_rows(): set trx->active_trans = 1
Diffstat (limited to 'innobase/include/dict0crea.h')
-rw-r--r--innobase/include/dict0crea.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/innobase/include/dict0crea.h b/innobase/include/dict0crea.h
index 7164e53bceb..5dd571be59c 100644
--- a/innobase/include/dict0crea.h
+++ b/innobase/include/dict0crea.h
@@ -56,14 +56,17 @@ dict_create_index_step(
/***********************************************************************
Truncates the index tree associated with a row in SYS_INDEXES table. */
-void
+ulint
dict_truncate_index_tree(
/*=====================*/
+ /* out: new root page number, or
+ FIL_NULL on failure */
dict_table_t* table, /* in: the table the index belongs to */
rec_t* rec, /* in: record in the clustered index of
SYS_INDEXES table */
mtr_t* mtr); /* in: mtr having the latch
- on the record page */
+ on the record page. The mtr may be
+ committed and restarted in this call. */
/***********************************************************************
Drops the index tree associated with a row in SYS_INDEXES table. */