Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72b24fdfdd |
@@ -303,9 +303,6 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
|
||||
!ENDIF
|
||||
|
||||
# Always enable math functions on Windows
|
||||
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MATH_FUNCTIONS
|
||||
|
||||
# Should the rbu extension be enabled? If so, add compilation options
|
||||
# to enable it.
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.35.3.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.35.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -726,8 +726,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='sqlite'
|
||||
PACKAGE_TARNAME='sqlite'
|
||||
PACKAGE_VERSION='3.35.3'
|
||||
PACKAGE_STRING='sqlite 3.35.3'
|
||||
PACKAGE_VERSION='3.35.0'
|
||||
PACKAGE_STRING='sqlite 3.35.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1467,7 +1467,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures sqlite 3.35.3 to adapt to many kinds of systems.
|
||||
\`configure' configures sqlite 3.35.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1532,7 +1532,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of sqlite 3.35.3:";;
|
||||
short | recursive ) echo "Configuration of sqlite 3.35.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1660,7 +1660,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
sqlite configure 3.35.3
|
||||
sqlite configure 3.35.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2079,7 +2079,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by sqlite $as_me 3.35.3, which was
|
||||
It was created by sqlite $as_me 3.35.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -12378,7 +12378,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by sqlite $as_me 3.35.3, which was
|
||||
This file was extended by sqlite $as_me 3.35.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12444,7 +12444,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
sqlite config.status 3.35.3
|
||||
sqlite config.status 3.35.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+88
-98
@@ -38,8 +38,8 @@
|
||||
** (5) Otherwise, SQLITE_CANTOPEN is returned.
|
||||
**
|
||||
** To avoid unnecessary complications with the PENDING_BYTE, the size of
|
||||
** the file containing the database is limited to 1GiB. (1073741824 bytes)
|
||||
** This VFS will not read or write past the 1GiB mark. This restriction
|
||||
** the file containing the database is limited to 1GB. (1000013824 bytes)
|
||||
** This VFS will not read or write past the 1GB mark. This restriction
|
||||
** might be lifted in future versions. For now, if you need a larger
|
||||
** database, then keep it in a separate file.
|
||||
**
|
||||
@@ -68,16 +68,14 @@ SQLITE_EXTENSION_INIT1
|
||||
** Maximum size of the combined prefix + database + append-mark. This
|
||||
** must be less than 0x40000000 to avoid locking issues on Windows.
|
||||
*/
|
||||
#define APND_MAX_SIZE (0x40000000)
|
||||
#define APND_MAX_SIZE (65536*15259)
|
||||
|
||||
/*
|
||||
** Try to align the database to an even multiple of APND_ROUNDUP bytes.
|
||||
** Size of storage page upon which to align appendvfs portion.
|
||||
*/
|
||||
#ifndef APND_ROUNDUP
|
||||
#define APND_ROUNDUP 4096
|
||||
#ifndef APND_ROUNDUP_BITS
|
||||
#define APND_ROUNDUP_BITS 12
|
||||
#endif
|
||||
#define APND_ALIGN_MASK ((sqlite3_int64)(APND_ROUNDUP-1))
|
||||
#define APND_START_ROUNDUP(fsz) (((fsz)+APND_ALIGN_MASK) & ~APND_ALIGN_MASK)
|
||||
|
||||
/*
|
||||
** Forward declaration of objects used by this utility
|
||||
@@ -91,45 +89,39 @@ typedef struct ApndFile ApndFile;
|
||||
#define ORIGVFS(p) ((sqlite3_vfs*)((p)->pAppData))
|
||||
#define ORIGFILE(p) ((sqlite3_file*)(((ApndFile*)(p))+1))
|
||||
|
||||
/* An open appendvfs file
|
||||
**
|
||||
** An instance of this structure describes the appended database file.
|
||||
** A separate sqlite3_file object is always appended. The appended
|
||||
** sqlite3_file object (which can be accessed using ORIGFILE()) describes
|
||||
** the entire file, including the prefix, the database, and the
|
||||
** append-mark.
|
||||
**
|
||||
** The structure of an AppendVFS database is like this:
|
||||
**
|
||||
** +-------------+---------+----------+-------------+
|
||||
** | prefix-file | padding | database | append-mark |
|
||||
** +-------------+---------+----------+-------------+
|
||||
** ^ ^
|
||||
** | |
|
||||
** iPgOne iMark
|
||||
**
|
||||
**
|
||||
** "prefix file" - file onto which the database has been appended.
|
||||
** "padding" - zero or more bytes inserted so that "database"
|
||||
** starts on an APND_ROUNDUP boundary
|
||||
** "database" - The SQLite database file
|
||||
** "append-mark" - The 25-byte "Start-Of-SQLite3-NNNNNNNN" that indicates
|
||||
** the offset from the start of prefix-file to the start
|
||||
** of "database".
|
||||
**
|
||||
** The size of the database is iMark - iPgOne.
|
||||
**
|
||||
** The NNNNNNNN in the "Start-Of-SQLite3-NNNNNNNN" suffix is the value
|
||||
** of iPgOne stored as a big-ending 64-bit integer.
|
||||
**
|
||||
** iMark will be the size of the underlying file minus 25 (APND_MARKSIZE).
|
||||
** Or, iMark is -1 to indicate that it has not yet been written.
|
||||
*/
|
||||
/* Invariants for an open appendvfs file:
|
||||
* Once an appendvfs file is opened, it will be in one of three states:
|
||||
* State 0: Never written. Underlying file (if any) is unaltered.
|
||||
* State 1: Append mark is persisted, content write is in progress.
|
||||
* State 2: Append mark is persisted, content writes are complete.
|
||||
*
|
||||
* State 0 is persistent in the sense that nothing will have been done
|
||||
* to the underlying file, including any attempt to convert it to an
|
||||
* appendvfs file.
|
||||
*
|
||||
* State 1 is normally transitory. However, if a write operation ends
|
||||
* abnormally (disk full, power loss, process kill, etc.), then State 1
|
||||
* may be persistent on disk with an incomplete content write-out. This
|
||||
* is logically equivalent to an interrupted write to an ordinary file,
|
||||
* where some unknown portion of to-be-written data is persisted while
|
||||
* the remainder is not. Database integrity in such cases is maintained
|
||||
* (or not) by the same measures available for ordinary file access.
|
||||
*
|
||||
* State 2 is persistent under normal circumstances (when there is no
|
||||
* abnormal termination of a write operation such that data provided
|
||||
* to the underlying VFS write method has not yet reached storage.)
|
||||
*
|
||||
* In order to maintain the state invariant, the append mark is written
|
||||
* in advance of content writes where any part of such content would
|
||||
* overwrite an existing (or yet to be written) append mark.
|
||||
*/
|
||||
struct ApndFile {
|
||||
sqlite3_file base; /* Subclass. MUST BE FIRST! */
|
||||
sqlite3_int64 iPgOne; /* Offset to the start of the database */
|
||||
sqlite3_int64 iMark; /* Offset of the append mark. -1 if unwritten */
|
||||
/* Always followed by another sqlite3_file that describes the whole file */
|
||||
/* Access to IO methods of the underlying file */
|
||||
sqlite3_file base;
|
||||
/* File offset to beginning of appended content (unchanging) */
|
||||
sqlite3_int64 iPgOne;
|
||||
/* File offset of written append-mark, or -1 if unwritten */
|
||||
sqlite3_int64 iMark;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -259,7 +251,7 @@ static int apndWriteMark(
|
||||
int rc;
|
||||
assert(pFile == ORIGFILE(paf));
|
||||
memcpy(a, APND_MARK_PREFIX, APND_MARK_PREFIX_SZ);
|
||||
while( --i >= 0 ){
|
||||
while (--i >= 0) {
|
||||
a[APND_MARK_PREFIX_SZ+i] = (unsigned char)(iPgOne & 0xff);
|
||||
iPgOne >>= 8;
|
||||
}
|
||||
@@ -287,7 +279,8 @@ static int apndWrite(
|
||||
/* If append-mark is absent or will be overwritten, write it. */
|
||||
if( paf->iMark < 0 || paf->iPgOne + iWriteEnd > paf->iMark ){
|
||||
int rc = apndWriteMark(paf, pFile, iWriteEnd);
|
||||
if( SQLITE_OK!=rc ) return rc;
|
||||
if( SQLITE_OK!=rc )
|
||||
return rc;
|
||||
}
|
||||
return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
|
||||
}
|
||||
@@ -299,7 +292,8 @@ static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
|
||||
ApndFile *paf = (ApndFile *)pFile;
|
||||
pFile = ORIGFILE(pFile);
|
||||
/* The append mark goes out first so truncate failure does not lose it. */
|
||||
if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
|
||||
if( SQLITE_OK!=apndWriteMark(paf, pFile, size) )
|
||||
return SQLITE_IOERR;
|
||||
/* Truncate underlying file just past append mark */
|
||||
return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
|
||||
}
|
||||
@@ -415,9 +409,8 @@ static int apndFetch(
|
||||
void **pp
|
||||
){
|
||||
ApndFile *p = (ApndFile *)pFile;
|
||||
if( p->iMark < 0 || iOfst+iAmt > p->iMark ){
|
||||
if( p->iMark < 0 || iOfst+iAmt > p->iMark)
|
||||
return SQLITE_IOERR; /* Cannot read what is not yet there. */
|
||||
}
|
||||
pFile = ORIGFILE(pFile);
|
||||
return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
|
||||
}
|
||||
@@ -468,18 +461,14 @@ static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
|
||||
char zHdr[16];
|
||||
sqlite3_int64 iMark = apndReadMark(sz, pFile);
|
||||
if( iMark>=0 ){
|
||||
/* If file has the correct end-marker, the expected odd size, and the
|
||||
** SQLite DB type marker where the end-marker puts it, then it
|
||||
** is an appendvfs database.
|
||||
*/
|
||||
/* If file has right end-marker, the expected odd size, and the
|
||||
* SQLite DB type marker where the end-marker puts it, then it
|
||||
* is an appendvfs database (to be treated as such.)
|
||||
*/
|
||||
rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
|
||||
if( SQLITE_OK==rc
|
||||
&& memcmp(zHdr, apvfsSqliteHdr, sizeof(zHdr))==0
|
||||
&& (sz & 0x1ff) == APND_MARK_SIZE
|
||||
&& sz>=512+APND_MARK_SIZE
|
||||
){
|
||||
if( SQLITE_OK==rc && memcmp(zHdr, apvfsSqliteHdr, sizeof(zHdr))==0
|
||||
&& (sz & 0x1ff)== APND_MARK_SIZE && sz>=512+APND_MARK_SIZE )
|
||||
return 1; /* It's an appendvfs database */
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -501,65 +490,66 @@ static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
|
||||
}
|
||||
}
|
||||
|
||||
/* Round-up used to get appendvfs portion to begin at a page boundary. */
|
||||
#define APND_ALIGN_MASK(nbits) ((1<<nbits)-1)
|
||||
#define APND_START_ROUNDUP(fsz, nbits) \
|
||||
( ((fsz)+APND_ALIGN_MASK(nbits)) & ~(sqlite3_int64)APND_ALIGN_MASK(nbits) )
|
||||
|
||||
/*
|
||||
** Open an apnd file handle.
|
||||
*/
|
||||
static int apndOpen(
|
||||
sqlite3_vfs *pApndVfs,
|
||||
sqlite3_vfs *pVfs,
|
||||
const char *zName,
|
||||
sqlite3_file *pFile,
|
||||
int flags,
|
||||
int *pOutFlags
|
||||
){
|
||||
ApndFile *pApndFile = (ApndFile*)pFile;
|
||||
sqlite3_file *pBaseFile = ORIGFILE(pFile);
|
||||
sqlite3_vfs *pBaseVfs = ORIGVFS(pApndVfs);
|
||||
ApndFile *p;
|
||||
sqlite3_file *pSubFile;
|
||||
sqlite3_vfs *pSubVfs;
|
||||
int rc;
|
||||
sqlite3_int64 sz = 0;
|
||||
sqlite3_int64 sz;
|
||||
pSubVfs = ORIGVFS(pVfs);
|
||||
if( (flags & SQLITE_OPEN_MAIN_DB)==0 ){
|
||||
/* The appendvfs is not to be used for transient or temporary databases.
|
||||
** Just use the base VFS open to initialize the given file object and
|
||||
** open the underlying file. (Appendvfs is then unused for this file.)
|
||||
*/
|
||||
return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
|
||||
/* The appendvfs is not to be used for transient or temporary databases. */
|
||||
return pSubVfs->xOpen(pSubVfs, zName, pFile, flags, pOutFlags);
|
||||
}
|
||||
memset(pApndFile, 0, sizeof(ApndFile));
|
||||
p = (ApndFile*)pFile;
|
||||
memset(p, 0, sizeof(*p));
|
||||
pSubFile = ORIGFILE(pFile);
|
||||
pFile->pMethods = &apnd_io_methods;
|
||||
pApndFile->iMark = -1; /* Append mark not yet written */
|
||||
|
||||
rc = pBaseVfs->xOpen(pBaseVfs, zName, pBaseFile, flags, pOutFlags);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = pBaseFile->pMethods->xFileSize(pBaseFile, &sz);
|
||||
}
|
||||
rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
|
||||
if( rc ) goto apnd_open_done;
|
||||
rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);
|
||||
if( rc ){
|
||||
pBaseFile->pMethods->xClose(pBaseFile);
|
||||
pFile->pMethods = 0;
|
||||
return rc;
|
||||
pSubFile->pMethods->xClose(pSubFile);
|
||||
goto apnd_open_done;
|
||||
}
|
||||
if( apndIsOrdinaryDatabaseFile(sz, pBaseFile) ){
|
||||
/* The file being opened appears to be just an ordinary DB. Copy
|
||||
** the base dispatch-table so this instance mimics the base VFS.
|
||||
*/
|
||||
memmove(pApndFile, pBaseFile, pBaseVfs->szOsFile);
|
||||
if( apndIsOrdinaryDatabaseFile(sz, pSubFile) ){
|
||||
memmove(pFile, pSubFile, pSubVfs->szOsFile);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
pApndFile->iPgOne = apndReadMark(sz, pFile);
|
||||
if( pApndFile->iPgOne>=0 ){
|
||||
pApndFile->iMark = sz - APND_MARK_SIZE; /* Append mark found */
|
||||
/* Record that append mark has not been written until seen otherwise. */
|
||||
p->iMark = -1;
|
||||
p->iPgOne = apndReadMark(sz, pFile);
|
||||
if( p->iPgOne>=0 ){
|
||||
/* Append mark was found, infer its offset */
|
||||
p->iMark = sz - p->iPgOne - APND_MARK_SIZE;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
if( (flags & SQLITE_OPEN_CREATE)==0 ){
|
||||
pBaseFile->pMethods->xClose(pBaseFile);
|
||||
pSubFile->pMethods->xClose(pSubFile);
|
||||
rc = SQLITE_CANTOPEN;
|
||||
pFile->pMethods = 0;
|
||||
}else{
|
||||
/* Round newly added appendvfs location to #define'd page boundary.
|
||||
** Note that nothing has yet been written to the underlying file.
|
||||
** The append mark will be written along with first content write.
|
||||
** Until then, paf->iMark value indicates it is not yet written.
|
||||
*/
|
||||
pApndFile->iPgOne = APND_START_ROUNDUP(sz);
|
||||
}
|
||||
/* Round newly added appendvfs location to #define'd page boundary.
|
||||
* Note that nothing has yet been written to the underlying file.
|
||||
* The append mark will be written along with first content write.
|
||||
* Until then, the p->iMark value indicates it is not yet written.
|
||||
*/
|
||||
p->iPgOne = APND_START_ROUNDUP(sz, APND_ROUNDUP_BITS);
|
||||
apnd_open_done:
|
||||
if( rc ) pFile->pMethods = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ static int wholenumberBestIndex(
|
||||
pIdxInfo->orderByConsumed = 1;
|
||||
}
|
||||
if( (idxNum & 12)==0 ){
|
||||
pIdxInfo->estimatedCost = 1e99;
|
||||
pIdxInfo->estimatedCost = (double)100000000;
|
||||
}else if( (idxNum & 3)==0 ){
|
||||
pIdxInfo->estimatedCost = (double)5;
|
||||
}else{
|
||||
|
||||
@@ -268,14 +268,6 @@ tablE t1 USING FTs5(c);
|
||||
DELETE FROM t1 WHERE rowid = 1;
|
||||
INSERT INTO t1 VALUES('a b c');
|
||||
}
|
||||
4 {
|
||||
creAte virTUal tablE t1 USING FTs5(c);
|
||||
INSERT INTO t1 VALUES('a b c');
|
||||
INSERT INTO t1 VALUES('a b c');
|
||||
} {
|
||||
DELETE FROM t1 WHERE rowid = 1;
|
||||
INSERT INTO t1 VALUES('a b c');
|
||||
}
|
||||
|
||||
} {
|
||||
forcedelete test.db test.db2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
C Version\s3.35.3
|
||||
D 2021-03-26T12:12:52.553
|
||||
C Create\snew\sbranch\snamed\s"derived_tests"
|
||||
D 2021-03-12T20:24:15.926
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -7,7 +7,7 @@ F Makefile.in fe6cc1db11e02b308f3ab0ec2504344697b9eaaa410fa73f48d16a143462e5d3
|
||||
F Makefile.linux-gcc f609543700659711fbd230eced1f01353117621dccae7b9fb70daa64236c5241
|
||||
F Makefile.msc 6b5428cef2af1288e02faeb602dabe68fbf2de7bc8a8e29c7299778ee08cd35c
|
||||
F README.md 1514a365ffca3c138e00c5cc839906108a01011a6b082bad19b09781e3aa498a
|
||||
F VERSION 75575cade3e93b31a84ffcb0d40de856a49bd3e4c1028dff52432bfae9806adb
|
||||
F VERSION 92f3e4c5cdee6f0779aef1eae857dfc21d0eabb1f2af169dc90e63cd76b15bb2
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||
@@ -15,7 +15,7 @@ F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||
F autoconf/Makefile.am a8d1d24affe52ebf8d7ddcf91aa973fa0316618ab95bb68c87cabf8faf527dc8
|
||||
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
|
||||
F autoconf/Makefile.msc ebe7e66edbb2f453593cbde186d1a0fa0dcd8cae9977febcae27aef1dab5678d
|
||||
F autoconf/Makefile.msc e0f1dafc48d000fd6ddfdb01815271528db55cbc7299ca888df5b93367f0d5a4
|
||||
F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
|
||||
F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1
|
||||
F autoconf/configure.ac a8ba2a9e61216f5093d44f3b7d2cb8fe1890d6b7dc330a02f802d8efaa1fdc79
|
||||
@@ -34,7 +34,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
||||
F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
|
||||
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
|
||||
F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559
|
||||
F configure 174eed3b99edc1c897fe32638c5b4068d4abfb282dc545ccc3ee92a472f73d7a x
|
||||
F configure e8b5dc901c21f76a169d673bbfdee33350e68de59c0eaaade6d2de87884319db x
|
||||
F configure.ac 4e4b58b32f88c8da9914a2f2c3158f80e69907eccc019fcc7e3ba14ffd91c640
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
|
||||
@@ -286,7 +286,7 @@ F ext/lsm1/tool/mklsm1c.tcl f31561bbee5349f0a554d1ad7236ac1991fc09176626f529f607
|
||||
F ext/misc/README.md d6dd0fe1d8af77040216798a6a2b0c46c73054d2f0ea544fbbcdccf6f238c240
|
||||
F ext/misc/amatch.c e3ad5532799cee9a97647f483f67f43b38796b84b5a8c60594fe782a4338f358
|
||||
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
|
||||
F ext/misc/appendvfs.c bdc9de0a0e61c21327e975da178b4fd6f57de9c46123044aa6ee3a20798c5db2
|
||||
F ext/misc/appendvfs.c 7fff57cd4a5d63758d20a1dd1a96c64c7c123cf48fd98bbd36cfe8b063236e3d
|
||||
F ext/misc/blobio.c a867c4c4617f6ec223a307ebfe0eabb45e0992f74dd47722b96f3e631c0edb2a
|
||||
F ext/misc/btreeinfo.c d28ce349b40054eaa9473e835837bad7a71deec33ba13e39f963d50933bfa0f9
|
||||
F ext/misc/carray.c b75a0f207391038bf1540d3372f482a95c3613511c7c474db51ede1196321c7c
|
||||
@@ -336,7 +336,7 @@ F ext/misc/vfslog.c 3b25c2f56ba60788db247287be6ab024b53c4afffd412b4876db563389be
|
||||
F ext/misc/vfsstat.c 389ea13983d3af926504c314f06a83cc858d5adc24b40af74aaed1fece00c118
|
||||
F ext/misc/vtablog.c 5538acd0c8ddaae372331bee11608d76973436b77d6a91e8635cfc9432fba5ae
|
||||
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
|
||||
F ext/misc/wholenumber.c a838d1bea913c514ff316c69695efbb49ea3b8cb37d22afc57f73b6b010b4546
|
||||
F ext/misc/wholenumber.c 520f34c3099e5b7d546f13708607dc2fa173c46b68952eecf0d19cd675fec85e
|
||||
F ext/misc/zipfile.c e35e035bc2765b1ccdcb15f9815c2112843fcbc8f36aa071f0e5935df7072228
|
||||
F ext/misc/zorder.c b0ff58fa643afa1d846786d51ea8d5c4b6b35aa0254ab5a82617db92f3adda64
|
||||
F ext/rbu/rbu.c b880ca5cb857d6d6f52e72eb7397813058ef48c78c5402cd04ff2b6b5437f622
|
||||
@@ -359,7 +359,7 @@ F ext/rbu/rbu_common.tcl 60d904133ff843fe72cc0514e9dd2486707181e6e0fbab20979da28
|
||||
F ext/rbu/rbucollate.test cac528a9a46318cba42e61258bb42660bbbf4fdb9a8c863de5a54ad0c658d197
|
||||
F ext/rbu/rbucrash.test 000981a1fe8a6e4d9a684232f6a129e66a3ef595f5ed74655e2f9c68ffa613b4
|
||||
F ext/rbu/rbucrash2.test efa143cc94228eb0266d3f1abfbee60a5838a84cef7cc3fcb8c145b74d96fd41
|
||||
F ext/rbu/rbudiff.test abe895a8d479e4d33acb40e244e3d8e2cd25f55a18dfa8b9f83e13d00073f600
|
||||
F ext/rbu/rbudiff.test 156957851136b63c143478518dc1bda6c832103cdbe8ac1d7cdd47edb3cbe0a3
|
||||
F ext/rbu/rbudor.test e3e8623926012f43eebe51fedf06a102df2640750d971596b052495f2536db20
|
||||
F ext/rbu/rbuexpr.test 10d0420537c3bc7666e576d72adeffe7e86cfbb00dcc30aa9ce096c042415190
|
||||
F ext/rbu/rbufault.test 2d7f567b79d558f6e093c58808cab4354f8a174e3802f69e7790a9689b3c09f8
|
||||
@@ -476,21 +476,21 @@ F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
|
||||
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
|
||||
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
|
||||
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
|
||||
F src/alter.c 2d631213818b654faaf08755f26e934134c4769757ae9286981401cd6b571081
|
||||
F src/alter.c 1f9383846b52e655d40479a5a5659bf60300ed43f7467e6e85d66588ba48f51b
|
||||
F src/analyze.c 01c6c6765cb4d40b473b71d85535093730770bb186f2f473abac25f07fcdee5c
|
||||
F src/attach.c 9cbe761e464025694df8e6f6ee4d9f41432c3a255ca9443ccbb4130eeb87cf72
|
||||
F src/auth.c 08954fdc4cc2da5264ba5b75cfd90b67a6fc7d1710a02ccf917c38eadec77853
|
||||
F src/backup.c 3014889fa06e20e6adfa0d07b60097eec1f6e5b06671625f476a714d2356513d
|
||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c cfd2a37794532d765e235a2550ad2732924a6d06b07a3bc9f6a71750e3b3cca1
|
||||
F src/btree.c bafa3a2e8b6622a3aa8791f90c8ecc70e8ae551ba9023f865213890f5b8a8994
|
||||
F src/btree.h 096cc53baa58be22b02c896d1cf933c38cfc6d65f9253c1367ece8cc88a24de5
|
||||
F src/btreeInt.h 7bc15a24a02662409ebcd6aeaa1065522d14b7fda71573a2b0568b458f514ae0
|
||||
F src/build.c 066c44421bf7b73c6fa47f6fb0c0fcf1357c10552bcf8f3f94c6ebede581cd01
|
||||
F src/btreeInt.h 7614cae30f95b6aed0c7cac7718276a55cfe2c77058cbfd8bef5b75329757331
|
||||
F src/build.c fec73c39d756f31d35ccbaa80fe1e040a8d675a318d4d30f41c444167bf3b860
|
||||
F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 2a322b9a3d75771fb4d99e0702851f4f68dda982507a0f798eefb0712969a410
|
||||
F src/date.c e0632f335952b32401482d099321bbf12716b29d6e72836b53ae49683ebae4bf
|
||||
F src/date.c dace306a10d9b02ee553d454c8e1cf8d3c9b932e137738a6b15b90253a9bfc10
|
||||
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
|
||||
F src/dbstat.c 3aa79fc3aed7ce906e4ea6c10e85d657299e304f6049861fe300053ac57de36c
|
||||
F src/delete.c 73f57a9a183532c344a3135cf8f2a5589376e39183e0b5f562d6b61b2af0f4d8
|
||||
@@ -503,7 +503,7 @@ F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
|
||||
F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
|
||||
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
|
||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c e36be69e3810902eaf7e171260c885bc9547b1d41616c868f1cc46e6a0a3b7fd
|
||||
F src/insert.c 8942baede303a54ba3b6d06200d5b74c9bc25ababec8a55823e06309748cd4a3
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c 8c9c8cd2bd8eecdb06d9b6e89de7e9e65bae45cc8fc33609cc74023a5c296067
|
||||
F src/main.c 2a7ece3a67c646e5fe9984ffe0277d6a76f80ce9715bf2faa591d8cb66b9d913
|
||||
@@ -526,7 +526,7 @@ F src/os.c 2d6e646370b1aa78942c68d7edf124e518963adf4a90bce87f365a5a5495529a
|
||||
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
|
||||
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
||||
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c 7a9eab7b11f552ab91ead980086b312c7e3b871efdee8c0c072b682bbec6592e
|
||||
F src/os_unix.c adbbcea4c63d3b400d405f60a5da4c01433753ec4a12e2dc695beb2bbd671fe9
|
||||
F src/os_win.c 77d39873836f1831a9b0b91894fec45ab0e9ca8e067dc8c549e1d1eca1566fe9
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c 970691daea03f9f15e34de671bd8675c1e136232b529e21bfd36d4dba6d41753
|
||||
@@ -540,14 +540,14 @@ F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
|
||||
F src/prepare.c e21b54489b5c73b06ada15e6fc79b5c6f64b06701924a6ca98944ae59e06256f
|
||||
F src/printf.c 2b03a80d7c11bb422115dca175a18bf430e9c9dbaa0eee63b758f0c022f8f34f
|
||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||
F src/resolve.c dd47248c2c914feb0d4428c27d782e2723971d32cfa5536f49306d080df4d45a
|
||||
F src/resolve.c d95db73d3e6a5c689e5f6604b4d2521350e45f2a0f0f84f5a2dc2bfee56580a0
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c 734cf12e42f81f2fe461e41214e6552375e55b62a802784a4f0066ac592e7f4a
|
||||
F src/shell.c.in aa28256887d049badaf93aa30ab5c76a2ec88143a674d685c0e739056702e5c3
|
||||
F src/select.c fc904a7aa7ebfd5c7a57a0141d829c9f5388ac7773e0d1d9668768c1bbc87fc3
|
||||
F src/shell.c.in 35adf1212d759069b00e468a9304a05a67710c8f8f50e7312335e23cac985d8c
|
||||
F src/sqlite.h.in 3426a080ea1f222a73e3bd91e7eacbd30570a0117c03d42c6dde606f33e5e318
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 61b38c073d5e1e96a3d45271b257aef27d0d13da2bea5347692ae579475cd95e
|
||||
F src/sqliteInt.h 0f81c7eb3a40dda0b74d0acdc8f3b134346b40be780b1fe5cc24dd294a928d1a
|
||||
F src/sqliteInt.h 3652edb9e6032808d51d6f26d9c6f9eb621ac199e0fd2d2a5aa551799d91a296
|
||||
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
|
||||
F src/status.c 4b8bc2a6905163a38b739854a35b826c737333fab5b1f8e03fa7eb9a4799c4c1
|
||||
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
|
||||
@@ -606,7 +606,7 @@ F src/test_windirent.h 90dfbe95442c9762357fe128dc7ae3dc199d006de93eb33ba3972e0a9
|
||||
F src/test_window.c cdae419fdcea5bad6dcd9368c685abdad6deb59e9fc8b84b153de513d394ba3f
|
||||
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||
F src/tokenize.c 0b9c82fa628b5adce93e2bcaf935a24d43eb83344fb51551f7835526d0693fc4
|
||||
F src/tokenize.c c64c49d7c2ec4490c2fef1f24350167ba16b03b0c6cee58ad1a1d70a4325d4e9
|
||||
F src/treeview.c c6260e1fa5f41c361b2409edc9b0050bcaef5bc4d6abc467fbc45f0d7ccf3d84
|
||||
F src/trigger.c 861c3ec2c5b0fc830bdf82470454a9324fad70cbaa96d2e208fb54577c9e8d28
|
||||
F src/update.c 0f5a61f0787199983530a33f6fffe4f52742f35fcdf6ccfad1078b1a8bc17723
|
||||
@@ -614,11 +614,11 @@ F src/upsert.c df8f1727d62b5987c4fd302cd4d7c0c84ae57cd65683c5a34a740dfe24039235
|
||||
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
|
||||
F src/util.c 41c7a72da1df47864faa378a1c720b38adb288c6838cb6be5594511b6287a048
|
||||
F src/vacuum.c 492422c1463c076473bae1858799c7a0a5fe87a133d1223239447c422cd26286
|
||||
F src/vdbe.c 5001a0d3003d3664615dd7ac3cedab1d51e2391b5bdd0878f40a41fdcd942e13
|
||||
F src/vdbe.c b79b222f07690874d436eef4ad5e76845b2796e7094b1d0545cc94333f0d8e50
|
||||
F src/vdbe.h 25dabb25c7e157b84e59260cfb5b466c3ac103ede9f36f4db371332c47601abe
|
||||
F src/vdbeInt.h 000d9ab1ea4cb55a80de15e28f3f595645b4fddef34bca4347fb3db8031d9041
|
||||
F src/vdbeInt.h 3df118924e1711f1bbc8e30c46260d0ab6c3b029b32dd411f789111f76434f3c
|
||||
F src/vdbeapi.c 4a43e303ec3354c785f453e881521969378e85628278ab74ba4a9df790c0d93b
|
||||
F src/vdbeaux.c 1b3eaa3a70d9d1877266e8ade0d0c3b2b4c6cf77d393d94dbcbd522b9bfefc15
|
||||
F src/vdbeaux.c fb51483c2bcaf45c5de63c26cce8649ef37f1332e8e035867033d21ef5e7fc2c
|
||||
F src/vdbeblob.c 253ed82894924c362a7fa3079551d3554cd1cdace39aa833da77d3bc67e7c1b1
|
||||
F src/vdbemem.c 947f2a65910edb4014dc981d33e414a68c51f169f9df8c4c493a0ba840b6eb1f
|
||||
F src/vdbesort.c f5b5e473a7cee44e47a94817b042fd7172cf3aa2c0a7928a8339d612bcfdec5a
|
||||
@@ -647,10 +647,10 @@ F test/alter3.test e487958dec7932453e0b83baf21d6b1e71d5e7d9a55bc20eadfa62a51ddff
|
||||
F test/alter4.test dfd6086faf461b27ca2d2999848dcd207edf23352fc1592d0005c0844f3f08cf
|
||||
F test/alterauth.test 63442ba61ceb0c1eeb63aac1f4f5cebfa509d352276059d27106ae256bafc959
|
||||
F test/alterauth2.test 794ac5cef251819fe364b4fe20f12f86e9c5d68070513c7fd26c17cb244c89af
|
||||
F test/altercol.test 3456f7cc4196ef8f7d82d245d6e91940eb12bc95c36c91ac4b512f6b5c9a4fa9
|
||||
F test/altercol.test 65eef562f0eea7a1f5ddd4a140c4274c2bfc5712bb2ab2096f738852b0efce86
|
||||
F test/altercorrupt.test 584d707a80e106952d6382790c8919bcf9f0db678ed3a1c09fd98b7f9d1d3a10
|
||||
F test/alterdropcol.test 596623cb8a72d9570bfb8417b0f302810efe007873796f03c17a9e9ff28dade1
|
||||
F test/alterdropcol2.test 527fce683b200d620f560f666c44ae33e22728e990a10a48a543280dfd4b4d41
|
||||
F test/alterdropcol2.test 3948c805ca52f4621051b35968c18c09d107eb117e2b656c78cee3b2870650c0
|
||||
F test/alterlegacy.test f38c6d06cda39e1f7b955bbce57f2e3ef5b7cb566d3d1234502093e228c15811
|
||||
F test/altermalloc.test 167a47de41b5c638f5f5c6efb59784002b196fff70f98d9b4ed3cd74a3fb80c9
|
||||
F test/altermalloc2.test fa7b1c1139ea39b8dec407cf1feb032ca8e0076bd429574969b619175ad0174b
|
||||
@@ -699,7 +699,7 @@ F test/autoindex4.test 49d3cd791a9baa16fb461d7ea3de80d019a819cf
|
||||
F test/autoindex5.test a5d72fe8c217cc0ea356dc6fa06a282a8a3fc53aa807709d79dba07a8f248102
|
||||
F test/autovacuum.test 0831cd34e14695d297187f7f6519265e3121c5b0a1720e548e86829e796129e9
|
||||
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
|
||||
F test/avfs.test 0c3a38e03cccb0fc3127838462dc05dc3f4c1480d770c084b388304c25de3652
|
||||
F test/avfs.test 67a27e590b1baae5249bc857d10814a13231dbe2d624c64f2aa78c4ba85afff9
|
||||
F test/avtrans.test b7dc25459ecbd86c6fa9c606ee3068f59d81e225118617dcf2bbb6ded2ade89e
|
||||
F test/backcompat.test 3e64cedda754c778ef6bbe417b6e7a295e662a4d
|
||||
F test/backup.test dd4a5ff756e3df3931dacb1791db0584d4bad989
|
||||
@@ -822,7 +822,7 @@ F test/cursorhint.test 0175e4404181ace3ceca8b114eb0a98eae600d565aa4e2705abbe6614
|
||||
F test/cursorhint2.test 6f3aa9cb19e7418967a10ec6905209bcbb5968054da855fc36c8beee9ae9c42f
|
||||
F test/dataversion1.test 6e5e86ac681f0782e766ebcb56c019ae001522d114e0e111e5ebf68ccf2a7bb8
|
||||
F test/date.test 9b73bbeb1b82d9c1f44dec5cf563bf7da58d2373
|
||||
F test/date2.test 7e12ec14aaf4d5e6294b4ba140445b0eca06ea50062a9c3a69c4ee13d0b6f8b1
|
||||
F test/date2.test 520a1708e4e14c682cf514560f3e9f2e5affa9d66560fbc2a6941ae291260daf
|
||||
F test/dbdata.test 042f49acff3438f940eeba5868d3af080ae64ddf26ae78f80c92bec3ca7d8603
|
||||
F test/dbfuzz.c 73047c920d6210e5912c87cdffd9a1c281d4252e
|
||||
F test/dbfuzz001.test 55e1a3504f8dea84155e09912fe3b1c3ad77e0b1a938ec42ca03b8e51b321e30
|
||||
@@ -855,7 +855,7 @@ F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
|
||||
F test/e_droptrigger.test 235c610f8bf8ec44513e222b9085c7e49fad65ad0c1975ac2577109dd06fd8fa
|
||||
F test/e_dropview.test 74e405df7fa0f762e0c9445b166fe03955856532e2bb234c372f7c51228d75e7
|
||||
F test/e_expr.test 6ba7a51ece7b3e7fc145f14f924eed25ebb5a24e7b8596c78f3838d372cf0385
|
||||
F test/e_fkey.test a2907f749cccd0b2c30d8576b673002eebdcc1fc9964bae61e5117b1d54733e2
|
||||
F test/e_fkey.test 0b458b85f192cdb9e9933d5891848bb19bcc44d3f49faf111a375f2844a164d3
|
||||
F test/e_fts3.test 17ba7c373aba4d4f5696ba147ee23fd1a1ef70782af050e03e262ca187c5ee07
|
||||
F test/e_insert.test f02f7f17852b2163732c6611d193f84fc67bc641fb4882c77a464076e5eba80e
|
||||
F test/e_reindex.test 2b0e29344497d9a8a999453a003cb476b6b1d2eef2d6c120f83c2d3a429f3164
|
||||
@@ -1045,7 +1045,7 @@ F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c
|
||||
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
|
||||
F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830
|
||||
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
|
||||
F test/fuzzcheck.c 772110a59c6f839f95e49a9fd3e5f855bd9cbb90e9d366a6ccd15cb3616fc631
|
||||
F test/fuzzcheck.c 8f83829e6c4da26abf6aded7fe9f04e56d46a418c8d7b8b67e14cf6f2ee0a25c
|
||||
F test/fuzzdata1.db d36e88741b4f23bcbaaf55b006290669d03c6c891cf13c7b3a53bc1b097b693f
|
||||
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
|
||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||
@@ -1094,7 +1094,7 @@ F test/index6.test f172653b35b20233e59200e8b92a76db61bf7285437bf777b93b306ba26a4
|
||||
F test/index7.test b8a0ba2110fd517bb48c4e76d26d60f1ab2ed9e257b18d71f820d7e71e9f8570
|
||||
F test/index8.test bc2e3db70e8e62459aaa1bd7e4a9b39664f8f9d7
|
||||
F test/index9.test 0aa3e509dddf81f93380396e40e9bb386904c1054924ba8fa9bcdfe85a8e7721
|
||||
F test/indexedby.test a3ca11f0819a9279619099f36b624bcaa315f7a1ed65c3ed2219c2a944683d2c
|
||||
F test/indexedby.test f54aac21c06948872010a956fd02de5178c362c7785a9887cf0b8616be17883b
|
||||
F test/indexexpr1.test 284e119999d132cc8bf37735a928c9859b28e8e295d02b7a6a4f93977c7f9ba5
|
||||
F test/indexexpr2.test dba11dbb0a58fcba4cd694f46b4004976123b81b0501f525d43c9be59f0207b1
|
||||
F test/indexfault.test 98d78a8ff1f5335628b62f886a1cb7c7dac1ef6d48fa39c51ec871c87dce9811
|
||||
@@ -1282,7 +1282,7 @@ F test/quick.test 1681febc928d686362d50057c642f77a02c62e57
|
||||
F test/quota-glob.test 32901e9eed6705d68ca3faee2a06b73b57cb3c26
|
||||
F test/quota.test bfb269ce81ea52f593f9648316cd5013d766dd2a
|
||||
F test/quota2.test 7dc12e08b11cbc4c16c9ba2aa2e040ea8d8ab4b8
|
||||
F test/quote.test b8ddaba6b81dcf63bb31243219e28a2f96e04396adc50108cc7e5593019c3eb5
|
||||
F test/quote.test 3f9238ab0e1db70dea89af9afa5859dbd759b0ce0a63da67d547553e2c316475
|
||||
F test/randexpr1.tcl 40dec52119ed3a2b8b2a773bce24b63a3a746459
|
||||
F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
|
||||
F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736
|
||||
@@ -1303,7 +1303,7 @@ F test/round1.test 768018b04522ca420b1aba8a24bd76091d269f3bce3902af3ec6ebcee41ab
|
||||
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
|
||||
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
|
||||
F test/rowid.test bfbd7b97d9267660be3c8f28507c4ed7f205196b8877c0db42df347c2e8845e3
|
||||
F test/rowvalue.test 6795850abf6243e96f09ef041919d1ea61713332237b60d01371c0fee73f6379
|
||||
F test/rowvalue.test b5436c767394a3f8fa5e7e474b2114ba430fdab34a5c8573c1b6256756534565
|
||||
F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
|
||||
F test/rowvalue3.test 3068f508753af69884b12125995f023da0dbb256
|
||||
F test/rowvalue4.test 02e35f7762371c2f57ebd856aa056eac56cb27ef7715a0bb31eac1895a745356
|
||||
@@ -1661,7 +1661,7 @@ F test/upsert1.test 88f9e258c6a0eeeb85937b08831e8daad440ba41f125af48439e9d33f266
|
||||
F test/upsert2.test 9c3cdbb1a890227f6504ce4b0e3de68f4cdfa16bb21d8641208a9239896c5a09
|
||||
F test/upsert3.test 88d7d590a1948a9cb6eac1b54b0642f67a9f35a1fc0f19b200e97d5d39e3179c
|
||||
F test/upsert4.test 25d2a1da92f149331ae0c51ca6e3eee78189577585eab92de149900d62994fa5
|
||||
F test/upsert5.test fff0dcfce73c649204543088d8e5bde01172676063ec9b8f8fc7f195abc386fe
|
||||
F test/upsert5.test f49faf5f15b5c3641c6f5d7c7cc531ef5ac997567b2b6bb7bc96f7c88753ca0b
|
||||
F test/upsertfault.test f21ca47740841fdb4d61acfa7b17646d773e67724fe8c185b71c018db8a94b35
|
||||
F test/uri.test 3481026f00ade6dfe8adb7acb6e1e47b04369568
|
||||
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
|
||||
@@ -1788,8 +1788,8 @@ F test/windowerr.test a8b752402109c15aa1c5efe1b93ccb0ce1ef84fa964ae1cd6684dd0b3c
|
||||
F test/windowfault.test d543d46571b32d19f198cb04b6505747fabf3cc369970daae47074ee793612be
|
||||
F test/windowpushd.test 5b9c114e8173c3addacf58a0fcd941437b14649f2033700184479a13f188ad00
|
||||
F test/with1.test 780be387f01e290e768bdfd1827280f9e37ba37223eb4736aba386864fac5a94
|
||||
F test/with2.test 000fb95f1f29dae868cea0f41505eb5126077d49eb967ff88f9ee46212ad8863
|
||||
F test/with3.test 2f1e05aef7aeef9a741cbf36deeb4be73003dc541921c3abc78becbbf5b7852d
|
||||
F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1ab
|
||||
F test/with3.test 85e059bf4c2ef5626411ee59f399b4bb4b4a0f009bcb7db86f254e570ed11831
|
||||
F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
|
||||
F test/with5.test 6248213c41fab36290b5b73aa3f937309dfba337004d9d8434c3fabc8c7d4be8
|
||||
F test/with6.test 3001b59179cbdc26a8c67ff8f46944e3141fdece9ab064c49bbf08459b67b207
|
||||
@@ -1875,7 +1875,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
|
||||
F tool/split-sqlite3c.tcl 3efcd4240b738f6bb2b5af0aea7e1e0ef9bc1c61654f645076cec883030b710c
|
||||
F tool/sqldiff.c 21226ef092ec1e543b237c5d3d2d32d344a60f2437eadfea04f65b348fbd00e4
|
||||
F tool/sqldiff.c 4151108387cb56c08906e5ac8d6a353dcfe8fc6014eeded0f0910e2230ea0f5b
|
||||
F tool/sqlite3_analyzer.c.in 7eeaae8b0d7577662acaabbb11107af0659d1b41bc1dfdd4d91422de27127968
|
||||
F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
|
||||
F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
|
||||
@@ -1910,9 +1910,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 8de4cb984a4b019f0823018072120ec100d0223605257a85b16c03557a8cabc8
|
||||
R ae0fc23b03fdb5a4ca6eb2481f79c620
|
||||
T +sym-release *
|
||||
T +sym-version-3.35.3 *
|
||||
U drh
|
||||
Z cb895605ccb85d7c560d5019ebd82e77
|
||||
P cea34f3cc35ad6dc67691799a219a30739f2296945d624d232bf76150c598ec0
|
||||
R 8423c0661daaf9ba8568de41b16ee2d0
|
||||
T *branch * derived_tests
|
||||
T *sym-derived_tests *
|
||||
T -sym-trunk *
|
||||
U larrybr
|
||||
Z 1bb76481dd851460a80182d852531261
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
4c5e6c200adc8afe0814936c67a971efc516d1bd739cb620235592f18f40be2a
|
||||
8dc765d3ba26cb1267b5e3e3fc2b3103b1e4f841431306bf86798511971747ff
|
||||
+21
-30
@@ -53,8 +53,7 @@ static void renameTestSchema(
|
||||
Parse *pParse, /* Parse context */
|
||||
const char *zDb, /* Name of db to verify schema of */
|
||||
int bTemp, /* True if this is the temp db */
|
||||
const char *zWhen, /* "when" part of error message */
|
||||
const char *zDropColumn /* Name of column being dropped */
|
||||
const char *zWhen /* "when" part of error message */
|
||||
){
|
||||
pParse->colNamesSet = 1;
|
||||
sqlite3NestedParse(pParse,
|
||||
@@ -62,9 +61,9 @@ static void renameTestSchema(
|
||||
"FROM \"%w\"." DFLT_SCHEMA_TABLE " "
|
||||
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
|
||||
" AND sql NOT LIKE 'create virtual%%'"
|
||||
" AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %Q)=NULL ",
|
||||
" AND sqlite_rename_test(%Q, sql, type, name, %d, %Q)=NULL ",
|
||||
zDb,
|
||||
zDb, bTemp, zWhen, zDropColumn
|
||||
zDb, bTemp, zWhen
|
||||
);
|
||||
|
||||
if( bTemp==0 ){
|
||||
@@ -73,8 +72,8 @@ static void renameTestSchema(
|
||||
"FROM temp." DFLT_SCHEMA_TABLE " "
|
||||
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
|
||||
" AND sql NOT LIKE 'create virtual%%'"
|
||||
" AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %Q)=NULL ",
|
||||
zDb, zWhen, zDropColumn
|
||||
" AND sqlite_rename_test(%Q, sql, type, name, 1, %Q)=NULL ",
|
||||
zDb, zWhen
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -237,7 +236,7 @@ void sqlite3AlterRenameTable(
|
||||
"sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), "
|
||||
"tbl_name = "
|
||||
"CASE WHEN tbl_name=%Q COLLATE nocase AND "
|
||||
" sqlite_rename_test(%Q, sql, type, name, 1, 'after rename',0) "
|
||||
" sqlite_rename_test(%Q, sql, type, name, 1, 'after rename') "
|
||||
"THEN %Q ELSE tbl_name END "
|
||||
"WHERE type IN ('view', 'trigger')"
|
||||
, zDb, zTabName, zName, zTabName, zDb, zName);
|
||||
@@ -257,7 +256,7 @@ void sqlite3AlterRenameTable(
|
||||
#endif
|
||||
|
||||
renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);
|
||||
renameTestSchema(pParse, zDb, iDb==1, "after rename", 0);
|
||||
renameTestSchema(pParse, zDb, iDb==1, "after rename");
|
||||
|
||||
exit_rename_table:
|
||||
sqlite3SrcListDelete(db, pSrc);
|
||||
@@ -625,7 +624,7 @@ void sqlite3AlterRenameColumn(
|
||||
|
||||
/* Drop and reload the database schema. */
|
||||
renameReloadSchema(pParse, iSchema, INITFLAG_AlterRename);
|
||||
renameTestSchema(pParse, zDb, iSchema==1, "after rename", 0);
|
||||
renameTestSchema(pParse, zDb, iSchema==1, "after rename");
|
||||
|
||||
exit_rename_column:
|
||||
sqlite3SrcListDelete(db, pSrc);
|
||||
@@ -1049,17 +1048,12 @@ static int renameParseSql(
|
||||
const char *zDb, /* Name of schema SQL belongs to */
|
||||
sqlite3 *db, /* Database handle */
|
||||
const char *zSql, /* SQL to parse */
|
||||
int bTemp, /* True if SQL is from temp schema */
|
||||
const char *zDropColumn /* Name of column being dropped */
|
||||
int bTemp /* True if SQL is from temp schema */
|
||||
){
|
||||
int rc;
|
||||
char *zErr = 0;
|
||||
|
||||
db->init.iDb = bTemp ? 1 : sqlite3FindDbName(db, zDb);
|
||||
if( zDropColumn ){
|
||||
db->init.bDropColumn = 1;
|
||||
db->init.azInit = (char**)&zDropColumn;
|
||||
}
|
||||
|
||||
/* Parse the SQL statement passed as the first argument. If no error
|
||||
** occurs and the parse does not result in a new table, index or
|
||||
@@ -1092,7 +1086,6 @@ static int renameParseSql(
|
||||
#endif
|
||||
|
||||
db->init.iDb = 0;
|
||||
db->init.bDropColumn = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1394,7 +1387,7 @@ static void renameColumnFunc(
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
db->xAuth = 0;
|
||||
#endif
|
||||
rc = renameParseSql(&sParse, zDb, db, zSql, bTemp, 0);
|
||||
rc = renameParseSql(&sParse, zDb, db, zSql, bTemp);
|
||||
|
||||
/* Find tokens that need to be replaced. */
|
||||
memset(&sWalker, 0, sizeof(Walker));
|
||||
@@ -1436,12 +1429,12 @@ static void renameColumnFunc(
|
||||
for(pIdx=sParse.pNewIndex; pIdx; pIdx=pIdx->pNext){
|
||||
sqlite3WalkExprList(&sWalker, pIdx->aColExpr);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
|
||||
for(i=0; i<sParse.pNewTable->nCol; i++){
|
||||
sqlite3WalkExpr(&sWalker, sParse.pNewTable->aCol[i].pDflt);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
|
||||
for(i=0; i<sParse.pNewTable->nCol; i++){
|
||||
sqlite3WalkExpr(&sWalker, sParse.pNewTable->aCol[i].pDflt);
|
||||
}
|
||||
#endif
|
||||
|
||||
for(pFKey=sParse.pNewTable->pFKey; pFKey; pFKey=pFKey->pNextFrom){
|
||||
for(i=0; i<pFKey->nCol; i++){
|
||||
@@ -1598,7 +1591,7 @@ static void renameTableFunc(
|
||||
sWalker.xSelectCallback = renameTableSelectCb;
|
||||
sWalker.u.pRename = &sCtx;
|
||||
|
||||
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp, 0);
|
||||
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);
|
||||
|
||||
if( rc==SQLITE_OK ){
|
||||
int isLegacy = (db->flags & SQLITE_LegacyAlter);
|
||||
@@ -1714,7 +1707,6 @@ static void renameTableFunc(
|
||||
** 3: Object name.
|
||||
** 4: True if object is from temp schema.
|
||||
** 5: "when" part of error message.
|
||||
** 6: Name of column being dropped, or NULL.
|
||||
**
|
||||
** Unless it finds an error, this function normally returns NULL. However, it
|
||||
** returns integer value 1 if:
|
||||
@@ -1733,7 +1725,6 @@ static void renameTableTest(
|
||||
int bTemp = sqlite3_value_int(argv[4]);
|
||||
int isLegacy = (db->flags & SQLITE_LegacyAlter);
|
||||
char const *zWhen = (const char*)sqlite3_value_text(argv[5]);
|
||||
char const *zDropColumn = (const char*)sqlite3_value_text(argv[6]);
|
||||
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
sqlite3_xauth xAuth = db->xAuth;
|
||||
@@ -1744,7 +1735,7 @@ static void renameTableTest(
|
||||
if( zDb && zInput ){
|
||||
int rc;
|
||||
Parse sParse;
|
||||
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp, zDropColumn);
|
||||
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);
|
||||
if( rc==SQLITE_OK ){
|
||||
if( isLegacy==0 && sParse.pNewTable && sParse.pNewTable->pSelect ){
|
||||
NameContext sNC;
|
||||
@@ -1812,7 +1803,7 @@ static void dropColumnFunc(
|
||||
#endif
|
||||
|
||||
UNUSED_PARAMETER(NotUsed);
|
||||
rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1, 0);
|
||||
rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1);
|
||||
if( rc!=SQLITE_OK ) goto drop_column_done;
|
||||
pTab = sParse.pNewTable;
|
||||
if( pTab==0 || pTab->nCol==1 || iCol>=pTab->nCol ){
|
||||
@@ -1905,7 +1896,7 @@ void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *pName){
|
||||
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
|
||||
assert( iDb>=0 );
|
||||
zDb = db->aDb[iDb].zDbSName;
|
||||
renameTestSchema(pParse, zDb, iDb==1, "", 0);
|
||||
renameTestSchema(pParse, zDb, iDb==1, "");
|
||||
sqlite3NestedParse(pParse,
|
||||
"UPDATE \"%w\"." DFLT_SCHEMA_TABLE " SET "
|
||||
"sql = sqlite_drop_column(%d, sql, %d) "
|
||||
@@ -1915,7 +1906,7 @@ void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *pName){
|
||||
|
||||
/* Drop and reload the database schema. */
|
||||
renameReloadSchema(pParse, iDb, INITFLAG_AlterDrop);
|
||||
renameTestSchema(pParse, zDb, iDb==1, "after drop column", zCol);
|
||||
renameTestSchema(pParse, zDb, iDb==1, "after drop column");
|
||||
|
||||
/* Edit rows of table on disk */
|
||||
if( pParse->nErr==0 && (pTab->aCol[iCol].colFlags & COLFLAG_VIRTUAL)==0 ){
|
||||
@@ -1975,7 +1966,7 @@ void sqlite3AlterFunctions(void){
|
||||
static FuncDef aAlterTableFuncs[] = {
|
||||
INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
|
||||
INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
|
||||
INTERNAL_FUNCTION(sqlite_rename_test, 7, renameTableTest),
|
||||
INTERNAL_FUNCTION(sqlite_rename_test, 6, renameTableTest),
|
||||
INTERNAL_FUNCTION(sqlite_drop_column, 3, dropColumnFunc),
|
||||
};
|
||||
sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
|
||||
|
||||
+10
-21
@@ -2737,23 +2737,19 @@ static void freeTempSpace(BtShared *pBt){
|
||||
*/
|
||||
int sqlite3BtreeClose(Btree *p){
|
||||
BtShared *pBt = p->pBt;
|
||||
BtCursor *pCur;
|
||||
|
||||
/* Close all cursors opened via this handle. */
|
||||
assert( sqlite3_mutex_held(p->db->mutex) );
|
||||
sqlite3BtreeEnter(p);
|
||||
|
||||
/* Verify that no other cursors have this Btree open */
|
||||
#ifdef SQLITE_DEBUG
|
||||
{
|
||||
BtCursor *pCur = pBt->pCursor;
|
||||
while( pCur ){
|
||||
BtCursor *pTmp = pCur;
|
||||
pCur = pCur->pNext;
|
||||
assert( pTmp->pBtree!=p );
|
||||
|
||||
pCur = pBt->pCursor;
|
||||
while( pCur ){
|
||||
BtCursor *pTmp = pCur;
|
||||
pCur = pCur->pNext;
|
||||
if( pTmp->pBtree==p ){
|
||||
sqlite3BtreeCloseCursor(pTmp);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Rollback any active transaction and free the handle structure.
|
||||
** The call to sqlite3BtreeRollback() drops any table-locks held by
|
||||
@@ -4135,7 +4131,7 @@ int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
|
||||
sqlite3BtreeLeave(p);
|
||||
return rc;
|
||||
}
|
||||
p->iBDataVersion--; /* Compensate for pPager->iDataVersion++; */
|
||||
p->iDataVersion--; /* Compensate for pPager->iDataVersion++; */
|
||||
pBt->inTransaction = TRANS_READ;
|
||||
btreeClearHasContent(pBt);
|
||||
}
|
||||
@@ -4545,14 +4541,7 @@ int sqlite3BtreeCloseCursor(BtCursor *pCur){
|
||||
unlockBtreeIfUnused(pBt);
|
||||
sqlite3_free(pCur->aOverflow);
|
||||
sqlite3_free(pCur->pKey);
|
||||
if( (pBt->openFlags & BTREE_SINGLE) && pBt->pCursor==0 ){
|
||||
/* Since the BtShared is not sharable, there is no need to
|
||||
** worry about the missing sqlite3BtreeLeave() call here. */
|
||||
assert( pBtree->sharable==0 );
|
||||
sqlite3BtreeClose(pBtree);
|
||||
}else{
|
||||
sqlite3BtreeLeave(pBtree);
|
||||
}
|
||||
sqlite3BtreeLeave(pBtree);
|
||||
pCur->pBtree = 0;
|
||||
}
|
||||
return SQLITE_OK;
|
||||
@@ -9665,7 +9654,7 @@ void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
|
||||
assert( idx>=0 && idx<=15 );
|
||||
|
||||
if( idx==BTREE_DATA_VERSION ){
|
||||
*pMeta = sqlite3PagerDataVersion(pBt->pPager) + p->iBDataVersion;
|
||||
*pMeta = sqlite3PagerDataVersion(pBt->pPager) + p->iDataVersion;
|
||||
}else{
|
||||
*pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@ struct Btree {
|
||||
u8 hasIncrblobCur; /* True if there are one or more Incrblob cursors */
|
||||
int wantToLock; /* Number of nested calls to sqlite3BtreeEnter() */
|
||||
int nBackup; /* Number of backup operations reading this btree */
|
||||
u32 iBDataVersion; /* Combines with pBt->pPager->iDataVersion */
|
||||
u32 iDataVersion; /* Combines with pBt->pPager->iDataVersion */
|
||||
Btree *pNext; /* List of other sharable Btrees from the same db */
|
||||
Btree *pPrev; /* Back pointer of the same list */
|
||||
#ifdef SQLITE_DEBUG
|
||||
|
||||
+1
-15
@@ -4149,11 +4149,7 @@ void sqlite3CreateIndex(
|
||||
/* Clean up before exiting */
|
||||
exit_create_index:
|
||||
if( pIndex ) sqlite3FreeIndex(db, pIndex);
|
||||
if( pTab ){
|
||||
/* Ensure all REPLACE indexes on pTab are at the end of the pIndex list.
|
||||
** The list was already ordered when this routine was entered, so at this
|
||||
** point at most a single index (the newly added index) will be out of
|
||||
** order. So we have to reorder at most one index. */
|
||||
if( pTab ){ /* Ensure all REPLACE indexes are at the end of the list */
|
||||
Index **ppFrom = &pTab->pIndex;
|
||||
Index *pThis;
|
||||
for(ppFrom=&pTab->pIndex; (pThis = *ppFrom)!=0; ppFrom=&pThis->pNext){
|
||||
@@ -4167,16 +4163,6 @@ exit_create_index:
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef SQLITE_DEBUG
|
||||
/* Verify that all REPLACE indexes really are now at the end
|
||||
** of the index list. In other words, no other index type ever
|
||||
** comes after a REPLACE index on the list. */
|
||||
for(pThis = pTab->pIndex; pThis; pThis=pThis->pNext){
|
||||
assert( pThis->onError!=OE_Replace
|
||||
|| pThis->pNext==0
|
||||
|| pThis->pNext->onError==OE_Replace );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
sqlite3ExprDelete(db, pPIWhere);
|
||||
sqlite3ExprListDelete(db, pList);
|
||||
|
||||
@@ -881,7 +881,6 @@ static int isDate(
|
||||
int eType;
|
||||
memset(p, 0, sizeof(*p));
|
||||
if( argc==0 ){
|
||||
if( !sqlite3NotPureFunc(context) ) return 1;
|
||||
return setDateTimeToCurrent(context, p);
|
||||
}
|
||||
if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT
|
||||
|
||||
+2
-4
@@ -1004,9 +1004,7 @@ void sqlite3Insert(
|
||||
pNx->iDataCur = iDataCur;
|
||||
pNx->iIdxCur = iIdxCur;
|
||||
if( pNx->pUpsertTarget ){
|
||||
if( sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx) ){
|
||||
goto insert_cleanup;
|
||||
}
|
||||
sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx);
|
||||
}
|
||||
pNx = pNx->pNextUpsert;
|
||||
}while( pNx!=0 );
|
||||
@@ -2428,7 +2426,7 @@ static void codeWithoutRowidPreupdate(
|
||||
Vdbe *v = pParse->pVdbe;
|
||||
int r = sqlite3GetTempReg(pParse);
|
||||
assert( !HasRowid(pTab) );
|
||||
assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) || CORRUPT_DB );
|
||||
assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) );
|
||||
sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
|
||||
sqlite3VdbeAddOp4(v, OP_Insert, iCur, regData, r, (char*)pTab, P4_TABLE);
|
||||
sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
|
||||
|
||||
+1
-2
@@ -6361,8 +6361,7 @@ static int unixBackupDir(const char *z, int *pJ){
|
||||
int j = *pJ;
|
||||
int i;
|
||||
if( j<=0 ) return 0;
|
||||
for(i=j-1; i>0 && z[i-1]!='/'; i--){}
|
||||
if( i==0 ) return 0;
|
||||
for(i=j-1; ALWAYS(i>0) && z[i-1]!='/'; i--){}
|
||||
if( z[i]=='.' && i==j-2 && z[i+1]=='.' ) return 0;
|
||||
*pJ = i-1;
|
||||
return 1;
|
||||
|
||||
@@ -559,7 +559,6 @@ static int lookupName(
|
||||
assert( pExpr->op==TK_ID );
|
||||
if( ExprHasProperty(pExpr,EP_DblQuoted)
|
||||
&& areDoubleQuotedStringsEnabled(db, pTopNC)
|
||||
&& (db->init.bDropColumn==0 || sqlite3StrICmp(zCol, db->init.azInit[0])!=0)
|
||||
){
|
||||
/* If a double-quoted identifier does not match any known column name,
|
||||
** then treat it as a string.
|
||||
@@ -574,11 +573,6 @@ static int lookupName(
|
||||
** Someday, I hope to get rid of this hack. Unfortunately there is
|
||||
** a huge amount of legacy SQL that uses it. So for now, we just
|
||||
** issue a warning.
|
||||
**
|
||||
** 2021-03-15: ticket 1c24a659e6d7f3a1
|
||||
** Do not do the ID-to-STRING conversion when doing the schema
|
||||
** sanity check following a DROP COLUMN if the identifer name matches
|
||||
** the name of the column being dropped.
|
||||
*/
|
||||
sqlite3_log(SQLITE_WARNING,
|
||||
"double-quoted string literal: \"%w\"", zCol);
|
||||
|
||||
+5
-17
@@ -1986,7 +1986,7 @@ int sqlite3ColumnsFromExprList(
|
||||
nCol = pEList->nExpr;
|
||||
aCol = sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);
|
||||
testcase( aCol==0 );
|
||||
if( NEVER(nCol>32767) ) nCol = 32767;
|
||||
if( nCol>32767 ) nCol = 32767;
|
||||
}else{
|
||||
nCol = 0;
|
||||
aCol = 0;
|
||||
@@ -4039,7 +4039,6 @@ static int flattenSubquery(
|
||||
if( (p->selFlags & SF_Recursive) ) return 0;
|
||||
|
||||
if( pSrc->nSrc>1 ){
|
||||
if( pParse->nSelect>500 ) return 0;
|
||||
aCsrMap = sqlite3DbMallocZero(db, pParse->nTab*sizeof(int));
|
||||
}
|
||||
}
|
||||
@@ -4116,7 +4115,6 @@ static int flattenSubquery(
|
||||
if( pNew==0 ){
|
||||
p->pPrior = pPrior;
|
||||
}else{
|
||||
pNew->selId = ++pParse->nSelect;
|
||||
if( aCsrMap && db->mallocFailed==0 ){
|
||||
renumberCursors(pParse, pNew, iFrom, aCsrMap);
|
||||
}
|
||||
@@ -5060,24 +5058,16 @@ static int resolveFromTermToCte(
|
||||
pSavedWith = pParse->pWith;
|
||||
pParse->pWith = pWith;
|
||||
if( pSel->selFlags & SF_Recursive ){
|
||||
int rc;
|
||||
assert( pRecTerm!=0 );
|
||||
assert( (pRecTerm->selFlags & SF_Recursive)==0 );
|
||||
assert( pRecTerm->pNext!=0 );
|
||||
assert( (pRecTerm->pNext->selFlags & SF_Recursive)!=0 );
|
||||
assert( pRecTerm->pWith==0 );
|
||||
pRecTerm->pWith = pSel->pWith;
|
||||
rc = sqlite3WalkSelect(pWalker, pRecTerm);
|
||||
sqlite3WalkSelect(pWalker, pRecTerm);
|
||||
pRecTerm->pWith = 0;
|
||||
if( rc ){
|
||||
pParse->pWith = pSavedWith;
|
||||
return 2;
|
||||
}
|
||||
}else{
|
||||
if( sqlite3WalkSelect(pWalker, pSel) ){
|
||||
pParse->pWith = pSavedWith;
|
||||
return 2;
|
||||
}
|
||||
sqlite3WalkSelect(pWalker, pSel);
|
||||
}
|
||||
pParse->pWith = pWith;
|
||||
|
||||
@@ -6386,9 +6376,7 @@ int sqlite3Select(
|
||||
sqlite3VdbeAddOp2(v, OP_OpenDup, pItem->iCursor, pPrior->iCursor);
|
||||
pSub->nSelectRow = pPrior->pSelect->nSelectRow;
|
||||
}else{
|
||||
/* Materalize the view. If the view is not correlated, generate a
|
||||
** subroutine to do the materialization so that subsequent uses of
|
||||
** the same view can reuse the materialization. */
|
||||
/* Generate a subroutine that will materialize the view. */
|
||||
int topAddr;
|
||||
int onceAddr = 0;
|
||||
int retAddr;
|
||||
@@ -6415,7 +6403,7 @@ int sqlite3Select(
|
||||
VdbeComment((v, "end %s", pItem->pTab->zName));
|
||||
sqlite3VdbeChangeP1(v, topAddr, retAddr);
|
||||
sqlite3ClearTempRegCache(pParse);
|
||||
if( pItem->fg.isCte && pItem->fg.isCorrelated==0 ){
|
||||
if( pItem->fg.isCte ){
|
||||
CteUse *pCteUse = pItem->u2.pCteUse;
|
||||
pCteUse->addrM9e = pItem->addrFillSub;
|
||||
pCteUse->regRtn = pItem->regReturn;
|
||||
|
||||
+2
-4
@@ -3063,7 +3063,6 @@ static void exec_prepared_stmt_columnar(
|
||||
if( rc!=SQLITE_ROW ) return;
|
||||
nColumn = sqlite3_column_count(pStmt);
|
||||
nAlloc = nColumn*4;
|
||||
if( nAlloc<=0 ) nAlloc = 1;
|
||||
azData = sqlite3_malloc64( nAlloc*sizeof(char*) );
|
||||
if( azData==0 ) shell_out_of_memory();
|
||||
for(i=0; i<nColumn; i++){
|
||||
@@ -3103,7 +3102,6 @@ static void exec_prepared_stmt_columnar(
|
||||
if( n>p->actualWidth[j] ) p->actualWidth[j] = n;
|
||||
}
|
||||
if( seenInterrupt ) goto columnar_end;
|
||||
if( nColumn==0 ) goto columnar_end;
|
||||
switch( p->cMode ){
|
||||
case MODE_Column: {
|
||||
colSep = " ";
|
||||
@@ -3893,13 +3891,13 @@ static const char *(azHelp[]) = {
|
||||
".databases List names and files of attached databases",
|
||||
".dbconfig ?op? ?val? List or change sqlite3_db_config() options",
|
||||
".dbinfo ?DB? Show status information about the database",
|
||||
".dump ?OBJECTS? Render database content as SQL",
|
||||
".dump ?TABLE? Render database content as SQL",
|
||||
" Options:",
|
||||
" --data-only Output only INSERT statements",
|
||||
" --newlines Allow unescaped newline characters in output",
|
||||
" --nosys Omit system tables (ex: \"sqlite_stat1\")",
|
||||
" --preserve-rowids Include ROWID values in the output",
|
||||
" OBJECTS is a LIKE pattern for tables, indexes, triggers or views to dump",
|
||||
" TABLE is a LIKE pattern for the tables to dump",
|
||||
" Additional LIKE patterns can be given in subsequent arguments",
|
||||
".echo on|off Turn command echo on or off",
|
||||
".eqp on|off|full|... Enable or disable automatic EXPLAIN QUERY PLAN",
|
||||
|
||||
@@ -1533,10 +1533,7 @@ struct sqlite3 {
|
||||
unsigned orphanTrigger : 1; /* Last statement is orphaned TEMP trigger */
|
||||
unsigned imposterTable : 1; /* Building an imposter table */
|
||||
unsigned reopenMemdb : 1; /* ATTACH is really a reopen using MemDB */
|
||||
unsigned bDropColumn : 1; /* Doing schema check after DROP COLUMN */
|
||||
char **azInit; /* "type", "name", and "tbl_name" columns */
|
||||
/* or if bDropColumn, then azInit[0] is the */
|
||||
/* name of the column being dropped */
|
||||
} init;
|
||||
int nVdbeActive; /* Number of VDBEs currently running */
|
||||
int nVdbeRead; /* Number of active VDBEs that read or write */
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ static const unsigned char aiClass[] = {
|
||||
#ifdef SQLITE_EBCDIC
|
||||
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */
|
||||
/* 0x */ 29, 28, 28, 28, 28, 7, 28, 28, 28, 28, 28, 28, 7, 7, 28, 28,
|
||||
/* 1x */ 28, 28, 28, 28, 28, 7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
||||
/* 1x */ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
||||
/* 2x */ 28, 28, 28, 28, 28, 7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
||||
/* 3x */ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
||||
/* 4x */ 7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 26, 12, 17, 20, 10,
|
||||
|
||||
+39
-44
@@ -272,6 +272,11 @@ static VdbeCursor *allocateCursor(
|
||||
|
||||
assert( iCur>=0 && iCur<p->nCursor );
|
||||
if( p->apCsr[iCur] ){ /*OPTIMIZATION-IF-FALSE*/
|
||||
/* Before calling sqlite3VdbeFreeCursor(), ensure the isEphemeral flag
|
||||
** is clear. Otherwise, if this is an ephemeral cursor created by
|
||||
** OP_OpenDup, the cursor will not be closed and will still be part
|
||||
** of a BtShared.pCursor list. */
|
||||
if( p->apCsr[iCur]->pBtx==0 ) p->apCsr[iCur]->isEphemeral = 0;
|
||||
sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
|
||||
p->apCsr[iCur] = 0;
|
||||
}
|
||||
@@ -3868,7 +3873,7 @@ case OP_OpenDup: {
|
||||
|
||||
pOrig = p->apCsr[pOp->p2];
|
||||
assert( pOrig );
|
||||
assert( pOrig->isEphemeral ); /* Only ephemeral cursors can be duplicated */
|
||||
assert( pOrig->pBtx!=0 ); /* Only ephemeral cursors can be duplicated */
|
||||
|
||||
pCx = allocateCursor(p, pOp->p1, pOrig->nField, -1, CURTYPE_BTREE);
|
||||
if( pCx==0 ) goto no_mem;
|
||||
@@ -3878,10 +3883,7 @@ case OP_OpenDup: {
|
||||
pCx->isTable = pOrig->isTable;
|
||||
pCx->pgnoRoot = pOrig->pgnoRoot;
|
||||
pCx->isOrdered = pOrig->isOrdered;
|
||||
pCx->pBtx = pOrig->pBtx;
|
||||
pCx->hasBeenDuped = 1;
|
||||
pOrig->hasBeenDuped = 1;
|
||||
rc = sqlite3BtreeCursor(pCx->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
|
||||
rc = sqlite3BtreeCursor(pOrig->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
|
||||
pCx->pKeyInfo, pCx->uc.pCursor);
|
||||
/* The sqlite3BtreeCursor() routine can only fail for the first cursor
|
||||
** opened for a database. Since there is already an open cursor when this
|
||||
@@ -3947,10 +3949,9 @@ case OP_OpenEphemeral: {
|
||||
aMem[pOp->p3].z = "";
|
||||
}
|
||||
pCx = p->apCsr[pOp->p1];
|
||||
if( pCx && !pCx->hasBeenDuped ){
|
||||
/* If the ephermeral table is already open and has no duplicates from
|
||||
** OP_OpenDup, then erase all existing content so that the table is
|
||||
** empty again, rather than creating a new table. */
|
||||
if( pCx && ALWAYS(pCx->pBtx) ){
|
||||
/* If the ephermeral table is already open, erase all existing content
|
||||
** so that the table is empty again, rather than creating a new table. */
|
||||
assert( pCx->isEphemeral );
|
||||
pCx->seqCount = 0;
|
||||
pCx->cacheStatus = CACHE_STALE;
|
||||
@@ -3964,36 +3965,33 @@ case OP_OpenEphemeral: {
|
||||
vfsFlags);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3BtreeBeginTrans(pCx->pBtx, 1, 0);
|
||||
if( rc==SQLITE_OK ){
|
||||
/* If a transient index is required, create it by calling
|
||||
** sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before
|
||||
** opening it. If a transient table is required, just use the
|
||||
** automatically created table with root-page 1 (an BLOB_INTKEY table).
|
||||
*/
|
||||
if( (pCx->pKeyInfo = pKeyInfo = pOp->p4.pKeyInfo)!=0 ){
|
||||
assert( pOp->p4type==P4_KEYINFO );
|
||||
rc = sqlite3BtreeCreateTable(pCx->pBtx, &pCx->pgnoRoot,
|
||||
BTREE_BLOBKEY | pOp->p5);
|
||||
if( rc==SQLITE_OK ){
|
||||
assert( pCx->pgnoRoot==SCHEMA_ROOT+1 );
|
||||
assert( pKeyInfo->db==db );
|
||||
assert( pKeyInfo->enc==ENC(db) );
|
||||
rc = sqlite3BtreeCursor(pCx->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
|
||||
pKeyInfo, pCx->uc.pCursor);
|
||||
}
|
||||
pCx->isTable = 0;
|
||||
}else{
|
||||
pCx->pgnoRoot = SCHEMA_ROOT;
|
||||
rc = sqlite3BtreeCursor(pCx->pBtx, SCHEMA_ROOT, BTREE_WRCSR,
|
||||
0, pCx->uc.pCursor);
|
||||
pCx->isTable = 1;
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
/* If a transient index is required, create it by calling
|
||||
** sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before
|
||||
** opening it. If a transient table is required, just use the
|
||||
** automatically created table with root-page 1 (an BLOB_INTKEY table).
|
||||
*/
|
||||
if( (pCx->pKeyInfo = pKeyInfo = pOp->p4.pKeyInfo)!=0 ){
|
||||
assert( pOp->p4type==P4_KEYINFO );
|
||||
rc = sqlite3BtreeCreateTable(pCx->pBtx, &pCx->pgnoRoot,
|
||||
BTREE_BLOBKEY | pOp->p5);
|
||||
if( rc==SQLITE_OK ){
|
||||
assert( pCx->pgnoRoot==SCHEMA_ROOT+1 );
|
||||
assert( pKeyInfo->db==db );
|
||||
assert( pKeyInfo->enc==ENC(db) );
|
||||
rc = sqlite3BtreeCursor(pCx->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
|
||||
pKeyInfo, pCx->uc.pCursor);
|
||||
}
|
||||
}
|
||||
pCx->isOrdered = (pOp->p5!=BTREE_UNORDERED);
|
||||
if( rc ){
|
||||
sqlite3BtreeClose(pCx->pBtx);
|
||||
pCx->isTable = 0;
|
||||
}else{
|
||||
pCx->pgnoRoot = SCHEMA_ROOT;
|
||||
rc = sqlite3BtreeCursor(pCx->pBtx, SCHEMA_ROOT, BTREE_WRCSR,
|
||||
0, pCx->uc.pCursor);
|
||||
pCx->isTable = 1;
|
||||
}
|
||||
}
|
||||
pCx->isOrdered = (pOp->p5!=BTREE_UNORDERED);
|
||||
}
|
||||
if( rc ) goto abort_due_to_error;
|
||||
pCx->nullRow = 1;
|
||||
@@ -4427,13 +4425,13 @@ seek_not_found:
|
||||
**
|
||||
** There are three possible outcomes from this opcode:<ol>
|
||||
**
|
||||
** <li> If after This.P1 steps, the cursor is still pointing to a place that
|
||||
** is earlier in the btree than the target row, then fall through
|
||||
** into the subsquence OP_SeekGE opcode.
|
||||
** <li> If after This.P1 steps, the cursor is still point to a place that
|
||||
** is earlier in the btree than the target row,
|
||||
** then fall through into the subsquence OP_SeekGE opcode.
|
||||
**
|
||||
** <li> If the cursor is successfully moved to the target row by 0 or more
|
||||
** sqlite3BtreeNext() calls, then jump to This.P2, which will land just
|
||||
** past the OP_IdxGT or OP_IdxGE opcode that follows the OP_SeekGE.
|
||||
** past the OP_IdxGT opcode that follows the OP_SeekGE.
|
||||
**
|
||||
** <li> If the cursor ends up past the target row (indicating the the target
|
||||
** row does not exist in the btree) then jump to SeekOP.P2.
|
||||
@@ -4450,8 +4448,7 @@ case OP_SeekScan: {
|
||||
/* pOp->p2 points to the first instruction past the OP_IdxGT that
|
||||
** follows the OP_SeekGE. */
|
||||
assert( pOp->p2>=(int)(pOp-aOp)+2 );
|
||||
assert( aOp[pOp->p2-1].opcode==OP_IdxGT || aOp[pOp->p2-1].opcode==OP_IdxGE );
|
||||
testcase( aOp[pOp->p2-1].opcode==OP_IdxGE );
|
||||
assert( aOp[pOp->p2-1].opcode==OP_IdxGT );
|
||||
assert( pOp[1].p1==aOp[pOp->p2-1].p1 );
|
||||
assert( pOp[1].p2==aOp[pOp->p2-1].p2 );
|
||||
assert( pOp[1].p3==aOp[pOp->p2-1].p3 );
|
||||
@@ -5986,8 +5983,6 @@ case OP_IdxRowid: { /* out2 */
|
||||
pTabCur->deferredMoveto = 1;
|
||||
assert( pOp->p4type==P4_INTARRAY || pOp->p4.ai==0 );
|
||||
pTabCur->aAltMap = pOp->p4.ai;
|
||||
assert( !pC->isEphemeral );
|
||||
assert( !pTabCur->isEphemeral );
|
||||
pTabCur->pAltCursor = pC;
|
||||
}else{
|
||||
pOut = out2Prerelease(p, pOp);
|
||||
|
||||
@@ -86,7 +86,6 @@ struct VdbeCursor {
|
||||
Bool isEphemeral:1; /* True for an ephemeral table */
|
||||
Bool useRandomRowid:1; /* Generate new record numbers semi-randomly */
|
||||
Bool isOrdered:1; /* True if the table is not BTREE_UNORDERED */
|
||||
Bool hasBeenDuped:1; /* This cursor was source or target of OP_OpenDup */
|
||||
u16 seekHit; /* See the OP_SeekHit and OP_IfNoHope opcodes */
|
||||
Btree *pBtx; /* Separate file holding temporary table */
|
||||
i64 seqCount; /* Sequence counter */
|
||||
|
||||
+8
-4
@@ -2472,15 +2472,20 @@ void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
|
||||
return;
|
||||
}
|
||||
assert( pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE );
|
||||
assert( pCx->pBtx==0 || pCx->isEphemeral );
|
||||
switch( pCx->eCurType ){
|
||||
case CURTYPE_SORTER: {
|
||||
sqlite3VdbeSorterClose(p->db, pCx);
|
||||
break;
|
||||
}
|
||||
case CURTYPE_BTREE: {
|
||||
assert( pCx->uc.pCursor!=0 );
|
||||
sqlite3BtreeCloseCursor(pCx->uc.pCursor);
|
||||
if( pCx->isEphemeral ){
|
||||
if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx);
|
||||
/* The pCx->pCursor will be close automatically, if it exists, by
|
||||
** the call above. */
|
||||
}else{
|
||||
assert( pCx->uc.pCursor!=0 );
|
||||
sqlite3BtreeCloseCursor(pCx->uc.pCursor);
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
@@ -3564,7 +3569,6 @@ int sqlite3VdbeCursorMoveto(VdbeCursor **pp, u32 *piCol){
|
||||
assert( p->eCurType==CURTYPE_BTREE || p->eCurType==CURTYPE_PSEUDO );
|
||||
if( p->deferredMoveto ){
|
||||
u32 iMap;
|
||||
assert( !p->isEphemeral );
|
||||
if( p->aAltMap && (iMap = p->aAltMap[1+*piCol])>0 && !p->nullRow ){
|
||||
*pp = p->pAltCursor;
|
||||
*piCol = iMap - 1;
|
||||
|
||||
@@ -822,18 +822,5 @@ do_execsql_test 21.2 {
|
||||
END}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 22.0 {
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE TABLE t2(c, othername, extra AS (c + 1));
|
||||
ALTER TABLE t1 RENAME a to othername;
|
||||
SELECT sql FROM sqlite_schema;
|
||||
} {
|
||||
{CREATE TABLE t1(othername, b)}
|
||||
{CREATE TABLE t2(c, othername, extra AS (c + 1))}
|
||||
}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
+5
-13
@@ -57,7 +57,7 @@ proc do_atdc_error_test {tn schema atdc error} {
|
||||
# and does not have a UNIQUE constraint.
|
||||
#
|
||||
|
||||
# EVIDENCE-OF: R-52436-31752 The column is a PRIMARY KEY or part of one.
|
||||
# EVIDENCE-OF: R-05184-13006 The column is a PRIMARY KEY.
|
||||
#
|
||||
do_atdc_error_test 2.1.1 {
|
||||
CREATE TABLE x1(a PRIMARY KEY, b, c);
|
||||
@@ -66,13 +66,6 @@ do_atdc_error_test 2.1.1 {
|
||||
} {
|
||||
cannot drop PRIMARY KEY column: "a"
|
||||
}
|
||||
do_atdc_error_test 2.1.2 {
|
||||
CREATE TABLE x1(a,b,c,d,e, PRIMARY KEY(b,c,d));
|
||||
} {
|
||||
ALTER TABLE x1 DROP COLUMN c
|
||||
} {
|
||||
cannot drop PRIMARY KEY column: "c"
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-43412-16016 The column has a UNIQUE constraint.
|
||||
#
|
||||
@@ -91,7 +84,7 @@ do_atdc_error_test 2.2.2 {
|
||||
error in table x1 after drop column: no such column: c
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-46731-08965 The column is indexed.
|
||||
# EVIDENCE-OF: R-46731-08965: The column is indexed.
|
||||
#
|
||||
do_atdc_error_test 2.3.1 {
|
||||
CREATE TABLE 'one two'('x y', 'z 1', 'a b');
|
||||
@@ -110,7 +103,7 @@ do_atdc_error_test 2.3.2 {
|
||||
error in index idx after drop column: no such column: a
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-46731-08965 The column is indexed.
|
||||
# EVIDENCE-OF: R-46731-08965: The column is indexed.
|
||||
#
|
||||
do_atdc_error_test 2.4.1 {
|
||||
CREATE TABLE x1234(a, b, c PRIMARY KEY) WITHOUT ROWID;
|
||||
@@ -121,8 +114,7 @@ do_atdc_error_test 2.4.1 {
|
||||
error in index i1 after drop column: no such column: a
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-47838-03249 The column is named in a table or column
|
||||
# CHECK constraint not associated with the column being dropped.
|
||||
# EVIDENCE-OF: R-18825-17786 The column appears in a table CHECK constraint.
|
||||
#
|
||||
do_atdc_error_test 2.5.1 {
|
||||
CREATE TABLE x1234(a, b, c PRIMARY KEY, CHECK(((a+5)%10)!=0)) WITHOUT ROWID;
|
||||
@@ -195,7 +187,7 @@ do_atdc_error_test 2.8.3 {
|
||||
# if the CHECK constraint was specified as part of the column definition.
|
||||
#
|
||||
|
||||
# STALE-EVIDENCE: R-60924-11170 However, the column being deleted can be used in a
|
||||
# EVIDENCE-OF: R-60924-11170 However, the column being deleted can be used in a
|
||||
# column CHECK constraint because the column CHECK constraint is dropped
|
||||
# together with the column itself.
|
||||
do_execsql_test 3.0 {
|
||||
|
||||
+6
-64
@@ -20,9 +20,6 @@
|
||||
# avfs-2.1. Test that the simple text file retains its initial text.
|
||||
# avfs-3.1. Test that the appendvfs can grow and shrink, remaining intact.
|
||||
# avfs-3.2. Test that appendvfs is intact after grow/shrink/close/reopen.
|
||||
# avfs-3.3. Test that appendvfs can grow by many pages and be written.
|
||||
# avfs-3.4. Test that grown appendvfs can be reopened and appear intact.
|
||||
# avfs-3.5. Test that much grown appendvfs can shrink and reopen intact.
|
||||
# avfs-4.1. Test shell's ability to append to a non-appendvfs file.
|
||||
# avfs-4.2. Test shell's ability to append to empty or nonexistent file.
|
||||
# avfs-4.3. Test shell's ability to reopen and alter an appendvfs file.
|
||||
@@ -162,12 +159,11 @@ do_test 2.1 {
|
||||
} {Appendee intact.}
|
||||
|
||||
# Set of repeatable random integers for a couple tests.
|
||||
set ::nrint 50000
|
||||
proc rint {v} {
|
||||
return [::tcl::mathfunc::int [expr $v * 100000]]
|
||||
}
|
||||
array set ::randints [list 0 [rint [::tcl::mathfunc::srand 0]]]
|
||||
for {set i 1} {$i < $::nrint} {incr i} {
|
||||
for {set i 1} {$i < 10000} {incr i} {
|
||||
set ::randints($i) [rint [::tcl::mathfunc::rand]]
|
||||
}
|
||||
|
||||
@@ -180,7 +176,7 @@ do_test 3.1 {
|
||||
CREATE TABLE ri (i INTEGER);
|
||||
BEGIN;
|
||||
}
|
||||
for {set i 0} {$i < $::nrint} {incr i} {
|
||||
for {set i 0} {$i < 10000} {incr i} {
|
||||
set r $::randints($i)
|
||||
set s $::randints([incr i])
|
||||
set t $::randints([incr i])
|
||||
@@ -207,11 +203,11 @@ do_test 3.1 {
|
||||
adb close
|
||||
set adaSz [file size $::fa]
|
||||
set adba [expr ($adbSz + 0.1)/$adaSz]
|
||||
# lappend results $adba
|
||||
# lappend results $adbSz $adaSz
|
||||
set results [concat $results [lrange $qr 0 2]]
|
||||
lappend results [expr {$adba > 10.0}]
|
||||
lappend results [expr {$adba > 10.0 && $adba < 20.0}]
|
||||
set ::result [join $results " | "]
|
||||
} "ok | $::nrint | ok | ok | 1"
|
||||
} {ok | 10000 | ok | ok | 1}
|
||||
|
||||
do_test 3.2 {
|
||||
set results {}
|
||||
@@ -223,60 +219,6 @@ do_test 3.2 {
|
||||
set ::result [join $results " | "]
|
||||
} {ok}
|
||||
|
||||
# avfs-3.3. Test that appendvfs can grow by many pages and be written.
|
||||
do_test 3.3 {
|
||||
set results {}
|
||||
sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
|
||||
set npages 300
|
||||
adb eval { BEGIN }
|
||||
while {$npages > 0} {
|
||||
adb eval { INSERT INTO ri VALUES (randomblob(1500)) }
|
||||
incr npages -1
|
||||
}
|
||||
adb eval { COMMIT }
|
||||
adb eval {
|
||||
SELECT integrity_check as ic FROM pragma_integrity_check();
|
||||
} { lappend results $ic }
|
||||
adb close
|
||||
set adaSzr [expr [file size $::fa] / 300.0 / 1500 ]
|
||||
set okSzr [expr $adaSzr > 1.0 && $adaSzr < 1.3 ]
|
||||
lappend results $okSzr
|
||||
set ::result [join $results " | "]
|
||||
} {ok | 1}
|
||||
|
||||
# avfs-3.4. Test that grown appendvfs can be reopened and appear intact.
|
||||
do_test 3.4 {
|
||||
set results {}
|
||||
sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
|
||||
adb eval {
|
||||
SELECT integrity_check as ic FROM pragma_integrity_check();
|
||||
} { lappend results $ic }
|
||||
adb close
|
||||
set ::result $ic
|
||||
} {ok}
|
||||
|
||||
# avfs-3.5. Test that much grown appendvfs can shrink and reopen intact.
|
||||
do_test 3.5 {
|
||||
set results {}
|
||||
set adbsz [file size $::fa]
|
||||
sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
|
||||
adb eval {
|
||||
DELETE FROM ri WHERE rowid % 8 <> 0;
|
||||
SELECT integrity_check as ic FROM pragma_integrity_check();
|
||||
VACUUM;
|
||||
SELECT integrity_check as ic FROM pragma_integrity_check();
|
||||
} { lappend results $ic }
|
||||
adb close
|
||||
set adasz [file size $::fa]
|
||||
lappend results [expr {$adbsz/$adasz > 5}]
|
||||
sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
|
||||
adb eval {
|
||||
SELECT integrity_check as ic FROM pragma_integrity_check();
|
||||
} { lappend results $ic }
|
||||
adb close
|
||||
set ::result [join $results " | "]
|
||||
} {ok | ok | 1 | ok}
|
||||
|
||||
set ::cliDoesAr [shellDoesAr]
|
||||
|
||||
do_test 4.1 {
|
||||
@@ -390,6 +332,6 @@ do_test 5.2 {
|
||||
|
||||
forcedelete $::fa $::fza
|
||||
|
||||
unset -nocomplain ::fa ::fza ::tlo ::result ::randints ::nrint ::cliDoesAr
|
||||
unset -nocomplain ::fa ::fza ::tlo ::result ::randints ::cliDoesAr
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -38,13 +38,6 @@ do_catchsql_test date2-130 {
|
||||
INSERT INTO t1(x,y) VALUES('2017-08-01','two');
|
||||
} {1 {CHECK constraint failed: date(x) BETWEEN '2017-07-01' AND '2017-07-31'}}
|
||||
|
||||
# 2021-03-16 Forum post https://sqlite.org/forum/forumpost/464afd4086
|
||||
do_catchsql_test date2-140 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(x, y, z AS (date()));
|
||||
INSERT INTO t1(x,y) VALUES(1,2);
|
||||
} {1 {non-deterministic use of date() in a generated column}}
|
||||
|
||||
do_execsql_test date2-200 {
|
||||
CREATE TABLE t2(x,y);
|
||||
INSERT INTO t2(x,y) VALUES(1, '2017-07-20'), (2, 'xyzzy');
|
||||
|
||||
+2
-2
@@ -2055,9 +2055,9 @@ do_test e_fkey-44.5 {
|
||||
#-------------------------------------------------------------------------
|
||||
# Test SET DEFAULT actions.
|
||||
#
|
||||
# EVIDENCE-OF: R-55814-22637 The "SET DEFAULT" actions are similar to
|
||||
# EVIDENCE-OF: R-43054-54832 The "SET DEFAULT" actions are similar to
|
||||
# "SET NULL", except that each of the child key columns is set to
|
||||
# contain the column's default value instead of NULL.
|
||||
# contain the columns default value instead of NULL.
|
||||
#
|
||||
drop_all_tables
|
||||
do_test e_fkey-45.1 {
|
||||
|
||||
+8
-10
@@ -735,7 +735,7 @@ static int progress_handler(void *pClientData) {
|
||||
** "PRAGMA parser_trace" since they can dramatically increase the
|
||||
** amount of output without actually testing anything useful.
|
||||
**
|
||||
** Also block ATTACH if attaching a file from the filesystem.
|
||||
** Also block ATTACH and DETACH
|
||||
*/
|
||||
static int block_troublesome_sql(
|
||||
void *Notused,
|
||||
@@ -750,15 +750,13 @@ static int block_troublesome_sql(
|
||||
(void)zArg3;
|
||||
(void)zArg4;
|
||||
if( eCode==SQLITE_PRAGMA ){
|
||||
if( eVerbosity==0 ){
|
||||
if( sqlite3_strnicmp("vdbe_", zArg1, 5)==0
|
||||
|| sqlite3_stricmp("parser_trace", zArg1)==0
|
||||
|| sqlite3_stricmp("temp_store_directory", zArg1)==0
|
||||
){
|
||||
return SQLITE_DENY;
|
||||
}
|
||||
}else if( sqlite3_stricmp("oom",zArg1)==0
|
||||
&& zArg2!=0 && zArg2[0]!=0 ){
|
||||
if( sqlite3_strnicmp("vdbe_", zArg1, 5)==0
|
||||
|| sqlite3_stricmp("parser_trace", zArg1)==0
|
||||
|| sqlite3_stricmp("temp_store_directory", zArg1)==0
|
||||
){
|
||||
return SQLITE_DENY;
|
||||
}
|
||||
if( sqlite3_stricmp("oom",zArg1)==0 && zArg2!=0 && zArg2[0]!=0 ){
|
||||
oomCounter = atoi(zArg2);
|
||||
}
|
||||
}else if( eCode==SQLITE_ATTACH ){
|
||||
|
||||
+3
-3
@@ -90,9 +90,9 @@ do_test indexedby-2.4 {
|
||||
catchsql { SELECT * FROM t1 INDEXED BY i3 WHERE a = 'one' AND b = 'two'}
|
||||
} {1 {no such index: i3}}
|
||||
|
||||
# EVIDENCE-OF: R-05301-32681 If the query optimizer is unable to use the
|
||||
# index specified by the INDEXED BY clause, then the query will fail
|
||||
# with an error.
|
||||
# EVIDENCE-OF: R-62112-42456 If the query optimizer is unable to use the
|
||||
# index specified by the INDEX BY clause, then the query will fail with
|
||||
# an error.
|
||||
do_test indexedby-2.4.1 {
|
||||
catchsql { SELECT b FROM t1 INDEXED BY i1 WHERE b = 'two' }
|
||||
} {0 {}}
|
||||
|
||||
+3
-42
@@ -110,7 +110,7 @@ do_execsql_test 2.2 {
|
||||
PRAGMA writable_schema = 1;
|
||||
CREATE TABLE xyz(a, b, c CHECK (c!="null") );
|
||||
CREATE INDEX i2 ON t1(x, y, z||"abc");
|
||||
CREATE INDEX i3 ON t1("w"||"");
|
||||
CREATE INDEX i3 ON t1("w");
|
||||
CREATE INDEX i4 ON t1(x) WHERE z="w";
|
||||
}
|
||||
|
||||
@@ -135,49 +135,10 @@ do_execsql_test 2.5 {
|
||||
{CREATE TABLE t1(x, y, z)}
|
||||
{CREATE TABLE xyz(a, b, c CHECK (c!="null") )}
|
||||
{CREATE INDEX i2 ON t1(x, y, z||"abc")}
|
||||
{CREATE INDEX i3 ON t1("w"||"")}
|
||||
{CREATE INDEX i3 ON t1("w")}
|
||||
{CREATE INDEX i4 ON t1(x) WHERE z="w"}
|
||||
}
|
||||
|
||||
# 2021-03-13
|
||||
# ticket 1c24a659e6d7f3a1
|
||||
reset_db
|
||||
do_catchsql_test 3.0 {
|
||||
CREATE TABLE t1(a,b);
|
||||
CREATE INDEX x1 on t1("b");
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
} {1 {error in index x1 after drop column: no such column: b}}
|
||||
do_catchsql_test 3.1 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a,"b");
|
||||
CREATE INDEX x1 on t1("b");
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
} {1 {error in index x1 after drop column: no such column: b}}
|
||||
do_catchsql_test 3.2 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a,'b');
|
||||
CREATE INDEX x1 on t1("b");
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
} {1 {error in index x1 after drop column: no such column: b}}
|
||||
do_catchsql_test 3.3 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a,"b");
|
||||
CREATE INDEX x1 on t1('b');
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
} {1 {error in index x1 after drop column: no such column: b}}
|
||||
do_catchsql_test 3.4 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a, b, c);
|
||||
CREATE INDEX x1 ON t1("a"||"b");
|
||||
INSERT INTO t1 VALUES(1,2,3),(1,4,5);
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
} {1 {error in index x1 after drop column: no such column: b}}
|
||||
do_catchsql_test 3.5 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a, b, c);
|
||||
CREATE INDEX x1 ON t1("a"||"x");
|
||||
INSERT INTO t1 VALUES(1,2,3),(1,4,5);
|
||||
ALTER TABLE t1 DROP COLUMN b;
|
||||
} {0 {}}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -657,10 +657,4 @@ do_catchsql_test 28.10 {
|
||||
DELETE FROM t0;
|
||||
} {1 {sub-select returns 2 columns - expected 1}}
|
||||
|
||||
# 2021-03-19
|
||||
# dbsqlfuzz find of a NEVER().
|
||||
do_catchsql_test 29.1 {
|
||||
SELECT (SELECT 1 WHERE ((SELECT 1 WHERE (2,(2,0)) IS (2,(20))),(2,0)) IS (2,(20))) WHERE (2,(2,0)) IS (2 IN(SELECT 1 WHERE (2,(2,2,0)) IS (2,(20))),(20));
|
||||
} {1 {row value misused}}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -394,18 +394,4 @@ foreach {tn sql} {
|
||||
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_execsql_test 2.0 {
|
||||
CREATE TABLE t2(a, b, c REAL, d, e, PRIMARY KEY(a,b)) WITHOUT ROWID;
|
||||
CREATE UNIQUE INDEX t2c ON t2(c);
|
||||
}
|
||||
|
||||
do_catchsql_test 2.1 {
|
||||
INSERT INTO t2(a,b,c,e,d) VALUES(1,2,3,4,5)
|
||||
ON CONFLICT(c) DO UPDATE SET b=''
|
||||
ON CONFLICT((SELECT t2 FROM nosuchtable)) DO NOTHING;
|
||||
|
||||
} {1 {no such table: nosuchtable}}
|
||||
|
||||
finish_test
|
||||
|
||||
-134
@@ -414,139 +414,5 @@ do_execsql_test 8.3 {
|
||||
SELECT * FROM q;
|
||||
} {1 2 3 4 5}
|
||||
|
||||
# 2021-03-18
|
||||
# Ticket bb8a9fd4a9b7fce5
|
||||
reset_db
|
||||
do_execsql_test 9.1 {
|
||||
WITH xyz(a) AS (
|
||||
WITH abc AS ( SELECT 1234 ) SELECT * FROM abc
|
||||
)
|
||||
SELECT * FROM xyz AS one, xyz AS two, (
|
||||
SELECT * FROM xyz UNION ALL SELECT * FROM xyz
|
||||
);
|
||||
} {1234 1234 1234 1234 1234 1234}
|
||||
ifcapable vtab {
|
||||
load_static_extension db series
|
||||
do_execsql_test 9.2 {
|
||||
WITH
|
||||
cst(rsx, rsy) AS (
|
||||
SELECT 100, 100
|
||||
),
|
||||
cst2(minx, maxx, stepx, miny, maxy, stepy, qualitativex, qualitativey) AS (
|
||||
SELECT NULL, NULL, NULL, NULL, NULL, NULL, 0, 0
|
||||
),
|
||||
ds0(m, n, x, y, x2, y2, title, size, mark, label, markmode) AS (
|
||||
SELECT 1, 2, 3, 4, 5, 6, 7 , 8, 9, 10, 11
|
||||
),
|
||||
ds(m, n, x, y, x2, y2, title, size, mark, label, markmode) AS (
|
||||
SELECT m, n, x,
|
||||
y, x2,
|
||||
y2,
|
||||
title, size, mark, label, markmode
|
||||
FROM ds0
|
||||
WINDOW w AS (PARTITION BY m, x ORDER BY n)
|
||||
),
|
||||
d(m, n, x, y, x2, y2, labelx,labely,title,size,mark,label,markmode) AS (
|
||||
SELECT m, n, x, y, x2, y2, x, y, title, size, mark, label, markmode
|
||||
FROM ds, cst2
|
||||
),
|
||||
ylabels(y, label) AS (
|
||||
SELECT y, MIN(labely) FROM d GROUP BY y
|
||||
),
|
||||
yaxis(maxy, miny, stepy , minstepy) AS (
|
||||
WITH
|
||||
xt0(minx, maxx) AS (
|
||||
SELECT coalesce(miny, min(min(y2),
|
||||
min(y))), coalesce(maxy, max(max(y2),
|
||||
max(y))) + qualitativey
|
||||
FROM d, cst2
|
||||
),
|
||||
xt1(mx, mn) AS (SELECT maxx, minx FROM xt0),
|
||||
xt2(mx, mn, step) AS (SELECT mx, mn, (mx-mn) FROM xt1),
|
||||
|
||||
xt3(mx, mn, ms) AS (
|
||||
SELECT mx, mn, first_value(rs) OVER (order by x desc) AS ms
|
||||
FROM (SELECT mx, mn, step, f,(mx-mn) as rng,
|
||||
1.0*step/f as rs, 1.0*(mx-mn)/(step/f) AS x
|
||||
FROM xt2, (SELECT 1 AS f UNION ALL SELECT 2
|
||||
UNION ALL SELECT 4
|
||||
UNION ALL SELECT 5)) AS src
|
||||
WHERE x < 10 limit 1),
|
||||
xt4(minstepy) AS (
|
||||
SELECT MIN(abs(y2-y)) FROM d WHERE y2 != y
|
||||
)
|
||||
SELECT (mx/ms)*ms, (mn/ms)*ms, coalesce(stepy, ms),
|
||||
coalesce(minstepy, ms, stepy) FROM xt3, cst2,xt4
|
||||
),
|
||||
distinct_mark_n_m(mark, ze, zem, title) AS (
|
||||
SELECT DISTINCT mark, n AS ze, m AS zem, title FROM ds0
|
||||
),
|
||||
facet0(m, mi, title, radial) AS (
|
||||
SELECT md, row_number() OVER () - 1, title, 'radial'
|
||||
IN (SELECT mark FROM distinct_mark_n_m WHERE zem = md)
|
||||
FROM (SELECT DISTINCT zem AS md, title AS title
|
||||
FROM distinct_mark_n_m ORDER BY 2, 1)
|
||||
),
|
||||
facet(m, mi, xorigin, yorigin, title, radial) AS (
|
||||
SELECT m, mi,
|
||||
rsx * 1.2 * IFNULL(CASE WHEN (
|
||||
0
|
||||
) > 0 THEN mi / (
|
||||
0
|
||||
) ELSE mi % (
|
||||
2
|
||||
) END, mi),
|
||||
rsy * 1.2 * IFNULL(CASE WHEN (
|
||||
2
|
||||
) > 0 THEN mi / (
|
||||
2
|
||||
) ELSE mi / (
|
||||
0
|
||||
) END, 0),
|
||||
title, radial FROM facet0, cst
|
||||
),
|
||||
radygrid(m, mi, tty, wty, ttx, ttx2, xorigin, yorigin) AS (
|
||||
SELECT m, mi, rsy / 2 / ((maxy-miny)/stepy) * (value-1) AS tty,
|
||||
coalesce(NULL, miny + stepy * (value-1)) AS wty,
|
||||
xorigin, xorigin+rsx, xorigin + rsx / 2,
|
||||
yorigin + rsy / 2
|
||||
FROM generate_series(1), yaxis, cst,
|
||||
facet LEFT JOIN ylabels ON ylabels.y = (miny + (value-1) * stepy)
|
||||
WHERE radial AND stop = 1+1.0*(maxy-miny)/stepy
|
||||
),
|
||||
ypos(m, mi, pcx, pcy, radial) AS (
|
||||
SELECT m, mi, xorigin, yorigin + CASE
|
||||
WHEN 0 BETWEEN miny AND maxy THEN
|
||||
rsy - (0 - miny) * rsy / (maxy-miny)
|
||||
WHEN 0 >= maxy THEN 0
|
||||
ELSE rsy
|
||||
END, radial FROM yaxis, cst, facet WHERE NOT radial
|
||||
UNION ALL
|
||||
SELECT m, mi, xorigin + rsx / 2, yorigin + (CASE
|
||||
WHEN 0 BETWEEN miny AND maxy THEN
|
||||
rsy - (0 - miny) * rsy / 2 / (maxy-miny)
|
||||
WHEN 0 >= maxy THEN 0
|
||||
ELSE rsy
|
||||
END ) / 2, radial FROM yaxis, cst, facet WHERE radial
|
||||
)
|
||||
SELECT * FROM radygrid , ypos;
|
||||
} {}
|
||||
} ;# end ifcapable vtab
|
||||
|
||||
# 2021-03-19
|
||||
# dbsqlfuzz 01b8355086998f0a452cb31208e80b9d29ca739a
|
||||
#
|
||||
# Correlated CTEs should not be materialized.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 10.1 {
|
||||
SELECT 1 AS c WHERE (
|
||||
SELECT (
|
||||
WITH t1(a) AS (VALUES( c ))
|
||||
SELECT ( SELECT t1a.a FROM t1 AS t1a, t1 AS t1x )
|
||||
FROM t1 AS xyz GROUP BY 1
|
||||
)
|
||||
)
|
||||
} {1}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -224,23 +224,6 @@ do_execsql_test 5.2 {
|
||||
ORDER BY 1;
|
||||
} {0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# At one point this would incorrectly report "circular reference: cte1"
|
||||
#
|
||||
do_catchsql_test 6.0 {
|
||||
with
|
||||
cte1(x, y) AS ( select 1, 2, 3 ),
|
||||
cte2(z) as ( select 1 from cte1 )
|
||||
select * from cte2, cte1;
|
||||
} {1 {table cte1 has 3 values for 2 columns}}
|
||||
|
||||
do_catchsql_test 6.1 {
|
||||
with
|
||||
cte1(x, y) AS ( select 1, 2, 3 ),
|
||||
cte2(z) as ( select 1 from cte1 UNION ALL SELECT z+1 FROM cte2 WHERE z<5)
|
||||
select * from cte2, cte1;
|
||||
} {1 {table cte1 has 3 values for 2 columns}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+3
-11
@@ -1712,28 +1712,20 @@ end_changeset_one_table:
|
||||
strFree(&sql);
|
||||
}
|
||||
|
||||
/*
|
||||
** Return true if the ascii character passed as the only argument is a
|
||||
** whitespace character. Otherwise return false.
|
||||
*/
|
||||
static int is_whitespace(char x){
|
||||
return (x==' ' || x=='\t' || x=='\n' || x=='\r');
|
||||
}
|
||||
|
||||
/*
|
||||
** Extract the next SQL keyword or quoted string from buffer zIn and copy it
|
||||
** (or a prefix of it if it will not fit) into buffer zBuf, size nBuf bytes.
|
||||
** Return a pointer to the character within zIn immediately following
|
||||
** the token or quoted string just extracted.
|
||||
*/
|
||||
static const char *gobble_token(const char *zIn, char *zBuf, int nBuf){
|
||||
const char *gobble_token(const char *zIn, char *zBuf, int nBuf){
|
||||
const char *p = zIn;
|
||||
char *pOut = zBuf;
|
||||
char *pEnd = &pOut[nBuf-1];
|
||||
char q = 0; /* quote character, if any */
|
||||
|
||||
if( p==0 ) return 0;
|
||||
while( is_whitespace(*p) ) p++;
|
||||
while( *p==' ' ) p++;
|
||||
switch( *p ){
|
||||
case '"': q = '"'; break;
|
||||
case '\'': q = '\''; break;
|
||||
@@ -1752,7 +1744,7 @@ static const char *gobble_token(const char *zIn, char *zBuf, int nBuf){
|
||||
p++;
|
||||
}
|
||||
}else{
|
||||
while( *p && !is_whitespace(*p) && *p!='(' ){
|
||||
while( *p && *p!=' ' && *p!='(' ){
|
||||
if( pOut<pEnd ) *pOut++ = *p;
|
||||
p++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user