mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
Hold checkpoint_safe lock when setting callback, clear callback at end of test.
git-svn-id: file:///svn/toku/tokudb@11320 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
51ba43f193
commit
4784ac1f0b
2 changed files with 4 additions and 1 deletions
|
@ -327,7 +327,8 @@ test_main (int argc, const char *argv[]) {
|
|||
}
|
||||
|
||||
db_env_set_checkpoint_callback(checkpoint_callback, (void*) test_dictionary);
|
||||
runtests(0,4,1);
|
||||
runtests(0,4096,1);
|
||||
db_env_set_checkpoint_callback(NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3818,6 +3818,8 @@ void setup_dlmalloc (void) {
|
|||
// For test purposes only.
|
||||
// With this interface, all checkpoint users get the same callback and the same extra.
|
||||
void db_env_set_checkpoint_callback (void (*callback_f)(void*), void* extra) {
|
||||
toku_checkpoint_safe_client_lock();
|
||||
checkpoint_callback_f = callback_f;
|
||||
checkpoint_callback_extra = extra;
|
||||
toku_checkpoint_safe_client_unlock();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue