File: discarded_partition_create.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (65 lines) | stat: -rw-r--r-- 2,399 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Testcase used to create DB with partitioned Tables which have
# some partitions discarded.
#
# It uses include/discarded_partition.inc to fill in tables, so
# the results, after upgrade should be the same
#
# Note: to use in 5.7, you have to:
# a) change "#p#" to "#P#" in discarded_partition.inc
# b) change "#sp" to "#SP" in discarded_partition.inc
#

--source include/linux.inc
--source include/have_case_sensitive_file_system.inc
--source include/have_innodb_16k.inc

--let $MYSQLD_DATADIR= `select @@datadir`

select case when @@version like "5.7.30%" then '5730'
            when @@version like "8.0.20%" then '8020'
            else 'none' end as VERSION into @current_server_version;

--let $VERSION= `select @current_server_version`
--let $IS_57= `select case when @@version like "5.7%" then 1 else 0 end`

--echo # Starting server with keyring plugin
--let $restart_parameters = restart: --early-plugin-load="keyring_file=$KEYRING_PLUGIN" --loose-keyring_file_data=$MYSQL_TMP_DIR/mysecret_keyring  $KEYRING_PLUGIN_OPT

--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $KEYRING_PLUGIN_OPT --plugin-dir=KEYRING_PLUGIN_PATH $KEYRING_PLUGIN keyring_file.so
--source include/restart_mysqld.inc

# Prepare database
--let $discarded_partition_option = PREPARE
--source suite/innodb/include/discarded_partition.inc

--echo
--echo # Stop DB server which was created by MTR default
--source include/shutdown_mysqld.inc

if ($IS_57)
{
  --mkdir $MYSQLTEST_VARDIR/std_data/upgrade
}

# Zip data directory and copy
--echo # Copy and zip old version data directory.
--exec ln -s $MYSQLD_DATADIR $MYSQLTEST_VARDIR/data_upgrade
--exec zip -qr $MYSQL_TMP_DIR/data_upgrade.zip $MYSQLTEST_VARDIR/data_upgrade
--file_exists $MYSQL_TMP_DIR/data_upgrade.zip
--move_file $MYSQL_TMP_DIR/data_upgrade.zip  $MYSQLTEST_VARDIR/std_data/upgrade/discarded_partition_data_$VERSION.zip.new
--remove_file $MYSQLTEST_VARDIR/data_upgrade


--echo # Cleanup: Restart with default options.
let $restart_parameters =;
--source include/start_mysqld.inc

# Clean up
--let $discarded_partition_option = DROP_TEST
--source suite/innodb/include/discarded_partition.inc


--remove_file $MYSQL_TMP_DIR/mysecret_keyring

call mtr.add_suppression("\\[Warning\\].* Tablespace .*, name '.*', file '.*' is missing");
call mtr.add_suppression("\\[Warning\\].* Tablespace for table `.*`\\.`.*` /\\* Partition `.*` \\*/ is set as discarded");