Below works in mysql but not in mariadb. Any suggestions?

CREATE TABLE `purchases` (
  `id` int(10) UNSIGNED NOT NULL,
  `product` varchar(255) GENERATED ALWAYS AS (json_unquote(json_extract(`json`,'$.product'))) stored,
  `customer` varchar(255) GENERATED ALWAYS AS (json_unquote(json_value(`json`,'$.customer'))) stored,
  `json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
New contributor
Amit Gupta is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 1
    Not reproduced. dbfiddle.uk/… – Akina Jun 8 at 4:37
  • I just tried again and product column does not get value from product in JSON. my insert sql is insert into purch1ases(json) values("{'product':'1223'}") – Amit Gupta 2 days ago

Browse other questions tagged or ask your own question.