diff options
author | dan <dan@noemail.net> | 2014-09-15 12:18:29 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2014-09-15 12:18:29 +0000 |
commit | 13ce7931f70455546fda109d54cc3c5d94585d2d (patch) | |
tree | 2422f82d5c0747a07df9c95011d0d5380a428e02 /src | |
parent | d54e06ca5ef35bc5cfbd840881065b819482ec16 (diff) | |
download | sqlite-13ce7931f70455546fda109d54cc3c5d94585d2d.tar.gz sqlite-13ce7931f70455546fda109d54cc3c5d94585d2d.zip |
Have the sqlite3_index_writer() VMs check that the final values of records inserted into indexes on rowid tables are integers.
FossilOrigin-Name: cca376bff3510dc5e99fc5824862c3471ceced16
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbeblob.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c index dd08b0b8a..09c519cb5 100644 --- a/src/vdbeblob.c +++ b/src/vdbeblob.c @@ -549,6 +549,11 @@ int sqlite3_index_writer( } regRec = ++pParse->nMem; + /* If this is a rowid table, check that the rowid field is an integer. */ + if( HasRowid(pTab) ){ + sqlite3VdbeAddOp2(v, OP_MustBeInt, pIdx->nColumn, 0); + } + if( bDelete==0 ){ sqlite3VdbeAddOp4(v, OP_MakeRecord, 1, pIdx->nColumn, regRec, zAffinity, 0); |