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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user