1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Add a simple test case (many more are coming soon to TH3). Fix an obsolete

assert().

FossilOrigin-Name: aa829a131a3431791083cf60d9cf00e7b3c0fafdd39a23e761b629a2287ab875
This commit is contained in:
drh
2025-01-18 21:19:02 +00:00
parent 50c4420030
commit 0f4de9bf9d
4 changed files with 37 additions and 12 deletions

View File

@ -949,7 +949,7 @@ static void explainAutomaticIndex(
sqlite3_str *pStr = sqlite3_str_new(pParse->db);
sqlite3_str_appendf(pStr,"CREATE AUTOMATIC INDEX ON %s(", pTab->zName);
assert( pIdx->nColumn>1 );
assert( pIdx->aiColumn[pIdx->nColumn-1]==XN_ROWID );
assert( pIdx->aiColumn[pIdx->nColumn-1]==XN_ROWID || !HasRowid(pTab) );
for(ii=0; ii<(pIdx->nColumn-1); ii++){
const char *zName = 0;
int iCol = pIdx->aiColumn[ii];