Hello community, here is the log from the commit of package sqlite3 for openSUSE:Factory checked in at 2016-04-12 19:00:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sqlite3 (Old) and /work/SRC/openSUSE:Factory/.sqlite3.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sqlite3" Changes: -------- --- /work/SRC/openSUSE:Factory/sqlite3/sqlite3.changes 2016-04-03 23:04:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.sqlite3.new/sqlite3.changes 2016-04-12 19:00:37.000000000 +0200 @@ -1,0 +2,10 @@ +Sat Apr 9 06:55:32 UTC 2016 - idon...@suse.com + +- Fix a boundary condition error introduced by version 3.12.0 that + can result in a crash during heavy SAVEPOINT usage. +- Fix views so that they inherit column datatypes from the table + that they are defined against, when possible. +- Fix the query planner so that IS and IS NULL operators are able to + drive an index on a LEFT OUTER JOIN. + +------------------------------------------------------------------- Old: ---- sqlite-autoconf-3120000.tar.gz sqlite-doc-3120000.zip New: ---- sqlite-autoconf-3120100.tar.gz sqlite-doc-3120100.zip ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sqlite3.spec ++++++ --- /var/tmp/diff_new_pack.0uefaJ/_old 2016-04-12 19:00:38.000000000 +0200 +++ /var/tmp/diff_new_pack.0uefaJ/_new 2016-04-12 19:00:38.000000000 +0200 @@ -19,9 +19,9 @@ # Simplify building on RH for Application:Geo (SR#212812). %define pname sqlite3 %define oname sqlite -%define tarversion 3120000 +%define tarversion 3120100 Name: %{pname} -Version: 3.12.0 +Version: 3.12.1 Release: 0 Summary: Embeddable SQL Database Engine License: SUSE-Public-Domain ++++++ sqlite-autoconf-3120000.tar.gz -> sqlite-autoconf-3120100.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/Makefile.msc new/sqlite-autoconf-3120100/Makefile.msc --- old/sqlite-autoconf-3120000/Makefile.msc 2016-03-29 12:47:26.000000000 +0200 +++ new/sqlite-autoconf-3120100/Makefile.msc 2016-04-08 17:47:53.000000000 +0200 @@ -256,6 +256,8 @@ # !IFNDEF EXT_FEATURE_FLAGS !IF $(FOR_WIN10)!=0 +EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_STAT4=1 +EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4=1 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_SYSTEM_MALLOC=1 EXT_FEATURE_FLAGS = $(EXT_FEATURE_FLAGS) -DSQLITE_OMIT_LOCALTIME=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/configure new/sqlite-autoconf-3120100/configure --- old/sqlite-autoconf-3120000/configure 2016-03-29 12:47:30.000000000 +0200 +++ new/sqlite-autoconf-3120100/configure 2016-04-08 17:47:57.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.12.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.12.1. # # Report bugs to <http://www.sqlite.org>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.12.0' -PACKAGE_STRING='sqlite 3.12.0' +PACKAGE_VERSION='3.12.1' +PACKAGE_STRING='sqlite 3.12.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1328,7 +1328,7 @@ # 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.12.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.12.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1398,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.12.0:";; + short | recursive ) echo "Configuration of sqlite 3.12.1:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.12.0 +sqlite configure 3.12.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1842,7 +1842,7 @@ 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.12.0, which was +It was created by sqlite $as_me 3.12.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2708,7 +2708,7 @@ # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.12.0' + VERSION='3.12.1' cat >>confdefs.h <<_ACEOF @@ -14088,7 +14088,7 @@ # 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.12.0, which was +This file was extended by sqlite $as_me 3.12.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14145,7 +14145,7 @@ 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.12.0 +sqlite config.status 3.12.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/configure.ac new/sqlite-autoconf-3120100/configure.ac --- old/sqlite-autoconf-3120000/configure.ac 2016-03-29 12:47:26.000000000 +0200 +++ new/sqlite-autoconf-3120100/configure.ac 2016-04-08 17:47:53.000000000 +0200 @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.12.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.12.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) # Use automake. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/sqlite3.c new/sqlite-autoconf-3120100/sqlite3.c --- old/sqlite-autoconf-3120000/sqlite3.c 2016-03-29 12:47:26.000000000 +0200 +++ new/sqlite-autoconf-3120100/sqlite3.c 2016-04-08 17:47:53.000000000 +0200 @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.12.0. By combining all the individual C code files into this +** version 3.12.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -336,9 +336,9 @@ ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.12.0" -#define SQLITE_VERSION_NUMBER 3012000 -#define SQLITE_SOURCE_ID "2016-03-29 10:14:15 e9bb4cf40f4971974a74468ef922bdee481c988b" +#define SQLITE_VERSION "3.12.1" +#define SQLITE_VERSION_NUMBER 3012001 +#define SQLITE_SOURCE_ID "2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -14393,6 +14393,7 @@ SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*); SQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3*,Table*); SQLITE_PRIVATE int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**); +SQLITE_PRIVATE void sqlite3SelectAddColumnTypeAndCollation(Parse*,Table*,Select*); SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*); SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *, int); SQLITE_PRIVATE Index *sqlite3PrimaryKeyIndex(Table*); @@ -84674,6 +84675,7 @@ #endif assert( (iAmt+iOfst)<=p->endpoint.iOffset ); + assert( p->readpoint.iOffset==0 || p->readpoint.pChunk!=0 ); if( p->readpoint.iOffset!=iOfst || iOfst==0 ){ sqlite3_int64 iOff = 0; for(pChunk=p->pFirst; @@ -84684,6 +84686,7 @@ } }else{ pChunk = p->readpoint.pChunk; + assert( pChunk!=0 ); } iChunkOffset = (int)(iOfst%p->nChunkSize); @@ -84695,7 +84698,7 @@ nRead -= iSpace; iChunkOffset = 0; } while( nRead>=0 && (pChunk=pChunk->pNext)!=0 && nRead>0 ); - p->readpoint.iOffset = iOfst+iAmt; + p->readpoint.iOffset = pChunk ? iOfst+iAmt : 0; p->readpoint.pChunk = pChunk; return SQLITE_OK; @@ -96650,44 +96653,55 @@ ** statement that defines the view. */ assert( pTable->pSelect ); - if( pTable->pCheck ){ + pSel = sqlite3SelectDup(db, pTable->pSelect, 0); + if( pSel ){ + n = pParse->nTab; + sqlite3SrcListAssignCursors(pParse, pSel->pSrc); + pTable->nCol = -1; db->lookaside.bDisable++; - sqlite3ColumnsFromExprList(pParse, pTable->pCheck, - &pTable->nCol, &pTable->aCol); - db->lookaside.bDisable--; - }else{ - pSel = sqlite3SelectDup(db, pTable->pSelect, 0); - if( pSel ){ - n = pParse->nTab; - sqlite3SrcListAssignCursors(pParse, pSel->pSrc); - pTable->nCol = -1; - db->lookaside.bDisable++; #ifndef SQLITE_OMIT_AUTHORIZATION - xAuth = db->xAuth; - db->xAuth = 0; - pSelTab = sqlite3ResultSetOfSelect(pParse, pSel); - db->xAuth = xAuth; -#else - pSelTab = sqlite3ResultSetOfSelect(pParse, pSel); -#endif - db->lookaside.bDisable--; - pParse->nTab = n; - if( pSelTab ){ - assert( pTable->aCol==0 ); - pTable->nCol = pSelTab->nCol; - pTable->aCol = pSelTab->aCol; - pSelTab->nCol = 0; - pSelTab->aCol = 0; - sqlite3DeleteTable(db, pSelTab); - assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) ); - }else{ - pTable->nCol = 0; - nErr++; + xAuth = db->xAuth; + db->xAuth = 0; + pSelTab = sqlite3ResultSetOfSelect(pParse, pSel); + db->xAuth = xAuth; +#else + pSelTab = sqlite3ResultSetOfSelect(pParse, pSel); +#endif + pParse->nTab = n; + if( pTable->pCheck ){ + /* CREATE VIEW name(arglist) AS ... + ** The names of the columns in the table are taken from + ** arglist which is stored in pTable->pCheck. The pCheck field + ** normally holds CHECK constraints on an ordinary table, but for + ** a VIEW it holds the list of column names. + */ + sqlite3ColumnsFromExprList(pParse, pTable->pCheck, + &pTable->nCol, &pTable->aCol); + if( db->mallocFailed==0 + && pParse->nErr==0 + && pTable->nCol==pSel->pEList->nExpr + ){ + sqlite3SelectAddColumnTypeAndCollation(pParse, pTable, pSel); } - sqlite3SelectDelete(db, pSel); - } else { + }else if( pSelTab ){ + /* CREATE VIEW name AS... without an argument list. Construct + ** the column names from the SELECT statement that defines the view. + */ + assert( pTable->aCol==0 ); + pTable->nCol = pSelTab->nCol; + pTable->aCol = pSelTab->aCol; + pSelTab->nCol = 0; + pSelTab->aCol = 0; + assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) ); + }else{ + pTable->nCol = 0; nErr++; } + if( pSelTab ) sqlite3DeleteTable(db, pSelTab); + sqlite3SelectDelete(db, pSel); + db->lookaside.bDisable--; + } else { + nErr++; } pTable->pSchema->schemaFlags |= DB_UnresetViews; #endif /* SQLITE_OMIT_VIEW */ @@ -112193,7 +112207,7 @@ ** This routine requires that all identifiers in the SELECT ** statement be resolved. */ -static void selectAddColumnTypeAndCollation( +SQLITE_PRIVATE void sqlite3SelectAddColumnTypeAndCollation( Parse *pParse, /* Parsing contexts */ Table *pTab, /* Add column type information to this table */ Select *pSelect /* SELECT used to determine types and collations */ @@ -112215,10 +112229,20 @@ sNC.pSrcList = pSelect->pSrc; a = pSelect->pEList->a; for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){ + const char *zType; + int n, m; p = a[i].pExpr; - columnType(&sNC, p, 0, 0, 0, &pCol->szEst); + zType = columnType(&sNC, p, 0, 0, 0, &pCol->szEst); szAll += pCol->szEst; pCol->affinity = sqlite3ExprAffinity(p); + if( zType && (m = sqlite3Strlen30(zType))>0 ){ + n = sqlite3Strlen30(pCol->zName); + pCol->zName = sqlite3DbReallocOrFree(db, pCol->zName, n+m+2); + if( pCol->zName ){ + memcpy(&pCol->zName[n+1], zType, m+1); + pCol->colFlags |= COLFLAG_HASTYPE; + } + } if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_BLOB; pColl = sqlite3ExprCollSeq(pParse, p); if( pColl && pCol->zColl==0 ){ @@ -112255,7 +112279,7 @@ pTab->zName = 0; pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) ); sqlite3ColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol); - selectAddColumnTypeAndCollation(pParse, pTab, pSelect); + sqlite3SelectAddColumnTypeAndCollation(pParse, pTab, pSelect); pTab->iPKey = -1; if( db->mallocFailed ){ sqlite3DeleteTable(db, pTab); @@ -115039,7 +115063,7 @@ Select *pSel = pFrom->pSelect; if( pSel ){ while( pSel->pPrior ) pSel = pSel->pPrior; - selectAddColumnTypeAndCollation(pParse, pTab, pSel); + sqlite3SelectAddColumnTypeAndCollation(pParse, pTab, pSel); } } } @@ -125728,8 +125752,6 @@ assert( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 ); if( pNew->wsFlags & WHERE_BTM_LIMIT ){ opMask = WO_LT|WO_LE; - }else if( /*pProbe->tnum<=0 ||*/ (pSrc->fg.jointype & JT_LEFT)!=0 ){ - opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE; }else{ opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE|WO_ISNULL|WO_IS; } @@ -125767,6 +125789,18 @@ ** to mix with a lower range bound from some other source */ if( pTerm->wtFlags & TERM_LIKEOPT && pTerm->eOperator==WO_LT ) continue; + /* Do not allow IS constraints from the WHERE clause to be used by the + ** right table of a LEFT JOIN. Only constraints in the ON clause are + ** allowed */ + if( (pSrc->fg.jointype & JT_LEFT)!=0 + && !ExprHasProperty(pTerm->pExpr, EP_FromJoin) + && (eOp & (WO_IS|WO_ISNULL))!=0 + ){ + testcase( eOp & WO_IS ); + testcase( eOp & WO_ISNULL ); + continue; + } + pNew->wsFlags = saved_wsFlags; pNew->u.btree.nEq = saved_nEq; pNew->nLTerm = saved_nLTerm; @@ -185424,7 +185458,7 @@ ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2016-03-29 10:14:15 e9bb4cf40f4971974a74468ef922bdee481c988b", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d", -1, SQLITE_TRANSIENT); } static int fts5Init(sqlite3 *db){ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/sqlite3.h new/sqlite-autoconf-3120100/sqlite3.h --- old/sqlite-autoconf-3120000/sqlite3.h 2016-03-29 12:47:26.000000000 +0200 +++ new/sqlite-autoconf-3120100/sqlite3.h 2016-04-08 17:47:53.000000000 +0200 @@ -111,9 +111,9 @@ ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.12.0" -#define SQLITE_VERSION_NUMBER 3012000 -#define SQLITE_SOURCE_ID "2016-03-29 10:14:15 e9bb4cf40f4971974a74468ef922bdee481c988b" +#define SQLITE_VERSION "3.12.1" +#define SQLITE_VERSION_NUMBER 3012001 +#define SQLITE_SOURCE_ID "2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d" /* ** CAPI3REF: Run-Time Library Version Numbers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/tea/configure new/sqlite-autoconf-3120100/tea/configure --- old/sqlite-autoconf-3120000/tea/configure 2016-03-29 12:47:31.000000000 +0200 +++ new/sqlite-autoconf-3120100/tea/configure 2016-04-08 17:47:58.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.12.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.12.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.12.0' -PACKAGE_STRING='sqlite 3.12.0' +PACKAGE_VERSION='3.12.1' +PACKAGE_STRING='sqlite 3.12.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1292,7 +1292,7 @@ # 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.12.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.12.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1353,7 +1353,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.12.0:";; + short | recursive ) echo "Configuration of sqlite 3.12.1:";; esac cat <<\_ACEOF @@ -1455,7 +1455,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.12.0 +sqlite configure 3.12.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1866,7 +1866,7 @@ 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.12.0, which was +It was created by sqlite $as_me 3.12.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -9365,7 +9365,7 @@ # 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.12.0, which was +This file was extended by sqlite $as_me 3.12.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9418,7 +9418,7 @@ 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.12.0 +sqlite config.status 3.12.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sqlite-autoconf-3120000/tea/configure.ac new/sqlite-autoconf-3120100/tea/configure.ac --- old/sqlite-autoconf-3120000/tea/configure.ac 2016-03-29 12:47:31.000000000 +0200 +++ new/sqlite-autoconf-3120100/tea/configure.ac 2016-04-08 17:47:57.000000000 +0200 @@ -19,7 +19,7 @@ # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([sqlite], [3.12.0]) +AC_INIT([sqlite], [3.12.1]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars.