Nick Tobey
Nick Tobey
Repro: ``` DELIMITER // CREATE PROCEDURE create_system_user() BEGIN IF (SELECT COUNT(*) FROM `user_test` where `user_test`.`username` = 'system') = 0 THEN INSERT INTO `user_test` (`username`) VALUES ('system'); END IF; END; //...
The server calls the `clearWarnings` method after each command, which removes the list of warnings from the session if the last command didn't emit any new ones. So, warnings accumulate...
MySQL: ``` mysql> select cast(JSON_OBJECT('key"with"quotes', 1) as char); +--------------------------+ | cast(@a as char) | +--------------------------+ | {"key\"with\"quotes": 1} | +--------------------------+ 1 row in set (0.00 sec) mysql> select cast(cast(JSON_OBJECT('key"with"quotes', 1)...
According to the MySQL documentation for JSON paths (https://dev.mysql.com/doc/refman/8.4/en/json.html): - [N] appended to a path that selects an array names the value at position N within the array. Array positions...
JSON_VALUE and JSON_EXTRACT allow you to extract a value from a JSON document at a specified path. We currently use https://github.com/dolthub/jsonpath to parse these paths, which is built according to...
The jsonpath module returns an error when performing a lookup with an out-of-bounds array index. We need to capture that error and return nil for the lookup operation instead.
This moves the test cases for JSON_INSERT into a non-test file, and also allows the caller to provide a function that converts the test's json values into a different representation....