CREATE TABLE t1 (c POINT NOT NULL);
|
ALTER TABLE t1 ADD SPATIAL INDEX b1(c DESC);
|
ALTER TABLE t1 ADD SPATIAL INDEX b2(c DESC);
|
|
# Cleanup
|
DROP TABLE t1;
|
preview-10.8-MDEV-13756-desc-indexes c10e10c6
|
MariaDB [test]> ALTER TABLE t1 ADD SPATIAL INDEX b1(c DESC);
|
Query OK, 0 rows affected (0.024 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> ALTER TABLE t1 ADD SPATIAL INDEX b2(c DESC);
|
Query OK, 0 rows affected (0.026 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
Without the DESC attribute (or, on previous versions, regardless of it) the second ALTER causes a warning:
MariaDB [test]> ALTER TABLE t1 ADD SPATIAL INDEX b1(c);
|
Query OK, 0 rows affected (0.023 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> ALTER TABLE t1 ADD SPATIAL INDEX b2(c);
|
Query OK, 0 rows affected, 1 warning (0.024 sec)
|
Records: 0 Duplicates: 0 Warnings: 1
|
|
MariaDB [test]> show warnings;
|
+-------+------+-------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+-------------------------------------------------------------------------------------+
|
| Note | 1831 | Duplicate index `b2`. This is deprecated and will be disallowed in a future release |
|
+-------+------+-------------------------------------------------------------------------------------+
|
1 row in set (0.000 sec)
|