mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
drop aux shadow table on destroy
This commit is contained in:
parent
163654b93a
commit
d6adbc9f56
4 changed files with 37 additions and 6 deletions
12
sqlite-vec.c
12
sqlite-vec.c
|
|
@ -4835,6 +4835,18 @@ static int vec0Destroy(sqlite3_vtab *pVtab) {
|
|||
}
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
if(p->numAuxiliaryColumns > 0) {
|
||||
zSql = sqlite3_mprintf("DROP TABLE " VEC0_SHADOW_AUXILIARY_NAME, p->schemaName, p->tableName);
|
||||
rc = sqlite3_prepare_v2(p->db, zSql, -1, &stmt, 0);
|
||||
sqlite3_free((void *)zSql);
|
||||
if ((rc != SQLITE_OK) || (sqlite3_step(stmt) != SQLITE_DONE)) {
|
||||
rc = SQLITE_ERROR;
|
||||
goto done;
|
||||
}
|
||||
sqlite3_finalize(stmt);
|
||||
}
|
||||
|
||||
stmt = NULL;
|
||||
rc = SQLITE_OK;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue