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

Have sqlite3session_diff() automatically attach tables to session objects, as it has always been documented to do.

FossilOrigin-Name: ec1641858ec48d96f5a2ddce4575ebd40a18932d69831fdb4eafc9acf508f216
This commit is contained in:
dan
2025-04-08 15:58:19 +00:00
parent 87ceb6ba9e
commit 6864f78fdf
4 changed files with 39 additions and 10 deletions

View File

@ -2216,7 +2216,9 @@ int sqlite3session_diff(
SessionTable *pTo; /* Table zTbl */
/* Locate and if necessary initialize the target table object */
pSession->bAutoAttach++;
rc = sessionFindTable(pSession, zTbl, &pTo);
pSession->bAutoAttach--;
if( pTo==0 ) goto diff_out;
if( sessionInitTable(pSession, pTo, pSession->db, pSession->zDb) ){
rc = pSession->rc;