1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add a test to check that the incrblob API cannot be used to write to an IPK column. Also a comment to explain why the incrblob code does not need to check if a column is part of a parent key before writing to it.

FossilOrigin-Name: dca2a7f608d9237039541707846c76cd460f5805
This commit is contained in:
dan
2009-10-02 06:35:06 +00:00
parent 3d7b046996
commit 1316700e54
4 changed files with 29 additions and 9 deletions

View File

@@ -152,6 +152,10 @@ int sqlite3_blob_open(
Index *pIdx;
#ifndef SQLITE_OMIT_FOREIGN_KEY
if( db->flags&SQLITE_ForeignKeys ){
/* Check that the column is not part of an FK child key definition. It
** is not necessary to check if it is part of a parent key, as parent
** key columns must be indexed. The check below will pick up this
** case. */
FKey *pFKey;
for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
int j;