summaryrefslogtreecommitdiff
path: root/storage/xtradb/lock/lock0lock.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-01-29 15:10:47 +0100
committerSergei Golubchik <sergii@pisem.net>2013-01-29 15:10:47 +0100
commit0af4b6c6ee2b8a61823478c0a56ebdfa52cae3cc (patch)
tree7b24eb150b9cca718c88edaabbfc6c8bb16fd015 /storage/xtradb/lock/lock0lock.c
parentcf20de000bdff07a34a373079991d24837423896 (diff)
parent52fbe44fbbe60ecaba6453884ec1ad32755d7a04 (diff)
downloadmariadb-git-0af4b6c6ee2b8a61823478c0a56ebdfa52cae3cc.tar.gz
5.5 merge
Diffstat (limited to 'storage/xtradb/lock/lock0lock.c')
-rw-r--r--storage/xtradb/lock/lock0lock.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/storage/xtradb/lock/lock0lock.c b/storage/xtradb/lock/lock0lock.c
index 414d3ae2c49..f172ad6695b 100644
--- a/storage/xtradb/lock/lock0lock.c
+++ b/storage/xtradb/lock/lock0lock.c
@@ -5481,8 +5481,13 @@ lock_sec_rec_read_check_and_lock(
return(DB_SUCCESS);
}
- if (thr && thr_get_trx(thr)->fake_changes && mode == LOCK_X) {
- mode = LOCK_S;
+ if (UNIV_UNLIKELY((thr && thr_get_trx(thr)->fake_changes))) {
+ if (!srv_fake_changes_locks) {
+ return(DB_SUCCESS);
+ }
+ if (mode == LOCK_X) {
+ mode = LOCK_S;
+ }
}
heap_no = page_rec_get_heap_no(rec);
@@ -5561,8 +5566,13 @@ lock_clust_rec_read_check_and_lock(
return(DB_SUCCESS);
}
- if (thr && thr_get_trx(thr)->fake_changes && mode == LOCK_X) {
- mode = LOCK_S;
+ if (UNIV_UNLIKELY((thr && thr_get_trx(thr)->fake_changes))) {
+ if (!srv_fake_changes_locks) {
+ return(DB_SUCCESS);
+ }
+ if (mode == LOCK_X) {
+ mode = LOCK_S;
+ }
}
heap_no = page_rec_get_heap_no(rec);