summaryrefslogtreecommitdiff
path: root/mysql-test/main/mysql_upgrade_mysql_json_datatype.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/mysql_upgrade_mysql_json_datatype.result')
-rw-r--r--mysql-test/main/mysql_upgrade_mysql_json_datatype.result104
1 files changed, 104 insertions, 0 deletions
diff --git a/mysql-test/main/mysql_upgrade_mysql_json_datatype.result b/mysql-test/main/mysql_upgrade_mysql_json_datatype.result
new file mode 100644
index 00000000000..25bc70c9074
--- /dev/null
+++ b/mysql-test/main/mysql_upgrade_mysql_json_datatype.result
@@ -0,0 +1,104 @@
+call mtr.add_suppression("Table rebuild required");
+call mtr.add_suppression("is marked as crashed");
+call mtr.add_suppression("Checking");
+SET NAMES utf8;
+set sql_mode="";
+show create table tempty;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
+show create table mysql_json_test;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
+show create table mysql_json_test_big;
+ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
+# Run mysql_upgrade to fix the tables containing JSON.
+Phase 1/7: Checking and upgrading mysql database
+Processing databases
+mysql
+mysql.column_stats OK
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.global_priv OK
+mysql.gtid_slave_pos OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.index_stats OK
+mysql.innodb_index_stats OK
+mysql.innodb_table_stats OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.proxies_priv OK
+mysql.roles_mapping OK
+mysql.servers OK
+mysql.table_stats OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.transaction_registry OK
+Phase 2/7: Installing used storage engines... Skipped
+Phase 3/7: Fixing views
+mysql.user OK
+Phase 4/7: Running 'mysql_fix_privilege_tables'
+Phase 5/7: Fixing table and database names
+Phase 6/7: Checking and upgrading tables
+Processing databases
+information_schema
+mtr
+mtr.global_suppressions OK
+mtr.test_suppressions OK
+performance_schema
+test
+test.mysql_json_test Needs upgrade
+test.mysql_json_test_big Needs upgrade
+test.tempty Needs upgrade
+
+Repairing tables
+test.mysql_json_test OK
+test.mysql_json_test_big OK
+test.tempty OK
+Phase 7/7: Running 'FLUSH PRIVILEGES'
+OK
+#
+# Now check if the table structure is correct and that the data
+# is still present.
+#
+show create table tempty;
+Table Create Table
+tempty CREATE TABLE `tempty` (
+ `t` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table mysql_json_test;
+Table Create Table
+mysql_json_test CREATE TABLE `mysql_json_test` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+show create table mysql_json_test_big;
+Table Create Table
+mysql_json_test_big CREATE TABLE `mysql_json_test_big` (
+ `description` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `expected` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `actual` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test;
+Total_Number_of_Tests Succesful_Tests String_is_valid_JSON
+100 100 100
+select count(*) as 'Total_Number_of_Tests',
+sum(expected = actual) as 'Succesful_Tests',
+sum(JSON_VALID(actual)) as 'String_is_valid_JSON'
+from mysql_json_test_big;
+Total_Number_of_Tests Succesful_Tests String_is_valid_JSON
+1 1 1
+drop table tempty;
+drop table mysql_json_test;
+drop table mysql_json_test_big;