Bug fix in the out-of-order INSERT. (CVS 336)

FossilOrigin-Name: a26d0880b20ca5534400a3689d1da31fe6aaa934
This commit is contained in:
drh 2001-12-22 21:48:29 +00:00
parent e7ec22019d
commit 9aa028daa2
4 changed files with 16 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Update\sdocumentation\sfor\sthe\s2.2.0\srelease.\s(CVS\s335)
D 2001-12-22T19:27:40
C Bug\sfix\sin\sthe\sout-of-order\sINSERT.\s(CVS\s336)
D 2001-12-22T21:48:30
F Makefile.in 352fed589f09dd94347e0bb391d047118ebd6105
F Makefile.template c88ffcb9c339e718f434d0c7f045bcd7eea125af
F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
@ -26,7 +26,7 @@ F src/delete.c f7690efc09ad6a2f1f3f0490e1b0cbb676bb95cf
F src/expr.c ef1c365c5d558fa691878830501d3c36ed7edb25
F src/hash.c 6f1a7712ae3aac8351662969aec5693740a2fbf7
F src/hash.h a5f5b3ce2d086a172c5879b0b06a27a82eac9fac
F src/insert.c 8119b42a4858bc4401bd5dfae8e9f28b8205871d
F src/insert.c 78c11efb6464ab01548f9b4c92b51cb30e3a7a3c
F src/main.c 00a9f5603e130fc0b1a05f731731c9c99ebdc2dc
F src/md5.c 52f677bfc590e09f71d07d7e327bd59da738d07c
F src/os.c 07882cde5c61f26751b8ee76fd84726c1f7e453c
@ -65,7 +65,7 @@ F test/in.test 9323681388be301dc73f370b4cd62c5a33f79d1e
F test/index.test c8a471243bbf878974b99baf5badd59407237cf3
F test/insert.test a5c122aa726f1cef6f07d6767e8fd6f220994c11
F test/insert2.test d6901ca931e308fea7fca8c95ebe7dc957cc9fc2
F test/intpkey.test 3f765f69c39af45f9324edcc6e14b201654e9790
F test/intpkey.test c5776456778f4062a8355467704df9c501ab3e1c
F test/ioerr.test 57d9bffaca18b34f9e976f786eadc2591d6efc6a
F test/limit.test a930f3eba2a7691c8397ccab33710b931589566a
F test/lock.test 19593689260c419efe7ced55b1418653a4b7bcd1
@ -119,7 +119,7 @@ F www/speed.tcl 83457b2bf6bb430900bd48ca3dd98264d9a916a5
F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279
F www/tclsqlite.tcl 880ef67cb4f2797b95bf1368fc4e0d8ca0fda956
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
P 29cab124b4f7eae9d9feb60d2f3a2c443fd9b9aa
R c48343b6602223daa3e4640e717ebad9
P 14392258c5b6385091be8d684e3ea6841941b483
R ca7de0eadaa033a7f4b8aa20c781d7ab
U drh
Z df1fb6885750227397b1a0fd9aad25a2
Z 78bd90f0486367269572eb4d5eb1619b

View File

@ -1 +1 @@
14392258c5b6385091be8d684e3ea6841941b483
a26d0880b20ca5534400a3689d1da31fe6aaa934

View File

@ -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.28 2001/12/22 14:49:25 drh Exp $
** $Id: insert.c,v 1.29 2001/12/22 21:48:30 drh Exp $
*/
#include "sqliteInt.h"
@ -142,7 +142,7 @@ void sqliteInsert(
if( sqliteStrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){
pColumn->a[i].idx = j;
if( j==pTab->iPKey ){
keyColumn = j;
keyColumn = i;
}
break;
}

View File

@ -13,7 +13,7 @@
# This file implements tests for the special processing associated
# with INTEGER PRIMARY KEY columns.
#
# $Id: intpkey.test,v 1.3 2001/12/22 19:27:41 drh Exp $
# $Id: intpkey.test,v 1.4 2001/12/22 21:48:30 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -399,12 +399,16 @@ do_test intpkey-6.4 {
# Do an insert of values with the columns specified out of order.
#
execsql {pragma vdbe_trace=on;}
do_test intpkey-7.1 {
execsql {
INSERT INTO t1(c,b,a) VALUES('row','new',30);
SELECT * FROM t1 WHERE rowid>=30;
}
} {30 new row}
do_test intpkey-7.2 {
execsql {
SELECT * FROM t1 WHERE rowid>20;
}
} {22 b-22 c-22 30 new row}
finish_test