summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2019-06-07 02:38:29 -0700
committerAnel Husakovic <anel@mariadb.org>2019-07-08 08:53:29 -0700
commit1a7853a764b908700072f2c7db5ffbdd1ad54d8c (patch)
tree985ae8672e4fc8bb9f4d0bb48de1cb54dc6d7368
parentc8f98428b736f4b5529e062e32c42a6af2bc25c9 (diff)
downloadmariadb-git-1a7853a764b908700072f2c7db5ffbdd1ad54d8c.tar.gz
Mixed test
-rw-r--r--mysql-test/main/anel_json.result31
-rw-r--r--mysql-test/main/anel_json.test17
-rw-r--r--mysql-test/std_data/tjson.MYDbin0 -> 940 bytes
-rw-r--r--mysql-test/std_data/tjson.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/tjson.frmbin0 -> 8556 bytes
5 files changed, 16 insertions, 32 deletions
diff --git a/mysql-test/main/anel_json.result b/mysql-test/main/anel_json.result
deleted file mode 100644
index 56652e374c1..00000000000
--- a/mysql-test/main/anel_json.result
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# MDEV-18323: Convert MySQL JSON type to MariaDB TEXT in mysql_upgrade
-# Test integers
-#
-drop table if exists mysql_json;
-Warnings:
-Note 1051 Unknown table 'test.mysql_json'
-#
-# String value
-#
-select * from test.mysql_json;
-t
-{"key1":"val1","key2":"val2"}
-Finshed
-drop table mysql_json;
-#
-# Negative value
-#
-select * from test.mysql_json;
-t
-{"neg":-10}
-Finshed
-drop table mysql_json;
-#
-# Mix of INT32 and UINT64
-#
-select * from test.mysql_json;
-t
-{"neg":-1234567890,"pos":9876543210}
-Finshed
-drop table mysql_json;
diff --git a/mysql-test/main/anel_json.test b/mysql-test/main/anel_json.test
index 21c06390546..30ecbd51237 100644
--- a/mysql-test/main/anel_json.test
+++ b/mysql-test/main/anel_json.test
@@ -6,6 +6,21 @@
let $datadir=`select @@datadir`;
drop table if exists mysql_json;
+
+--echo #
+--echo # Mix of everything
+--echo #
+
+# Make sure you have placed `json.[frm/myd/myi]` files in `source/mysql-test/std_data/`
+--copy_file std_data/tjson.frm $datadir/test/mysql_json.frm
+--copy_file std_data/tjson.MYI $datadir/test/mysql_json.MYI
+--copy_file std_data/tjson.MYD $datadir/test/mysql_json.MYD
+
+# Now can read
+select * from test.mysql_json;
+
+drop table mysql_json;
+
--echo #
--echo # String value
--echo #
@@ -44,4 +59,4 @@ drop table mysql_json;
# Now can read
select * from test.mysql_json;
-drop table mysql_json; \ No newline at end of file
+drop table mysql_json;
diff --git a/mysql-test/std_data/tjson.MYD b/mysql-test/std_data/tjson.MYD
new file mode 100644
index 00000000000..c062948c735
--- /dev/null
+++ b/mysql-test/std_data/tjson.MYD
Binary files differ
diff --git a/mysql-test/std_data/tjson.MYI b/mysql-test/std_data/tjson.MYI
new file mode 100644
index 00000000000..9c5cc8ca6c3
--- /dev/null
+++ b/mysql-test/std_data/tjson.MYI
Binary files differ
diff --git a/mysql-test/std_data/tjson.frm b/mysql-test/std_data/tjson.frm
new file mode 100644
index 00000000000..0ba3625d9ff
--- /dev/null
+++ b/mysql-test/std_data/tjson.frm
Binary files differ