| 1 |
--source include/have_debug.inc |
| 2 |
--source include/have_innodb_16k.inc |
| 3 |
--source include/not_valgrind.inc |
| 4 |
--source include/have_case_sensitive_file_system.inc |
| 5 |
|
| 6 |
--echo # |
| 7 |
--echo # This test upgrades a database from 8.0.21 and attempts to add |
| 8 |
--echo # autoextend_size tablespace attribute to it's tables |
| 9 |
--echo # and tablespaces |
| 10 |
--echo # |
| 11 |
|
| 12 |
--echo # Stop the running server |
| 13 |
--source include/shutdown_mysqld.inc |
| 14 |
|
| 15 |
--echo ################################################################### |
| 16 |
--echo # Unzip a 8.0.21 database and start the server using this directory |
| 17 |
--echo ################################################################### |
| 18 |
|
| 19 |
--echo ################################################################### |
| 20 |
--echo # Copy and unzip the datadir |
| 21 |
--echo ################################################################### |
| 22 |
--copy_file $MYSQLTEST_VARDIR/std_data/data80021_autoextend_size.zip $MYSQL_TMP_DIR/data80021_autoextend_size.zip |
| 23 |
--file_exists $MYSQL_TMP_DIR/data80021_autoextend_size.zip |
| 24 |
--exec unzip -qo $MYSQL_TMP_DIR/data80021_autoextend_size.zip -d $MYSQL_TMP_DIR |
| 25 |
let $BUGDATADIR = $MYSQL_TMP_DIR/data80021_autoextend_size; |
| 26 |
|
| 27 |
--echo # Restart the server using the new datadir |
| 28 |
--replace_result $BUGDATADIR BUGDATADIR |
| 29 |
--let $restart_parameters = restart: --datadir=$BUGDATADIR --innodb_page_size=16k |
| 30 |
--let $wait_counter=3000 |
| 31 |
--source include/start_mysqld.inc |
| 32 |
|
| 33 |
--echo # Check the contents of INFORMATION_SCHEMA.INNODB_TABLESPACES |
| 34 |
SELECT lower(name), file_size, autoextend_size from |
| 35 |
INFORMATION_SCHEMA.INNODB_TABLESPACES where name like '%t%'; |
| 36 |
|
| 37 |
--echo # Update autoextend_size attribute both for the implicit as |
| 38 |
--echo # well as explicit tablespaces |
| 39 |
ALTER TABLE t5 AUTOEXTEND_SIZE 4M; |
| 40 |
ALTER TABLESPACE ts1 AUTOEXTEND_SIZE 4M; |
| 41 |
|
| 42 |
--echo # Check the contents of INFORMATION_SCHEMA.INNODB_TABLESPACES |
| 43 |
SELECT lower(name), file_size, autoextend_size from |
| 44 |
INFORMATION_SCHEMA.INNODB_TABLESPACES where name like '%t%'; |
| 45 |
|
| 46 |
--echo # Cleanup |
| 47 |
--echo # Shutdown server |
| 48 |
--source include/shutdown_mysqld.inc |
| 49 |
|
| 50 |
--echo # Remove the copied files |
| 51 |
--file_exists $MYSQL_TMP_DIR/data80021_autoextend_size.zip |
| 52 |
--force-rmdir $MYSQL_TMP_DIR/data80021_autoextend_size |
| 53 |
--remove_file $MYSQL_TMP_DIR/data80021_autoextend_size.zip |
| 54 |
|
| 55 |
--echo # Restart the server |
| 56 |
let $restart_parameters =; |
| 57 |
--source include/start_mysqld.inc |