1#
2# Bug #27216817 / #88747 "InnoDB: Failing assertion: prebuilt->table->n_mysql_handles_opened == 1"
3# fixed in 5.5.60, 5.6.40, 5.7.22, 8.0.11
4# Adding a unique index to an InnoDB table on which multiple locks were
5# held could raise an assertion
6#
7CREATE TABLE t1(
8c1 INT NOT NULL,
9c2 TIMESTAMP NOT NULL,
10c3 INT NULL,
11c4 CHAR(1) NOT NULL
12) ENGINE=InnoDB;
13LOCK TABLES t1 WRITE, t1 AS a READ;
14ALTER TABLE t1 ADD PRIMARY KEY(c1);
15UNLOCK TABLES;
16DROP TABLE t1;
17