mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
More small changes to get test cases to execute. (CVS 1355)
FossilOrigin-Name: 6dc6004684a97fbdba2f2dce94086dc2c4967a42
This commit is contained in:
16
manifest
16
manifest
@@ -1,5 +1,5 @@
|
||||
C Remove\scode\sdealing\swith\sold\sfile\sformats.\s(CVS\s1354)
|
||||
D 2004-05-11T07:11:52
|
||||
C More\ssmall\schanges\sto\sget\stest\scases\sto\sexecute.\s(CVS\s1355)
|
||||
D 2004-05-11T08:48:11
|
||||
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
||||
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||
@@ -36,14 +36,14 @@ F src/func.c 6cf6501f092b41c8cd9368b09c287016c0576438
|
||||
F src/hash.c 440c2f8cb373ee1b4e13a0988489c7cd95d55b6f
|
||||
F src/hash.h 762d95f1e567664d1eafc1687de755626be962fb
|
||||
F src/insert.c 1e63d2774c4d893363e0c072f19d4c92a4ab982d
|
||||
F src/main.c 07dbefd62294f9b5100210161f4af4da2e6fb0ff
|
||||
F src/main.c 2732115c888440caaebf50fc791b13cfdcc5dcd7
|
||||
F src/md5.c 8e39fdae6d8776b87558e91dcc94740c9b635a9c
|
||||
F src/os.c ddcda92f7fd71b4513c57c1ec797917f206d504e
|
||||
F src/os.h fbb2f6595fc34fa351830d88fe1c6b85118f0383
|
||||
F src/pager.c 43556f37b80efdccb853dbf86b3d09470d791d0d
|
||||
F src/pager.h 0c95b18f2785b58bfbb2b6f6a221f23caf378687
|
||||
F src/parse.y d0258aa3cc8b0c5742b07b699d10fa98f3caea7d
|
||||
F src/pragma.c cef4b66bd22d43f6c71c91e7d6925f9b214c301e
|
||||
F src/pragma.c 2ab2a12b62ec5370b9221f44b4743a633a90bfa8
|
||||
F src/printf.c 8aa5d88509f46f064f57d0a8419e7b5f3b9fd559
|
||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||
F src/select.c ca99ae4db14a45a436ec51d3e6bd48d44a3efb3c
|
||||
@@ -63,7 +63,7 @@ F src/update.c 6ca82fc4a0fb4d7f134e961921c906f6f3c8bc74
|
||||
F src/utf.c fc799748d43fe1982d157b871e3e420a19c85d4f
|
||||
F src/util.c 778a8cd03ad6e52778602d20a3132c7d2d1b0a0c
|
||||
F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476
|
||||
F src/vdbe.c 4ff07e53292eb28df4f5ea1acae3ef5cd4206915
|
||||
F src/vdbe.c b9a499da850260eca461883b50319036338e4d25
|
||||
F src/vdbe.h 2dc4d1161b64f5684faa6a2d292e318a185ecb2e
|
||||
F src/vdbeInt.h ff85e432a43eb7533b17c9cece2baaf813ba8711
|
||||
F src/vdbeaux.c feee0e94cd5fe520cd024287446d8b387a221a4b
|
||||
@@ -188,7 +188,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
|
||||
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
|
||||
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
|
||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||
P 941d0fdc97ad0a2ba0e823ce40022bdef857aa6e
|
||||
R 16e70b539b0afb4036f677ee3f6bf7c9
|
||||
P dfde112116b982017a5516590ff1780e8aa519ce
|
||||
R a865e61ee80395ceaf86ba7cc2e435b0
|
||||
U danielk1977
|
||||
Z df9cf5602eb49f1df00c4efad7a7a79a
|
||||
Z d6e32fdd48dc789f36c98b88caac2221
|
||||
|
@@ -1 +1 @@
|
||||
dfde112116b982017a5516590ff1780e8aa519ce
|
||||
6dc6004684a97fbdba2f2dce94086dc2c4967a42
|
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.170 2004/05/11 07:11:53 danielk1977 Exp $
|
||||
** $Id: main.c,v 1.171 2004/05/11 08:48:11 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -268,7 +268,7 @@ static int sqlite3InitOne(sqlite *db, int iDb, char **pzErrMsg){
|
||||
if( rc==SQLITE_OK ){
|
||||
int i;
|
||||
for(i=0; rc==SQLITE_OK && i<SQLITE_N_BTREE_META; i++){
|
||||
rc = sqlite3BtreeGetMeta(db->aDb[iDb].pBt, i+1, &meta[i]);
|
||||
rc = sqlite3BtreeGetMeta(db->aDb[iDb].pBt, i, &meta[i]);
|
||||
}
|
||||
if( rc ){
|
||||
sqlite3SetString(pzErrMsg, sqlite3_error_string(rc), (char*)0);
|
||||
|
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the PRAGMA command.
|
||||
**
|
||||
** $Id: pragma.c,v 1.21 2004/05/11 07:11:53 danielk1977 Exp $
|
||||
** $Id: pragma.c,v 1.22 2004/05/11 08:48:11 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -577,9 +577,9 @@ void sqlite3Pragma(Parse *pParse, Token *pLeft, Token *pRight, int minusFlag){
|
||||
/* Code to do an BTree integrity check on a single database file.
|
||||
*/
|
||||
static VdbeOpList checkDb[] = {
|
||||
{ OP_SetInsert, 0, 0, "2"},
|
||||
{ OP_SetInsert, 0, 0, "1"},
|
||||
{ OP_Integer, 0, 0, 0}, /* 1 */
|
||||
{ OP_OpenRead, 0, 2, 0},
|
||||
{ OP_OpenRead, 0, MASTER_ROOT, 0},
|
||||
{ OP_Rewind, 0, 7, 0}, /* 3 */
|
||||
{ OP_Column, 0, 3, 0}, /* 4 */
|
||||
{ OP_SetInsert, 0, 0, 0},
|
||||
|
25
src/vdbe.c
25
src/vdbe.c
@@ -43,7 +43,7 @@
|
||||
** in this file for details. If in doubt, do not deviate from existing
|
||||
** commenting and indentation practices when changing or adding code.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.279 2004/05/11 06:55:15 danielk1977 Exp $
|
||||
** $Id: vdbe.c,v 1.280 2004/05/11 08:48:11 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -2935,8 +2935,8 @@ case OP_Found: {
|
||||
** using MakeIdxKey. Call it K. This instruction pops R from the
|
||||
** stack but it leaves K unchanged.
|
||||
**
|
||||
** P1 is an index. So all but the last four bytes of K are an
|
||||
** index string. The last four bytes of K are a record number.
|
||||
** P1 is an index. So all but the last eight bytes of K are an
|
||||
** index string. The last eight bytes of K are a record number.
|
||||
**
|
||||
** This instruction asks if there is an entry in P1 where the
|
||||
** index string matches K but the record number is different
|
||||
@@ -2953,7 +2953,7 @@ case OP_IsUnique: {
|
||||
Mem *pNos = &pTos[-1];
|
||||
Cursor *pCx;
|
||||
BtCursor *pCrsr;
|
||||
int R;
|
||||
i64 R;
|
||||
|
||||
/* Pop the value R off the top of the stack
|
||||
*/
|
||||
@@ -2966,7 +2966,7 @@ case OP_IsUnique: {
|
||||
pCrsr = pCx->pCursor;
|
||||
if( pCrsr!=0 ){
|
||||
int res, rc;
|
||||
int v; /* The record number on the P1 entry that matches K */
|
||||
i64 v; /* The record number on the P1 entry that matches K */
|
||||
char *zKey; /* The value of K */
|
||||
int nKey; /* Number of bytes in K */
|
||||
|
||||
@@ -2975,13 +2975,14 @@ case OP_IsUnique: {
|
||||
Stringify(pNos);
|
||||
zKey = pNos->z;
|
||||
nKey = pNos->n;
|
||||
assert( nKey >= 4 );
|
||||
assert( nKey >= 8 );
|
||||
|
||||
/* Search for an entry in P1 where all but the last four bytes match K.
|
||||
/* Search for an entry in P1 where all but the last eight bytes match K.
|
||||
** If there is no such entry, jump immediately to P2.
|
||||
*/
|
||||
assert( p->aCsr[i].deferredMoveto==0 );
|
||||
rc = sqlite3BtreeMoveto(pCrsr, zKey, nKey-4, &res);
|
||||
assert( p->aCsr[i].intKey==0 );
|
||||
rc = sqlite3BtreeMoveto(pCrsr, zKey, nKey-8, &res);
|
||||
if( rc!=SQLITE_OK ) goto abort_due_to_error;
|
||||
if( res<0 ){
|
||||
rc = sqlite3BtreeNext(pCrsr, &res);
|
||||
@@ -2991,7 +2992,7 @@ case OP_IsUnique: {
|
||||
}
|
||||
}
|
||||
/* FIX ME - the sqlite2BtreeKeyCompare() function is a temporary hack */
|
||||
rc = sqlite2BtreeKeyCompare(pCrsr, zKey, nKey-4, 4, &res);
|
||||
rc = sqlite2BtreeKeyCompare(pCrsr, zKey, nKey-8, 8, &res);
|
||||
if( rc!=SQLITE_OK ) goto abort_due_to_error;
|
||||
if( res>0 ){
|
||||
pc = pOp->p2 - 1;
|
||||
@@ -2999,11 +3000,11 @@ case OP_IsUnique: {
|
||||
}
|
||||
|
||||
/* At this point, pCrsr is pointing to an entry in P1 where all but
|
||||
** the last for bytes of the key match K. Check to see if the last
|
||||
** four bytes of the key are different from R. If the last four
|
||||
** the last eight bytes of the key match K. Check to see if the last
|
||||
** eight bytes of the key are different from R. If the last four
|
||||
** bytes equal R then jump immediately to P2.
|
||||
*/
|
||||
sqlite3BtreeKey(pCrsr, nKey - 4, 4, (char*)&v);
|
||||
sqlite3BtreeKey(pCrsr, nKey - sizeof(i64), sizeof(i64), (char*)&v);
|
||||
v = keyToInt(v);
|
||||
if( v==R ){
|
||||
pc = pOp->p2 - 1;
|
||||
|
Reference in New Issue
Block a user