1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

post-fixes for TRUNCATE

* fix the truncate-by-handler variant, used by InnoDB
* test that insert works after truncate, meaning graph table was emptied
* test that the vector index size is zero after truncate in MyISAM
This commit is contained in:
Sergei Golubchik
2024-07-25 20:27:50 +02:00
parent 70575defb7
commit ebcbed6d74
8 changed files with 68 additions and 14 deletions

View File

@@ -5478,7 +5478,7 @@ handler::ha_delete_all_rows()
int err= delete_all_rows();
if (!err)
err= table->hlindexes_on_delete_all();
err= table->hlindexes_on_delete_all(false);
return err;
}
@@ -5497,7 +5497,14 @@ handler::ha_truncate()
m_lock_type == F_WRLCK);
mark_trx_read_write();
return truncate();
int err= truncate();
if (!err && table->s->hlindexes())
{
if (!(err= table->hlindex_open(table->s->keys)))
err= table->hlindexes_on_delete_all(true);
}
return err;
}