- bug#1410410: innodb_fake_changes cause unknown error code 1000
innodb_fake_changes allows user to dry run the workload.
Dry run will execute the query part but will not make any modifications
to DB there-by helping in warmup the cache. This feature eventually helps
newly added slave to catch-up with replication faster.
To faciliate this, search mode in-case of pessimistic insert is modified
from BTR_MODIFY_TREE to BTR_SEARCH_TREE (newly added for this purpose).
This mode switch takes S-latch instead of X-latch as S-latch is less
restrictive and so is acceptable for dry-run workload requirement.
Same search mode was used for insert too but without special handling
in insert part and so even though pessimistic mode was invoked it caused
optimistic insert to execute
if (mode != BTR_MODIFY_TREE) { optimistic
} else { pessimistic
}
with mode = BTR_SEARCH_TREE it defaulted to optimistic.
We made the code consistent with previous revision to ensure that
search_mode and mode (used for insert) are segregated to avoid re-use.
commit 18dc2fbb910604a e826c3585f40a29 94e24b88c4
Author: Krunal Bauskar <email address hidden>
Date: Tue Sep 8 10:54:23 2015 +0530
- bug#1410410: innodb_fake_changes cause unknown error code 1000
innodb_ fake_changes allows user to dry run the workload.
Dry run will execute the query part but will not make any modifications
to DB there-by helping in warmup the cache. This feature eventually helps
newly added slave to catch-up with replication faster.
To faciliate this, search mode in-case of pessimistic insert is modified
from BTR_MODIFY_TREE to BTR_SEARCH_TREE (newly added for this purpose).
This mode switch takes S-latch instead of X-latch as S-latch is less
restrictive and so is acceptable for dry-run workload requirement.
Same search mode was used for insert too but without special handling
optimistic
pessimistic
in insert part and so even though pessimistic mode was invoked it caused
optimistic insert to execute
if (mode != BTR_MODIFY_TREE) {
} else {
}
with mode = BTR_SEARCH_TREE it defaulted to optimistic.
We made the code consistent with previous revision to ensure that
search_mode and mode (used for insert) are segregated to avoid re-use.
Pull-Request: #147