1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00
Files
mariadb/mysql-test/t/partition_not_windows.test
msvensson@pilot.mysql.com d918988baa WL#4189
- dynamic configuration support
 - safe process
 - cleanups
 - create new suite for fedarated
2007-12-12 18:19:24 +01:00

102 lines
4.0 KiB
Plaintext

# Non-windows specific partition tests.
--source include/not_windows.inc
--source include/have_partition.inc
# DATA DIRECTORY/INDEX DIRECTORY require symbolic link support
--source include/have_symlink.inc
# The test for Bug 20770 is disabled on Windows due to BUG#19107; it
# should be moved into partition.test once the bug has been resolved.
#
# Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize
# doesn't remove old directory
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
--exec mkdir $MYSQLD_DATADIR/tmpdata || true
eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLD_DATADIR/tmpdata''';
let $data_directory = `select @data_dir`;
--exec mkdir $MYSQLD_DATADIR/tmpinx || true
eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLD_DATADIR/tmpinx''';
let $inx_directory = `select @inx_dir`;
--enable_query_log
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
eval create table t1 (a int) engine myisam
partition by range (a)
subpartition by hash (a)
(partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart00, SUBPARTITION subpart01));
--echo Checking if file exists before alter
--file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLD_DATADIR/test/t1.par
--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart00.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart00.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart01.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart01.MYI
--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p0#SP#subpart00.MYD
--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p0#SP#subpart01.MYD
--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p0#SP#subpart00.MYI
--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p0#SP#subpart01.MYI
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart10, SUBPARTITION subpart11),
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
(SUBPARTITION subpart20, SUBPARTITION subpart21));
--echo Checking if file exists after alter
--file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLD_DATADIR/test/t1.par
--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart10.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart10.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart11.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart11.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart21.MYI
--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p1#SP#subpart10.MYD
--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p1#SP#subpart11.MYD
--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLD_DATADIR/tmpdata/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p1#SP#subpart10.MYI
--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p1#SP#subpart11.MYI
--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLD_DATADIR/tmpinx/t1#P#p2#SP#subpart21.MYI
drop table t1;
--exec rmdir $MYSQLD_DATADIR/tmpdata || true
--exec rmdir $MYSQLD_DATADIR/tmpinx || true
# End Windows specific test failures.
# These tests contain non-Windows specific directory/file format.
#
# Bug 25141: Crash Server on Partitioning command
#
--disable_warnings
DROP TABLE IF EXISTS `example`;
--enable_warnings
--disable_abort_on_error
CREATE TABLE `example` (
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
`DESCRIPTION` varchar(30) NOT NULL,
`LEVEL` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`ID_EXAMPLE`)
) ENGINE = MYISAM
PARTITION BY HASH(ID_EXAMPLE)(
PARTITION p0 DATA DIRECTORY = '/build/5.1/data/partitiontest/p0Data',
PARTITION p1 DATA DIRECTORY = '/build/5.1/data/partitiontest/p1Data',
PARTITION p2 DATA DIRECTORY = '/build/5.1/data/partitiontest/p2Data',
PARTITION p3 DATA DIRECTORY = '/build/5.1/data/partitiontest/p3Data'
);
--enable_abort_on_error