Fix a bug in sqlite3_prepare_v2() introduced by checkin (3578) and reported

on the mailing list. (CVS 3592)

FossilOrigin-Name: 87248470362f444f2339fee18d3624e8544f5256
This commit is contained in:
drh
2007-01-12 23:43:42 +00:00
parent e047921c78
commit f6d8ab87c6
4 changed files with 32 additions and 10 deletions
+3 -1
View File
@@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.585 2007/01/09 14:01:14 drh Exp $
** $Id: vdbe.c,v 1.586 2007/01/12 23:43:43 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -2517,6 +2517,8 @@ case OP_VerifyCookie: { /* no-push */
}
if( rc==SQLITE_OK && iMeta!=pOp->p2 ){
sqlite3SetString(&p->zErrMsg, "database schema has changed", (char*)0);
sqlite3ResetInternalSchema(db, pOp->p1);
sqlite3ExpirePreparedStatements(db);
rc = SQLITE_SCHEMA;
}
break;