"Fossies" - the Fresh Open Source Software Archive

Member "groonga-12.0.5/test/command/suite/wal_recover/ja/update/huge/1_segment.test" (30 Jun 2022, 2508 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 0 Memos '{"_key" => "huge: 4MiB <=: 1 segment", "content" => "abcd" * ((4 * 1024 * 1024) / 4)}'
   25 #@enable-logging
   26 
   27 #@disable-logging
   28 #@generate-series 0 0 Memos '{"_key" => "huge: 4MiB <=: 1 segment", "content" => "ABCD" * ((4 * 1024 * 1024) / 4)}'
   29 #@enable-logging
   30 
   31 check --obj Memos.content
   32 
   33 plugin_register functions/string
   34 
   35 select \
   36   --table Memos \
   37   --columns[content_head].stage output \
   38   --columns[content_head].flags COLUMN_SCALAR \
   39   --columns[content_head].type ShortText \
   40   --columns[content_head].value 'string_slice(content, 0, 5)' \
   41   --columns[content_tail].stage output \
   42   --columns[content_tail].flags COLUMN_SCALAR \
   43   --columns[content_tail].type ShortText \
   44   --columns[content_tail].value 'string_slice(content, -5, 5)' \
   45   --columns[content_length].stage output \
   46   --columns[content_length].flags COLUMN_SCALAR \
   47   --columns[content_length].type UInt32 \
   48   --columns[content_length].value 'string_length(content)' \
   49   --output_columns _key,content_head,content_tail,content_length
   50 
   51 #@copy-path #{db_path}.0000101.wal #{db_path}.0000101.wal.keep
   52 _database_close
   53 
   54 #@copy-path #{db_path}.0000101.initial #{db_path}.0000101
   55 #@copy-path #{db_path}.0000101.wal.keep #{db_path}.0000101.wal
   56 _database_reopen
   57 
   58 select \
   59   --table Memos \
   60   --columns[content_head].stage output \
   61   --columns[content_head].flags COLUMN_SCALAR \
   62   --columns[content_head].type ShortText \
   63   --columns[content_head].value 'string_slice(content, 0, 5)' \
   64   --columns[content_tail].stage output \
   65   --columns[content_tail].flags COLUMN_SCALAR \
   66   --columns[content_tail].type ShortText \
   67   --columns[content_tail].value 'string_slice(content, -5, 5)' \
   68   --columns[content_length].stage output \
   69   --columns[content_length].flags COLUMN_SCALAR \
   70   --columns[content_length].type UInt32 \
   71   --columns[content_length].value 'string_length(content)' \
   72   --output_columns _key,content_head,content_tail,content_length
   73 
   74 check --obj Memos.content