mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-25 18:38:00 +03:00 
			
		
		
		
	 6223deb694
			
		
	
	6223deb694
	
	
	
		
			
			Post pushbuild fix Disabled test on windows due to bug#30459 (DATA/INDEX DIR for partitions not working on windows) Patch from Mattias Jonsson.
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| -- source include/have_partition.inc
 | |
| --disable_warnings
 | |
| DROP TABLE IF EXISTS t1;
 | |
| --enable_warnings
 | |
| 
 | |
| #
 | |
| # Bug 21143: mysqld hang when error in number of subparts in
 | |
| #            REORGANIZE command
 | |
| #
 | |
| create table t1 (a int)
 | |
| partition by range (a)
 | |
| subpartition by key (a)
 | |
| (partition p0 values less than (10) (subpartition sp00, subpartition sp01),
 | |
|  partition p1 values less than (20) (subpartition sp10, subpartition sp11));
 | |
| 
 | |
| -- error ER_PARTITION_WRONG_NO_SUBPART_ERROR
 | |
| alter table t1 reorganize partition p0 into
 | |
| (partition p0 values less than (10) (subpartition sp00,
 | |
| subpartition sp01, subpartition sp02));
 | |
| drop table t1;
 | |
|  
 | |
| CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
 | |
| PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2;
 | |
| SHOW CREATE TABLE t1;
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
 | |
| ALTER TABLE t1 COALESCE PARTITION 1;
 | |
| SHOW CREATE TABLE t1;
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
 | |
| -- file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
 | |
| drop table t1;
 | |
| #
 | |
| # Bug 20767: REORGANIZE partition crashes
 | |
| #
 | |
| create table t1 (a int)
 | |
| partition by list (a)
 | |
| subpartition by hash (a)
 | |
| (partition p11 values in (1,2),
 | |
|  partition p12 values in (3,4));
 | |
| 
 | |
| alter table t1 REORGANIZE partition p11, p12 INTO
 | |
| (partition p1 values in (1,2,3,4));
 | |
| 
 | |
| alter table t1 REORGANIZE partition p1 INTO
 | |
| (partition p11 values in (1,2),
 | |
|  partition p12 values in (3,4));
 | |
| 
 | |
| drop table t1;
 |