Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
If I create a new index and specify a type which is not supported by the storage engine:
- the index is created using the default type;
- I get no error / warning.
For example, I tried to create a hash index for XtraDB:
MariaDB [test]> CREATE TABLE t5 (c1 INT) ENGINE = XtraDB;
|
Query OK, 0 rows affected, 2 warnings (0.08 sec)
|
|
|
MariaDB [test]> ALTER TABLE t5 ADD INDEX i1 (c1) USING hash;
|
Query OK, 0 rows affected (0.14 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
|
MariaDB [test]> SHOW WARNINGS;
|
Empty set (0.00 sec)
|
|
|
MariaDB [test]> SHOW INDEX FROM t5;
|
+-------+------------+----------+--------------+-------------+-----------+------
|
-------+----------+--------+------+------------+---------+
|
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardi
|
nality | Sub_part | Packed | Null | Index_type | Comment |
|
+-------+------------+----------+--------------+-------------+-----------+------
|
-------+----------+--------+------+------------+---------+
|
| t5 | 1 | i1 | 1 | c1 | A |
|
NULL | NULL | NULL | YES | BTREE | |
|
+-------+------------+----------+--------------+-------------+-----------+------
|
-------+----------+--------+------+------------+---------+
|
1 row in set (0.00 sec)
|
|
|
MariaDB [test]>
|