Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27578

DESC attribute upon spatial index creation prevents ER_DUP_INDEX warning

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.8(EOL)
    • 10.11
    • GIS, Server
    • None

    Description

      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)
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.