1CREATE TABLE articles (
2id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
3title VARCHAR(200),
4body TEXT,
5FULLTEXT (title,body)
6) ENGINE=InnoDB;
7SET @saved_debug_dbug = @@SESSION.debug_dbug;
8SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
9CREATE FULLTEXT INDEX idx ON articles(body);
10ERROR HY000: Out of memory.
11SET SESSION debug_dbug=@saved_debug_dbug;
12ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
13DROP TABLE articles;
14CREATE TABLE t (a INT, b TEXT) engine=innodb;
15SET debug_dbug='+d,alter_table_rollback_new_index';
16ALTER TABLE t ADD FULLTEXT INDEX (b(64));
17ERROR HY000: Unknown error
18SET SESSION debug_dbug=@saved_debug_dbug;
19DROP TABLE t;
20CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
21FULLTEXT KEY(a)) ENGINE=InnoDB;
22CREATE TABLE t2 (b INT, FOREIGN KEY(b) REFERENCES t1(pk)) ENGINE=InnoDB;
23DROP TABLE t1;
24ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
25SET DEBUG_DBUG="+d,fts_instrument_sync";
26INSERT INTO t1 VALUES(1, "mariadb");
27ALTER TABLE t1 FORCE;
28DROP TABLE t2, t1;
29#
30# MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
31#
32CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
33INSERT INTO t1 VALUES(1, "test", "test_1");
34connect con1,localhost,root,,test;
35SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
36SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
37ALTER TABLE t1 ADD FULLTEXT(c);
38connection default;
39SET DEBUG_SYNC='now WAIT_FOR s2';
40START TRANSACTION;
41SELECT * FROM t1;
42a	b	c
431	test	test_1
44SET DEBUG_SYNC='now SIGNAL g2';
45connection con1;
46ERROR HY000: Out of memory.
47disconnect con1;
48connection default;
49SET DEBUG_SYNC=RESET;
50ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
51CHECK TABLE t1;
52Table	Op	Msg_type	Msg_text
53test.t1	check	status	OK
54DROP TABLE t1;
55#
56# MDEV-25663 Double free of transaction during TRUNCATE
57#
58call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
59SET DEBUG_DBUG='-d,ib_create_table_fail_too_many_trx';
60CREATE TABLE t1 (b CHAR(12), FULLTEXT KEY(b)) engine=InnoDB;
61SET @save_dbug= @@debug_dbug;
62SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
63TRUNCATE t1;
64ERROR HY000: Got error -1 "Internal error < 0 (Not system error)" from storage engine InnoDB
65SET debug_dbug=@save_dbug;
66DROP TABLE t1;
67# End of 10.3 tests
68