mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
trx0trx.ic, trx0trx.h, srv0srv.h, row0sel.h, dict0mem.h:
Modifications for query cache + trxs, fix of q.c.+ foreign keys innobase/include/dict0mem.h: Modifications for query cache + trxs, fix of q.c.+ foreign keys innobase/include/row0sel.h: Modifications for query cache + trxs, fix of q.c.+ foreign keys innobase/include/srv0srv.h: Modifications for query cache + trxs, fix of q.c.+ foreign keys innobase/include/trx0trx.h: Modifications for query cache + trxs, fix of q.c.+ foreign keys innobase/include/trx0trx.ic: Modifications for query cache + trxs, fix of q.c.+ foreign keys
This commit is contained in:
parent
b8cfcf768e
commit
ce62618ca7
5 changed files with 47 additions and 1 deletions
|
@ -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 */
|
||||
/*----------------------*/
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue