Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove the restriction that a transaction cannot be started by one linuxthread and continued by another. Leave in the documentation the warning about not carrying a database connection across fork() but do not test for it any more. Ticket #130. (CVS 701) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
bdbdb866f2e76abd1f8f545adadc9a90 |
User & Date: | drh 2002-08-02 10:36:09.000 |
Context
2002-08-04
| ||
00:52 | Fix for ticket #131: When a SELECT contains a GROUP BY clause it cannot use an index for sorting. It has to sort as a separate operation after the GROUP BY is complete. (CVS 702) (check-in: 18745c67ac user: drh tags: trunk) | |
2002-08-02
| ||
10:36 | Remove the restriction that a transaction cannot be started by one linuxthread and continued by another. Leave in the documentation the warning about not carrying a database connection across fork() but do not test for it any more. Ticket #130. (CVS 701) (check-in: bdbdb866f2 user: drh tags: trunk) | |
2002-07-31
| ||
19:50 | Fix for ticket #124: Fix a stack VDBE overflow problem on joins on an INTEGER PRIMARY KEY. (CVS 700) (check-in: fe329e078f user: drh tags: trunk) | |
Changes
Changes to src/build.c.
︙ | ︙ | |||
21 22 23 24 25 26 27 | ** COPY ** VACUUM ** BEGIN TRANSACTION ** COMMIT ** ROLLBACK ** PRAGMA ** | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ** COPY ** VACUUM ** BEGIN TRANSACTION ** COMMIT ** ROLLBACK ** PRAGMA ** ** $Id: build.c,v 1.107 2002/08/02 10:36:09 drh 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 |
︙ | ︙ | |||
1726 1727 1728 1729 1730 1731 1732 | sqlite *db; if( pParse==0 || (db=pParse->db)==0 || db->pBe==0 ) return; if( pParse->nErr || sqlite_malloc_failed ) return; if( db->flags & SQLITE_InTrans ) return; sqliteBeginWriteOperation(pParse, 0); db->flags |= SQLITE_InTrans; | < | 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 | sqlite *db; if( pParse==0 || (db=pParse->db)==0 || db->pBe==0 ) return; if( pParse->nErr || sqlite_malloc_failed ) return; if( db->flags & SQLITE_InTrans ) return; sqliteBeginWriteOperation(pParse, 0); db->flags |= SQLITE_InTrans; db->onError = onError; } /* ** Commit a transaction */ void sqliteCommitTransaction(Parse *pParse){ |
︙ | ︙ |
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.95 2002/08/02 10:36:10 drh Exp $ */ #include "sqliteInt.h" #include "os.h" #include <ctype.h> /* ** A pointer to this structure is used to communicate information |
︙ | ︙ | |||
596 597 598 599 600 601 602 | void *pArg, /* First argument to xCallback() */ char **pzErrMsg /* Write error messages here */ ){ Parse sParse; if( pzErrMsg ) *pzErrMsg = 0; if( sqliteSafetyOn(db) ) goto exec_misuse; | < < < | 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | void *pArg, /* First argument to xCallback() */ char **pzErrMsg /* Write error messages here */ ){ Parse sParse; if( pzErrMsg ) *pzErrMsg = 0; if( sqliteSafetyOn(db) ) goto exec_misuse; if( (db->flags & SQLITE_Initialized)==0 ){ int rc = sqliteInit(db, pzErrMsg); if( rc!=SQLITE_OK ){ sqliteStrRealloc(pzErrMsg); sqliteSafetyOff(db); return rc; } |
︙ | ︙ |
Changes to src/os.c.
︙ | ︙ | |||
574 575 576 577 578 579 580 | #endif #if OS_WIN SimulateIOError(SQLITE_IOERR); *pSize = GetFileSize(id->h, 0); return SQLITE_OK; #endif } | < < < < < < < < < < < < < < | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | #endif #if OS_WIN SimulateIOError(SQLITE_IOERR); *pSize = GetFileSize(id->h, 0); return SQLITE_OK; #endif } /* ** Change the status of the lock on the file "id" to be a readlock. ** If the file was write locked, then this reduces the lock to a read. ** If the file was read locked, then this acquires a new read lock. ** ** Return SQLITE_OK on success and SQLITE_BUSY on failure. |
︙ | ︙ |
Changes to src/os.h.
︙ | ︙ | |||
78 79 80 81 82 83 84 | int sqliteOsTruncate(OsFile*, int size); int sqliteOsFileSize(OsFile*, int *pSize); int sqliteOsReadLock(OsFile*); int sqliteOsWriteLock(OsFile*); int sqliteOsUnlock(OsFile*); int sqliteOsRandomSeed(char*); int sqliteOsSleep(int ms); | < | 78 79 80 81 82 83 84 85 86 87 88 89 90 | int sqliteOsTruncate(OsFile*, int size); int sqliteOsFileSize(OsFile*, int *pSize); int sqliteOsReadLock(OsFile*); int sqliteOsWriteLock(OsFile*); int sqliteOsUnlock(OsFile*); int sqliteOsRandomSeed(char*); int sqliteOsSleep(int ms); void sqliteOsEnterMutex(void); void sqliteOsLeaveMutex(void); #endif /* _SQLITE_OS_H_ */ |
Changes to src/sqliteInt.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* ** 2001 September 15 ** ** 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. ** ************************************************************************* ** Internal interface definitions for SQLite. ** | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* ** 2001 September 15 ** ** 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. ** ************************************************************************* ** Internal interface definitions for SQLite. ** ** @(#) $Id: sqliteInt.h,v 1.142 2002/08/02 10:36:10 drh Exp $ */ #include "sqlite.h" #include "hash.h" #include "vdbe.h" #include "parse.h" #include "btree.h" #include <stdio.h> |
︙ | ︙ | |||
196 197 198 199 200 201 202 | Btree *pBeTemp; /* Backend for session temporary tables */ int flags; /* Miscellanous flags. See below */ int file_format; /* What file format version is this database? */ int schema_cookie; /* Magic number that changes with the schema */ int next_cookie; /* Value of schema_cookie after commit */ int cache_size; /* Number of pages to use in the cache */ int nTable; /* Number of tables in the database */ | < | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | Btree *pBeTemp; /* Backend for session temporary tables */ int flags; /* Miscellanous flags. See below */ int file_format; /* What file format version is this database? */ int schema_cookie; /* Magic number that changes with the schema */ int next_cookie; /* Value of schema_cookie after commit */ int cache_size; /* Number of pages to use in the cache */ int nTable; /* Number of tables in the database */ void *pBusyArg; /* 1st Argument to the busy callback */ int (*xBusyCallback)(void *,const char*,int); /* The busy callback */ Hash tblHash; /* All tables indexed by name */ Hash idxHash; /* All (named) indices indexed by name */ Hash trigHash; /* All triggers indexed by name */ Hash aFunc; /* All functions that can be in SQL exprs */ int lastRowid; /* ROWID of most recent insert */ |
︙ | ︙ |
Changes to www/c_interface.tcl.
1 2 3 | # # Run this Tcl script to generate the sqlite.html file. # | | | 1 2 3 4 5 6 7 8 9 10 11 | # # Run this Tcl script to generate the sqlite.html file. # set rcsid {$Id: c_interface.tcl,v 1.33 2002/08/02 10:36:10 drh Exp $} puts {<html> <head> <title>The C language interface to the SQLite library</title> </head> <body bgcolor=white> <h1 align=center> |
︙ | ︙ | |||
297 298 299 300 301 302 303 | </p></dd> <dt>SQLITE_MISUSE</dt> <dd><p>This error might occur if one or more of the SQLite API routines is used incorrectly. Examples of incorrect usage include calling <b>sqlite_exec()</b> after the database has been closed using <b>sqlite_close()</b> or calling <b>sqlite_exec()</b> with the same database pointer simultaneously from two separate threads. | < < < | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | </p></dd> <dt>SQLITE_MISUSE</dt> <dd><p>This error might occur if one or more of the SQLite API routines is used incorrectly. Examples of incorrect usage include calling <b>sqlite_exec()</b> after the database has been closed using <b>sqlite_close()</b> or calling <b>sqlite_exec()</b> with the same database pointer simultaneously from two separate threads. </p></dd> </dl> </blockquote> <h2>The Extended API</h2> <p>Only the three core routines shown above are required to use |
︙ | ︙ | |||
814 815 816 817 818 819 820 | <p> Under Unix, an <b>sqlite*</b> pointer should not be carried across a <b>fork()</b> system call into the child process. The child process should open its own copy of the database after the <b>fork()</b>. </p> | < < < < < < < < | 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | <p> Under Unix, an <b>sqlite*</b> pointer should not be carried across a <b>fork()</b> system call into the child process. The child process should open its own copy of the database after the <b>fork()</b>. </p> <h2>Usage Examples</h2> <p>For examples of how the SQLite C/C++ interface can be used, refer to the source code for the <b>sqlite</b> program in the file <b>src/shell.c</b> of the source tree. Additional information about sqlite is available at <a href="sqlite.html">sqlite.html</a>. |
︙ | ︙ |
Changes to www/faq.tcl.
1 2 3 | # # Run this script to generated a faq.html output file # | | | 1 2 3 4 5 6 7 8 9 10 11 | # # Run this script to generated a faq.html output file # set rcsid {$Id: faq.tcl,v 1.13 2002/08/02 10:36:10 drh Exp $} puts {<html> <head> <title>SQLite Frequently Asked Questions</title> </head> <body bgcolor="white"> <h1 align="center">Frequently Asked Questions</h1> |
︙ | ︙ | |||
230 231 232 233 234 235 236 | thread creates a new table or index, the other threads might not be able to see the new table right away. You might have to get the other threads to close and reopen their connection to the database before they will be able to see the new table.</p> <p>Under UNIX, you should not carry an open SQLite database across a fork() system call into the child process. Problems will result | | < < | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | thread creates a new table or index, the other threads might not be able to see the new table right away. You might have to get the other threads to close and reopen their connection to the database before they will be able to see the new table.</p> <p>Under UNIX, you should not carry an open SQLite database across a fork() system call into the child process. Problems will result if you do.</p> } faq { How do I list all tables/indices contained in an SQLite database } { <p>If you are running the <b>sqlite</b> command-line access program you can type "<b>.tables</b>" to get a list of all tables. Or you |
︙ | ︙ |