diff options
author | drh <drh@noemail.net> | 2005-06-24 03:53:06 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-06-24 03:53:06 +0000 |
commit | 7f057c9166a1c8e13bda74b3db7ee488659ae7fb (patch) | |
tree | 956b9811b110b14adac869c6de43ced5ec19d84d /src/insert.c | |
parent | 2f471496913a58a9d8f2c5852275a0666dc169df (diff) | |
download | sqlite-7f057c9166a1c8e13bda74b3db7ee488659ae7fb.tar.gz sqlite-7f057c9166a1c8e13bda74b3db7ee488659ae7fb.zip |
NULL values in a row of a unique index cause the row to be distinct.
Ticket #1301. More testing and optimization needs to be done on this
before closing the ticket. (CVS 2526)
FossilOrigin-Name: 06a71b162b032fc5b56d18919a784d4ee94dde7c
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/insert.c b/src/insert.c index 36a024451..e336f6cf9 100644 --- a/src/insert.c +++ b/src/insert.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle INSERT statements in SQLite. ** -** $Id: insert.c,v 1.139 2005/06/12 21:35:52 drh Exp $ +** $Id: insert.c,v 1.140 2005/06/24 03:53:06 drh Exp $ */ #include "sqliteInt.h" @@ -949,7 +949,7 @@ void sqlite3GenerateConstraintChecks( sqlite3VdbeAddOp(v, OP_Dup, i+extra+nCol-idx, 1); } } - jumpInst1 = sqlite3VdbeAddOp(v, OP_MakeRecord, pIdx->nColumn, (1<<24)); + jumpInst1 = sqlite3VdbeAddOp(v, OP_MakeIdxRec, pIdx->nColumn, 0); sqlite3IndexAffinityStr(v, pIdx); /* Find out what action to take in case there is an indexing conflict */ @@ -1019,9 +1019,8 @@ void sqlite3GenerateConstraintChecks( } } contAddr = sqlite3VdbeCurrentAddr(v); - assert( contAddr<(1<<24) ); #if NULL_DISTINCT_FOR_UNIQUE - sqlite3VdbeChangeP2(v, jumpInst1, contAddr | (1<<24)); + sqlite3VdbeChangeP2(v, jumpInst1, contAddr); #endif sqlite3VdbeChangeP2(v, jumpInst2, contAddr); } |