mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	 2a54abd582
			
		
	
	2a54abd582
	
	
	
		
			
			- The function build_table_filename() builds up a string unconditionally using the forward slash as a path separator. Later, when the string is searched for FN_LIBCHAR by the set_up_table_before_create() function, a null pointer is returned that is finally used by strlen in the append_file_to_dir() function which causes the crash.
		
			
				
	
	
		
			28 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| create table t1 (a int) engine myisam
 | |
| partition by range (a)
 | |
| subpartition by hash (a)
 | |
| (partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
 | |
| (SUBPARTITION subpart00, SUBPARTITION subpart01));
 | |
| Checking if file exists before alter
 | |
| ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
 | |
| (partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
 | |
| (SUBPARTITION subpart10, SUBPARTITION subpart11),
 | |
| partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
 | |
| (SUBPARTITION subpart20, SUBPARTITION subpart21));
 | |
| Checking if file exists after alter
 | |
| drop table t1;
 | |
| DROP TABLE IF EXISTS `example`;
 | |
| 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'
 | |
| );
 | |
| ERROR HY000: Can't create/write to file '/build/5.1/data/partitiontest/p0Data/example#P#p0.MYD' (Errcode: 2)
 |