Debian Codegraph @

test/command/suite/wal_recover/db/auto_recovery/column/indexed_column.test

raw
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 Terms TABLE_PAT_KEY ShortText \
11 --normalizer NormalizerNFKC130 \
12 --default_tokenizer TokenNgram
13
14 table_create Data TABLE_PAT_KEY ShortText
15 column_create Data content COLUMN_SCALAR ShortText
16
17 column_create Terms data_content COLUMN_INDEX|WITH_POSITION Data content
18
19 load --table Data
20 [
21 {"_key": "abc", "content": "a and b and c"},
22 {"_key": "ABC", "content": "A and B and C"},
23 {"_key": "abcdef", "content": "a and b and c and d and e and f"}
24 ]
25
26 delete --table Data --key ABC
27
28 dump
29
30 _database_close
31
32 #@copy-path #{db_path}.0000102 #{db_path}.0000102.wal
33 #@add-important-log-levels notice
34 _database_reopen
35 #@remove-important-log-levels notice
36
37 dump
38
39 index_column_diff --table Terms --name data_content
40
41 select Data \
42 --match_columns 'content * 2' \
43 --query d \
44 --output_columns _id,_key,content,_score