Commit 55807d95 authored by heikki@hundin.mysql.fi's avatar heikki@hundin.mysql.fi
Browse files

trx0trx.ic, trx0trx.h, srv0srv.h, row0sel.h, dict0mem.h:

  Modifications for query cache + trxs, fix of q.c.+ foreign keys
parent 9e493e91
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -333,6 +333,13 @@ struct dict_table_struct{
				space from the lock heap of the trx:
				otherwise the lock heap would grow rapidly
				if we do a large insert from a select */
	dulint		query_cache_inv_trx_id;
				/* transactions whose trx id < than this
				number are not allowed to store to the MySQL
				query cache or retrieve from it; when a trx
				with undo logs commits, it sets this to the
				value of the trx id counter for the tables it
				had an IX lock on */
	UT_LIST_BASE_NODE_T(lock_t)
			locks; /* list of locks on the table */
	/*----------------------*/
+12 −0
Original line number Diff line number Diff line
@@ -133,6 +133,18 @@ row_search_for_mysql(
					then prebuilt must have a pcur
					with stored position! In opening of a
					cursor 'direction' should be 0. */
/***********************************************************************
Checks if MySQL at the moment is allowed for this table to retrieve a
consistent read result, or store it to the query cache. */

ibool
row_search_check_if_query_cache_permitted(
/*======================================*/
				/* out: TRUE if storing or retrieving from
				the query cache is permitted */
	trx_t*	trx,		/* in: transaction object */
	char*	norm_name);	/* in: concatenation of database name, '/'
				char, table name */


/* A structure for caching column values for prefetched rows */
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ extern ulint srv_n_log_files;
extern ulint	srv_log_file_size;
extern ibool	srv_log_archive_on;
extern ulint	srv_log_buffer_size;
extern ulint	srv_flush_log_at_trx_commit;
extern ibool	srv_flush_log_at_trx_commit;

extern byte	srv_latin1_ordering[256];/* The sort order table of the latin1
					character set */
+8 −0
Original line number Diff line number Diff line
@@ -118,6 +118,14 @@ trx_start_if_not_started(
/*=====================*/
	trx_t*	trx);	/* in: transaction */
/*****************************************************************
Starts the transaction if it is not yet started. Assumes we have reserved
the kernel mutex! */
UNIV_INLINE
void
trx_start_if_not_started_low(
/*=========================*/
	trx_t*	trx);	/* in: transaction */
/*****************************************************************
Starts the transaction if it is not yet started. */

void
+19 −0
Original line number Diff line number Diff line
@@ -21,3 +21,22 @@ trx_start_if_not_started(
		trx_start(trx, ULINT_UNDEFINED);
	}
}

/*****************************************************************
Starts the transaction if it is not yet started. Assumes we have reserved
the kernel mutex! */
UNIV_INLINE
void
trx_start_if_not_started_low(
/*=========================*/
	trx_t*	trx)	/* in: transaction */
{	
	ut_ad(trx->conc_state != TRX_COMMITTED_IN_MEMORY);

	if (trx->conc_state == TRX_NOT_STARTED) {

		trx_start_low(trx, ULINT_UNDEFINED);
	}
}