1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE

vers_insert_history_row(): do not insert rows with zero or negative lifetime.

mysql_update(): properly handle error from vers_insert_history_row()
This commit is contained in:
Eugene Kosov
2018-02-02 15:01:53 +03:00
committed by Sergei Golubchik
parent 75afaa7e00
commit edeeaac451
7 changed files with 67 additions and 15 deletions

View File

@ -1640,6 +1640,11 @@ int vers_insert_history_row(TABLE *table)
// Set Sys_end to now()
table->vers_update_end();
Field *row_start= table->vers_start_field();
Field *row_end= table->vers_end_field();
if (row_start->cmp(row_start->ptr, row_end->ptr) >= 0)
return 0;
return table->file->ha_write_row(table->record[0]);
}