Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.27, 10.4.17, 10.5.8, 10.6.2
-
None
-
ALL
Description
How to repeat:
On Spider:
spd.sql |
mysql> SHOW CREATE TABLE t1\G
|
*************************** 1. row ***************************
|
Table: t1
|
Create Table: CREATE TABLE `t1` (
|
`i` int(11) NOT NULL,
|
`jdoc` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
PRIMARY KEY (`i`)
|
) ENGINE=SPIDER DEFAULT CHARSET=latin1
|
PARTITION BY LIST (`i` MOD 4)
|
(PARTITION `pt0` VALUES IN (0) COMMENT = 'database "yxtest", table "t1", server "SPT0"' ENGINE = SPIDER,
|
PARTITION `pt1` VALUES IN (1) COMMENT = 'database "yxtest", table "t1", server "SPT1"' ENGINE = SPIDER,
|
PARTITION `pt2` VALUES IN (2) COMMENT = 'database "yxtest", table "t1", server "SPT2"' ENGINE = SPIDER,
|
PARTITION `pt3` VALUES IN (3) COMMENT = 'database "yxtest", table "t1", server "SPT3"' ENGINE = SPIDER)
|
1 row in set (0.00 sec)
|
|
mysql> INSERT INTO t1 VALUES(1, '{"Name":"Tom", "Age":18}'), (2, '{"Name":"Jerry", "Age":20}');
|
Query OK, 2 rows affected (0.00 sec)
|
Records: 2 Duplicates: 0 Warnings: 0
|
|
mysql> SELECT * FROM t1 WHERE json_extract(jdoc, '$.Age')=20;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json_extract '$.Age') = 20)' at line 1
|