Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove code dealing with old file formats. (CVS 1354) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
dfde112116b982017a5516590ff1780e |
User & Date: | danielk1977 2004-05-11 07:11:52.000 |
Context
2004-05-11
| ||
08:48 | More small changes to get test cases to execute. (CVS 1355) (check-in: 6dc6004684 user: danielk1977 tags: trunk) | |
07:11 | Remove code dealing with old file formats. (CVS 1354) (check-in: dfde112116 user: danielk1977 tags: trunk) | |
06:55 | More minor changes to accomadate the new btree. All the select* tests pass now. (CVS 1353) (check-in: 941d0fdc97 user: danielk1977 tags: trunk) | |
Changes
Changes to src/attach.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* ** 2003 April 6 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to implement the ATTACH and DETACH commands. ** | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* ** 2003 April 6 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to implement the ATTACH and DETACH commands. ** ** $Id: attach.c,v 1.12 2004/05/11 07:11:52 danielk1977 Exp $ */ #include "sqliteInt.h" /* ** This routine is called by the parser to process an ATTACH statement: ** ** ATTACH DATABASE filename AS dbname |
︙ | ︙ | |||
30 31 32 33 34 35 36 | sqlite *db; Vdbe *v; v = sqlite3GetVdbe(pParse); sqlite3VdbeAddOp(v, OP_Halt, 0, 0); if( pParse->explain ) return; db = pParse->db; | < < < < < < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | sqlite *db; Vdbe *v; v = sqlite3GetVdbe(pParse); sqlite3VdbeAddOp(v, OP_Halt, 0, 0); if( pParse->explain ) return; db = pParse->db; if( db->nDb>=MAX_ATTACHED+2 ){ sqlite3ErrorMsg(pParse, "too many attached databases - max %d", MAX_ATTACHED); pParse->rc = SQLITE_ERROR; return; } |
︙ | ︙ |
Changes to src/build.c.
︙ | ︙ | |||
19 20 21 22 23 24 25 | ** DROP INDEX ** creating ID lists ** BEGIN TRANSACTION ** COMMIT ** ROLLBACK ** PRAGMA ** | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ** DROP INDEX ** creating ID lists ** BEGIN TRANSACTION ** COMMIT ** ROLLBACK ** PRAGMA ** ** $Id: build.c,v 1.181 2004/05/11 07:11:52 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> /* ** This routine is called when a new SQL statement is beginning to ** be parsed. Check to see if the schema for the database needs |
︙ | ︙ | |||
695 696 697 698 699 700 701 | if( iCol<pTab->nCol ) pTab->aCol[iCol].isPrimKey = 1; } if( pList->nId>1 ) iCol = -1; } if( iCol>=0 && iCol<pTab->nCol ){ zType = pTab->aCol[iCol].zType; } | < | | 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | if( iCol<pTab->nCol ) pTab->aCol[iCol].isPrimKey = 1; } if( pList->nId>1 ) iCol = -1; } if( iCol>=0 && iCol<pTab->nCol ){ zType = pTab->aCol[iCol].zType; } if( zType && sqlite3StrICmp(zType, "INTEGER")==0 ){ pTab->iPKey = iCol; pTab->keyConf = onError; }else{ sqlite3CreateIndex(pParse, 0, 0, pList, onError, 0, 0); pList = 0; } |
︙ | ︙ | |||
1717 1718 1719 1720 1721 1722 1723 | if( pTab->iPKey==iCol ){ sqlite3VdbeAddOp(v, OP_Dup, i, 0); }else{ sqlite3VdbeAddOp(v, OP_Column, 2, iCol); } } sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIndex->nColumn, 0); | | | 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 | if( pTab->iPKey==iCol ){ sqlite3VdbeAddOp(v, OP_Dup, i, 0); }else{ sqlite3VdbeAddOp(v, OP_Column, 2, iCol); } } sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIndex->nColumn, 0); sqlite3AddIdxKeyType(v, pIndex); sqlite3VdbeOp3(v, OP_IdxPut, 1, pIndex->onError!=OE_None, "indexed columns are not unique", P3_STATIC); sqlite3VdbeAddOp(v, OP_Next, 2, lbl1); sqlite3VdbeResolveLabel(v, lbl2); sqlite3VdbeAddOp(v, OP_Close, 2, 0); sqlite3VdbeAddOp(v, OP_Close, 1, 0); } |
︙ | ︙ |
Changes to src/delete.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle DELETE FROM statements. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle DELETE FROM statements. ** ** $Id: delete.c,v 1.64 2004/05/11 07:11:53 danielk1977 Exp $ */ #include "sqliteInt.h" /* ** Look up every table that is named in pSrc. If any table is not found, ** add an error message to pParse->zErrMsg and return NULL. If all tables ** are found, return a pointer to the last table. |
︙ | ︙ | |||
383 384 385 386 387 388 389 | if( idx==pTab->iPKey ){ sqlite3VdbeAddOp(v, OP_Dup, j, 0); }else{ sqlite3VdbeAddOp(v, OP_Column, iCur, idx); } } sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); | | | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | if( idx==pTab->iPKey ){ sqlite3VdbeAddOp(v, OP_Dup, j, 0); }else{ sqlite3VdbeAddOp(v, OP_Column, iCur, idx); } } sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); sqlite3AddIdxKeyType(v, pIdx); sqlite3VdbeAddOp(v, OP_IdxDelete, iCur+i, 0); } } |
Changes to src/expr.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** ** $Id: expr.c,v 1.117 2004/05/11 07:11:53 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> /* ** Construct a new expression node and return a pointer to it. Memory ** for this node is obtained from sqliteMalloc(). The calling function |
︙ | ︙ | |||
1068 1069 1070 1071 1072 1073 1074 | } case TK_LT: case TK_LE: case TK_GT: case TK_GE: case TK_NE: case TK_EQ: { | | | 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | } case TK_LT: case TK_LE: case TK_GT: case TK_GE: case TK_NE: case TK_EQ: { if( sqlite3ExprType(pExpr)==SQLITE_SO_TEXT ){ op += 6; /* Convert numeric opcodes to text opcodes */ } /* Fall through into the next case */ } case TK_AND: case TK_OR: case TK_PLUS: |
︙ | ︙ | |||
1330 1331 1332 1333 1334 1335 1336 | case TK_LE: case TK_GT: case TK_GE: case TK_NE: case TK_EQ: { sqlite3ExprCode(pParse, pExpr->pLeft); sqlite3ExprCode(pParse, pExpr->pRight); | | | 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 | case TK_LE: case TK_GT: case TK_GE: case TK_NE: case TK_EQ: { sqlite3ExprCode(pParse, pExpr->pLeft); sqlite3ExprCode(pParse, pExpr->pRight); if( sqlite3ExprType(pExpr)==SQLITE_SO_TEXT ){ op += 6; /* Convert numeric opcodes to text opcodes */ } sqlite3VdbeAddOp(v, op, jumpIfNull, dest); break; } case TK_ISNULL: case TK_NOTNULL: { |
︙ | ︙ | |||
1423 1424 1425 1426 1427 1428 1429 | } case TK_LT: case TK_LE: case TK_GT: case TK_GE: case TK_NE: case TK_EQ: { | | | 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 | } case TK_LT: case TK_LE: case TK_GT: case TK_GE: case TK_NE: case TK_EQ: { if( sqlite3ExprType(pExpr)==SQLITE_SO_TEXT ){ /* Convert numeric comparison opcodes into text comparison opcodes. ** This step depends on the fact that the text comparision opcodes are ** always 6 greater than their corresponding numeric comparison ** opcodes. */ assert( OP_Eq+6 == OP_StrEq ); op += 6; |
︙ | ︙ |
Changes to src/insert.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle INSERT statements in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle INSERT statements in SQLite. ** ** $Id: insert.c,v 1.97 2004/05/11 07:11:53 danielk1977 Exp $ */ #include "sqliteInt.h" /* ** This routine is call to handle SQL of the following forms: ** ** insert into TABLE (IDLIST) values(EXPRLIST) |
︙ | ︙ | |||
769 770 771 772 773 774 775 | if( idx==pTab->iPKey ){ sqlite3VdbeAddOp(v, OP_Dup, i+extra+nCol+1, 1); }else{ sqlite3VdbeAddOp(v, OP_Dup, i+extra+nCol-idx, 1); } } jumpInst1 = sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); | | | 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | if( idx==pTab->iPKey ){ sqlite3VdbeAddOp(v, OP_Dup, i+extra+nCol+1, 1); }else{ sqlite3VdbeAddOp(v, OP_Dup, i+extra+nCol-idx, 1); } } jumpInst1 = sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); sqlite3AddIdxKeyType(v, pIdx); /* Find out what action to take in case there is an indexing conflict */ onError = pIdx->onError; if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */ if( overrideError!=OE_Default ){ onError = overrideError; }else if( pParse->db->onError!=OE_Default ){ |
︙ | ︙ |
Changes to src/main.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | ** ************************************************************************* ** Main file for the SQLite library. The routines in this file ** implement the programmer interface to the library. Routines in ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ** ************************************************************************* ** Main file for the SQLite library. The routines in this file ** implement the programmer interface to the library. Routines in ** 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 $ */ #include "sqliteInt.h" #include "os.h" #include <ctype.h> /* ** A pointer to this structure is used to communicate information |
︙ | ︙ | |||
384 385 386 387 388 389 390 | } db->init.busy = 0; if( rc==SQLITE_OK ){ db->flags |= SQLITE_Initialized; sqlite3CommitInternalChanges(db); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | } db->init.busy = 0; if( rc==SQLITE_OK ){ db->flags |= SQLITE_Initialized; sqlite3CommitInternalChanges(db); } if( rc!=SQLITE_OK ){ db->flags &= ~SQLITE_Initialized; } return rc; } /* |
︙ | ︙ | |||
696 697 698 699 700 701 702 | return rc; } if( pzErrMsg ){ sqliteFree(*pzErrMsg); *pzErrMsg = 0; } } | < < < < < | 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | return rc; } if( pzErrMsg ){ sqliteFree(*pzErrMsg); *pzErrMsg = 0; } } } assert( (db->flags & SQLITE_Initialized)!=0 || db->init.busy ); if( db->pVdbe==0 ){ db->nChange = 0; } memset(&sParse, 0, sizeof(sParse)); sParse.db = db; sqlite3RunParser(&sParse, zSql, pzErrMsg); if( db->xTrace && !db->init.busy ){ |
︙ | ︙ |
Changes to src/pragma.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* ** 2003 April 6 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* ** 2003 April 6 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** ** $Id: pragma.c,v 1.21 2004/05/11 07:11:53 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> /* ** Interpret the given string as a boolean value. */ |
︙ | ︙ | |||
663 664 665 666 667 668 669 | if( idx==pTab->iPKey ){ sqlite3VdbeAddOp(v, OP_Recno, 1, 0); }else{ sqlite3VdbeAddOp(v, OP_Column, 1, idx); } } sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); | | | 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | if( idx==pTab->iPKey ){ sqlite3VdbeAddOp(v, OP_Recno, 1, 0); }else{ sqlite3VdbeAddOp(v, OP_Column, 1, idx); } } sqlite3VdbeAddOp(v, OP_MakeIdxKey, pIdx->nColumn, 0); sqlite3AddIdxKeyType(v, pIdx); jmp2 = sqlite3VdbeAddOp(v, OP_Found, j+2, 0); addr = sqlite3VdbeAddOpList(v, ArraySize(idxErr), idxErr); sqlite3VdbeChangeP3(v, addr+4, pIdx->zName, P3_STATIC); sqlite3VdbeChangeP2(v, jmp2, sqlite3VdbeCurrentAddr(v)); } sqlite3VdbeAddOp(v, OP_Next, 1, loopTop+1); sqlite3VdbeChangeP2(v, loopTop, sqlite3VdbeCurrentAddr(v)); |
︙ | ︙ |