diff options
author | unknown <marko@hundin.mysql.fi> | 2004-02-20 16:34:09 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-02-20 16:34:09 +0200 |
commit | 0eacf58fd5ebc665ce799a673739c97d6157b13b (patch) | |
tree | 96c04a7ccc804314e3737d02fc081513e1e827db /innobase/row | |
parent | f443541a36769eaacf9228ad517ed224c827c565 (diff) | |
download | mariadb-git-0eacf58fd5ebc665ce799a673739c97d6157b13b.tar.gz |
Many files:
Removed unused code
.del-os0trash.c~8cae5c1695501117:
Delete: innobase/os/os0trash.c
dict0crea.c:
Protect all sprintf(%s) with assertions
BitKeeper/deleted/.del-os0trash.c~8cae5c1695501117:
Delete: innobase/os/os0trash.c
innobase/btr/btr0sea.c:
Removed unused code
innobase/buf/buf0buf.c:
Removed unused code
innobase/com/com0shm.c:
Removed unused code
innobase/data/data0data.c:
Removed unused code
innobase/dict/dict0crea.c:
Removed unused code
innobase/fsp/fsp0fsp.c:
Removed unused code
innobase/ha/ha0ha.c:
Removed unused code
innobase/include/btr0cur.h:
Removed unused code
innobase/include/btr0sea.h:
Removed unused code
innobase/include/buf0buf.ic:
Removed unused code
innobase/include/data0data.h:
Removed unused code
innobase/include/dict0crea.h:
Removed unused code
innobase/include/dict0dict.h:
Removed unused code
innobase/include/ibuf0ibuf.h:
Removed unused code
innobase/include/lock0lock.h:
Removed unused code
innobase/include/mem0dbg.h:
Removed unused code
innobase/include/mem0mem.ic:
Removed unused code
innobase/include/mtr0log.h:
Removed unused code
innobase/include/mtr0mtr.h:
Removed unused code
innobase/include/os0proc.h:
Removed unused code
innobase/include/os0thread.h:
Removed unused code
innobase/include/rem0cmp.ic:
Removed unused code
innobase/include/row0row.h:
Removed unused code
innobase/include/srv0srv.h:
Removed unused code
innobase/include/sync0sync.h:
Removed unused code
innobase/lock/lock0lock.c:
Removed unused code
innobase/log/log0recv.c:
Removed unused code
innobase/mem/mem0dbg.c:
Removed unused code
innobase/mtr/mtr0mtr.c:
Removed unused code
innobase/os/os0proc.c:
Removed unused code
innobase/page/page0page.c:
Removed unused code
innobase/que/que0que.c:
Removed unused code
innobase/rem/rem0cmp.c:
Removed unused code
innobase/row/row0ins.c:
Removed unused code
innobase/row/row0mysql.c:
Removed unused code
innobase/row/row0row.c:
Removed unused code
innobase/srv/srv0srv.c:
Removed unused code
innobase/srv/srv0start.c:
Removed unused code
innobase/sync/sync0sync.c:
Removed unused code
innobase/trx/trx0rec.c:
Removed unused code
innobase/trx/trx0trx.c:
Removed unused code
innobase/ut/ut0dbg.c:
Removed unused code
innobase/ut/ut0mem.c:
Removed unused code
innobase/ut/ut0ut.c:
Removed unused code
Diffstat (limited to 'innobase/row')
-rw-r--r-- | innobase/row/row0ins.c | 61 | ||||
-rw-r--r-- | innobase/row/row0mysql.c | 6 | ||||
-rw-r--r-- | innobase/row/row0row.c | 55 |
3 files changed, 5 insertions, 117 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index d589cc8c9bc..f455eabd2e0 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); } } diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index a95d0fc6b95..22530662b48 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -1386,10 +1386,12 @@ row_create_table_for_mysql( "UNIV_MEM_DEBUG defined in univ.i and the server must be\n" "quiet because allocation from a mem heap is not protected\n" "by any semaphore.\n"); - +#ifdef UNIV_MEM_DEBUG ut_a(mem_validate()); - printf("Memory validated\n"); +#else /* UNIV_MEM_DEBUG */ + puts("Memory NOT validated (recompile with UNIV_MEM_DEBUG)"); +#endif /* UNIV_MEM_DEBUG */ } heap = mem_heap_create(512); diff --git a/innobase/row/row0row.c b/innobase/row/row0row.c index 6c0c6c04cd5..b5d676a936a 100644 --- a/innobase/row/row0row.c +++ b/innobase/row/row0row.c @@ -236,61 +236,6 @@ row_build( return(row); } -#ifdef notdefined -/*********************************************************************** -An inverse function to dict_row_build_index_entry. Builds a row from a -record in a clustered index. */ - -void -row_build_to_tuple( -/*===============*/ - dtuple_t* row, /* in/out: row built; see the NOTE below! */ - dict_index_t* index, /* in: clustered index */ - rec_t* rec) /* in: record in the clustered index; - NOTE: the data fields in the row will point - directly into this record, therefore, - the buffer page of this record must be - at least s-latched and the latch held - as long as the row dtuple is used! - NOTE 2: does not work with externally - stored fields! */ -{ - dict_table_t* table; - ulint n_fields; - ulint i; - dfield_t* dfield; - byte* field; - ulint len; - ulint row_len; - dict_col_t* col; - - ut_ad(index && rec); - ut_ad(index->type & DICT_CLUSTERED); - - table = index->table; - row_len = dict_table_get_n_cols(table); - - dtuple_set_info_bits(row, rec_get_info_bits(rec)); - - n_fields = dict_index_get_n_fields(index); - - ut_ad(n_fields == rec_get_n_fields(rec)); - - dict_table_copy_types(row, table); - - for (i = 0; i < n_fields; i++) { - - col = dict_field_get_col(dict_index_get_nth_field(index, i)); - dfield = dtuple_get_nth_field(row, dict_col_get_no(col)); - field = rec_get_nth_field(rec, i, &len); - - dfield_set_data(dfield, field, len); - } - - ut_ad(dtuple_check_typed(row)); -} -#endif - /*********************************************************************** Converts an index record to a typed data tuple. NOTE that externally stored (often big) fields are NOT copied to heap. */ |