diff options
author | dan <dan@noemail.net> | 2009-10-02 06:35:06 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2009-10-02 06:35:06 +0000 |
commit | 1316700e54cf437f7189e74fadafda0d6db7965c (patch) | |
tree | c079111a85f30deedb1ba465703c8a4be2bfe9e3 /src/vdbeblob.c | |
parent | 3d7b04699609efaaa5b4a686302876aaba76b9ea (diff) | |
download | sqlite-1316700e54cf437f7189e74fadafda0d6db7965c.tar.gz sqlite-1316700e54cf437f7189e74fadafda0d6db7965c.zip |
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
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r-- | src/vdbeblob.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c index 394335a92..6fc53b7a2 100644 --- a/src/vdbeblob.c +++ b/src/vdbeblob.c @@ -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; |