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

@@ -9952,11 +9952,11 @@ int TABLE::hlindexes_on_delete(const uchar *buf)
return 0;
}
int TABLE::hlindexes_on_delete_all()
int TABLE::hlindexes_on_delete_all(bool truncate)
{
DBUG_ASSERT(s->hlindexes() == (hlindex != NULL));
if (hlindex && hlindex->in_use)
if (int err= mhnsw_delete_all(this, key_info + s->keys))
if (int err= mhnsw_delete_all(this, key_info + s->keys, truncate))
return err;
return 0;
}