MariaDB [bug869001]> alter table t2 engine=innodb; Query OK, 1 row affected (1.43 sec) Records: 1 Duplicates: 0 Warnings: 0
MariaDB [bug869001]> explain SELECT * FROM t1 JOIN t2 ON (t2.f4 = t1.f3 ) WHERE ( 8 ) IN ( SELECT t3.f1 FROM t3 , t4 ); +----+-------------+-------+------+---------------+------+---------+-----------------+------+-----------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+---------------+------+---------+-----------------+------+-----------------------------+ | 1 | PRIMARY | t2 | ALL | NULL | NULL | NULL | NULL | 1 | Using where | | 1 | PRIMARY | t1 | ref | f3 | f3 | 4 | bug869001.t2.f4 | 1 | Using index | | 1 | PRIMARY | t4 | ALL | NULL | NULL | NULL | NULL | 3 | | | 1 | PRIMARY | t3 | ALL | NULL | NULL | NULL | NULL | 5 | Using where; FirstMatch(t1) | +----+-------------+-------+------+---------------+------+---------+-----------------+------+-----------------------------+ 4 rows in set (0.06 sec)
MariaDB [bug869001]> alter table t2 engine=innodb;
Query OK, 1 row affected (1.43 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB [bug869001]> explain SELECT * FROM t1 JOIN t2 ON (t2.f4 = t1.f3 ) WHERE ( 8 ) IN ( SELECT t3.f1 FROM t3 , t4 ); ------- -----+- ------+ ------+ ------- ------- -+----- -+----- ----+-- ------- ------- -+----- -+----- ------- ------- ------- ---+ ------- -----+- ------+ ------+ ------- ------- -+----- -+----- ----+-- ------- ------- -+----- -+----- ------- ------- ------- ---+ ------- -----+- ------+ ------+ ------- ------- -+----- -+----- ----+-- ------- ------- -+----- -+----- ------- ------- ------- ---+
+----+-
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-
| 1 | PRIMARY | t2 | ALL | NULL | NULL | NULL | NULL | 1 | Using where |
| 1 | PRIMARY | t1 | ref | f3 | f3 | 4 | bug869001.t2.f4 | 1 | Using index |
| 1 | PRIMARY | t4 | ALL | NULL | NULL | NULL | NULL | 3 | |
| 1 | PRIMARY | t3 | ALL | NULL | NULL | NULL | NULL | 5 | Using where; FirstMatch(t1) |
+----+-
4 rows in set (0.06 sec)