mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	This is a follow-up to MDEV-18733. As part of that fix, we made dict_check_sys_tables() skip tables that would be dropped by row_mysql_drop_garbage_tables(). DICT_ERR_IGNORE_DROP: A new mode where the file should not be attempted to be opened. dict_load_tablespace(): Do not try to load the tablespace if DICT_ERR_IGNORE_DROP has been specified. row_mysql_drop_garbage_tables(): Pass the DICT_ERR_IGNORE_DROP mode. fil_space_for_table_exists_in_mem(): Remove a parameter. The only caller that passed print_error_if_does_not_exist=true was row_drop_single_table_tablespace().
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| --source include/have_innodb.inc
 | |
| --source include/have_debug.inc
 | |
| # Embedded server does not support restarting
 | |
| --source include/not_embedded.inc
 | |
| 
 | |
| let $MYSQLD_DATADIR=`select @@datadir`;
 | |
| 
 | |
| CREATE TABLE t(c0 SERIAL, c1 INT, c2 INT, c3 INT, c4 INT,
 | |
| KEY(c1), KEY(c2), KEY(c2,c1),
 | |
| KEY(c3), KEY(c3,c1), KEY(c3,c2), KEY(c3,c2,c1),
 | |
| KEY(c4), KEY(c4,c1), KEY(c4,c2), KEY(c4,c2,c1),
 | |
| KEY(c4,c3), KEY(c4,c3,c1), KEY(c4,c3,c2), KEY(c4,c3,c2,c1)) ENGINE=InnoDB;
 | |
| 
 | |
| CREATE TABLE `#mysql50##sql-ib-foo`(a SERIAL) ENGINE=InnoDB;
 | |
| INSERT INTO t (c1) VALUES (1),(2),(1);
 | |
| 
 | |
| let $n= 10;
 | |
| 
 | |
| SET DEBUG_DBUG='+d,row_drop_table_add_to_background';
 | |
| --disable_query_log
 | |
| let $i= $n;
 | |
| while ($i) {
 | |
|   eval CREATE TABLE t$i LIKE t;
 | |
|   dec $i;
 | |
| }
 | |
| let $i= $n;
 | |
| while ($i) {
 | |
|   eval DROP TABLE t$i;
 | |
|   dec $i;
 | |
| }
 | |
| --enable_query_log
 | |
| --error ER_DUP_ENTRY
 | |
| CREATE TABLE target (PRIMARY KEY(c1)) ENGINE=InnoDB SELECT * FROM t;
 | |
| --error ER_NO_SUCH_TABLE
 | |
| SELECT * from target;
 | |
| DROP TABLE t;
 | |
| --source include/shutdown_mysqld.inc
 | |
| --remove_files_wildcard $MYSQLD_DATADIR/test #sql-*.ibd
 | |
| --source include/start_mysqld.inc
 | |
| CREATE TABLE t (a INT) ENGINE=InnoDB;
 | |
| DROP TABLE t;
 | |
| --error ER_BAD_TABLE_ERROR
 | |
| DROP TABLE target;
 | |
| CREATE TABLE target (a INT) ENGINE=InnoDB;
 | |
| DROP TABLE target;
 | |
| --error ER_NO_SUCH_TABLE_IN_ENGINE
 | |
| SELECT * FROM `#mysql50##sql-ib-foo`;
 | |
| DROP TABLE `#mysql50##sql-ib-foo`;
 |