[MDEV-21391] why not process ha_index_or_rnd_end 's return value Created: 2019-12-25 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update |
| Affects Version/s: | 10.4.8 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | chu huaxing | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Description |
|
#0 mdb::CMdb::rnd_end (this=0x7faaa801e490) at /data01/chuhx_mdb4/mariadb-10.4.8/storage/mdb/src/mdb/mdb.cc:735 (gdb) *we designed our own engine, and rnd_end() may return error , but at records.cc:330 , it is void, so update will success even error! * |
| Comments |
| Comment by Sergei Golubchik [ 2019-12-25 ] |
|
What could the server do if your rnd_end() fails? The update loop is, basically,
so if you fail at rnd_end() what does it mean? The table was already updated. The server cab try to rollback the transaction, if your engine is transactional. Otherwise it's too late to fail. |
| Comment by chu huaxing [ 2020-01-10 ] |
|
But the return value type it defines is int (int ha_rnd_end(); /int ha_index_or_rnd_end();). |
| Comment by Sergei Golubchik [ 2020-01-21 ] |
|
Are you saying that if the engine fails in rnd_end(), the server has to abort the transaction? This sounds reasonable. |
| Comment by chu huaxing [ 2020-02-03 ] |
|
yes, i mean that,when rnd_end() fail, the server should know, and to abort the transaction. |