mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Update RBU to avoid repreparing a statement immediately after it is prepared.
FossilOrigin-Name: 1d75a41bb2f7fcd32f9f08768517b814e452e456
This commit is contained in:
@ -1939,17 +1939,6 @@ static int rbuObjIterPrepareAll(
|
||||
zCollist = rbuObjIterGetCollist(p, pIter);
|
||||
pIter->nCol = pIter->nTblCol;
|
||||
|
||||
/* Create the SELECT statement to read keys from data_xxx */
|
||||
if( p->rc==SQLITE_OK ){
|
||||
p->rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pSelect, pz,
|
||||
sqlite3_mprintf(
|
||||
"SELECT %s, rbu_control%s FROM '%q'%s",
|
||||
zCollist, (bRbuRowid ? ", rbu_rowid" : ""),
|
||||
pIter->zDataTbl, zLimit
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/* Create the imposter table or tables (if required). */
|
||||
rbuCreateImposterTable(p, pIter);
|
||||
rbuCreateImposterTable2(p, pIter);
|
||||
@ -2022,6 +2011,17 @@ static int rbuObjIterPrepareAll(
|
||||
rbuObjIterPrepareTmpInsert(p, pIter, zCollist, zRbuRowid);
|
||||
}
|
||||
|
||||
/* Create the SELECT statement to read keys from data_xxx */
|
||||
if( p->rc==SQLITE_OK ){
|
||||
p->rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pSelect, pz,
|
||||
sqlite3_mprintf(
|
||||
"SELECT %s, rbu_control%s FROM '%q'%s",
|
||||
zCollist, (bRbuRowid ? ", rbu_rowid" : ""),
|
||||
pIter->zDataTbl, zLimit
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
sqlite3_free(zWhere);
|
||||
sqlite3_free(zOldlist);
|
||||
sqlite3_free(zNewlist);
|
||||
|
Reference in New Issue
Block a user