--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_innodb_16k.inc 

--echo #
--echo # Bug #18010711	UNIQUE PREFIX INDEX ON BINARY COLUMN: FAILING
--echo # ASSERTION: FLEN == LEN
--echo #
create table t1 (f1 binary(5)) engine=innodb;
insert into t1 values ('w'), ('w');
--error ER_DUP_ENTRY
create unique index index_t1 on t1(f1(4));
drop table t1;

--echo #
--echo #BUG#21326304 INNODB ONLINE ATER TABLE ENDS IN CRASH ON DISK FULL
--echo #
CREATE TABLE t1(f1 CHAR(255) NOT NULL, f2 CHAR(255) NOT NULL, f3
CHAR(255) NOT NULL, f4 CHAR(255) NOT NULL, f5 CHAR(255) NOT NULL,f6
CHAR(255) NOT NULL, f7 CHAR(255) NOT NULL, f8 CHAR(255) NOT NULL,f9
CHAR(255) NOT NULL, f10 CHAR(255) NOT NULL, f11 CHAR(255) NOT NULL,f12
CHAR(255) NOT NULL, f13 CHAR(255) NOT NULL, f14 CHAR(255) NOT NULL,f15
CHAR(255) NOT NULL, f16 CHAR(255) NOT NULL, f17 CHAR(255) NOT NULL,f18
CHAR(255) NOT NULL)ENGINE=INNODB;

INSERT INTO t1
VALUES('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r');

INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;

SET SESSION debug="+d,disk_is_full";

--error ER_RECORD_FILE_FULL
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;

SET SESSION debug="-d,disk_is_full";

DROP TABLE t1;
