Skip to content

MDEV-40383:innodb_gis.point_basic fails on replay#5446

Open
bsrikanth-mariadb wants to merge 1 commit into
bb-12.3-MDEV-39368-test-replay-preview-treefrom
13.1-MDEV-40383-innodb_gis.point_basic-fails-on-replay
Open

MDEV-40383:innodb_gis.point_basic fails on replay#5446
bsrikanth-mariadb wants to merge 1 commit into
bb-12.3-MDEV-39368-test-replay-preview-treefrom
13.1-MDEV-40383-innodb_gis.point_basic-fails-on-replay

Conversation

@bsrikanth-mariadb

@bsrikanth-mariadb bsrikanth-mariadb commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

There are 2 problems: -

  1. The REPLACE statement that is recorded doesn't store the
    value of geometry type field correctly.
  2. The table definition that got recorded has fields with non-null constraint,
    and no default value is specified.
    Also, the "REPLACE INTO" statement that gets stored in the context,
    doesn't have any value specified for these non-null fields.

Solution is to: -

  1. Store all the non-numeric values in HEX, when using REPLACE INTO
    statement.
  2. Instead of storing only the column values that were projected in the
    query, store all the column values into the recorded REPLACE INTO
    statement.

Implementation details: -

  1. Modify the format_and_store_row() method in filesort.cc, to accept an
    argument that tells whether to store non-numeric vales in hex or the
    default string type. The value of new argument is by default false,
    but is set to TRUE, when recording a const row for base tables.
    The default value of FALSE is used when mysql.[table|column|index]_stats
    table is used in the REPLACE INTO statement.
  2. From join_read_const(), and join_read_system() methods in sql_select.cc,
    re-read the const row for all the fields in the table. After the row
    is re-read and recorded, restore the table->read_set, and the const row,
    to the value that was before.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@bsrikanth-mariadb
bsrikanth-mariadb force-pushed the 13.1-MDEV-40383-innodb_gis.point_basic-fails-on-replay branch from 62c5d41 to d7ceeb9 Compare July 23, 2026 16:24
There are 2 problems: -
1. The REPLACE statement that is recorded doesn't store the
   value of geometry type field correctly.
2. The table definition that got recorded has fields with non-null constraint,
   and no default value is specified.
   Also, the "REPLACE INTO" statement that gets stored in the context,
   doesn't have any value specified for these non-null fields.

Solution is to: -
1. Store all the non-numeric values in HEX, when using REPLACE INTO
   statement.
2. Instead of storing only the column values that were projected in the
   query, store all the column values into the recorded REPLACE INTO
   statement.

Implementation details: -
1. Modify the format_and_store_row() method in filesort.cc, to accept an
   argument that tells whether to store non-numeric vales in hex or the
   default string type. The value of new argument is by default false,
   but is set to TRUE, when recording a const row for base tables.
   The default value of FALSE is used when mysql.[table|column|index]_stats
   table is used in the REPLACE INTO statement.
2. From join_read_const(), and join_read_system() methods in sql_select.cc,
   re-read the const row for all the fields in the table. After the row
   is re-read and recorded, restore the table->read_set, and the const row,
   to the value that was before.
@bsrikanth-mariadb
bsrikanth-mariadb force-pushed the 13.1-MDEV-40383-innodb_gis.point_basic-fails-on-replay branch from d7ceeb9 to 12df834 Compare July 24, 2026 02:51
@mariadb-pavithrapandith

Copy link
Copy Markdown

Test failure is fixed with the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants