mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
merge with 4.0
BitKeeper/etc/ignore: auto-union VC++Files/comp_err/comp_err.dsp: Auto merged VC++Files/my_print_defaults/my_print_defaults.dsp: Auto merged VC++Files/myisampack/myisampack.dsp: Auto merged acinclude.m4: Auto merged innobase/buf/buf0buf.c: Auto merged innobase/com/com0shm.c: Auto merged innobase/data/data0data.c: Auto merged innobase/ha/ha0ha.c: Auto merged innobase/include/buf0buf.ic: Auto merged innobase/include/dict0dict.h: Auto merged innobase/include/ibuf0ibuf.h: Auto merged innobase/include/lock0lock.h: Auto merged innobase/include/mtr0log.h: Auto merged innobase/include/mtr0mtr.h: Auto merged innobase/include/os0proc.h: Auto merged innobase/include/os0thread.h: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/sync0sync.h: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/log/log0recv.c: Auto merged innobase/mem/mem0dbg.c: Auto merged innobase/mtr/mtr0mtr.c: Auto merged innobase/os/os0proc.c: Auto merged innobase/page/page0page.c: Auto merged innobase/que/que0que.c: Auto merged innobase/rem/rem0cmp.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/sync/sync0sync.c: Auto merged innobase/trx/trx0rec.c: Auto merged innobase/trx/trx0trx.c: Auto merged innobase/ut/ut0mem.c: Auto merged innobase/ut/ut0ut.c: Auto merged libmysql/libmysql.c: Auto merged scripts/mysql_config.sh: Auto merged sql/net_serv.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user