diff options
Diffstat (limited to 'innobase/row/row0ins.c')
-rw-r--r-- | innobase/row/row0ins.c | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index 5e84f43bcf0..5fef07683af 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -38,7 +38,7 @@ This prototype is copied from /mysql/sql/ha_innodb.cc. Invalidates the MySQL query cache for the table. NOTE that the exact prototype of this function has to be in /innobase/row/row0ins.c! */ - +extern void innobase_invalidate_query_cache( /*============================*/ @@ -1349,58 +1349,6 @@ row_ins_check_foreign_constraints( return(DB_SUCCESS); } -/************************************************************************* -Reports a UNIQUE key error to dict_unique_err_buf so that SHOW INNODB -STATUS can print it. */ -static -void -row_ins_unique_report_err( -/*======================*/ - que_thr_t* thr, /* in: query thread */ - rec_t* rec, /* in: a record in the index */ - dtuple_t* entry, /* in: index entry to insert in the index */ - dict_index_t* index) /* in: index */ -{ - UT_NOT_USED(thr); - UT_NOT_USED(rec); - UT_NOT_USED(entry); - UT_NOT_USED(index); - -#ifdef notdefined - /* Disable reporting to test if the slowdown of REPLACE in 4.0.13 was - caused by this! */ - - char* buf = dict_unique_err_buf; - - /* The foreign err mutex protects also dict_unique_err_buf */ - - mutex_enter(&dict_foreign_err_mutex); - - ut_sprintf_timestamp(buf); - sprintf(buf + strlen(buf), " Transaction:\n"); - trx_print(buf + strlen(buf), thr_get_trx(thr)); - - sprintf(buf + strlen(buf), -"Unique key constraint fails for table %.500s.\n", index->table_name); - sprintf(buf + strlen(buf), -"Trying to add in index %.500s (%lu fields unique) tuple:\n", index->name, - dict_index_get_n_unique(index)); - - dtuple_sprintf(buf + strlen(buf), 1000, entry); - - sprintf(buf + strlen(buf), -"\nBut there is already a record:\n"); - - rec_sprintf(buf + strlen(buf), 1000, rec); - - sprintf(buf + strlen(buf), "\n"); - - ut_a(strlen(buf) < DICT_FOREIGN_ERR_BUF_LEN); - - mutex_exit(&dict_foreign_err_mutex); -#endif -} - /******************************************************************* Checks if a unique key violation to rec would occur at the index entry insert. */ @@ -1531,8 +1479,6 @@ row_ins_scan_sec_index_for_duplicate( if (cmp == 0) { if (row_ins_dupl_error_with_rec(rec, entry, index)) { - row_ins_unique_report_err(thr, rec, entry, - index); err = DB_DUPLICATE_KEY; thr_get_trx(thr)->error_info = index; @@ -1627,8 +1573,6 @@ row_ins_duplicate_error_in_clust( if (row_ins_dupl_error_with_rec(rec, entry, cursor->index)) { trx->error_info = cursor->index; - row_ins_unique_report_err(thr, rec, entry, - cursor->index); return(DB_DUPLICATE_KEY); } } @@ -1651,9 +1595,6 @@ row_ins_duplicate_error_in_clust( if (row_ins_dupl_error_with_rec(rec, entry, cursor->index)) { trx->error_info = cursor->index; - - row_ins_unique_report_err(thr, rec, entry, - cursor->index); return(DB_DUPLICATE_KEY); } } |