mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Bug fixes and enhancements entered while on jury recess. (CVS 2246)
FossilOrigin-Name: 38401dfbd5e3b50dd4e7a11562a7770347cebdf4
This commit is contained in:
28
manifest
28
manifest
@@ -1,5 +1,5 @@
|
||||
C Added\sthe\sSQLITE_OMIT_SUBQUERY\scompile-time\soption\sand\sthe\sEXISTS\soperator.\nRegression\stests\sare\scurrently\sfailing\swith\san\sassertion\sfault.\s(CVS\s2245)
|
||||
D 2005-01-20T13:36:20
|
||||
C Bug\sfixes\sand\senhancements\sentered\swhile\son\sjury\srecess.\s(CVS\s2246)
|
||||
D 2005-01-20T22:48:48
|
||||
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||
@@ -36,7 +36,7 @@ F src/cursor.c de73c00aefc4747ad59b5105cf38bbff0667922e
|
||||
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
|
||||
F src/delete.c b3accca9c38d9a67dbd724f67b04151a13735ebd
|
||||
F src/experimental.c 8cc66b2be6a011055d75ef19ed2584bcfbb585ad
|
||||
F src/expr.c 12b37893ab7e3a41d1d9e9a4931eeb3690951d1f
|
||||
F src/expr.c ebddbcf204b1a286799058731c33f4e382d98f1a
|
||||
F src/func.c dc188d862d7276ea897655b248e2cb17022686e3
|
||||
F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
|
||||
F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
|
||||
@@ -58,7 +58,7 @@ F src/parse.y 301d07db056f5125806e84994b5f41a8355d28ad
|
||||
F src/pragma.c 8ab313986673aa4c45e8693d8aabb9b95ee7b14a
|
||||
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
|
||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||
F src/select.c 8a4a38310c5168d1f6e1759494e57cf838d6d37c
|
||||
F src/select.c d8f5c8b44922d9e295a32be941d0a416cda94f98
|
||||
F src/shell.c 591364a0e9ca4ce53873e21e0294476c0c2b4770
|
||||
F src/sqlite.h.in 8249b697d71ef6d7f7f752ba4ca04058e9e8b5ff
|
||||
F src/sqliteInt.h 9a582fcb8333b5a30706250282d9697654305dbc
|
||||
@@ -73,15 +73,15 @@ F src/tokenize.c 88bef43fe3e3c8865a7447f934296ac13238c4f6
|
||||
F src/trigger.c b3de66150300026f21522bb273bbc413a80f427d
|
||||
F src/update.c 6e5c6eb660a5508c449c6d637571e24ef13f70a1
|
||||
F src/utf.c 9bece2c7b94d9002ab1bb900a7658c6f826b0f74
|
||||
F src/util.c 63e8d77659df88b292ac2a9dbd4766419b0ea158
|
||||
F src/util.c a858b93ba06bbafab55ba41e4d58538eb51f4b6a
|
||||
F src/vacuum.c 1a9db113a027461daaf44724c71dd1ebbd064203
|
||||
F src/vdbe.c c5a711f146415634b72b05212bab9f222b0cce26
|
||||
F src/vdbe.c 37afd35d6d09cb701f7fd0a959c4cb8aa0432184
|
||||
F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
|
||||
F src/vdbeInt.h f2b5f54d9881bbc89fff02d95f3f825ade68bce2
|
||||
F src/vdbeapi.c 0cf3bdc1072616bedc8eec7fc22e3f5a169d33fd
|
||||
F src/vdbeaux.c 6c294f7390880a7bb4795c9e0bc605b1a416579a
|
||||
F src/vdbeaux.c d01eff904aa38fcea738998845b736ec1a3b1f7c
|
||||
F src/vdbemem.c 62fe89471b656a922e9879be005abf690509ead3
|
||||
F src/where.c 06aa612bd0bc2634a53e541c4ed9874b814e82d1
|
||||
F src/where.c f4127cc2633ee0f74790ab7f09f5af832489e44e
|
||||
F tclinstaller.tcl 36478c3bbfc5b93ceac42d94e3c736937b808432
|
||||
F test/all.test 7f0988442ab811dfa41793b5b550f5828ce316f3
|
||||
F test/alter.test 95c57a4f461fa81293e0dccef7f83889aadb169a
|
||||
@@ -104,7 +104,7 @@ F test/btree4.test 3797b4305694c7af6828675b0f4b1424b8ca30e4
|
||||
F test/btree5.test 8e5ff32c02e685d36516c6499add9375fe1377f2
|
||||
F test/btree6.test a5ede6bfbbb2ec8b27e62813612c0f28e8f3e027
|
||||
F test/btree7.test a6d3b842db22af97dd14b989e90a2fd96066b72f
|
||||
F test/capi2.test 325e8d68fe7b3c518f73a37f039c52278be8f101
|
||||
F test/capi2.test b0e12aa66684424869f899b421ff71df69411998
|
||||
F test/capi3.test ffb8bd785d5fe26e5d63f24c189c45f21297d44f
|
||||
F test/capi3b.test 5b6a66f9f295f79f443b5d3f33187fa5ef6cf336
|
||||
F test/collate1.test f79736d2ebf5492167ee4d1f4ab4c09dda776b03
|
||||
@@ -245,7 +245,7 @@ F www/copyright-release.pdf cfca3558fc97095e57c6117d08f1f5b80d95125a
|
||||
F www/copyright.tcl 82c9670c7ddb0311912ab7fe24703f33c531066c
|
||||
F www/datatype3.tcl 1d14f70ab73075556b95e76a5c13e5b03f7f6c47
|
||||
F www/datatypes.tcl 7c786d2e8ff434346764534ec015966d17efce60
|
||||
F www/different.tcl 1cdf371794ec04a993be3b3e2c65e1897b789a86
|
||||
F www/different.tcl 051086bc273a36808dc08d58ed098611fb53e315
|
||||
F www/docs.tcl 09e5eccffad783fe65fac87772f5265e9bb64abe
|
||||
F www/download.tcl 4d8ff8c882063b864d004c524e4e7456858f09a5
|
||||
F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
|
||||
@@ -269,8 +269,8 @@ F www/support.tcl 3955da0fd82be68cc5c83d347c05095e80967051
|
||||
F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
|
||||
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||
F www/whentouse.tcl c3b50d3ac31c54be2a1af9b488a89d22f1e6e746
|
||||
P 417bbba93ad7ed5c03d9db6afc12e170155bd152
|
||||
R 0a5b2b3342f1338802ba7063dbaea636
|
||||
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
|
||||
P d30fdf0f2c24cb74b48fab9b83fba4e4b2fe878a
|
||||
R adcab33f79815bf8e13a0ca4e6aa511b
|
||||
U drh
|
||||
Z 9bd559beb0f6f23bafe4d9cc37e5f07d
|
||||
Z 2ea9d8b8d28cb125114230ce2ca3bb86
|
||||
|
@@ -1 +1 @@
|
||||
d30fdf0f2c24cb74b48fab9b83fba4e4b2fe878a
|
||||
38401dfbd5e3b50dd4e7a11562a7770347cebdf4
|
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.185 2005/01/20 13:36:20 drh Exp $
|
||||
** $Id: expr.c,v 1.186 2005/01/20 22:48:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -611,6 +611,10 @@ static int exprNodeIsConstant(void *pArg, Expr *pExpr){
|
||||
case TK_DOT:
|
||||
case TK_AGG_FUNCTION:
|
||||
case TK_FUNCTION:
|
||||
#ifndef SQLITE_OMIT_SUBQUERY
|
||||
case TK_SELECT:
|
||||
case TK_EXISTS:
|
||||
#endif
|
||||
*((int*)pArg) = 0;
|
||||
return 2;
|
||||
default:
|
||||
@@ -1534,6 +1538,8 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
|
||||
sqlite3VdbeOp3(v, OP_Function, nExpr, p2, (char*)pDef, P3_FUNCDEF);
|
||||
break;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_SUBQUERY
|
||||
case TK_EXISTS:
|
||||
case TK_SELECT: {
|
||||
if( pExpr->iTable>=0 ){
|
||||
sqlite3VdbeAddOp(v, OP_Gosub, 0, pExpr->iTable);
|
||||
@@ -1543,6 +1549,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
|
||||
VdbeComment((v, "# load subquery result"));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case TK_IN: {
|
||||
int addr;
|
||||
char affinity;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle SELECT statements in SQLite.
|
||||
**
|
||||
** $Id: select.c,v 1.231 2005/01/20 13:36:20 drh Exp $
|
||||
** $Id: select.c,v 1.232 2005/01/20 22:48:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -741,7 +741,7 @@ static void generateColumnNames(
|
||||
sqlite3 *db = pParse->db;
|
||||
int fullNames, shortNames;
|
||||
|
||||
#ifdef SQLITE_OMIT_EXPLAIN
|
||||
#ifndef SQLITE_OMIT_EXPLAIN
|
||||
/* If this is an EXPLAIN, skip this step */
|
||||
if( pParse->explain ){
|
||||
return;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
** This file contains functions for allocating memory, comparing
|
||||
** strings, and stuff like that.
|
||||
**
|
||||
** $Id: util.c,v 1.127 2005/01/17 07:53:44 danielk1977 Exp $
|
||||
** $Id: util.c,v 1.128 2005/01/20 22:48:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdarg.h>
|
||||
@@ -800,7 +800,7 @@ int sqlite3SafetyCheck(sqlite3 *db){
|
||||
int sqlite3PutVarint(unsigned char *p, u64 v){
|
||||
int i, j, n;
|
||||
u8 buf[10];
|
||||
if( v & 0xff00000000000000 ){
|
||||
if( v & (((u64)0xff000000)<<32) ){
|
||||
p[8] = v;
|
||||
v >>= 8;
|
||||
for(i=7; i>=0; i--){
|
||||
|
15
src/vdbe.c
15
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.443 2005/01/17 03:40:08 danielk1977 Exp $
|
||||
** $Id: vdbe.c,v 1.444 2005/01/20 22:48:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -2868,6 +2868,13 @@ case OP_NewRecno: {
|
||||
cnt = 0;
|
||||
assert( (sqlite3BtreeFlags(pC->pCursor) & BTREE_INTKEY)!=0 );
|
||||
assert( (sqlite3BtreeFlags(pC->pCursor) & BTREE_ZERODATA)==0 );
|
||||
|
||||
/* Some compilers complain about constants of the form 0x7fffffffffffffff.
|
||||
** Others complain about 0x7ffffffffffffffffLL. The following macro seems
|
||||
** to provide the constant while making all compilers happy.
|
||||
*/
|
||||
# define MAX_I64 ( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )
|
||||
|
||||
if( !pC->useRandomRowid ){
|
||||
if( pC->nextRowidValid ){
|
||||
v = pC->nextRowid;
|
||||
@@ -2878,7 +2885,7 @@ case OP_NewRecno: {
|
||||
}else{
|
||||
sqlite3BtreeKeySize(pC->pCursor, &v);
|
||||
v = keyToInt(v);
|
||||
if( v==0x7fffffffffffffff ){
|
||||
if( v==MAX_I64 ){
|
||||
pC->useRandomRowid = 1;
|
||||
}else{
|
||||
v++;
|
||||
@@ -2893,7 +2900,7 @@ case OP_NewRecno: {
|
||||
pMem = &p->aMem[pOp->p2];
|
||||
Integerify(pMem);
|
||||
assert( (pMem->flags & MEM_Int)!=0 ); /* mem(P2) holds an integer */
|
||||
if( pMem->i==0x7fffffffffffffff || pC->useRandomRowid ){
|
||||
if( pMem->i==MAX_I64 || pC->useRandomRowid ){
|
||||
rc = SQLITE_FULL;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
@@ -2904,7 +2911,7 @@ case OP_NewRecno: {
|
||||
}
|
||||
#endif
|
||||
|
||||
if( v<0x7fffffffffffffff ){
|
||||
if( v<MAX_I64 ){
|
||||
pC->nextRowidValid = 1;
|
||||
pC->nextRowid = v+1;
|
||||
}else{
|
||||
|
@@ -1487,13 +1487,14 @@ u32 sqlite3VdbeSerialType(Mem *pMem){
|
||||
return 0;
|
||||
}
|
||||
if( flags&MEM_Int ){
|
||||
/* Figure out whether to use 1, 2, 4 or 8 bytes. */
|
||||
/* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
|
||||
# define MAX_6BYTE ((((i64)0x00010000)<<32)-1)
|
||||
i64 i = pMem->i;
|
||||
if( i>=-127 && i<=127 ) return 1;
|
||||
if( i>=-32767 && i<=32767 ) return 2;
|
||||
if( i>=-8388607 && i<=8388607 ) return 3;
|
||||
if( i>=-2147483647 && i<=2147483647 ) return 4;
|
||||
if( i>=-140737488355328L && i<=140737488355328L ) return 5;
|
||||
if( i>=-MAX_6BYTE && i<=MAX_6BYTE ) return 5;
|
||||
return 6;
|
||||
}
|
||||
if( flags&MEM_Real ){
|
||||
|
@@ -16,7 +16,7 @@
|
||||
** so is applicable. Because this module is responsible for selecting
|
||||
** indices, you might also think of this module as the "query optimizer".
|
||||
**
|
||||
** $Id: where.c,v 1.130 2005/01/19 23:24:51 drh Exp $
|
||||
** $Id: where.c,v 1.131 2005/01/20 22:48:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -650,7 +650,6 @@ WhereInfo *sqlite3WhereBegin(
|
||||
createMask(&maskSet, pTabList->a[i].iCursor);
|
||||
}
|
||||
for(pTerm=aExpr, i=0; i<nExpr; i++, pTerm++){
|
||||
TriggerStack *pStack;
|
||||
exprAnalyze(pTabList, &maskSet, pTerm);
|
||||
}
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script testing the callback-free C/C++ API.
|
||||
#
|
||||
# $Id: capi2.test,v 1.23 2005/01/12 12:44:04 danielk1977 Exp $
|
||||
# $Id: capi2.test,v 1.24 2005/01/20 22:48:48 drh Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@@ -597,6 +597,7 @@ do_test capi2-7.11a {
|
||||
|
||||
ifcapable {explain} {
|
||||
do_test capi2-7.12 {
|
||||
btree_breakpoint
|
||||
set x [stepsql $DB {EXPLAIN SELECT * FROM t1}]
|
||||
lindex $x 0
|
||||
} {0}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
set rcsid {$Id: different.tcl,v 1.1 2005/01/17 03:42:52 drh Exp $}
|
||||
set rcsid {$Id: different.tcl,v 1.2 2005/01/20 22:48:49 drh Exp $}
|
||||
source common.tcl
|
||||
header {Distinctive Features Of SQLite}
|
||||
puts {
|
||||
@@ -28,11 +28,9 @@ feature zeroconfig {Zero-Configuration} {
|
||||
<p>
|
||||
SQLite just works.
|
||||
<p>
|
||||
An SQLite database is an ordinary disk file. If SQLite can read
|
||||
the disk file then it can read anything in the database. If the disk
|
||||
file and its directory are writable, then SQLite can change anything
|
||||
in the database.
|
||||
|
||||
Other more familiar database engines run great once you get them going.
|
||||
But doing the initial installation and configuration can be
|
||||
intimidatingly complex.
|
||||
}
|
||||
|
||||
feature serverless {Serverless} {
|
||||
@@ -64,12 +62,29 @@ feature serverless {Serverless} {
|
||||
allows multiple applications to access the same database at the same time.
|
||||
}
|
||||
|
||||
feature onefile {Single Database File} {
|
||||
An SQLite database is a single ordinary disk file that can be located
|
||||
anywhere in the directory hierarchy. If SQLite can read
|
||||
the disk file then it can read anything in the database. If the disk
|
||||
file and its directory are writable, then SQLite can change anything
|
||||
in the database. Database files can easily be copied onto a USB
|
||||
memory stick or emailed for sharing.
|
||||
<p>
|
||||
Other SQL database engines tend to store data as a large collection of
|
||||
files. Often these files are in a standard location that only the
|
||||
database engine itself can access. This makes the data more secure,
|
||||
but also makes it harder to access. Some SQL database engines provide
|
||||
the option of writing directly to disk and bypassing the filesystem
|
||||
all together. This provides added performance, but at the cost of
|
||||
considerable setup and maintenance complexity.
|
||||
}
|
||||
|
||||
feature small {Compact} {
|
||||
When optimized for size, the whole SQLite library with everything enabled
|
||||
is less than 220KiB in size (as measured on an ix86 using the "size"
|
||||
utility from the GNU compiler suite.) Unneeded features can be disabled
|
||||
at compile-time to further reduce the size of the library to under
|
||||
180KiB if desired.
|
||||
170KiB if desired.
|
||||
<p>
|
||||
Most other SQL database engines are much larger than this. IBM boasts
|
||||
that it's recently released CloudScape database engine is "only" a 2MiB
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Run this TCL script to generate HTML for the goals.html file.
|
||||
#
|
||||
set rcsid {$Id: whentouse.tcl,v 1.3 2005/01/03 01:33:00 drh Exp $}
|
||||
set rcsid {$Id: whentouse.tcl,v 1.4 2005/01/20 22:48:49 drh Exp $}
|
||||
source common.tcl
|
||||
header {Appropriate Uses For SQLite}
|
||||
|
||||
@@ -14,7 +14,7 @@ primary design goal is to be simple:
|
||||
<ul>
|
||||
<li>Simple to administer</li>
|
||||
<li>Simple to operate</li>
|
||||
<li>Simple to use in a program</li>
|
||||
<li>Simple to embed in a larger program</li>
|
||||
<li>Simple to maintain and customize</li>
|
||||
</ul>
|
||||
|
||||
@@ -34,8 +34,8 @@ achieve simplicity, SQLite has had to sacrifice other characteristics
|
||||
that some people find useful, such as high concurrency, fine-grained
|
||||
access control, a rich set of built-in functions, stored procedures,
|
||||
esoteric SQL language features, XML and/or Java extensions,
|
||||
tera- or peta-byte scalability, and so forth. If you need these
|
||||
kinds of features and don't mind the added complexity that they
|
||||
tera- or peta-byte scalability, and so forth. If you need some of these
|
||||
latter of features and do not mind the added complexity that they
|
||||
bring, then SQLite is probably not the database for you.
|
||||
SQLite is not intended to be an enterprise database engine. It
|
||||
not designed to compete with Oracle or PostgreSQL.
|
||||
@@ -188,7 +188,7 @@ prototyping new, experimental database language features or ideas.
|
||||
<ul>
|
||||
<li><p><b>Client/Server Applications</b><p>
|
||||
|
||||
<p>If you have many client programs access a common database
|
||||
<p>If you have many client programs accessing a common database
|
||||
over a network, you should consider using a client/server database
|
||||
engine instead of SQLite. SQLite will work over a network filesystem,
|
||||
but because of the latency associated with most network filesystems,
|
||||
@@ -235,7 +235,7 @@ consider using a different database engine.
|
||||
SQLite uses reader/writer locks on the entire database file. That means
|
||||
if any process is reading from any part of the database, all other
|
||||
processes are prevented from writing any other part of the database.
|
||||
Similarly, if any one process is writing to any part of the database,
|
||||
Similarly, if any one process is writing to the database,
|
||||
all other processes are prevented from reading any other part of the
|
||||
database.
|
||||
For many situations, this is not a problem. Each application
|
||||
|
Reference in New Issue
Block a user