Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
599 changes: 599 additions & 0 deletions mysql-test/r/delete_returning.result

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mysql-test/r/information_schema_keywords.result
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ RESUME 0
RETAIN 0
RETURN 1
RETURNED_SQLSTATE 0
RETURNING 0
RETURNING 1
RETURNS 0
REUSE 0
REVERSE 0
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/json/r/json_value.result
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ CREATE TABLE json_value(json_value JSON);
SELECT JSON_VALUE(json_value, '$.a') AS json_value FROM json_value;
json_value
DROP TABLE json_value;
CREATE TABLE returning(returning JSON);
SELECT JSON_VALUE(returning, '$.a' RETURNING CHAR) AS returning FROM returning;
CREATE TABLE `returning`(`returning` JSON);
SELECT JSON_VALUE(`returning`, '$.a' RETURNING CHAR) AS `returning` FROM `returning`;
returning
DROP TABLE returning;
DROP TABLE `returning`;
# Test ON EMPTY clause
SELECT JSON_VALUE('{"data": 123}', '$.num' RETURNING SIGNED) v;
v
Expand Down
9 changes: 5 additions & 4 deletions mysql-test/suite/json/t/json_value.test
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,11 @@ CREATE TABLE json_value(json_value JSON);
SELECT JSON_VALUE(json_value, '$.a') AS json_value FROM json_value;
DROP TABLE json_value;

# RETURNING is a non-reserved word both in the standard and in MySQL.
CREATE TABLE returning(returning JSON);
SELECT JSON_VALUE(returning, '$.a' RETURNING CHAR) AS returning FROM returning;
DROP TABLE returning;
# RETURNING is a non-reserved word in the SQL standard, but reserved in
# MySQL, so it can only be used as an identifier when quoted.
CREATE TABLE `returning`(`returning` JSON);
SELECT JSON_VALUE(`returning`, '$.a' RETURNING CHAR) AS `returning` FROM `returning`;
DROP TABLE `returning`;

--echo # Test ON EMPTY clause
SELECT JSON_VALUE('{"data": 123}', '$.num' RETURNING SIGNED) v;
Expand Down
Loading
Loading