config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb/t/alter_missing_tablespace.test

--source include/not_embedded.inc
--source include/have_innodb.inc

--echo #
--echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING
--echo # OR DISCARDED TABLESPACES
--echo #

let $MYSQLD_DATADIR=`select @@datadir`;
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a INT)ENGINE=InnoDB;

--source include/shutdown_mysqld.inc

# Remove the tablespace file.
let IBD=$MYSQLD_DATADIR/test/t.ibd;
perl;
unlink "$ENV{IBD}" || die "Unable to unlink $ENV{IBD}\n";
EOF

--source include/start_mysqld.inc

--disable_query_log
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for table `test`\.`t` because the \.ibd file is missing");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot delete tablespace [0-9]+ in DISCARD TABLESPACE: Tablespace not found");
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot delete tablespace [0-9]+ because it is not found in the tablespace memory cache");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only:");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Could not find a valid tablespace file for");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to find tablespace for table `test`.`t` in the cache");
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace open failed for `test`\.`t`, ignored");
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified.");
--enable_query_log

# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().
# The table does exist, only the tablespace does not exist.
--error ER_TABLESPACE_MISSING
SELECT * FROM t;

--error ER_TABLESPACE_MISSING
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
SHOW WARNINGS;

--error ER_NO_SUCH_TABLE
ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
SHOW WARNINGS;

--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE;
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE;
ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE;
ALTER TABLE t DISCARD TABLESPACE;
DROP TABLE t;

#Check with tables having special characters

CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO `x..d` (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8);

--source include/shutdown_mysqld.inc
--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/test/x@002e@002ed.ibd
--source include/start_mysqld.inc

--disable_query_log
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to find tablespace for table `test`\.`x\.\.d` in the cache");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for table `test`\.`x\.\.d` because the .ibd file is missing.");
--enable_query_log

--error ER_TABLESPACE_MISSING
select * from `x..d`;

DROP TABLE `x..d`;

Man Man