diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-09-20 05:18:55 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-09-20 05:18:55 +0300 |
commit | e1b9b4aaab6ce3714739f37625a00f6bd4074682 (patch) | |
tree | 653417929e31dd5e0ef2950808dea74312259f7b /innobase | |
parent | f7c279118c64a5535a05fc11cd30b24e539d2129 (diff) | |
download | mariadb-git-e1b9b4aaab6ce3714739f37625a00f6bd4074682.tar.gz |
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
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/dict0mem.h | 7 | ||||
-rw-r--r-- | innobase/include/row0sel.h | 12 | ||||
-rw-r--r-- | innobase/include/srv0srv.h | 2 | ||||
-rw-r--r-- | innobase/include/trx0trx.h | 8 | ||||
-rw-r--r-- | innobase/include/trx0trx.ic | 19 |
5 files changed, 47 insertions, 1 deletions
diff --git a/innobase/include/dict0mem.h b/innobase/include/dict0mem.h index cc27f2bad12..22293389bae 100644 --- a/innobase/include/dict0mem.h +++ b/innobase/include/dict0mem.h @@ -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 */ /*----------------------*/ diff --git a/innobase/include/row0sel.h b/innobase/include/row0sel.h index a64d3f8e425..aa2da6fe5f6 100644 --- a/innobase/include/row0sel.h +++ b/innobase/include/row0sel.h @@ -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 */ diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h index 9de5e9ccfc9..178c7b6971f 100644 --- a/innobase/include/srv0srv.h +++ b/innobase/include/srv0srv.h @@ -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 */ diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index e1f65e9da0f..9b29c481b6d 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -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 diff --git a/innobase/include/trx0trx.ic b/innobase/include/trx0trx.ic index 9d453047600..78e5acda148 100644 --- a/innobase/include/trx0trx.ic +++ b/innobase/include/trx0trx.ic @@ -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); + } +} + + |