Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3.16
-
MariaDB 10.3.16 on Debian Linux 9 (AMD64)
Description
On MariaDB 10.3.13 running on Gentoo AMD64… creating a view which references JSON_MERGE works as expected:
MariaDB [test]> create view testview as select json_merge('{"key1":"val1"}','{"key2":"val2"}') as testcol;
|
Query OK, 0 rows affected (0.006 sec)
|
|
MariaDB [test]> show create view testview;
|
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| View | Create View | character_set_client | collation_connection |
|
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| testview | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testview` AS select json_merge('{"key1":"val1"}','{"key2":"val2"}') AS `testcol` | utf8 | utf8_general_ci |
|
+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
1 row in set (0.000 sec)
|
Do the same on 10.3.16 on Debian 9 (AMD64), I get this:
MariaDB [test]> create view testview as select json_merge('{"key1":"val1"}','{"key2":"val2"}') as testcol;
|
Query OK, 0 rows affected (0.006 sec)
|
|
MariaDB [test]> show create view testview;
|
+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| View | Create View | character_set_client | collation_connection |
|
+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| testview | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testview` AS select json_merge_preserve('{"key1":"val1"}','{"key2":"val2"}') AS `testcol` | utf8mb4 | utf8mb4_general_ci |
|
+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
1 row in set (0.001 sec)
|
The json_merge_preserve also appears in mysqldump and this causes restoring the dump to fail.