mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
MDEV-23699 Assertion failed in ha_tina::delete_row
When REPAIRing a CSV table, the CSV engine marks the table as having no rows in the case that there are rows only in memory but not yet written to disk. In this case, there's actually nothing to repair, since nothing exists on disk; make REPAIR idempotent for CSV tables.
This commit is contained in:
parent
3c38c37432
commit
060c0e3ff5
3 changed files with 24 additions and 5 deletions
|
|
@ -1515,10 +1515,10 @@ error:
|
|||
check_opt The options for repair. We do not use it currently.
|
||||
|
||||
DESCRIPTION
|
||||
If the file is empty, change # of rows in the file and complete recovery.
|
||||
Otherwise, scan the table looking for bad rows. If none were found,
|
||||
Scan the table looking for bad rows. If none were found,
|
||||
we mark file as a good one and return. If a bad row was encountered,
|
||||
we truncate the datafile up to the last good row.
|
||||
If the file is empty, then do nothing and complete recovery.
|
||||
|
||||
TODO: Make repair more clever - it should try to recover subsequent
|
||||
rows (after the first bad one) as well.
|
||||
|
|
@ -1536,10 +1536,7 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
|
||||
/* empty file */
|
||||
if (!share->saved_data_file_length)
|
||||
{
|
||||
share->rows_recorded= 0;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Don't assert in field::val() functions */
|
||||
table->use_all_columns();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue