[MDEV-14829] Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE Created: 2017-12-31 Updated: 2019-08-02 Resolved: 2018-02-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update, Versioned Tables |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Eugene Kosov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
No visible effect on non-debug build. |
| Comments |
| Comment by Eugene Kosov (Inactive) [ 2018-01-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reproducible also with `myisam` and `--repeat=100`. After fixing incorrect error handling we see this: `1062: Duplicate entry '1-2018-01-27 21:30:30.184977' for key 'PRIMARY'` That's a design limitation of system-versioning implementation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eugene Kosov (Inactive) [ 2018-01-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Deadlock from InnoDB:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eugene Kosov (Inactive) [ 2018-01-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Deadlock is caused by InnoDB gap lock. It's ok for UPDATE without WHERE. First case from https://jira.mariadb.org/browse/MDEV-14794 related to this issue: inserting historical rows with zero or even negative lifetime should be prohibited. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eugene Kosov (Inactive) [ 2018-01-31 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Updating the same row from different connections:
Versioned UPDATE is UPDATE + INSERT https://github.com/MariaDB/server/blob/10.3/sql/sql_update.cc#L917
|