SQLite

Check-in [7530e1bf55]
Login

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

Overview
Comment:Merge the Makefile.msc fix and the compiler warning fix from trunk. Also fix another compiler warning in sqlite3session_diff().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sessions
Files: files | file ages | folders
SHA1: 7530e1bf557083ef91447a02f05b019dbe60fa70
User & Date: drh 2015-05-19 23:04:26.372
Context
2015-05-22
23:26
Merge enhancements from trunk, including the new sqlite3_value_dup() API and the addition of the apSqlParam field in the sqlite3_rtree_query_info object of R-Tree. (check-in: cdc0ca6fb3 user: drh tags: sessions)
2015-05-20
22:01
Add the sqlite3_value_dup() and sqlite3_value_free() interfaces and use those to add the sqlite3_rtree_query_info.apSqlParam field to the query callback in R-Tree. (check-in: 2007391cec user: drh tags: sessions-value-dup)
2015-05-19
23:04
Merge the Makefile.msc fix and the compiler warning fix from trunk. Also fix another compiler warning in sqlite3session_diff(). (check-in: 7530e1bf55 user: drh tags: sessions)
22:56
Fix the MSVC makefile so that it works with OTA. Fix a harmless compiler warning in FTS3. (check-in: c7b1664530 user: drh tags: trunk)
22:42
Merge recent trunk changes, include the R-Tree enhancement that allows 8-byte BLOB arguments to geometry functions, and the fix for the TEXT affinity problem that could cause corrupt indexes. (check-in: 0a0de8b72c user: drh tags: sessions)
Changes
Unified Diff Ignore Whitespace Patch
Changes to Makefile.msc.
1010
1011
1012
1013
1014
1015
1016
1017


1018
1019
1020
1021
1022
1023
1024
  $(TOP)\ext\fts3\fts3_unicode2.c \
  $(TOP)\ext\fts3\fts3_write.c \
  $(TOP)\ext\icu\sqliteicu.h \
  $(TOP)\ext\icu\icu.c \
  $(TOP)\ext\rtree\rtree.h \
  $(TOP)\ext\rtree\rtree.c \
  $(TOP)\ext\session\sqlite3session.h \
  $(TOP)\ext\session\sqlite3session.c




# Generated source code files
#
SRC5 = \
  keywordhash.h \
  opcodes.c \







|
>
>







1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
  $(TOP)\ext\fts3\fts3_unicode2.c \
  $(TOP)\ext\fts3\fts3_write.c \
  $(TOP)\ext\icu\sqliteicu.h \
  $(TOP)\ext\icu\icu.c \
  $(TOP)\ext\rtree\rtree.h \
  $(TOP)\ext\rtree\rtree.c \
  $(TOP)\ext\session\sqlite3session.h \
  $(TOP)\ext\session\sqlite3session.c \
  $(TOP)\ext\ota\sqlite3ota.h \
  $(TOP)\ext\ota\sqlite3ota.c


# Generated source code files
#
SRC5 = \
  keywordhash.h \
  opcodes.c \
1071
1072
1073
1074
1075
1076
1077
1078

1079
1080
1081
1082
1083
1084
1085
  $(TOP)\src\test_syscall.c \
  $(TOP)\src\test_tclvar.c \
  $(TOP)\src\test_thread.c \
  $(TOP)\src\test_vfs.c \
  $(TOP)\src\test_wsd.c \
  $(TOP)\ext\fts3\fts3_term.c \
  $(TOP)\ext\fts3\fts3_test.c \
  $(TOP)\ext\session\test_session.c


# Statically linked extensions
#
TESTEXT = \
  $(TOP)\ext\misc\amatch.c \
  $(TOP)\ext\misc\closure.c \
  $(TOP)\ext\misc\eval.c \







|
>







1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
  $(TOP)\src\test_syscall.c \
  $(TOP)\src\test_tclvar.c \
  $(TOP)\src\test_thread.c \
  $(TOP)\src\test_vfs.c \
  $(TOP)\src\test_wsd.c \
  $(TOP)\ext\fts3\fts3_term.c \
  $(TOP)\ext\fts3\fts3_test.c \
  $(TOP)\ext\session\test_session.c \
  $(TOP)\ext\ota\test_ota.c

# Statically linked extensions
#
TESTEXT = \
  $(TOP)\ext\misc\amatch.c \
  $(TOP)\ext\misc\closure.c \
  $(TOP)\ext\misc\eval.c \
Changes to ext/fts3/fts3_snippet.c.
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141

/*
** Allocate a two-slot MatchinfoBuffer object.
*/
static MatchinfoBuffer *fts3MIBufferNew(int nElem, const char *zMatchinfo){
  MatchinfoBuffer *pRet;
  int nByte = sizeof(u32) * (2*nElem + 2) + sizeof(MatchinfoBuffer);
  int nStr = strlen(zMatchinfo);

  pRet = sqlite3_malloc(nByte + nStr+1);
  if( pRet ){
    memset(pRet, 0, nByte);
    pRet->aMatchinfo[0] = (u8*)(&pRet->aMatchinfo[1]) - (u8*)pRet;
    pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0] + sizeof(u32)*(nElem+1);
    pRet->nElem = nElem;







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141

/*
** Allocate a two-slot MatchinfoBuffer object.
*/
static MatchinfoBuffer *fts3MIBufferNew(int nElem, const char *zMatchinfo){
  MatchinfoBuffer *pRet;
  int nByte = sizeof(u32) * (2*nElem + 2) + sizeof(MatchinfoBuffer);
  int nStr = (int)strlen(zMatchinfo);

  pRet = sqlite3_malloc(nByte + nStr+1);
  if( pRet ){
    memset(pRet, 0, nByte);
    pRet->aMatchinfo[0] = (u8*)(&pRet->aMatchinfo[1]) - (u8*)pRet;
    pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0] + sizeof(u32)*(nElem+1);
    pRet->nElem = nElem;
Changes to ext/session/sqlite3session.c.
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
            if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1;
            if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1;
            if( abPK[i] ) bHasPk = 1;
          }
        }

      }
      sqlite3_free(azCol);
      if( bMismatch ){
        *pzErrMsg = sqlite3_mprintf("table schemas do not match");
        rc = SQLITE_SCHEMA;
      }
      if( bHasPk==0 ){
        /* Ignore tables with no primary keys */
        goto diff_out;







|







1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
            if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1;
            if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1;
            if( abPK[i] ) bHasPk = 1;
          }
        }

      }
      sqlite3_free((char*)azCol);
      if( bMismatch ){
        *pzErrMsg = sqlite3_mprintf("table schemas do not match");
        rc = SQLITE_SCHEMA;
      }
      if( bHasPk==0 ){
        /* Ignore tables with no primary keys */
        goto diff_out;