diff options
author | Michael Widenius <monty@mariadb.org> | 2018-03-09 14:05:35 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:44 +0300 |
commit | a7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch) | |
tree | 70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/mysql_upgrade_noengine.test | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/mysql_upgrade_noengine.test')
-rw-r--r-- | mysql-test/main/mysql_upgrade_noengine.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/mysql-test/main/mysql_upgrade_noengine.test b/mysql-test/main/mysql_upgrade_noengine.test new file mode 100644 index 00000000000..1d65e7ffa1c --- /dev/null +++ b/mysql-test/main/mysql_upgrade_noengine.test @@ -0,0 +1,62 @@ +# +# MDEV-11942 BLACKHOLE is no longer active in 10.1 by default, mysql_upgrade not handling the situation +# +source include/have_innodb.inc; +source include/not_embedded.inc; + +if (!$HA_BLACKHOLE_SO) { + skip Need blackhole plugin; +} +if (!$HA_ARCHIVE_SO) { + skip Need Archive plugin; +} + +let $datadir= `select @@datadir`; + +install soname 'ha_blackhole'; +install soname 'ha_archive'; + +vertical_results; +create table t1 (a int) engine=blackhole; +create table t2 (a int) engine=archive; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; + +flush tables; +uninstall plugin blackhole; +uninstall plugin archive; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; + +# upgrade from 10.1 - engines aren't enabled +exec $MYSQL_UPGRADE 2>&1; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; + +# pretend it's an upgrade from 10.0 +alter table mysql.user drop column default_role, drop column max_statement_time; + +# but mysql_upgrade_info tells otherwise +remove_file $datadir/mysql_upgrade_info; +write_file $datadir/mysql_upgrade_info; +10.1.10-MariaDB +EOF + +# still upgrade from 10.1 +exec $MYSQL_UPGRADE 2>&1; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; + +alter table mysql.user drop column default_role, drop column max_statement_time; +remove_file $datadir/mysql_upgrade_info; + +# upgrade from 10.0 - engines are enabled +exec $MYSQL_UPGRADE 2>&1; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; +select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; + +drop table t1, t2; + +remove_file $datadir/mysql_upgrade_info; +uninstall plugin blackhole; +uninstall plugin archive; |