1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add an OP_VerifyCookie instruction to "CREATE XXX IF NOT EXISTS" commands. This way, if the specified database object existed when the statement was compiled but removed from the database before sqlite3_step() was called, the statement still works as expected (and creates the object).

FossilOrigin-Name: b9dbd9936191666c3fc9889e938344a82cc03aeb
This commit is contained in:
dan
2011-04-09 15:39:02 +00:00
parent c2822b76b4
commit 7687c83d4c
5 changed files with 95 additions and 9 deletions

View File

@@ -171,6 +171,9 @@ void sqlite3BeginTrigger(
zName, sqlite3Strlen30(zName)) ){
if( !noErr ){
sqlite3ErrorMsg(pParse, "trigger %T already exists", pName);
}else{
assert( !db->init.busy );
sqlite3CodeVerifySchema(pParse, iDb);
}
goto trigger_cleanup;
}