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

Predicates under spatial index cause transaction errors

    XMLWordPrintable

Details

    Description

      Considering following queries:

      DROP table if EXISTS t1;
      DROP table if EXISTS t2;
       
      CREATE TABLE t1(geom GEOMETRY NOT NULL);
      CREATE TABLE t2(geom GEOMETRY NOT NULL);
      INSERT INTO t1 (geom) VALUES(ST_GeomFromText('LINESTRING(2 0,1 1,2 2,2 0)'));
      INSERT INTO t2 (geom) VALUES(ST_GeomFromText('POLYGON((4 4,0 1,0 2,4 4))'));
       
      ALTER TABLE t1 ADD SPATIAL INDEX (geom);
      ALTER TABLE t2 ADD SPATIAL INDEX (geom);
       
       
      SELECT ST_Disjoint(t1.geom, t2.geom) FROM t1 JOIN t2;
      --result: {1}  as expected
       
      SELECT ST_Disjoint(t1.geom, t2.geom) FROM t1 JOIN t2 ON ST_Disjoint(t1.geom, t2.geom);
       
      --result:  /* SQLError(1207):Update locks cannot be acquired during a READ UNCOMMITTED transaction */ as unexpected
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nbvfgh Shijie Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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