mariadb/mysql-test/main/mysql_json_mysql_upgrade.test
Christian Gonzalez 3622644836 MDEV-30498 Rename mysql_upgrade state file to mariadb_upgrade
Renames the upgrade state file, and ensures the old
file is properly removed when `mariadb-upgrade` tool is executed.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
2023-02-07 07:29:04 +00:00

36 lines
1.2 KiB
Text

--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/mariadb_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;