| 1 |
# _database_close/_database_reopen can't use with HTTP because requests via HTTP are always |
| 2 |
# processed by workers. Workers never use primary WAL role. |
| 3 |
#@require-interface stdio |
| 4 |
|
| 5 |
#@require-feature message_pack |
| 6 |
|
| 7 |
#$GROONGA_ALLOW_DATABASE_REOPEN=yes |
| 8 |
#$GRN_WAL_ROLE=primary |
| 9 |
|
| 10 |
table_create Data TABLE_NO_KEY |
| 11 |
column_create Data content COLUMN_SCALAR ShortText |
| 12 |
|
| 13 |
load --table Data |
| 14 |
[ |
| 15 |
{"content": "a"}, |
| 16 |
{"content": "a and b and c"}, |
| 17 |
{"content": "a and b and c and d and e and f"} |
| 18 |
] |
| 19 |
|
| 20 |
delete Data --id 2 |
| 21 |
|
| 22 |
dump |
| 23 |
|
| 24 |
_database_close |
| 25 |
|
| 26 |
#@copy-path #{db_path}.0000100 #{db_path}.0000100.wal |
| 27 |
#@add-important-log-levels notice |
| 28 |
_database_reopen |
| 29 |
#@remove-important-log-levels notice |
| 30 |
|
| 31 |
dump |