summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/mysql_json_mysql_upgrade.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/mysql_json_mysql_upgrade.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/mysql_json_mysql_upgrade.test')
-rw-r--r--mysql-test/main/mysql_json_mysql_upgrade.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/main/mysql_json_mysql_upgrade.test b/mysql-test/main/mysql_json_mysql_upgrade.test
new file mode 100644
index 00000000..4380b004
--- /dev/null
+++ b/mysql-test/main/mysql_json_mysql_upgrade.test
@@ -0,0 +1,36 @@
+--echo #
+--echo # MDEV-24093: Detect during mysql_upgrade if type_mysql_json.so
+--echo # is needed and load it
+--echo #
+
+-- source include/have_utf8.inc
+-- source include/mysql_upgrade_preparation.inc
+
+if (!$TYPE_MYSQL_JSON_SO) {
+ skip Need MYSQL_JSON plugin;
+}
+
+SET NAMES utf8;
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--copy_file std_data/mysql_json/mysql_json_test.frm $MYSQLD_DATADIR/test/mysql_json_test.frm
+--copy_file std_data/mysql_json/mysql_json_test.MYI $MYSQLD_DATADIR/test/mysql_json_test.MYI
+--copy_file std_data/mysql_json/mysql_json_test.MYD $MYSQLD_DATADIR/test/mysql_json_test.MYD
+
+--copy_file std_data/mysql_json/mysql_json_test_big.frm $MYSQLD_DATADIR/test/mysql_json_test_big.frm
+--copy_file std_data/mysql_json/mysql_json_test_big.MYI $MYSQLD_DATADIR/test/mysql_json_test_big.MYI
+--copy_file std_data/mysql_json/mysql_json_test_big.MYD $MYSQLD_DATADIR/test/mysql_json_test_big.MYD
+
+--error ER_UNKNOWN_DATA_TYPE
+show create table mysql_json_test;
+
+--exec $MYSQL_UPGRADE --force 2>&1
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+show create table mysql_json_test;
+select * from mysql_json_test;
+show create table mysql_json_test_big;
+select * from mysql.plugin;
+drop table mysql_json_test;
+drop table mysql_json_test_big;