Fossil SCM

merge trunk

jan.nijtmans 2012-09-04 07:00 eclipse-project merge
Commit 56f6e9f3b9b5c7e0d5f16e9c76bb1a2054ff6e6c
+11 -11
--- src/info.c
+++ src/info.c
@@ -607,43 +607,43 @@
607607
@ <div class="sectionmenu">
608608
showDiff = g.zPath[0]!='c';
609609
if( db_get_boolean("show-version-diffs", 0)==0 ){
610610
showDiff = !showDiff;
611611
if( showDiff ){
612
- @ %z(xhref("class=\"button\"","%R/vinfo/%T",zName))
612
+ @ %z(xhref("class='button'","%R/vinfo/%T",zName))
613613
@ hide&nbsp;diffs</a>
614614
if( sideBySide ){
615
- @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
615
+ @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
616616
@ unified&nbsp;diffs</a>
617617
}else{
618
- @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
618
+ @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
619619
@ side-by-side&nbsp;diffs</a>
620620
}
621621
}else{
622
- @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
622
+ @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
623623
@ show&nbsp;unified&nbsp;diffs</a>
624
- @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
624
+ @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
625625
@ show&nbsp;side-by-side&nbsp;diffs</a>
626626
}
627627
}else{
628628
if( showDiff ){
629
- @ %z(xhref("class=\"button\"","%R/ci/%T",zName))hide&nbsp;diffs</a>
629
+ @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
630630
if( sideBySide ){
631
- @ %z(xhref("class=\"button\"","%R/info/%T?sbs=0",zName))
631
+ @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
632632
@ unified&nbsp;diffs</a>
633633
}else{
634
- @ %z(xhref("class=\"button\"","%R/info/%T?sbs=1",zName))
634
+ @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName))
635635
@ side-by-side&nbsp;diffs</a>
636636
}
637637
}else{
638
- @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=0",zName))
638
+ @ %z(xhref("class='button'","%R/vinfo/%T?sbs=0",zName))
639639
@ show&nbsp;unified&nbsp;diffs</a>
640
- @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=1",zName))
640
+ @ %z(xhref("class='button'","%R/vinfo/%T?sbs=1",zName))
641641
@ show&nbsp;side-by-side&nbsp;diffs</a>
642642
}
643643
}
644
- @ %z(xhref("class=\"button\"","%R/vpatch?from=%S&to=%S",zParent,zUuid))
644
+ @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
645645
@ patch</a></div>
646646
db_prepare(&q,
647647
"SELECT name,"
648648
" mperm,"
649649
" (SELECT uuid FROM blob WHERE rid=mlink.pid),"
650650
--- src/info.c
+++ src/info.c
@@ -607,43 +607,43 @@
607 @ <div class="sectionmenu">
608 showDiff = g.zPath[0]!='c';
609 if( db_get_boolean("show-version-diffs", 0)==0 ){
610 showDiff = !showDiff;
611 if( showDiff ){
612 @ %z(xhref("class=\"button\"","%R/vinfo/%T",zName))
613 @ hide&nbsp;diffs</a>
614 if( sideBySide ){
615 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
616 @ unified&nbsp;diffs</a>
617 }else{
618 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
619 @ side-by-side&nbsp;diffs</a>
620 }
621 }else{
622 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=0",zName))
623 @ show&nbsp;unified&nbsp;diffs</a>
624 @ %z(xhref("class=\"button\"","%R/ci/%T?sbs=1",zName))
625 @ show&nbsp;side-by-side&nbsp;diffs</a>
626 }
627 }else{
628 if( showDiff ){
629 @ %z(xhref("class=\"button\"","%R/ci/%T",zName))hide&nbsp;diffs</a>
630 if( sideBySide ){
631 @ %z(xhref("class=\"button\"","%R/info/%T?sbs=0",zName))
632 @ unified&nbsp;diffs</a>
633 }else{
634 @ %z(xhref("class=\"button\"","%R/info/%T?sbs=1",zName))
635 @ side-by-side&nbsp;diffs</a>
636 }
637 }else{
638 @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=0",zName))
639 @ show&nbsp;unified&nbsp;diffs</a>
640 @ %z(xhref("class=\"button\"","%R/vinfo/%T?sbs=1",zName))
641 @ show&nbsp;side-by-side&nbsp;diffs</a>
642 }
643 }
644 @ %z(xhref("class=\"button\"","%R/vpatch?from=%S&to=%S",zParent,zUuid))
645 @ patch</a></div>
646 db_prepare(&q,
647 "SELECT name,"
648 " mperm,"
649 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
650
--- src/info.c
+++ src/info.c
@@ -607,43 +607,43 @@
607 @ <div class="sectionmenu">
608 showDiff = g.zPath[0]!='c';
609 if( db_get_boolean("show-version-diffs", 0)==0 ){
610 showDiff = !showDiff;
611 if( showDiff ){
612 @ %z(xhref("class='button'","%R/vinfo/%T",zName))
613 @ hide&nbsp;diffs</a>
614 if( sideBySide ){
615 @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
616 @ unified&nbsp;diffs</a>
617 }else{
618 @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
619 @ side-by-side&nbsp;diffs</a>
620 }
621 }else{
622 @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
623 @ show&nbsp;unified&nbsp;diffs</a>
624 @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
625 @ show&nbsp;side-by-side&nbsp;diffs</a>
626 }
627 }else{
628 if( showDiff ){
629 @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
630 if( sideBySide ){
631 @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
632 @ unified&nbsp;diffs</a>
633 }else{
634 @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName))
635 @ side-by-side&nbsp;diffs</a>
636 }
637 }else{
638 @ %z(xhref("class='button'","%R/vinfo/%T?sbs=0",zName))
639 @ show&nbsp;unified&nbsp;diffs</a>
640 @ %z(xhref("class='button'","%R/vinfo/%T?sbs=1",zName))
641 @ show&nbsp;side-by-side&nbsp;diffs</a>
642 }
643 }
644 @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
645 @ patch</a></div>
646 db_prepare(&q,
647 "SELECT name,"
648 " mperm,"
649 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
650
+59 -24
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -673,11 +673,11 @@
673673
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
674674
** [sqlite_version()] and [sqlite_source_id()].
675675
*/
676676
#define SQLITE_VERSION "3.7.14"
677677
#define SQLITE_VERSION_NUMBER 3007014
678
-#define SQLITE_SOURCE_ID "2012-08-24 23:56:19 62678be3df35cdcb09172ba8c860f7b73517f1ea"
678
+#define SQLITE_SOURCE_ID "2012-09-03 15:42:36 c0d89d4a9752922f9e367362366efde4f1b06f2a"
679679
680680
/*
681681
** CAPI3REF: Run-Time Library Version Numbers
682682
** KEYWORDS: sqlite3_version, sqlite3_sourceid
683683
**
@@ -1081,11 +1081,11 @@
10811081
10821082
/*
10831083
** CAPI3REF: Device Characteristics
10841084
**
10851085
** The xDeviceCharacteristics method of the [sqlite3_io_methods]
1086
-** object returns an integer which is a vector of the these
1086
+** object returns an integer which is a vector of these
10871087
** bit values expressing I/O characteristics of the mass storage
10881088
** device that holds the file that the [sqlite3_io_methods]
10891089
** refers to.
10901090
**
10911091
** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -3231,10 +3231,16 @@
32313231
** <b>Note to Windows users:</b> The encoding used for the filename argument
32323232
** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
32333233
** codepage is currently defined. Filenames containing international
32343234
** characters must be converted to UTF-8 prior to passing them into
32353235
** sqlite3_open() or sqlite3_open_v2().
3236
+**
3237
+** <b>Note to Windows Runtime users:</b> The temporary directory must be set
3238
+** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3239
+** features that require the use of temporary files may fail.
3240
+**
3241
+** See also: [sqlite3_temp_directory]
32363242
*/
32373243
SQLITE_API int sqlite3_open(
32383244
const char *filename, /* Database filename (UTF-8) */
32393245
sqlite3 **ppDb /* OUT: SQLite db handle */
32403246
);
@@ -5035,10 +5041,25 @@
50355041
** [sqlite3_malloc] and the pragma may attempt to free that memory
50365042
** using [sqlite3_free].
50375043
** Hence, if this variable is modified directly, either it should be
50385044
** made NULL or made to point to memory obtained from [sqlite3_malloc]
50395045
** or else the use of the [temp_store_directory pragma] should be avoided.
5046
+**
5047
+** <b>Note to Windows Runtime users:</b> The temporary directory must be set
5048
+** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various
5049
+** features that require the use of temporary files may fail. Here is an
5050
+** example of how to do this using C++ with the Windows Runtime:
5051
+**
5052
+** <blockquote><pre>
5053
+** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
5054
+** &nbsp; TemporaryFolder->Path->Data();
5055
+** char zPathBuf&#91;MAX_PATH + 1&#93;;
5056
+** memset(zPathBuf, 0, sizeof(zPathBuf));
5057
+** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
5058
+** &nbsp; NULL, NULL);
5059
+** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
5060
+** </pre></blockquote>
50405061
*/
50415062
SQLITE_API char *sqlite3_temp_directory;
50425063
50435064
/*
50445065
** CAPI3REF: Name Of The Folder Holding Database Files
@@ -10893,11 +10914,11 @@
1089310914
};
1089410915
1089510916
/*
1089610917
** For each nested loop in a WHERE clause implementation, the WhereInfo
1089710918
** structure contains a single instance of this structure. This structure
10898
-** is intended to be private the the where.c module and should not be
10919
+** is intended to be private to the where.c module and should not be
1089910920
** access or modified by other modules.
1090010921
**
1090110922
** The pIdxInfo field is used to help pick the best index on a
1090210923
** virtual table. The pIdxInfo pointer contains indexing
1090310924
** information for the i-th table in the FROM clause before reordering.
@@ -23794,11 +23815,11 @@
2379423815
** strerror_r().
2379523816
**
2379623817
** The first argument passed to the macro should be the error code that
2379723818
** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).
2379823819
** The two subsequent arguments should be the name of the OS function that
23799
-** failed (e.g. "unlink", "open") and the the associated file-system path,
23820
+** failed (e.g. "unlink", "open") and the associated file-system path,
2380023821
** if any.
2380123822
*/
2380223823
#define unixLogError(a,b,c) unixLogErrorAtLine(a,b,c,__LINE__)
2380323824
static int unixLogErrorAtLine(
2380423825
int errcode, /* SQLite error code */
@@ -23817,11 +23838,11 @@
2381723838
char aErr[80];
2381823839
memset(aErr, 0, sizeof(aErr));
2381923840
zErr = aErr;
2382023841
2382123842
/* If STRERROR_R_CHAR_P (set by autoconf scripts) or __USE_GNU is defined,
23822
- ** assume that the system provides the the GNU version of strerror_r() that
23843
+ ** assume that the system provides the GNU version of strerror_r() that
2382323844
** returns a pointer to a buffer containing the error message. That pointer
2382423845
** may point to aErr[], or it may point to some static storage somewhere.
2382523846
** Otherwise, assume that the system provides the POSIX version of
2382623847
** strerror_r(), which always writes an error message into aErr[].
2382723848
**
@@ -31306,11 +31327,11 @@
3130631327
** FormatMessage.
3130731328
**
3130831329
** The first argument passed to the macro should be the error code that
3130931330
** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).
3131031331
** The two subsequent arguments should be the name of the OS function that
31311
-** failed and the the associated file-system path, if any.
31332
+** failed and the associated file-system path, if any.
3131231333
*/
3131331334
#define winLogError(a,b,c,d) winLogErrorAtLine(a,b,c,d,__LINE__)
3131431335
static int winLogErrorAtLine(
3131531336
int errcode, /* SQLite error code */
3131631337
DWORD lastErrno, /* Win32 last error */
@@ -33431,10 +33452,17 @@
3343133452
|| eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
3343233453
);
3343333454
3343433455
assert( id!=0 );
3343533456
UNUSED_PARAMETER(pVfs);
33457
+
33458
+#if SQLITE_OS_WINRT
33459
+ if( !sqlite3_temp_directory ){
33460
+ sqlite3_log(SQLITE_ERROR,
33461
+ "sqlite3_temp_directory variable should be set for WinRT");
33462
+ }
33463
+#endif
3343633464
3343733465
pFile->h = INVALID_HANDLE_VALUE;
3343833466
3343933467
/* If the second argument to this function is NULL, generate a
3344033468
** temporary file name to use
@@ -33745,11 +33773,11 @@
3374533773
}else{
3374633774
attr = sAttrData.dwFileAttributes;
3374733775
}
3374833776
}else{
3374933777
logIoerr(cnt);
33750
- if( lastErrno!=ERROR_FILE_NOT_FOUND ){
33778
+ if( lastErrno!=ERROR_FILE_NOT_FOUND && lastErrno!=ERROR_PATH_NOT_FOUND ){
3375133779
winLogError(SQLITE_IOERR_ACCESS, lastErrno, "winAccess", zFilename);
3375233780
sqlite3_free(zConverted);
3375333781
return SQLITE_IOERR_ACCESS;
3375433782
}else{
3375533783
attr = INVALID_FILE_ATTRIBUTES;
@@ -36710,11 +36738,11 @@
3671036738
return 0;
3671136739
}
3671236740
}
3671336741
3671436742
/*
36715
-** Check to see if element iRowid was inserted into the the rowset as
36743
+** Check to see if element iRowid was inserted into the rowset as
3671636744
** part of any insert batch prior to iBatch. Return 1 or 0.
3671736745
**
3671836746
** If this is the first test of a new batch and if there exist entires
3671936747
** on pRowSet->pEntry, then sort those entires into the forest at
3672036748
** pRowSet->pForest so that they can be tested.
@@ -36994,11 +37022,11 @@
3699437022
** (6) If a master journal file is used, then all writes to the database file
3699537023
** are synced prior to the master journal being deleted.
3699637024
**
3699737025
** Definition: Two databases (or the same database at two points it time)
3699837026
** are said to be "logically equivalent" if they give the same answer to
36999
-** all queries. Note in particular the the content of freelist leaf
37027
+** all queries. Note in particular the content of freelist leaf
3700037028
** pages can be changed arbitarily without effecting the logical equivalence
3700137029
** of the database.
3700237030
**
3700337031
** (7) At any time, if any subset, including the empty set and the total set,
3700437032
** of the unsynced changes to a rollback journal are removed and the
@@ -40768,11 +40796,11 @@
4076840796
** been written to the journal have actually reached the surface of the
4076940797
** disk and can be restored in the event of a hot-journal rollback.
4077040798
**
4077140799
** If the Pager.noSync flag is set, then this function is a no-op.
4077240800
** Otherwise, the actions required depend on the journal-mode and the
40773
-** device characteristics of the the file-system, as follows:
40801
+** device characteristics of the file-system, as follows:
4077440802
**
4077540803
** * If the journal file is an in-memory journal file, no action need
4077640804
** be taken.
4077740805
**
4077840806
** * Otherwise, if the device does not support the SAFE_APPEND property,
@@ -44007,11 +44035,11 @@
4400744035
**
4400844036
** The wal-index consists of a header region, followed by an one or
4400944037
** more index blocks.
4401044038
**
4401144039
** The wal-index header contains the total number of frames within the WAL
44012
-** in the the mxFrame field.
44040
+** in the mxFrame field.
4401344041
**
4401444042
** Each index block except for the first contains information on
4401544043
** HASHTABLE_NPAGE frames. The first index block contains information on
4401644044
** HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and
4401744045
** HASHTABLE_NPAGE are selected so that together the wal-index header and
@@ -53980,11 +54008,11 @@
5398054008
assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );
5398154009
5398254010
/*
5398354011
** Load pointers to all cells on sibling pages and the divider cells
5398454012
** into the local apCell[] array. Make copies of the divider cells
53985
- ** into space obtained from aSpace1[] and remove the the divider Cells
54013
+ ** into space obtained from aSpace1[] and remove the divider cells
5398654014
** from pParent.
5398754015
**
5398854016
** If the siblings are on leaf pages, then the child pointers of the
5398954017
** divider cells are stripped from the cells before they are copied
5399054018
** into aSpace1[]. In this way, all cells in apCell[] are without
@@ -58861,11 +58889,11 @@
5886158889
}
5886258890
}
5886358891
5886458892
#ifndef NDEBUG
5886558893
/*
58866
-** Change the comment on the the most recently coded instruction. Or
58894
+** Change the comment on the most recently coded instruction. Or
5886758895
** insert a No-op and add the comment to that new instruction. This
5886858896
** makes the code easier to read during debugging. None of this happens
5886958897
** in a production build.
5887058898
*/
5887158899
static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
@@ -64073,11 +64101,11 @@
6407364101
}
6407464102
nProgressOps++;
6407564103
}
6407664104
#endif
6407764105
64078
- /* On any opcode with the "out2-prerelase" tag, free any
64106
+ /* On any opcode with the "out2-prerelease" tag, free any
6407964107
** external allocations out of mem[p2] and set mem[p2] to be
6408064108
** an undefined integer. Opcodes will either fill in the integer
6408164109
** value or convert mem[p2] to a different type.
6408264110
*/
6408364111
assert( pOp->opflags==sqlite3OpcodeProperty[pOp->opcode] );
@@ -82638,11 +82666,11 @@
8263882666
iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
8263982667
if( iDb<0 ) goto exit_create_index;
8264082668
assert( pName && pName->z );
8264182669
8264282670
#ifndef SQLITE_OMIT_TEMPDB
82643
- /* If the index name was unqualified, check if the the table
82671
+ /* If the index name was unqualified, check if the table
8264482672
** is a temp table. If so, set the database to 1. Do not do this
8264582673
** if initialising a database schema.
8264682674
*/
8264782675
if( !db->init.busy ){
8264882676
pTab = sqlite3SrcListLookup(pParse, pTblName);
@@ -89192,11 +89220,11 @@
8919289220
break;
8919389221
}
8919489222
case OE_Replace: {
8919589223
/* If there are DELETE triggers on this table and the
8919689224
** recursive-triggers flag is set, call GenerateRowDelete() to
89197
- ** remove the conflicting row from the the table. This will fire
89225
+ ** remove the conflicting row from the table. This will fire
8919889226
** the triggers and remove both the table and index b-tree entries.
8919989227
**
8920089228
** Otherwise, if there are no triggers or the recursive-triggers
8920189229
** flag is not set, but the table has one or more indexes, call
8920289230
** GenerateRowIndexDelete(). This removes the index b-tree entries
@@ -95499,11 +95527,11 @@
9549995527
sqlite3ExprCodeCopy(pParse, pIn->iSdst, regPrev+1, pIn->nSdst);
9550095528
sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
9550195529
}
9550295530
if( pParse->db->mallocFailed ) return 0;
9550395531
95504
- /* Suppress the the first OFFSET entries if there is an OFFSET clause
95532
+ /* Suppress the first OFFSET entries if there is an OFFSET clause
9550595533
*/
9550695534
codeOffset(v, p, iContinue);
9550795535
9550895536
switch( pDest->eDest ){
9550995537
/* Store the result as data using a unique key.
@@ -96217,10 +96245,16 @@
9621796245
** rules (11), (13) and (14), they may also contain ORDER BY,
9621896246
** LIMIT and OFFSET clauses. The subquery cannot use any compound
9621996247
** operator other than UNION ALL because all the other compound
9622096248
** operators have an implied DISTINCT which is disallowed by
9622196249
** restriction (4).
96250
+**
96251
+** Also, each component of the sub-query must return the same number
96252
+** of result columns. This is actually a requirement for any compound
96253
+** SELECT statement, but all the code here does is make sure that no
96254
+** such (illegal) sub-query is flattened. The caller will detect the
96255
+** syntax error and return a detailed message.
9622296256
**
9622396257
** (18) If the sub-query is a compound select, then all terms of the
9622496258
** ORDER by clause of the parent must be simple references to
9622596259
** columns of the sub-query.
9622696260
**
@@ -96361,10 +96395,11 @@
9636196395
testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
9636296396
assert( pSub->pSrc!=0 );
9636396397
if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
9636496398
|| (pSub1->pPrior && pSub1->op!=TK_ALL)
9636596399
|| pSub1->pSrc->nSrc<1
96400
+ || pSub->pEList->nExpr!=pSub1->pEList->nExpr
9636696401
){
9636796402
return 0;
9636896403
}
9636996404
testcase( pSub1->pSrc->nSrc>1 );
9637096405
}
@@ -98467,11 +98502,11 @@
9846798502
goto trigger_cleanup;
9846898503
}
9846998504
iDb = 1;
9847098505
pName = pName1;
9847198506
}else{
98472
- /* Figure out the db that the the trigger will be created in */
98507
+ /* Figure out the db that the trigger will be created in */
9847398508
iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
9847498509
if( iDb<0 ){
9847598510
goto trigger_cleanup;
9847698511
}
9847798512
}
@@ -100636,11 +100671,11 @@
100636100671
SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
100637100672
sqlite3 *db = pVTab->db;
100638100673
100639100674
assert( db );
100640100675
assert( pVTab->nRef>0 );
100641
- assert( sqlite3SafetyCheckOk(db) );
100676
+ assert( db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE );
100642100677
100643100678
pVTab->nRef--;
100644100679
if( pVTab->nRef==0 ){
100645100680
sqlite3_vtab *p = pVTab->pVtab;
100646100681
if( p ){
@@ -106695,14 +106730,14 @@
106695106730
}else
106696106731
#endif
106697106732
if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
106698106733
Index *pIx = pLevel->plan.u.pIdx;
106699106734
KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx);
106700
- int iIdxCur = pLevel->iIdxCur;
106735
+ int iIndexCur = pLevel->iIdxCur;
106701106736
assert( pIx->pSchema==pTab->pSchema );
106702
- assert( iIdxCur>=0 );
106703
- sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIx->tnum, iDb,
106737
+ assert( iIndexCur>=0 );
106738
+ sqlite3VdbeAddOp4(v, OP_OpenRead, iIndexCur, pIx->tnum, iDb,
106704106739
(char*)pKey, P4_KEYINFO_HANDOFF);
106705106740
VdbeComment((v, "%s", pIx->zName));
106706106741
}
106707106742
sqlite3CodeVerifySchema(pParse, iDb);
106708106743
notReady &= ~getMask(pWC->pMaskSet, pTabItem->iCursor);
@@ -127465,11 +127500,11 @@
127465127500
rc = sqlite3Fts3SegReaderCursor(p, iLangid, iIndex, iLevel, 0, 0, 1, 0, &csr);
127466127501
if( rc!=SQLITE_OK || csr.nSegment==0 ) goto finished;
127467127502
127468127503
if( iLevel==FTS3_SEGCURSOR_ALL ){
127469127504
/* This call is to merge all segments in the database to a single
127470
- ** segment. The level of the new segment is equal to the the numerically
127505
+ ** segment. The level of the new segment is equal to the numerically
127471127506
** greatest segment level currently present in the database for this
127472127507
** index. The idx of the new segment is always 0. */
127473127508
if( csr.nSegment==1 ){
127474127509
rc = SQLITE_DONE;
127475127510
goto finished;
@@ -128095,11 +128130,11 @@
128095128130
128096128131
memcpy(pNode->key.a, zTerm, nTerm);
128097128132
pNode->key.n = nTerm;
128098128133
}
128099128134
}else{
128100
- /* Otherwise, flush the the current node of layer iLayer to disk.
128135
+ /* Otherwise, flush the current node of layer iLayer to disk.
128101128136
** Then allocate a new, empty sibling node. The key will be written
128102128137
** into the parent of this node. */
128103128138
rc = fts3WriteSegment(p, pNode->iBlock, pNode->block.a, pNode->block.n);
128104128139
128105128140
assert( pNode->block.nAlloc>=p->nNodeSize );
128106128141
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -673,11 +673,11 @@
673 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
674 ** [sqlite_version()] and [sqlite_source_id()].
675 */
676 #define SQLITE_VERSION "3.7.14"
677 #define SQLITE_VERSION_NUMBER 3007014
678 #define SQLITE_SOURCE_ID "2012-08-24 23:56:19 62678be3df35cdcb09172ba8c860f7b73517f1ea"
679
680 /*
681 ** CAPI3REF: Run-Time Library Version Numbers
682 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
683 **
@@ -1081,11 +1081,11 @@
1081
1082 /*
1083 ** CAPI3REF: Device Characteristics
1084 **
1085 ** The xDeviceCharacteristics method of the [sqlite3_io_methods]
1086 ** object returns an integer which is a vector of the these
1087 ** bit values expressing I/O characteristics of the mass storage
1088 ** device that holds the file that the [sqlite3_io_methods]
1089 ** refers to.
1090 **
1091 ** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -3231,10 +3231,16 @@
3231 ** <b>Note to Windows users:</b> The encoding used for the filename argument
3232 ** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
3233 ** codepage is currently defined. Filenames containing international
3234 ** characters must be converted to UTF-8 prior to passing them into
3235 ** sqlite3_open() or sqlite3_open_v2().
 
 
 
 
 
 
3236 */
3237 SQLITE_API int sqlite3_open(
3238 const char *filename, /* Database filename (UTF-8) */
3239 sqlite3 **ppDb /* OUT: SQLite db handle */
3240 );
@@ -5035,10 +5041,25 @@
5035 ** [sqlite3_malloc] and the pragma may attempt to free that memory
5036 ** using [sqlite3_free].
5037 ** Hence, if this variable is modified directly, either it should be
5038 ** made NULL or made to point to memory obtained from [sqlite3_malloc]
5039 ** or else the use of the [temp_store_directory pragma] should be avoided.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5040 */
5041 SQLITE_API char *sqlite3_temp_directory;
5042
5043 /*
5044 ** CAPI3REF: Name Of The Folder Holding Database Files
@@ -10893,11 +10914,11 @@
10893 };
10894
10895 /*
10896 ** For each nested loop in a WHERE clause implementation, the WhereInfo
10897 ** structure contains a single instance of this structure. This structure
10898 ** is intended to be private the the where.c module and should not be
10899 ** access or modified by other modules.
10900 **
10901 ** The pIdxInfo field is used to help pick the best index on a
10902 ** virtual table. The pIdxInfo pointer contains indexing
10903 ** information for the i-th table in the FROM clause before reordering.
@@ -23794,11 +23815,11 @@
23794 ** strerror_r().
23795 **
23796 ** The first argument passed to the macro should be the error code that
23797 ** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).
23798 ** The two subsequent arguments should be the name of the OS function that
23799 ** failed (e.g. "unlink", "open") and the the associated file-system path,
23800 ** if any.
23801 */
23802 #define unixLogError(a,b,c) unixLogErrorAtLine(a,b,c,__LINE__)
23803 static int unixLogErrorAtLine(
23804 int errcode, /* SQLite error code */
@@ -23817,11 +23838,11 @@
23817 char aErr[80];
23818 memset(aErr, 0, sizeof(aErr));
23819 zErr = aErr;
23820
23821 /* If STRERROR_R_CHAR_P (set by autoconf scripts) or __USE_GNU is defined,
23822 ** assume that the system provides the the GNU version of strerror_r() that
23823 ** returns a pointer to a buffer containing the error message. That pointer
23824 ** may point to aErr[], or it may point to some static storage somewhere.
23825 ** Otherwise, assume that the system provides the POSIX version of
23826 ** strerror_r(), which always writes an error message into aErr[].
23827 **
@@ -31306,11 +31327,11 @@
31306 ** FormatMessage.
31307 **
31308 ** The first argument passed to the macro should be the error code that
31309 ** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).
31310 ** The two subsequent arguments should be the name of the OS function that
31311 ** failed and the the associated file-system path, if any.
31312 */
31313 #define winLogError(a,b,c,d) winLogErrorAtLine(a,b,c,d,__LINE__)
31314 static int winLogErrorAtLine(
31315 int errcode, /* SQLite error code */
31316 DWORD lastErrno, /* Win32 last error */
@@ -33431,10 +33452,17 @@
33431 || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
33432 );
33433
33434 assert( id!=0 );
33435 UNUSED_PARAMETER(pVfs);
 
 
 
 
 
 
 
33436
33437 pFile->h = INVALID_HANDLE_VALUE;
33438
33439 /* If the second argument to this function is NULL, generate a
33440 ** temporary file name to use
@@ -33745,11 +33773,11 @@
33745 }else{
33746 attr = sAttrData.dwFileAttributes;
33747 }
33748 }else{
33749 logIoerr(cnt);
33750 if( lastErrno!=ERROR_FILE_NOT_FOUND ){
33751 winLogError(SQLITE_IOERR_ACCESS, lastErrno, "winAccess", zFilename);
33752 sqlite3_free(zConverted);
33753 return SQLITE_IOERR_ACCESS;
33754 }else{
33755 attr = INVALID_FILE_ATTRIBUTES;
@@ -36710,11 +36738,11 @@
36710 return 0;
36711 }
36712 }
36713
36714 /*
36715 ** Check to see if element iRowid was inserted into the the rowset as
36716 ** part of any insert batch prior to iBatch. Return 1 or 0.
36717 **
36718 ** If this is the first test of a new batch and if there exist entires
36719 ** on pRowSet->pEntry, then sort those entires into the forest at
36720 ** pRowSet->pForest so that they can be tested.
@@ -36994,11 +37022,11 @@
36994 ** (6) If a master journal file is used, then all writes to the database file
36995 ** are synced prior to the master journal being deleted.
36996 **
36997 ** Definition: Two databases (or the same database at two points it time)
36998 ** are said to be "logically equivalent" if they give the same answer to
36999 ** all queries. Note in particular the the content of freelist leaf
37000 ** pages can be changed arbitarily without effecting the logical equivalence
37001 ** of the database.
37002 **
37003 ** (7) At any time, if any subset, including the empty set and the total set,
37004 ** of the unsynced changes to a rollback journal are removed and the
@@ -40768,11 +40796,11 @@
40768 ** been written to the journal have actually reached the surface of the
40769 ** disk and can be restored in the event of a hot-journal rollback.
40770 **
40771 ** If the Pager.noSync flag is set, then this function is a no-op.
40772 ** Otherwise, the actions required depend on the journal-mode and the
40773 ** device characteristics of the the file-system, as follows:
40774 **
40775 ** * If the journal file is an in-memory journal file, no action need
40776 ** be taken.
40777 **
40778 ** * Otherwise, if the device does not support the SAFE_APPEND property,
@@ -44007,11 +44035,11 @@
44007 **
44008 ** The wal-index consists of a header region, followed by an one or
44009 ** more index blocks.
44010 **
44011 ** The wal-index header contains the total number of frames within the WAL
44012 ** in the the mxFrame field.
44013 **
44014 ** Each index block except for the first contains information on
44015 ** HASHTABLE_NPAGE frames. The first index block contains information on
44016 ** HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and
44017 ** HASHTABLE_NPAGE are selected so that together the wal-index header and
@@ -53980,11 +54008,11 @@
53980 assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );
53981
53982 /*
53983 ** Load pointers to all cells on sibling pages and the divider cells
53984 ** into the local apCell[] array. Make copies of the divider cells
53985 ** into space obtained from aSpace1[] and remove the the divider Cells
53986 ** from pParent.
53987 **
53988 ** If the siblings are on leaf pages, then the child pointers of the
53989 ** divider cells are stripped from the cells before they are copied
53990 ** into aSpace1[]. In this way, all cells in apCell[] are without
@@ -58861,11 +58889,11 @@
58861 }
58862 }
58863
58864 #ifndef NDEBUG
58865 /*
58866 ** Change the comment on the the most recently coded instruction. Or
58867 ** insert a No-op and add the comment to that new instruction. This
58868 ** makes the code easier to read during debugging. None of this happens
58869 ** in a production build.
58870 */
58871 static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
@@ -64073,11 +64101,11 @@
64073 }
64074 nProgressOps++;
64075 }
64076 #endif
64077
64078 /* On any opcode with the "out2-prerelase" tag, free any
64079 ** external allocations out of mem[p2] and set mem[p2] to be
64080 ** an undefined integer. Opcodes will either fill in the integer
64081 ** value or convert mem[p2] to a different type.
64082 */
64083 assert( pOp->opflags==sqlite3OpcodeProperty[pOp->opcode] );
@@ -82638,11 +82666,11 @@
82638 iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
82639 if( iDb<0 ) goto exit_create_index;
82640 assert( pName && pName->z );
82641
82642 #ifndef SQLITE_OMIT_TEMPDB
82643 /* If the index name was unqualified, check if the the table
82644 ** is a temp table. If so, set the database to 1. Do not do this
82645 ** if initialising a database schema.
82646 */
82647 if( !db->init.busy ){
82648 pTab = sqlite3SrcListLookup(pParse, pTblName);
@@ -89192,11 +89220,11 @@
89192 break;
89193 }
89194 case OE_Replace: {
89195 /* If there are DELETE triggers on this table and the
89196 ** recursive-triggers flag is set, call GenerateRowDelete() to
89197 ** remove the conflicting row from the the table. This will fire
89198 ** the triggers and remove both the table and index b-tree entries.
89199 **
89200 ** Otherwise, if there are no triggers or the recursive-triggers
89201 ** flag is not set, but the table has one or more indexes, call
89202 ** GenerateRowIndexDelete(). This removes the index b-tree entries
@@ -95499,11 +95527,11 @@
95499 sqlite3ExprCodeCopy(pParse, pIn->iSdst, regPrev+1, pIn->nSdst);
95500 sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
95501 }
95502 if( pParse->db->mallocFailed ) return 0;
95503
95504 /* Suppress the the first OFFSET entries if there is an OFFSET clause
95505 */
95506 codeOffset(v, p, iContinue);
95507
95508 switch( pDest->eDest ){
95509 /* Store the result as data using a unique key.
@@ -96217,10 +96245,16 @@
96217 ** rules (11), (13) and (14), they may also contain ORDER BY,
96218 ** LIMIT and OFFSET clauses. The subquery cannot use any compound
96219 ** operator other than UNION ALL because all the other compound
96220 ** operators have an implied DISTINCT which is disallowed by
96221 ** restriction (4).
 
 
 
 
 
 
96222 **
96223 ** (18) If the sub-query is a compound select, then all terms of the
96224 ** ORDER by clause of the parent must be simple references to
96225 ** columns of the sub-query.
96226 **
@@ -96361,10 +96395,11 @@
96361 testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
96362 assert( pSub->pSrc!=0 );
96363 if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
96364 || (pSub1->pPrior && pSub1->op!=TK_ALL)
96365 || pSub1->pSrc->nSrc<1
 
96366 ){
96367 return 0;
96368 }
96369 testcase( pSub1->pSrc->nSrc>1 );
96370 }
@@ -98467,11 +98502,11 @@
98467 goto trigger_cleanup;
98468 }
98469 iDb = 1;
98470 pName = pName1;
98471 }else{
98472 /* Figure out the db that the the trigger will be created in */
98473 iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
98474 if( iDb<0 ){
98475 goto trigger_cleanup;
98476 }
98477 }
@@ -100636,11 +100671,11 @@
100636 SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
100637 sqlite3 *db = pVTab->db;
100638
100639 assert( db );
100640 assert( pVTab->nRef>0 );
100641 assert( sqlite3SafetyCheckOk(db) );
100642
100643 pVTab->nRef--;
100644 if( pVTab->nRef==0 ){
100645 sqlite3_vtab *p = pVTab->pVtab;
100646 if( p ){
@@ -106695,14 +106730,14 @@
106695 }else
106696 #endif
106697 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
106698 Index *pIx = pLevel->plan.u.pIdx;
106699 KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx);
106700 int iIdxCur = pLevel->iIdxCur;
106701 assert( pIx->pSchema==pTab->pSchema );
106702 assert( iIdxCur>=0 );
106703 sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIx->tnum, iDb,
106704 (char*)pKey, P4_KEYINFO_HANDOFF);
106705 VdbeComment((v, "%s", pIx->zName));
106706 }
106707 sqlite3CodeVerifySchema(pParse, iDb);
106708 notReady &= ~getMask(pWC->pMaskSet, pTabItem->iCursor);
@@ -127465,11 +127500,11 @@
127465 rc = sqlite3Fts3SegReaderCursor(p, iLangid, iIndex, iLevel, 0, 0, 1, 0, &csr);
127466 if( rc!=SQLITE_OK || csr.nSegment==0 ) goto finished;
127467
127468 if( iLevel==FTS3_SEGCURSOR_ALL ){
127469 /* This call is to merge all segments in the database to a single
127470 ** segment. The level of the new segment is equal to the the numerically
127471 ** greatest segment level currently present in the database for this
127472 ** index. The idx of the new segment is always 0. */
127473 if( csr.nSegment==1 ){
127474 rc = SQLITE_DONE;
127475 goto finished;
@@ -128095,11 +128130,11 @@
128095
128096 memcpy(pNode->key.a, zTerm, nTerm);
128097 pNode->key.n = nTerm;
128098 }
128099 }else{
128100 /* Otherwise, flush the the current node of layer iLayer to disk.
128101 ** Then allocate a new, empty sibling node. The key will be written
128102 ** into the parent of this node. */
128103 rc = fts3WriteSegment(p, pNode->iBlock, pNode->block.a, pNode->block.n);
128104
128105 assert( pNode->block.nAlloc>=p->nNodeSize );
128106
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -673,11 +673,11 @@
673 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
674 ** [sqlite_version()] and [sqlite_source_id()].
675 */
676 #define SQLITE_VERSION "3.7.14"
677 #define SQLITE_VERSION_NUMBER 3007014
678 #define SQLITE_SOURCE_ID "2012-09-03 15:42:36 c0d89d4a9752922f9e367362366efde4f1b06f2a"
679
680 /*
681 ** CAPI3REF: Run-Time Library Version Numbers
682 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
683 **
@@ -1081,11 +1081,11 @@
1081
1082 /*
1083 ** CAPI3REF: Device Characteristics
1084 **
1085 ** The xDeviceCharacteristics method of the [sqlite3_io_methods]
1086 ** object returns an integer which is a vector of these
1087 ** bit values expressing I/O characteristics of the mass storage
1088 ** device that holds the file that the [sqlite3_io_methods]
1089 ** refers to.
1090 **
1091 ** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -3231,10 +3231,16 @@
3231 ** <b>Note to Windows users:</b> The encoding used for the filename argument
3232 ** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
3233 ** codepage is currently defined. Filenames containing international
3234 ** characters must be converted to UTF-8 prior to passing them into
3235 ** sqlite3_open() or sqlite3_open_v2().
3236 **
3237 ** <b>Note to Windows Runtime users:</b> The temporary directory must be set
3238 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
3239 ** features that require the use of temporary files may fail.
3240 **
3241 ** See also: [sqlite3_temp_directory]
3242 */
3243 SQLITE_API int sqlite3_open(
3244 const char *filename, /* Database filename (UTF-8) */
3245 sqlite3 **ppDb /* OUT: SQLite db handle */
3246 );
@@ -5035,10 +5041,25 @@
5041 ** [sqlite3_malloc] and the pragma may attempt to free that memory
5042 ** using [sqlite3_free].
5043 ** Hence, if this variable is modified directly, either it should be
5044 ** made NULL or made to point to memory obtained from [sqlite3_malloc]
5045 ** or else the use of the [temp_store_directory pragma] should be avoided.
5046 **
5047 ** <b>Note to Windows Runtime users:</b> The temporary directory must be set
5048 ** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various
5049 ** features that require the use of temporary files may fail. Here is an
5050 ** example of how to do this using C++ with the Windows Runtime:
5051 **
5052 ** <blockquote><pre>
5053 ** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
5054 ** &nbsp; TemporaryFolder->Path->Data();
5055 ** char zPathBuf&#91;MAX_PATH + 1&#93;;
5056 ** memset(zPathBuf, 0, sizeof(zPathBuf));
5057 ** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
5058 ** &nbsp; NULL, NULL);
5059 ** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
5060 ** </pre></blockquote>
5061 */
5062 SQLITE_API char *sqlite3_temp_directory;
5063
5064 /*
5065 ** CAPI3REF: Name Of The Folder Holding Database Files
@@ -10893,11 +10914,11 @@
10914 };
10915
10916 /*
10917 ** For each nested loop in a WHERE clause implementation, the WhereInfo
10918 ** structure contains a single instance of this structure. This structure
10919 ** is intended to be private to the where.c module and should not be
10920 ** access or modified by other modules.
10921 **
10922 ** The pIdxInfo field is used to help pick the best index on a
10923 ** virtual table. The pIdxInfo pointer contains indexing
10924 ** information for the i-th table in the FROM clause before reordering.
@@ -23794,11 +23815,11 @@
23815 ** strerror_r().
23816 **
23817 ** The first argument passed to the macro should be the error code that
23818 ** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).
23819 ** The two subsequent arguments should be the name of the OS function that
23820 ** failed (e.g. "unlink", "open") and the associated file-system path,
23821 ** if any.
23822 */
23823 #define unixLogError(a,b,c) unixLogErrorAtLine(a,b,c,__LINE__)
23824 static int unixLogErrorAtLine(
23825 int errcode, /* SQLite error code */
@@ -23817,11 +23838,11 @@
23838 char aErr[80];
23839 memset(aErr, 0, sizeof(aErr));
23840 zErr = aErr;
23841
23842 /* If STRERROR_R_CHAR_P (set by autoconf scripts) or __USE_GNU is defined,
23843 ** assume that the system provides the GNU version of strerror_r() that
23844 ** returns a pointer to a buffer containing the error message. That pointer
23845 ** may point to aErr[], or it may point to some static storage somewhere.
23846 ** Otherwise, assume that the system provides the POSIX version of
23847 ** strerror_r(), which always writes an error message into aErr[].
23848 **
@@ -31306,11 +31327,11 @@
31327 ** FormatMessage.
31328 **
31329 ** The first argument passed to the macro should be the error code that
31330 ** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN).
31331 ** The two subsequent arguments should be the name of the OS function that
31332 ** failed and the associated file-system path, if any.
31333 */
31334 #define winLogError(a,b,c,d) winLogErrorAtLine(a,b,c,d,__LINE__)
31335 static int winLogErrorAtLine(
31336 int errcode, /* SQLite error code */
31337 DWORD lastErrno, /* Win32 last error */
@@ -33431,10 +33452,17 @@
33452 || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
33453 );
33454
33455 assert( id!=0 );
33456 UNUSED_PARAMETER(pVfs);
33457
33458 #if SQLITE_OS_WINRT
33459 if( !sqlite3_temp_directory ){
33460 sqlite3_log(SQLITE_ERROR,
33461 "sqlite3_temp_directory variable should be set for WinRT");
33462 }
33463 #endif
33464
33465 pFile->h = INVALID_HANDLE_VALUE;
33466
33467 /* If the second argument to this function is NULL, generate a
33468 ** temporary file name to use
@@ -33745,11 +33773,11 @@
33773 }else{
33774 attr = sAttrData.dwFileAttributes;
33775 }
33776 }else{
33777 logIoerr(cnt);
33778 if( lastErrno!=ERROR_FILE_NOT_FOUND && lastErrno!=ERROR_PATH_NOT_FOUND ){
33779 winLogError(SQLITE_IOERR_ACCESS, lastErrno, "winAccess", zFilename);
33780 sqlite3_free(zConverted);
33781 return SQLITE_IOERR_ACCESS;
33782 }else{
33783 attr = INVALID_FILE_ATTRIBUTES;
@@ -36710,11 +36738,11 @@
36738 return 0;
36739 }
36740 }
36741
36742 /*
36743 ** Check to see if element iRowid was inserted into the rowset as
36744 ** part of any insert batch prior to iBatch. Return 1 or 0.
36745 **
36746 ** If this is the first test of a new batch and if there exist entires
36747 ** on pRowSet->pEntry, then sort those entires into the forest at
36748 ** pRowSet->pForest so that they can be tested.
@@ -36994,11 +37022,11 @@
37022 ** (6) If a master journal file is used, then all writes to the database file
37023 ** are synced prior to the master journal being deleted.
37024 **
37025 ** Definition: Two databases (or the same database at two points it time)
37026 ** are said to be "logically equivalent" if they give the same answer to
37027 ** all queries. Note in particular the content of freelist leaf
37028 ** pages can be changed arbitarily without effecting the logical equivalence
37029 ** of the database.
37030 **
37031 ** (7) At any time, if any subset, including the empty set and the total set,
37032 ** of the unsynced changes to a rollback journal are removed and the
@@ -40768,11 +40796,11 @@
40796 ** been written to the journal have actually reached the surface of the
40797 ** disk and can be restored in the event of a hot-journal rollback.
40798 **
40799 ** If the Pager.noSync flag is set, then this function is a no-op.
40800 ** Otherwise, the actions required depend on the journal-mode and the
40801 ** device characteristics of the file-system, as follows:
40802 **
40803 ** * If the journal file is an in-memory journal file, no action need
40804 ** be taken.
40805 **
40806 ** * Otherwise, if the device does not support the SAFE_APPEND property,
@@ -44007,11 +44035,11 @@
44035 **
44036 ** The wal-index consists of a header region, followed by an one or
44037 ** more index blocks.
44038 **
44039 ** The wal-index header contains the total number of frames within the WAL
44040 ** in the mxFrame field.
44041 **
44042 ** Each index block except for the first contains information on
44043 ** HASHTABLE_NPAGE frames. The first index block contains information on
44044 ** HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and
44045 ** HASHTABLE_NPAGE are selected so that together the wal-index header and
@@ -53980,11 +54008,11 @@
54008 assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );
54009
54010 /*
54011 ** Load pointers to all cells on sibling pages and the divider cells
54012 ** into the local apCell[] array. Make copies of the divider cells
54013 ** into space obtained from aSpace1[] and remove the divider cells
54014 ** from pParent.
54015 **
54016 ** If the siblings are on leaf pages, then the child pointers of the
54017 ** divider cells are stripped from the cells before they are copied
54018 ** into aSpace1[]. In this way, all cells in apCell[] are without
@@ -58861,11 +58889,11 @@
58889 }
58890 }
58891
58892 #ifndef NDEBUG
58893 /*
58894 ** Change the comment on the most recently coded instruction. Or
58895 ** insert a No-op and add the comment to that new instruction. This
58896 ** makes the code easier to read during debugging. None of this happens
58897 ** in a production build.
58898 */
58899 static void vdbeVComment(Vdbe *p, const char *zFormat, va_list ap){
@@ -64073,11 +64101,11 @@
64101 }
64102 nProgressOps++;
64103 }
64104 #endif
64105
64106 /* On any opcode with the "out2-prerelease" tag, free any
64107 ** external allocations out of mem[p2] and set mem[p2] to be
64108 ** an undefined integer. Opcodes will either fill in the integer
64109 ** value or convert mem[p2] to a different type.
64110 */
64111 assert( pOp->opflags==sqlite3OpcodeProperty[pOp->opcode] );
@@ -82638,11 +82666,11 @@
82666 iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
82667 if( iDb<0 ) goto exit_create_index;
82668 assert( pName && pName->z );
82669
82670 #ifndef SQLITE_OMIT_TEMPDB
82671 /* If the index name was unqualified, check if the table
82672 ** is a temp table. If so, set the database to 1. Do not do this
82673 ** if initialising a database schema.
82674 */
82675 if( !db->init.busy ){
82676 pTab = sqlite3SrcListLookup(pParse, pTblName);
@@ -89192,11 +89220,11 @@
89220 break;
89221 }
89222 case OE_Replace: {
89223 /* If there are DELETE triggers on this table and the
89224 ** recursive-triggers flag is set, call GenerateRowDelete() to
89225 ** remove the conflicting row from the table. This will fire
89226 ** the triggers and remove both the table and index b-tree entries.
89227 **
89228 ** Otherwise, if there are no triggers or the recursive-triggers
89229 ** flag is not set, but the table has one or more indexes, call
89230 ** GenerateRowIndexDelete(). This removes the index b-tree entries
@@ -95499,11 +95527,11 @@
95527 sqlite3ExprCodeCopy(pParse, pIn->iSdst, regPrev+1, pIn->nSdst);
95528 sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
95529 }
95530 if( pParse->db->mallocFailed ) return 0;
95531
95532 /* Suppress the first OFFSET entries if there is an OFFSET clause
95533 */
95534 codeOffset(v, p, iContinue);
95535
95536 switch( pDest->eDest ){
95537 /* Store the result as data using a unique key.
@@ -96217,10 +96245,16 @@
96245 ** rules (11), (13) and (14), they may also contain ORDER BY,
96246 ** LIMIT and OFFSET clauses. The subquery cannot use any compound
96247 ** operator other than UNION ALL because all the other compound
96248 ** operators have an implied DISTINCT which is disallowed by
96249 ** restriction (4).
96250 **
96251 ** Also, each component of the sub-query must return the same number
96252 ** of result columns. This is actually a requirement for any compound
96253 ** SELECT statement, but all the code here does is make sure that no
96254 ** such (illegal) sub-query is flattened. The caller will detect the
96255 ** syntax error and return a detailed message.
96256 **
96257 ** (18) If the sub-query is a compound select, then all terms of the
96258 ** ORDER by clause of the parent must be simple references to
96259 ** columns of the sub-query.
96260 **
@@ -96361,10 +96395,11 @@
96395 testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
96396 assert( pSub->pSrc!=0 );
96397 if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
96398 || (pSub1->pPrior && pSub1->op!=TK_ALL)
96399 || pSub1->pSrc->nSrc<1
96400 || pSub->pEList->nExpr!=pSub1->pEList->nExpr
96401 ){
96402 return 0;
96403 }
96404 testcase( pSub1->pSrc->nSrc>1 );
96405 }
@@ -98467,11 +98502,11 @@
98502 goto trigger_cleanup;
98503 }
98504 iDb = 1;
98505 pName = pName1;
98506 }else{
98507 /* Figure out the db that the trigger will be created in */
98508 iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
98509 if( iDb<0 ){
98510 goto trigger_cleanup;
98511 }
98512 }
@@ -100636,11 +100671,11 @@
100671 SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
100672 sqlite3 *db = pVTab->db;
100673
100674 assert( db );
100675 assert( pVTab->nRef>0 );
100676 assert( db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE );
100677
100678 pVTab->nRef--;
100679 if( pVTab->nRef==0 ){
100680 sqlite3_vtab *p = pVTab->pVtab;
100681 if( p ){
@@ -106695,14 +106730,14 @@
106730 }else
106731 #endif
106732 if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
106733 Index *pIx = pLevel->plan.u.pIdx;
106734 KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx);
106735 int iIndexCur = pLevel->iIdxCur;
106736 assert( pIx->pSchema==pTab->pSchema );
106737 assert( iIndexCur>=0 );
106738 sqlite3VdbeAddOp4(v, OP_OpenRead, iIndexCur, pIx->tnum, iDb,
106739 (char*)pKey, P4_KEYINFO_HANDOFF);
106740 VdbeComment((v, "%s", pIx->zName));
106741 }
106742 sqlite3CodeVerifySchema(pParse, iDb);
106743 notReady &= ~getMask(pWC->pMaskSet, pTabItem->iCursor);
@@ -127465,11 +127500,11 @@
127500 rc = sqlite3Fts3SegReaderCursor(p, iLangid, iIndex, iLevel, 0, 0, 1, 0, &csr);
127501 if( rc!=SQLITE_OK || csr.nSegment==0 ) goto finished;
127502
127503 if( iLevel==FTS3_SEGCURSOR_ALL ){
127504 /* This call is to merge all segments in the database to a single
127505 ** segment. The level of the new segment is equal to the numerically
127506 ** greatest segment level currently present in the database for this
127507 ** index. The idx of the new segment is always 0. */
127508 if( csr.nSegment==1 ){
127509 rc = SQLITE_DONE;
127510 goto finished;
@@ -128095,11 +128130,11 @@
128130
128131 memcpy(pNode->key.a, zTerm, nTerm);
128132 pNode->key.n = nTerm;
128133 }
128134 }else{
128135 /* Otherwise, flush the current node of layer iLayer to disk.
128136 ** Then allocate a new, empty sibling node. The key will be written
128137 ** into the parent of this node. */
128138 rc = fts3WriteSegment(p, pNode->iBlock, pNode->block.a, pNode->block.n);
128139
128140 assert( pNode->block.nAlloc>=p->nNodeSize );
128141
+23 -2
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.7.14"
111111
#define SQLITE_VERSION_NUMBER 3007014
112
-#define SQLITE_SOURCE_ID "2012-08-24 23:56:19 62678be3df35cdcb09172ba8c860f7b73517f1ea"
112
+#define SQLITE_SOURCE_ID "2012-09-03 15:42:36 c0d89d4a9752922f9e367362366efde4f1b06f2a"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
@@ -515,11 +515,11 @@
515515
516516
/*
517517
** CAPI3REF: Device Characteristics
518518
**
519519
** The xDeviceCharacteristics method of the [sqlite3_io_methods]
520
-** object returns an integer which is a vector of the these
520
+** object returns an integer which is a vector of these
521521
** bit values expressing I/O characteristics of the mass storage
522522
** device that holds the file that the [sqlite3_io_methods]
523523
** refers to.
524524
**
525525
** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -2665,10 +2665,16 @@
26652665
** <b>Note to Windows users:</b> The encoding used for the filename argument
26662666
** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
26672667
** codepage is currently defined. Filenames containing international
26682668
** characters must be converted to UTF-8 prior to passing them into
26692669
** sqlite3_open() or sqlite3_open_v2().
2670
+**
2671
+** <b>Note to Windows Runtime users:</b> The temporary directory must be set
2672
+** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
2673
+** features that require the use of temporary files may fail.
2674
+**
2675
+** See also: [sqlite3_temp_directory]
26702676
*/
26712677
SQLITE_API int sqlite3_open(
26722678
const char *filename, /* Database filename (UTF-8) */
26732679
sqlite3 **ppDb /* OUT: SQLite db handle */
26742680
);
@@ -4469,10 +4475,25 @@
44694475
** [sqlite3_malloc] and the pragma may attempt to free that memory
44704476
** using [sqlite3_free].
44714477
** Hence, if this variable is modified directly, either it should be
44724478
** made NULL or made to point to memory obtained from [sqlite3_malloc]
44734479
** or else the use of the [temp_store_directory pragma] should be avoided.
4480
+**
4481
+** <b>Note to Windows Runtime users:</b> The temporary directory must be set
4482
+** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various
4483
+** features that require the use of temporary files may fail. Here is an
4484
+** example of how to do this using C++ with the Windows Runtime:
4485
+**
4486
+** <blockquote><pre>
4487
+** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
4488
+** &nbsp; TemporaryFolder->Path->Data();
4489
+** char zPathBuf&#91;MAX_PATH + 1&#93;;
4490
+** memset(zPathBuf, 0, sizeof(zPathBuf));
4491
+** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
4492
+** &nbsp; NULL, NULL);
4493
+** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
4494
+** </pre></blockquote>
44744495
*/
44754496
SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
44764497
44774498
/*
44784499
** CAPI3REF: Name Of The Folder Holding Database Files
44794500
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.14"
111 #define SQLITE_VERSION_NUMBER 3007014
112 #define SQLITE_SOURCE_ID "2012-08-24 23:56:19 62678be3df35cdcb09172ba8c860f7b73517f1ea"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -515,11 +515,11 @@
515
516 /*
517 ** CAPI3REF: Device Characteristics
518 **
519 ** The xDeviceCharacteristics method of the [sqlite3_io_methods]
520 ** object returns an integer which is a vector of the these
521 ** bit values expressing I/O characteristics of the mass storage
522 ** device that holds the file that the [sqlite3_io_methods]
523 ** refers to.
524 **
525 ** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -2665,10 +2665,16 @@
2665 ** <b>Note to Windows users:</b> The encoding used for the filename argument
2666 ** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
2667 ** codepage is currently defined. Filenames containing international
2668 ** characters must be converted to UTF-8 prior to passing them into
2669 ** sqlite3_open() or sqlite3_open_v2().
 
 
 
 
 
 
2670 */
2671 SQLITE_API int sqlite3_open(
2672 const char *filename, /* Database filename (UTF-8) */
2673 sqlite3 **ppDb /* OUT: SQLite db handle */
2674 );
@@ -4469,10 +4475,25 @@
4469 ** [sqlite3_malloc] and the pragma may attempt to free that memory
4470 ** using [sqlite3_free].
4471 ** Hence, if this variable is modified directly, either it should be
4472 ** made NULL or made to point to memory obtained from [sqlite3_malloc]
4473 ** or else the use of the [temp_store_directory pragma] should be avoided.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4474 */
4475 SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
4476
4477 /*
4478 ** CAPI3REF: Name Of The Folder Holding Database Files
4479
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.14"
111 #define SQLITE_VERSION_NUMBER 3007014
112 #define SQLITE_SOURCE_ID "2012-09-03 15:42:36 c0d89d4a9752922f9e367362366efde4f1b06f2a"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -515,11 +515,11 @@
515
516 /*
517 ** CAPI3REF: Device Characteristics
518 **
519 ** The xDeviceCharacteristics method of the [sqlite3_io_methods]
520 ** object returns an integer which is a vector of these
521 ** bit values expressing I/O characteristics of the mass storage
522 ** device that holds the file that the [sqlite3_io_methods]
523 ** refers to.
524 **
525 ** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -2665,10 +2665,16 @@
2665 ** <b>Note to Windows users:</b> The encoding used for the filename argument
2666 ** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
2667 ** codepage is currently defined. Filenames containing international
2668 ** characters must be converted to UTF-8 prior to passing them into
2669 ** sqlite3_open() or sqlite3_open_v2().
2670 **
2671 ** <b>Note to Windows Runtime users:</b> The temporary directory must be set
2672 ** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
2673 ** features that require the use of temporary files may fail.
2674 **
2675 ** See also: [sqlite3_temp_directory]
2676 */
2677 SQLITE_API int sqlite3_open(
2678 const char *filename, /* Database filename (UTF-8) */
2679 sqlite3 **ppDb /* OUT: SQLite db handle */
2680 );
@@ -4469,10 +4475,25 @@
4475 ** [sqlite3_malloc] and the pragma may attempt to free that memory
4476 ** using [sqlite3_free].
4477 ** Hence, if this variable is modified directly, either it should be
4478 ** made NULL or made to point to memory obtained from [sqlite3_malloc]
4479 ** or else the use of the [temp_store_directory pragma] should be avoided.
4480 **
4481 ** <b>Note to Windows Runtime users:</b> The temporary directory must be set
4482 ** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various
4483 ** features that require the use of temporary files may fail. Here is an
4484 ** example of how to do this using C++ with the Windows Runtime:
4485 **
4486 ** <blockquote><pre>
4487 ** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
4488 ** &nbsp; TemporaryFolder->Path->Data();
4489 ** char zPathBuf&#91;MAX_PATH + 1&#93;;
4490 ** memset(zPathBuf, 0, sizeof(zPathBuf));
4491 ** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
4492 ** &nbsp; NULL, NULL);
4493 ** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
4494 ** </pre></blockquote>
4495 */
4496 SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
4497
4498 /*
4499 ** CAPI3REF: Name Of The Folder Holding Database Files
4500
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -549,11 +549,11 @@
549549
);
550550
@ <ul>
551551
while( db_step(&q)==SQLITE_ROW ){
552552
const char *zName = db_column_text(&q, 0);
553553
if( g.perm.Hyperlink ){
554
- @ <li>%z(xhref("class=\"taglink\"","%R/timeline?t=%T",zName))
554
+ @ <li>%z(xhref("class='taglink'","%R/timeline?t=%T",zName))
555555
@ %h(zName)</a></li>
556556
}else{
557557
@ <li><span class="tagDsp">%h(zName)</span></li>
558558
}
559559
}
560560
--- src/tag.c
+++ src/tag.c
@@ -549,11 +549,11 @@
549 );
550 @ <ul>
551 while( db_step(&q)==SQLITE_ROW ){
552 const char *zName = db_column_text(&q, 0);
553 if( g.perm.Hyperlink ){
554 @ <li>%z(xhref("class=\"taglink\"","%R/timeline?t=%T",zName))
555 @ %h(zName)</a></li>
556 }else{
557 @ <li><span class="tagDsp">%h(zName)</span></li>
558 }
559 }
560
--- src/tag.c
+++ src/tag.c
@@ -549,11 +549,11 @@
549 );
550 @ <ul>
551 while( db_step(&q)==SQLITE_ROW ){
552 const char *zName = db_column_text(&q, 0);
553 if( g.perm.Hyperlink ){
554 @ <li>%z(xhref("class='taglink'","%R/timeline?t=%T",zName))
555 @ %h(zName)</a></li>
556 }else{
557 @ <li><span class="tagDsp">%h(zName)</span></li>
558 }
559 }
560
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,11 @@
4848
*/
4949
void hyperlink_to_uuid(const char *zUuid){
5050
char z[UUID_SIZE+1];
5151
shorten_uuid(z, zUuid);
5252
if( g.perm.Hyperlink ){
53
- @ %z(xhref("class=\"timelineHistLink\"","%R/info/%s",z))[%s(z)]</a>
53
+ @ %z(xhref("class='timelineHistLink'","%R/info/%s",z))[%s(z)]</a>
5454
}else{
5555
@ <span class="timelineHistDsp">[%s(z)]</span>
5656
}
5757
}
5858
5959
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,11 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char z[UUID_SIZE+1];
51 shorten_uuid(z, zUuid);
52 if( g.perm.Hyperlink ){
53 @ %z(xhref("class=\"timelineHistLink\"","%R/info/%s",z))[%s(z)]</a>
54 }else{
55 @ <span class="timelineHistDsp">[%s(z)]</span>
56 }
57 }
58
59
--- src/timeline.c
+++ src/timeline.c
@@ -48,11 +48,11 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char z[UUID_SIZE+1];
51 shorten_uuid(z, zUuid);
52 if( g.perm.Hyperlink ){
53 @ %z(xhref("class='timelineHistLink'","%R/info/%s",z))[%s(z)]</a>
54 }else{
55 @ <span class="timelineHistDsp">[%s(z)]</span>
56 }
57 }
58
59

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button