"Fossies" - the Fresh Open Source Software Archive

Member "mroonga-12.04/mysql-test/mroonga/wrapper/column/generated/stored/r/add_column.result" (6 Jun 2022, 819 Bytes) of package /linux/misc/mroonga-12.04.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.

    1 DROP TABLE IF EXISTS logs;
    2 CREATE TABLE logs (
    3 id INT PRIMARY KEY,
    4 record JSON
    5 ) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"';
    6 INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}');
    7 ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED;
    8 ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"';
    9 INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}');
   10 INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}');
   11 SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE);
   12 id	record	message
   13 1	{"level": "info", "message": "start"}	"start"
   14 2	{"level": "info", "message": "restart"}	"restart"
   15 DROP TABLE logs;