summaryrefslogtreecommitdiff
path: root/mysql-test/suite/json/r/json_table_notembedded.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/json/r/json_table_notembedded.result')
-rw-r--r--mysql-test/suite/json/r/json_table_notembedded.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/json/r/json_table_notembedded.result b/mysql-test/suite/json/r/json_table_notembedded.result
new file mode 100644
index 00000000000..e277a87999d
--- /dev/null
+++ b/mysql-test/suite/json/r/json_table_notembedded.result
@@ -0,0 +1,20 @@
+create database db;
+use db;
+create table t (a text);
+insert into t values ('{"foo":"bar"}');
+create user u@localhost;
+grant select (a) on db.t to u@localhost;
+connect con1,localhost,u,,db;
+select a from t;
+a
+{"foo":"bar"}
+select * from t, json_table(t.a, '$' columns(f varchar(20) path '$.foo')) as jt;
+a f
+{"foo":"bar"} bar
+select * into outfile 'f' from json_table('[]', '$' columns(x for ordinality)) q;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: NO)
+connection default;
+disconnect con1;
+drop user u@localhost;
+drop database db;
+use test;