diff --git a/VERSION b/VERSION
index 3f684d2d90..9255f1db70 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.4
+2.4.0-beta1
diff --git a/manifest b/manifest
index be9374a0b2..97c0748af1 100644
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C More\sbugs\sfixed\sfor\sviews.\s(CVS\s416)
-D 2002-03-03T23:06:01
+C Updates\sto\sthe\sdocumentation.\s\sChanged\sversion\snumber\sto\s2.4.0-beta1\s(CVS\s417)
+D 2002-03-04T02:26:16
F Makefile.in 50f1b3351df109b5774771350d8c1b8d3640130d
F Makefile.template 89e373b2dad0321df00400fa968dc14b61a03296
F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
-F VERSION 80c0f75cf7de338f1c6c31c07f5576d21f764431
+F VERSION bb1eea85a80e8034130db85d6c0857abe42c9460
F aclocal.m4 11faa843caa38fd451bc6aeb43e248d1723a269d
F config.guess f38b1e93d1e0fa6f5a6913e9e7b12774b9232588
F config.log 6a73d03433669b10a3f0c221198c3f26b9413914
@@ -21,10 +21,10 @@ F sqlite.1 2e2bb0529ef468ade9e4322bd609d0695fb9ded9
F src/TODO af7f3cab0228e34149cf98e073aa83d45878e7e6
F src/btree.c d25ea795a0f7017bc2099c437e6cc01d4c31b22d
F src/btree.h 8abeabfe6e0b1a990b64fa457592a6482f6674f3
-F src/build.c 5b91d41cbeed1da348a43a8af3eb5a7ce5812673
+F src/build.c e11b0daa79ba894c7476c33372b1dc42b13471e6
F src/delete.c 577da499162291c1855f0b304b211bffcf9da945
F src/expr.c e12ca550536c0bae7a3acef49dfa3068fe5f0900
-F src/func.c 5b4d9707b0c8f463824c1f04547b524cba24bf7b
+F src/func.c 87516e7dc37190c24af77593931a5d09d797520a
F src/hash.c cc259475e358baaf299b00a2c7370f2b03dda892
F src/hash.h dca065dda89d4575f3176e75e9a3dc0f4b4fb8b9
F src/insert.c 42bfd145efd428d7e5f200dd49ea0b816fc30d79
@@ -111,23 +111,23 @@ F tool/report1.txt 9eae07f26a8fc53889b45fc833a66a33daa22816
F www/arch.fig d5f9752a4dbf242e9cfffffd3f5762b6c63b3bcf
F www/arch.png 82ef36db1143828a7abc88b1e308a5f55d4336f4
F www/arch.tcl 72a0c80e9054cc7025a50928d28d9c75c02c2b8b
-F www/c_interface.tcl 63efc40f09e2f0d8fea43d174103248b160fdf0e
-F www/changes.tcl 18df8bc8dbcefbfd9538ce476d4fcbc193ac3352
+F www/c_interface.tcl 567cda531aac9d68a61ef02e26c6b202bd856db2
+F www/changes.tcl cdd351b0f358bc23ca6243f3ca52c35ca1bede26
F www/conflict.tcl 81dd21f9a679e60aae049e9dd8ab53d59570cda2
F www/crosscompile.tcl 3622ebbe518927a3854a12de51344673eb2dd060
F www/download.tcl a6d75b8b117cd33dcb090bef7e80d7556d28ebe0
F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
F www/faq.tcl c6d1d6d69a9083734ee73d1b5ee4253ae8f10074
-F www/formatchng.tcl 2d9a35c787823b48d72a5c64bb5414a43e26d5ad
+F www/formatchng.tcl 5cffc0ebd00b3085c976a527eeeef70db4ccc7a7
F www/index.tcl eacd99bcc3132d6e6b74a51422d415cc0bf7bfdf
-F www/lang.tcl 01e47b43cb81cd24bd2918a2e1bd31a959097279
+F www/lang.tcl db13f9a9c5ce7a400fa7ae021cd99dc6b05fd74a
F www/mingw.tcl f1c7c0a7f53387dd9bb4f8c7e8571b7561510ebc
F www/opcode.tcl bdec8ef9f100dbd87bbef8976c54b88e43fd8ccc
F www/speed.tcl 83457b2bf6bb430900bd48ca3dd98264d9a916a5
F www/sqlite.tcl 8b5884354cb615049aed83039f8dfe1552a44279
F www/tclsqlite.tcl 829b393d1ab187fd7a5e978631b3429318885c49
F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 6121e5ab9328c90c64d40ade3de73ad11d4aaf4e
-R 83a8a52daf3c29d4bf2f935e98a598c9
+P 813077623087ffc6cd506f57cf6d1e3d9239f806
+R fe676fb38cbe5a2068c89e56308a155d
U drh
-Z 8a99e2c5584a6641ebfdb027f72777c2
+Z 9a81a81e1e363e5bb6c841e14ddef308
diff --git a/manifest.uuid b/manifest.uuid
index ac548d2fbd..79e1438fa4 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-813077623087ffc6cd506f57cf6d1e3d9239f806
\ No newline at end of file
+36a8fe0ad0ee2a67afafc04125dcc085ec1b5a13
\ No newline at end of file
diff --git a/src/build.c b/src/build.c
index adc07cb998..1642e47eb8 100644
--- a/src/build.c
+++ b/src/build.c
@@ -25,7 +25,7 @@
** ROLLBACK
** PRAGMA
**
-** $Id: build.c,v 1.83 2002/03/03 23:06:01 drh Exp $
+** $Id: build.c,v 1.84 2002/03/04 02:26:16 drh Exp $
*/
#include "sqliteInt.h"
#include
@@ -1508,20 +1508,9 @@ void sqliteCopy(
zTab = sqliteTableNameFromToken(pTableName);
if( sqlite_malloc_failed || zTab==0 ) goto copy_cleanup;
- pTab = sqliteFindTable(db, zTab);
+ pTab = sqliteTableNameToTable(pParse, zTab);
sqliteFree(zTab);
- if( pTab==0 ){
- sqliteSetNString(&pParse->zErrMsg, "no such table: ", 0,
- pTableName->z, pTableName->n, 0);
- pParse->nErr++;
- goto copy_cleanup;
- }
- if( pTab->readOnly ){
- sqliteSetString(&pParse->zErrMsg, "table ", pTab->zName,
- " may not be modified", 0);
- pParse->nErr++;
- goto copy_cleanup;
- }
+ if( pTab==0 ) goto copy_cleanup;
v = sqliteGetVdbe(pParse);
if( v ){
int openOp;
diff --git a/src/func.c b/src/func.c
index 304d828e62..8dbfc76a75 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.13 2002/03/02 19:00:31 drh Exp $
+** $Id: func.c,v 1.14 2002/03/04 02:26:16 drh Exp $
*/
#include
#include
@@ -242,6 +242,7 @@ struct StdDevCtx {
double sum2; /* Sum of the squares of terms */
};
+#if 0 /* Omit because math library is required */
/*
** Routines used to compute the standard deviation as an aggregate.
*/
@@ -263,6 +264,7 @@ static void stdDevFinalize(sqlite_func *context){
sqrt((p->sum2 - p->sum*p->sum/rN)/(rN-1.0)));
}
}
+#endif
/*
** The following structure keeps track of state information for the
@@ -396,7 +398,9 @@ void sqliteRegisterBuildinFunctions(sqlite *db){
{ "avg", 1, sumStep, avgFinalize },
{ "count", 0, countStep, countFinalize },
{ "count", 1, countStep, countFinalize },
+#if 0
{ "stddev", 1, stdDevStep, stdDevFinalize },
+#endif
};
int i;
diff --git a/www/c_interface.tcl b/www/c_interface.tcl
index c062470b4f..5f2f361745 100644
--- a/www/c_interface.tcl
+++ b/www/c_interface.tcl
@@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the sqlite.html file.
#
-set rcsid {$Id: c_interface.tcl,v 1.24 2002/02/19 22:42:06 drh Exp $}
+set rcsid {$Id: c_interface.tcl,v 1.25 2002/03/04 02:26:17 drh Exp $}
puts {
@@ -642,6 +642,82 @@ single-quote character ('), it is always a good idea to use the
SQLite printf routines and the %q formatting option instead of sprintf.
+
Adding New SQL Functions
+
+
Beginning with version 2.4.0, SQLite allows the SQL language to be
+extended with new functions implemented as C code. The following interface
+is used:
+
+The sqlite_create_function() interface is used to create
+regular functions and sqlite_create_aggregate() is used to
+create new aggregate functions. In both cases, the db
+parameter is an open SQLite database on which the functions should
+be registered, zName is the name of the new function,
+nArg is the number of arguments, and pUserData is
+a pointer which is passed through unchanged to the C implementation
+of the function.
+
+
+
+For regular functions, the xFunc callback is invoked once
+for each function call. The implementation of xFunc should call
+one of the sqlite_set_result_... interfaces to return its
+result. The sqlite_user_data() routine can be used to
+retrieve the pUserData pointer that was passed in when the
+function was registered.
+
+
+
+For aggregate functions, the xStep callback is invoked once
+for each row in the result and then xFinalize is invoked at the
+end to compute a final answer. The xStep routine can use the
+sqlite_aggregate_context() interface to allocate memory that
+will be unique to that particular instance of the SQL function.
+This memory will be automatically deleted after xFinalize is called.
+The sqlite_aggregate_count() routine can be used to find out
+how many rows of data were passed to the aggregate. The xFinalize
+callback should invoke one of the sqlite_set_result_...
+interfaces to set the final result of the aggregate.
+
+
+
+SQLite now implements all of its built-in functions using this
+interface. For additional information and examples on how to create
+new SQL functions, review the SQLite source code in the file
+func.c.
+
+
Usage Examples
For examples of how the SQLite C/C++ interface can be used,
diff --git a/www/changes.tcl b/www/changes.tcl
index 2cbdfcdcd7..fe8ac42ce6 100644
--- a/www/changes.tcl
+++ b/www/changes.tcl
@@ -17,7 +17,7 @@ proc chng {date desc} {
puts "
$desc
"
}
-chng {2002 Feb * (2.3.4)} {
+chng {2002 Mar * (2.4.0)} {
Change the name of the sanity_check PRAGMA to integrity_check
and make it available in all compiles.
SELECT min() or max() of an indexed column with no WHERE or GROUP BY
@@ -28,8 +28,16 @@ chng {2002 Feb * (2.3.4)} {
Modifications to the "lemon" parser generator so that the parser tables
are 4 times smaller.
Added support for user-defined functions implemented in C.
+
Added support for new functions: coalesce(), lower(),
+ upper(), and random()
Added support for VIEWs.
Added the subquery flattening optimizer.
+
Modified the B-Tree and Pager modules so that disk pages that do not
+ contain real data (free pages) are not journalled and are not
+ written from memory back to the disk when they change. This does not
+ impact database integrity, since the
+ pages contain no real data, but it does make large INSERT operations
+ about 2.5 times faster and large DELETEs about 5 times faster.
}
chng {2002 Feb 18 (2.3.3)} {
diff --git a/www/formatchng.tcl b/www/formatchng.tcl
index 8648969cb6..4f0c684830 100644
--- a/www/formatchng.tcl
+++ b/www/formatchng.tcl
@@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the formatchng.html file.
#
-set rcsid {$Id: formatchng.tcl,v 1.2 2002/01/30 16:17:25 drh Exp $ }
+set rcsid {$Id: formatchng.tcl,v 1.3 2002/03/04 02:26:17 drh Exp $ }
puts {
@@ -89,7 +89,21 @@ occurred since version 1.0.0:
that are stored in the SQLITE_MASTER table. If you create a database that
contains this new syntax, then try to read that database using version 2.2.5
or earlier, the parser will not understand the new syntax and you will get
- an error. Otherwise, databases for 2.2.x and 2.3.x are interchangeable.
+ an error. Otherwise, databases for 2.2.x and 2.3.x are interchangeable.
+
+
+
2.3.3 to 2.4.0
+
2002-Mar-?
+
Beginning with version 2.4.0, SQLite added support for views.
+ Information about views is stored in the SQLITE_MASTER table. If an older
+ version of SQLite attempts to read a database that contains VIEW information
+ in the SQLITE_MASTER table, the parser will not understand the new syntax
+ and you will get an error. Also, the
+ way SQLite keeps track of unused disk blocks in the database file
+ changed slightly.
+ If an older version of SQLite attempts to write a database that
+ was previously written by version 2.4.0 or later, then it may leak disk
+ blocks.
"
}
@@ -342,6 +344,21 @@ in place of the original command.
}
+Section {CREATE VIEW} {createview}
+
+Syntax {sql-command} {
+CREATE VIEW AS
+}
+
+puts {
+