summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/t/set_checkpoint.inc
blob: 558e2413256d64988a1009da88445092cab9fca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Usage:
# let $checkpoint = <value to set the checkpoint>;
# let $succeeds = <1 if checkpoint creation should succeed, 0 otherwise>;
# --source set_checkpoint.inc


if ($succeeds)
{
  # Create checkpoint
  --replace_result '$checkpoint' [CHECKPOINT]
  eval SET GLOBAL ROCKSDB_CREATE_CHECKPOINT = '$checkpoint';

  # Check checkpoint
  --list_files $checkpoint CURRENT

  # Cleanup
  --remove_files_wildcard $checkpoint *
  --rmdir $checkpoint
  --disable_abort_on_error
  --enable_abort_on_error
}
if (!$succeeds)
{
  --disable_result_log
  --disable_query_log
  --error ER_RDB_STATUS_GENERAL
  eval SET GLOBAL ROCKSDB_CREATE_CHECKPOINT = '$checkpoint';
  --enable_query_log
  --enable_result_log
}