"Fossies" - the Fresh Open Source Software Archive

Member "groonga-12.0.5/test/command/suite/wal_recover/ja/add/huge/1_segment.test" (30 Jun 2022, 2302 Bytes) of package /linux/misc/groonga-12.0.5.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "1_segment.test": 12.0.2_vs_12.0.3.

    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_ENABLE_REFERENCE_COUNT=no
    9 #$GRN_WAL_ROLE=primary
   10 
   11 #@disable-logging
   12 cache_limit --max 0
   13 #@enable-logging
   14 
   15 table_create Memos TABLE_HASH_KEY ShortText
   16 column_create Memos content COLUMN_SCALAR Text
   17 
   18 io_flush
   19 #@copy-path #{db_path}.0000101 #{db_path}.0000101.initial
   20 
   21 #@timeout 300
   22 
   23 #@disable-logging
   24 #@generate-series 0 1 Memos '{"_key" => "huge: 4MiB <=: 1 segment", "content" => "abcd" * ((4 * 1024 * 1024) / 4)}'
   25 #@enable-logging
   26 
   27 plugin_register functions/string
   28 
   29 select \
   30   --table Memos \
   31   --columns[content_head].stage output \
   32   --columns[content_head].flags COLUMN_SCALAR \
   33   --columns[content_head].type ShortText \
   34   --columns[content_head].value 'string_slice(content, 0, 5)' \
   35   --columns[content_tail].stage output \
   36   --columns[content_tail].flags COLUMN_SCALAR \
   37   --columns[content_tail].type ShortText \
   38   --columns[content_tail].value 'string_slice(content, -5, 5)' \
   39   --columns[content_length].stage output \
   40   --columns[content_length].flags COLUMN_SCALAR \
   41   --columns[content_length].type UInt32 \
   42   --columns[content_length].value 'string_length(content)' \
   43   --output_columns _key,content_head,content_tail,content_length
   44 
   45 #@copy-path #{db_path}.0000101.wal #{db_path}.0000101.wal.keep
   46 _database_close
   47 
   48 #@copy-path #{db_path}.0000101.initial #{db_path}.0000101
   49 #@copy-path #{db_path}.0000101.wal.keep #{db_path}.0000101.wal
   50 _database_reopen
   51 
   52 select \
   53   --table Memos \
   54   --columns[content_head].stage output \
   55   --columns[content_head].flags COLUMN_SCALAR \
   56   --columns[content_head].type ShortText \
   57   --columns[content_head].value 'string_slice(content, 0, 5)' \
   58   --columns[content_tail].stage output \
   59   --columns[content_tail].flags COLUMN_SCALAR \
   60   --columns[content_tail].type ShortText \
   61   --columns[content_tail].value 'string_slice(content, -5, 5)' \
   62   --columns[content_length].stage output \
   63   --columns[content_length].flags COLUMN_SCALAR \
   64   --columns[content_length].type UInt32 \
   65   --columns[content_length].value 'string_length(content)' \
   66   --output_columns _key,content_head,content_tail,content_length