diff options
author | Igor Babaev <igor@askmonty.org> | 2017-08-10 16:23:26 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2017-08-10 16:23:26 -0700 |
commit | 5a71e6bd5a61dff6d549d2c4f5927bbbd7ebcfee (patch) | |
tree | 98ca05164f4a2bf2fce6e1644bc6335193e69bbd /mysql-test/r/func_json.result | |
parent | 1710dd2bf286f9a240f380925a0067c57c1b29f9 (diff) | |
parent | bf75dcac89d1496032015526dc6ce78d327e329f (diff) | |
download | mariadb-git-bb-10-ext-mdev-13369.tar.gz |
Merge branch 'bb-10.2-ext' into bb-10-ext-mdev-13369bb-10-ext-mdev-13369
# Conflicts:
# mysql-test/r/derived_cond_pushdown.result
# mysql-test/t/derived_cond_pushdown.test
# sql/sql_derived.cc
# sql/sql_select.cc
# sql/sql_select.h
Diffstat (limited to 'mysql-test/r/func_json.result')
-rw-r--r-- | mysql-test/r/func_json.result | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index 03e4c48a3e1..10da7cd95c8 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/func_json.result @@ -356,6 +356,12 @@ json_keys('foo') NULL Warnings: Warning 4038 Syntax error in JSON text in argument 1 to function 'json_keys' at position 1 +select json_keys('{"a":{"c":1, "d":2}, "b":2, "c":1, "a":3, "b":1, "c":2}'); +json_keys('{"a":{"c":1, "d":2}, "b":2, "c":1, "a":3, "b":1, "c":2}') +["a", "b", "c"] +select json_keys('{"c1": "value 1", "c1": "value 2"}'); +json_keys('{"c1": "value 1", "c1": "value 2"}') +["c1"] SET @j = '["abc", [{"k": "10"}, "def"], {"x":"abc"}, {"y":"bcd"}]'; select json_search(@j, 'one', 'abc'); json_search(@j, 'one', 'abc') @@ -642,6 +648,33 @@ SELECT JSON_KEYS(f) FROM t1 ORDER BY 1; JSON_KEYS(f) NULL DROP TABLE t1; +SELECT JSON_EXTRACT( '{"foo":"bar"}', '$[*].*' ); +JSON_EXTRACT( '{"foo":"bar"}', '$[*].*' ) +NULL +SELECT JSON_EXTRACT( '{"foo":"bar"}', '$[*]' ); +JSON_EXTRACT( '{"foo":"bar"}', '$[*]' ) +NULL +select JSON_EXTRACT('{"name":"value"}', '$.name') = 'value'; +JSON_EXTRACT('{"name":"value"}', '$.name') = 'value' +1 +select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = true; +JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = true +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'true' +select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = false; +JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = false +1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'true' +select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = 1; +JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = 1 +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'true' +select JSON_EXTRACT('{\"input1\":\"\\u00f6\"}', '$.\"input1\"'); +JSON_EXTRACT('{\"input1\":\"\\u00f6\"}', '$.\"input1\"') +"\u00f6" # # Start of 10.3 tests # |