SQLite

Check-in [627b428f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge the 3.29.0 updates into the begin-concurrent-pnu-wal2 branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent-pnu-wal2
Files: files | file ages | folders
SHA3-256: 627b428fc8ca0f233cb3ac82a43fc81a22cf81ea958e6b7f69d93a0e53e05d09
User & Date: drh 2019-07-10 18:40:29
Context
2019-09-16
12:29
Bring the begin-concurrent-pnu-wal2 branch up to date with all the latest enhancements on trunk. (check-in: 15593bf3 user: drh tags: begin-concurrent-pnu-wal2)
2019-07-10
18:40
Merge the 3.29.0 updates into the begin-concurrent-pnu-wal2 branch. (check-in: 627b428f user: drh tags: begin-concurrent-pnu-wal2)
18:30
Merge the 3.29.0 release into the wal2 branch. (check-in: 8baa4022 user: drh tags: wal2)
2019-07-08
21:25
Merge enhancments from wal2, which also merges trunk enhancements. (check-in: 08dcb459 user: drh tags: begin-concurrent-pnu-wal2)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtree.c.

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77








78
79
80
81
82
83
84
#ifndef SQLITE_CORE
  #include "sqlite3ext.h"
  SQLITE_EXTENSION_INIT1
#else
  #include "sqlite3.h"
#endif

#include <string.h>
#include <assert.h>
#include <stdio.h>

#ifndef SQLITE_AMALGAMATION
#include "sqlite3rtree.h"
typedef sqlite3_int64 i64;
typedef sqlite3_uint64 u64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;


#endif









/*  The following macro is used to suppress compiler warnings.
*/
#ifndef UNUSED_PARAMETER
# define UNUSED_PARAMETER(x) (void)(x)
#endif








<
<
<
<







>
>

>
>
>
>
>
>
>
>







59
60
61
62
63
64
65




66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef SQLITE_CORE
  #include "sqlite3ext.h"
  SQLITE_EXTENSION_INIT1
#else
  #include "sqlite3.h"
#endif





#ifndef SQLITE_AMALGAMATION
#include "sqlite3rtree.h"
typedef sqlite3_int64 i64;
typedef sqlite3_uint64 u64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
# define NDEBUG 1
#endif
#if defined(NDEBUG) && defined(SQLITE_DEBUG)
# undef NDEBUG
#endif
#endif

#include <string.h>
#include <stdio.h>
#include <assert.h>

/*  The following macro is used to suppress compiler warnings.
*/
#ifndef UNUSED_PARAMETER
# define UNUSED_PARAMETER(x) (void)(x)
#endif

Changes to src/vdbemem.c.

699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
** comparison of "r1==(double)i" you sometimes get an answer of false even
** though the r1 and (double)i values are bit-for-bit the same.
*/
int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){
  double r2 = (double)i;
  return r1==0.0
      || (memcmp(&r1, &r2, sizeof(r1))==0
          && i >= -2251799813685248 && i < 2251799813685248);
}

/*
** Convert pMem so that it has type MEM_Real or MEM_Int.
** Invalidate any prior representations.
**
** Every effort is made to force the conversion, even if the input







|







699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
** comparison of "r1==(double)i" you sometimes get an answer of false even
** though the r1 and (double)i values are bit-for-bit the same.
*/
int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){
  double r2 = (double)i;
  return r1==0.0
      || (memcmp(&r1, &r2, sizeof(r1))==0
          && i >= -2251799813685248LL && i < 2251799813685248LL);
}

/*
** Convert pMem so that it has type MEM_Real or MEM_Int.
** Invalidate any prior representations.
**
** Every effort is made to force the conversion, even if the input

Changes to test/windowfault.test.

205
206
207
208
209
210
211

212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
}
proc tmpread_injectstop {} {
  set ret [expr $::tmp_read_fail<=0]
  unset -nocomplain ::tmp_read_fail 
  return $ret
}


do_faultsim_test 9 -end 25 -faults tmpread -body {
  execsql {
    SELECT sum(y) OVER win FROM t
    WINDOW win AS (
      ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND 1800 FOLLOWING
    )
  }
} -test {
  faultsim_test_result {0 {}}
}

catch {db close}
tvfs delete

finish_test







>








|






205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
}
proc tmpread_injectstop {} {
  set ret [expr $::tmp_read_fail<=0]
  unset -nocomplain ::tmp_read_fail 
  return $ret
}

set L [db eval {SELECT 0.0 FROM t}]
do_faultsim_test 9 -end 25 -faults tmpread -body {
  execsql {
    SELECT sum(y) OVER win FROM t
    WINDOW win AS (
      ORDER BY x ROWS BETWEEN UNBOUNDED PRECEDING AND 1800 FOLLOWING
    )
  }
} -test {
  faultsim_test_result [list 0 $::L]
}

catch {db close}
tvfs delete

finish_test