Commit c42f4db0 authored by unknown's avatar unknown
Browse files

Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0

into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0

parents bc72c684 11b6afd3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -889,7 +889,8 @@ Drops a page hash index. */
void
btr_search_drop_page_hash_index(
/*============================*/
	page_t*	page)	/* in: index page, s- or x-latched */
	page_t*	page)	/* in: index page, s- or x-latched, or an index page
			for which we know that block->buf_fix_count == 0 */
{
	hash_table_t*	table;
	buf_block_t*	block;
+8 −6
Original line number Diff line number Diff line
@@ -831,7 +831,13 @@ struct buf_block_struct{
					records with the same prefix should be
					indexed in the hash index */
					
	/* The following 6 fields are protected by btr_search_latch: */
	/* These 6 fields may only be modified when we have
	an x-latch on btr_search_latch AND
	a) we are holding an s-latch or x-latch on block->lock or
	b) we know that block->buf_fix_count == 0.

	An exception to this is when we init or create a page
	in the buffer pool in buf0buf.c. */

	ibool		is_hashed;	/* TRUE if hash index has already been
					built on this page; note that it does
@@ -849,11 +855,7 @@ struct buf_block_struct{
					BTR_SEARCH_RIGHT_SIDE in hash
					indexing */
	dict_index_t*	index;		/* Index for which the adaptive
					hash index has been created.
					This field may only be modified
					while holding an s-latch or x-latch
					on block->lock and an x-latch on
					btr_search_latch. */
					hash index has been created. */
	/* 6. Debug fields */
#ifdef UNIV_SYNC_DEBUG
	rw_lock_t	debug_latch;	/* in the debug version, each thread
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ Creates a temporary file. */
FILE*
os_file_create_tmpfile(void);
/*========================*/
			/* out: temporary file handle (never NULL) */
			/* out: temporary file handle, or NULL on error */
/***************************************************************************
The os_file_opendir() function opens a directory stream corresponding to the
directory named by the dirname argument. The directory stream is positioned
+12 −0
Original line number Diff line number Diff line
@@ -34,6 +34,18 @@ extern ibool srv_lower_case_table_names;
extern mutex_t	srv_monitor_file_mutex;
/* Temporary file for innodb monitor output */
extern FILE*	srv_monitor_file;
/* Mutex for locking srv_dict_tmpfile.
This mutex has a very high rank; threads reserving it should not
be holding any InnoDB latches. */
extern mutex_t	srv_dict_tmpfile_mutex;
/* Temporary file for output from the data dictionary */
extern FILE*	srv_dict_tmpfile;
/* Mutex for locking srv_misc_tmpfile.
This mutex has a very low rank; threads reserving it should not
acquire any further latches or sleep before releasing this one. */
extern mutex_t	srv_misc_tmpfile_mutex;
/* Temporary file for miscellanous diagnostic output */
extern FILE*	srv_misc_tmpfile;

/* Server parameters which are read from the initfile */

+14 −13
Original line number Diff line number Diff line
@@ -588,20 +588,21 @@ row_ins_set_detailed(
	trx_t*		trx,		/* in: transaction */
	dict_foreign_t*	foreign)	/* in: foreign key constraint */
{
		
	FILE*	tf = os_file_create_tmpfile();

	if (tf) {
		ut_print_name(tf, trx, foreign->foreign_table_name);
		dict_print_info_on_foreign_key_in_create_format(tf, trx,
			foreign, FALSE);

		trx_set_detailed_error_from_file(trx, tf);

		fclose(tf);
	mutex_enter(&srv_misc_tmpfile_mutex);
	rewind(srv_misc_tmpfile);

	if (os_file_set_eof(srv_misc_tmpfile)) {
		ut_print_name(srv_misc_tmpfile, trx,
				foreign->foreign_table_name);
		dict_print_info_on_foreign_key_in_create_format(
				srv_misc_tmpfile,
				trx, foreign, FALSE);
		trx_set_detailed_error_from_file(trx, srv_misc_tmpfile);
	} else {
		trx_set_detailed_error(trx, "temp file creation failed");
		trx_set_detailed_error(trx, "temp file operation failed");
	}

	mutex_exit(&srv_misc_tmpfile_mutex);
}

/*************************************************************************
@@ -709,7 +710,7 @@ row_ins_foreign_report_add_err(
	}

	if (rec) {
		rec_print(ef, rec, foreign->foreign_index);
		rec_print(ef, rec, foreign->referenced_index);
	}
	putc('\n', ef);

Loading