Commit 7b4869d9 authored by heikki@hundin.mysql.fi's avatar heikki@hundin.mysql.fi
Browse files

Many files:

  Merge InnoDB-3.23.52c
ha_innobase.cc:
  Test the ref length sanity also in the production version
parent 4f56ed82
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -808,7 +808,7 @@ btr_cur_optimistic_insert(

	if (!dtuple_check_typed_no_assert(entry)) {
		fprintf(stderr,
"InnoDB: Error in a tuple to insert into table %s index %s\n",
"InnoDB: Error in a tuple to insert into table %lu index %s\n",
					index->table_name, index->name);
	}
	
@@ -1213,6 +1213,8 @@ btr_cur_parse_update_in_place(
	rec_offset = mach_read_from_2(ptr);
	ptr += 2;

	ut_a(rec_offset <= UNIV_PAGE_SIZE);

	heap = mem_heap_create(256);
	
	ptr = row_upd_index_parse(ptr, end_ptr, heap, &update);
@@ -1977,6 +1979,8 @@ btr_cur_parse_del_mark_set_clust_rec(
	offset = mach_read_from_2(ptr);
	ptr += 2;

	ut_a(offset <= UNIV_PAGE_SIZE);

	if (page) {
		rec = page + offset;
	
@@ -2127,6 +2131,8 @@ btr_cur_parse_del_mark_set_sec_rec(
	offset = mach_read_from_2(ptr);
	ptr += 2;

	ut_a(offset <= UNIV_PAGE_SIZE);

	if (page) {
		rec = page + offset;
	
+1 −1
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ buf_page_print(
	ut_print_timestamp(stderr);
	fprintf(stderr,
	"  InnoDB: Page dump in ascii and hex (%lu bytes):\n%s",
					(unsigned long) UNIV_PAGE_SIZE, buf);
					(ulint)UNIV_PAGE_SIZE, buf);
	fprintf(stderr, "InnoDB: End of page dump\n");

	mem_free(buf);
+38 −0
Original line number Diff line number Diff line
@@ -204,6 +204,44 @@ buf_LRU_get_free_block(void)
loop:
	mutex_enter(&(buf_pool->mutex));

	if (UT_LIST_GET_LEN(buf_pool->free)
	   + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 10) {
	   	ut_print_timestamp(stderr);

	   	fprintf(stderr,
"  InnoDB: ERROR: over 9 / 10 of the buffer pool is occupied by\n"
"InnoDB: lock heaps or the adaptive hash index!\n"
"InnoDB: We intentionally generate a seg fault to print a stack trace\n"
"InnoDB: on Linux!\n");

		ut_a(0);
	   
	} else if (UT_LIST_GET_LEN(buf_pool->free)
	   + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 5) {

	   	/* Over 80 % of the buffer pool is occupied by lock heaps
	   	or the adaptive hash index. This may be a memory leak! */

	   	ut_print_timestamp(stderr);
	   	fprintf(stderr,
"  InnoDB: WARNING: over 4 / 5 of the buffer pool is occupied by\n"
"InnoDB: lock heaps or the adaptive hash index! Check that your\n"
"InnoDB: transactions do not set too many row locks. Starting InnoDB\n"
"InnoDB: Monitor to print diagnostics, including lock heap and hash index\n"
"InnoDB: sizes.\n");

		srv_print_innodb_monitor = TRUE;

	} else if (UT_LIST_GET_LEN(buf_pool->free)
	   + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 4) {

		/* Switch off the InnoDB Monitor; this is a simple way
		to stop the monitor if the situation becomes less urgent,
		but may also surprise users! */

		srv_print_innodb_monitor = FALSE;
	}

	if (buf_pool->LRU_flush_ended > 0) {
		mutex_exit(&(buf_pool->mutex));

+12 −2
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ ha_print_info(
	ulint		cells	= 0;
	ulint		len	= 0;
	ulint		max_len	= 0;
	ulint		n_bufs;
	ulint		i;
	
	if (buf_end - buf < 200) {
@@ -339,7 +340,16 @@ ha_print_info(
"Hash table size %lu, used cells %lu", hash_get_n_cells(table), cells);

	if (table->heaps == NULL && table->heap != NULL) {
	        buf += sprintf(buf,
", node heap has %lu buffer(s)\n", UT_LIST_GET_LEN(table->heap->base));

		/* This calculation is intended for the adaptive hash
		index: how many buffer frames we have reserved? */

		n_bufs = UT_LIST_GET_LEN(table->heap->base) - 1;

		if (table->heap->free_block) {
			n_bufs++;
		}
				
	        buf += sprintf(buf, ", node heap has %lu buffer(s)\n", n_bufs);
	}
}	
+0 −8
Original line number Diff line number Diff line
@@ -313,14 +313,6 @@ btr_discard_page(
	btr_cur_t*	cursor,	/* in: cursor on the page to discard: not on
				the root page */
	mtr_t*		mtr);	/* in: mtr */
/************************************************************************
Declares the latching order level for the page latch in the debug version. */

void
btr_declare_page_latch(
/*===================*/
	page_t*	page,	/* in: page */
	ibool	leaf);	/* in: TRUE if a leaf */
/********************************************************************
Parses the redo log record for setting an index record as the predefined
minimum record. */
Loading