[MDEV-19955] make argument of handler::ha_write_row() const Created: 2019-07-04  Updated: 2019-07-05  Resolved: 2019-07-05

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4.7

Type: Bug Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19486 Server crashes in row_upd or row_upd_... Closed

 Description   

int handler::ha_write_row(uchar * buf);
This interface clearly states that storage engine is allowed to modify memory where buf points.

It was used in native InnoDB system versioned tables and I fixed two bugs on that topic. One is MDEV-19486 and another one is not mentioned in Jira.

Actually, calling code for `handler::ha_write_row()` is not prepared to buffer change by engine. I see not places in the code where it's used now. Thus I see no reason on having a mutable argument here.

I'll make it const to prevent future bugs.



 Comments   
Comment by Alexander Barkov [ 2019-07-05 ]

This patch is OK to push:
https://github.com/MariaDB/server/commit/c9aa495fb67ab4fd5c9790d4f61b7e988423619f

Generated at Thu Feb 08 08:55:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.