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

CREATE TABLE t1 (<defs>) SELECT... does not preserve new SRID

    XMLWordPrintable

    Details

      Description

      DROP TABLE IF EXISTS t1,t2;
      CREATE TABLE t1 (a POINT REF_SYSTEM_ID=10 );
      CREATE TABLE t2 (a POINT REF_SYSTEM_ID=11) AS SELECT * FROM t1;
      SELECT G_TABLE_NAME,G_GEOMETRY_COLUMN,SRID FROM INFORMATION_SCHEMA.GEOMETRY_COLUMNS WHERE G_TABLE_NAME IN ('t1','t2');
      

      +--------------+-------------------+------+
      | G_TABLE_NAME | G_GEOMETRY_COLUMN | SRID |
      +--------------+-------------------+------+
      | t1           | a                 |   10 |
      | t2           | a                 |   10 |
      +--------------+-------------------+------+
      

      The expected SRID value for t2.a should be 11 rather than 10.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: