Created
November 18, 2020 08:37
-
-
Save javahippie/05b8d5e5ccc6630ec2b7aa017c07a00c to your computer and use it in GitHub Desktop.
Simple repro case to create a segfault in Oracle 19c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE JSON_TEST( | |
ID NUMBER(19, 0) NOT NULL, | |
JSON_COLUMN VARCHAR2(4000 CHAR) NOT NULL | |
); | |
ALTER TABLE JSON_TEST ADD CONSTRAINT CHECK_JSON CHECK (JSON_COLUMN IS JSON); | |
INSERT INTO JSON_TEST (ID, JSON_COLUMN) VALUES (1, '{"languages": [{"id": "1", "name": "java"}, | |
{"id": "2", "name": "clojure"}, | |
{"id": "3", "name": "sql"}]}'); | |
WITH json as | |
( | |
select * | |
from JSON_TEST j, | |
json_table(j.JSON_COLUMN, '$' columns ( | |
nested path '$.languages[*]' columns ( | |
lang_id path '$.id' null on error, | |
lang_name path '$.name' null on error))) | |
) SELECT * FROM json; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment