diff options
author | heikki@hundin.mysql.fi <> | 2002-09-20 05:11:08 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2002-09-20 05:11:08 +0300 |
commit | 9e493e91e900a5793f98e1c1fd71369e2a929b5c (patch) | |
tree | 83fa0b9921ca4d827b9a72cf561764aaaa2e4296 /innobase/lock/lock0lock.c | |
parent | a30d0261aeda4fc01b3fe4bc764caf76bd510a73 (diff) | |
download | mariadb-git-9e493e91e900a5793f98e1c1fd71369e2a929b5c.tar.gz |
Many files:
Modifications for query cache + trxs, fix of q.c.+ foreign keys
os0file.c:
Use unbuffered i/o in Windows
Diffstat (limited to 'innobase/lock/lock0lock.c')
-rw-r--r-- | innobase/lock/lock0lock.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index 8c48180cf63..ebd063b6ca5 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -14,6 +14,8 @@ Created 5/7/1996 Heikki Tuuri #include "usr0sess.h" #include "trx0purge.h" +#include "dict0mem.h" +#include "trx0sys.h" /* Restricts the length of search we will do in the waits-for graph of transactions */ @@ -3416,8 +3418,9 @@ lock_release_off_kernel( /*====================*/ trx_t* trx) /* in: transaction */ { - ulint count; - lock_t* lock; + dict_table_t* table; + ulint count; + lock_t* lock; ut_ad(mutex_own(&kernel_mutex)); @@ -3435,6 +3438,19 @@ lock_release_off_kernel( } else { ut_ad(lock_get_type(lock) == LOCK_TABLE); + if (lock_get_mode(lock) != LOCK_IS + && (trx->insert_undo || trx->update_undo)) { + + /* The trx may have modified the table. + We block the use of the MySQL query cache + for all currently active transactions. */ + + table = lock->un_member.tab_lock.table; + + table->query_cache_inv_trx_id = + trx_sys->max_trx_id; + } + lock_table_dequeue(lock); } |