summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/row/row0mysql.c')
-rw-r--r--storage/xtradb/row/row0mysql.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/storage/xtradb/row/row0mysql.c b/storage/xtradb/row/row0mysql.c
index 205aead8efe..1b97cbb0009 100644
--- a/storage/xtradb/row/row0mysql.c
+++ b/storage/xtradb/row/row0mysql.c
@@ -52,6 +52,7 @@ Created 9/17/2000 Heikki Tuuri
#include "btr0sea.h"
#include "fil0fil.h"
#include "ibuf0ibuf.h"
+#include "ha_prototypes.h"
/** Provide optional 4.x backwards compatibility for 5.0 and above */
UNIV_INTERN ibool row_rollback_on_timeout = FALSE;
@@ -2096,6 +2097,32 @@ row_insert_stats_for_mysql(
}
/*********************************************************************//**
+*/
+UNIV_INTERN
+int
+row_delete_stats_for_mysql(
+/*=============================*/
+ dict_index_t* index,
+ trx_t* trx)
+{
+ pars_info_t* info = pars_info_create();
+
+ trx->op_info = "delete rows from SYS_STATS";
+
+ trx_start_if_not_started(trx);
+ trx->error_state = DB_SUCCESS;
+
+ pars_info_add_dulint_literal(info, "indexid", index->id);
+
+ return((int) que_eval_sql(info,
+ "PROCEDURE DELETE_STATISTICS_PROC () IS\n"
+ "BEGIN\n"
+ "DELETE FROM SYS_STATS WHERE INDEX_ID = :indexid;\n"
+ "END;\n"
+ , TRUE, trx));
+}
+
+/*********************************************************************//**
Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
should be called after the indexes for a table have been created.