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

innodb_gis.rtree fails on replay

    XMLWordPrintable

Details

    • Unexpected results
    • Q3/2026 Server Maintenance

    Description

      innodb_gis.rtree fails on replay

       explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
       id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
      -1	SIMPLE	t1	range	g	g	34	NULL	5	Using where
      +1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
       drop table t1;
       
      Result length mismatch
      

      MTR testcase to repro issue: (Say example.test)

      --source include/not_embedded.inc
       
      --source include/have_innodb.inc
       
      # Create table with R-tree index.
      create table t1 (i int, g geometry not null, spatial index (g))engine=innodb;
       
      # Insert values.
      insert into t1 values (1, POINT(1,1));
      insert into t1 values (1, POINT(1.5,1.5));
      insert into t1 values (1, POINT(3,3));
      insert into t1 values (1, POINT(3.1,3.1));
      insert into t1 values (1, POINT(5,5));
       
      analyze table t1;
       
      # Select by R-tree index.
      set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
      explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
      drop table t1;
      

      How to repro

      ./mtr example.test  --record
      ./mtr example.test  --replay-server
      

      Attachments

        Issue Links

          Activity

            People

              bsrikanth Srikanth Bondalapati
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d
                  1d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h Time Not Required
                  1h

                  Git Integration

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