Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 12.3, 13.1
-
Unexpected results
Description
mariadb-binlog prints the binary log entry for this statement
INSERT INTO t VALUES |
(ST_GeomFromText('POINT(1 2)')), |
(ST_GeomFromText('POINT(3 4)')); |
with
# Number of rows: 1 |
, no --flashback required.
Code Analysis
The code path uses Rows_log_event::calc_row_event_length() to iterate through a row image.
This method checks both table_def::calc_field_size() and calc_field_event_length() for data validity (even though it only uses calc_field_event_length()'s output).
But calc_field_event_length() does not recognize many data types compared to table_def::calc_field_size() - GEOMETRY beïng one of them, so the 2nd validity check fails, and the counter silently aborts (or emits an error in MDEV-20749) at 1.
Although the duplication between these two functions is technically a separate topic, replacing calc_field_event_length() with table_def::calc_field_size() would fix this issue.
mariadb-binlog --verbose's separate, duplicate (uh) code path that uses only table_def::calc_field_size() proves this, as it is not affected by this issue.
Attachments
Issue Links
- causes
-
MDEV-40236 ERROR when reading GEOMETRY datatype
-
- Open
-
- split from
-
MDEV-40236 ERROR when reading GEOMETRY datatype
-
- Open
-