"Fossies" - the Fresh Open Source Software Archive 
Member "mroonga-12.04/mysql-test/mroonga/storage/column/generated/virtual/r/add_column.result" (6 Jun 2022, 676 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,
4 record JSON
5 ) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4;
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')) VIRTUAL;
8 INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}');
9 INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}');
10 SELECT * FROM logs;
11 id record message
12 1 {"level": "info", "message": "start"} "start"
13 2 {"level": "info", "message": "restart"} "restart"
14 3 {"level": "warn", "message": "abort"} "abort"
15 DROP TABLE logs;