[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#768356: marked as done (unblock: sqlite3/3.8.7.1-1)



Your message dated Thu, 06 Nov 2014 21:02:03 +0000
with message-id <12edc33200fb83b6bbf584c76a8641b3@mail.adsl.funky-badger.org>
and subject line Re: Bug#768356: unblock: sqlite3/3.8.7.1-1
has caused the Debian Bug report #768356,
regarding unblock: sqlite3/3.8.7.1-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
768356: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768356
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear Release Team,

Please consider the latest upload of sqlite3. Its an immediate bugfix
release to fix important issues. Quoting upstream[1]:
In PRAGMA journal_mode=TRUNCATE mode, call fsync() immediately after
truncating the journal file to ensure that the transaction is durable
across a power loss.
  * Fix an assertion fault that can occur when updating the NULL value
    of a field at the end of a table that was added using ALTER TABLE
    ADD COLUMN.
  * Do not attempt to use the strchrnul() function from the standard C
    library unless the HAVE_STRCHRNULL compile-time option is set.
  * Fix a couple of problems associated with running an UPDATE or DELETE
    on a VIEW with a rowid in the WHERE clause.

Such releases are rare and should (must) have updates.
The code debdiff is attached. I've the whole debdiff as well, but that
contains many small HTML updates in documentation and being big.

Thanks,
Laszlo/GCS

unblock sqlite3/3.8.7.1-1

[1] http://www.sqlite.org/releaselog/3_8_7_1.html
diff -Nur sqlite3-3.8.7/src/delete.c sqlite3-3.8.7.1/src/delete.c
--- sqlite3-3.8.7/src/delete.c	2014-10-17 18:38:28.000000000 +0000
+++ sqlite3-3.8.7.1/src/delete.c	2014-10-29 21:13:32.000000000 +0000
@@ -481,7 +481,7 @@
       assert( nKey==nPk );  /* OP_Found will use an unpacked key */
       assert( !IsVirtual(pTab) );
       if( aToOpen[iDataCur-iTabCur] ){
-        assert( pPk!=0 );
+        assert( pPk!=0 || pTab->pSelect!=0 );
         sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);
         VdbeCoverage(v);
       }
diff -Nur sqlite3-3.8.7/src/os_unix.c sqlite3-3.8.7.1/src/os_unix.c
--- sqlite3-3.8.7/src/os_unix.c	2014-11-06 16:17:55.000000000 +0000
+++ sqlite3-3.8.7.1/src/os_unix.c	2014-10-29 21:13:32.000000000 +0000
@@ -97,7 +97,7 @@
 # include <sys/mman.h>
 #endif
 
-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__)
+#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS
 # include <sys/ioctl.h>
 # if OS_VXWORKS
 #  include <semaphore.h>
@@ -2235,7 +2235,7 @@
 ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off or if
 ** compiling for VXWORKS.
 */
-#if (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) || defined(__GNU__)
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
 
 /*
 ** Retry flock() calls that fail with EINTR
@@ -5016,7 +5016,7 @@
   0                         /* xShmMap method */
 )
 
-#if (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) || defined(__GNU__)
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
 IOMETHODS(
   flockIoFinder,            /* Finder function name */
   flockIoMethods,           /* sqlite3_io_methods object name */
@@ -7484,8 +7484,6 @@
   static sqlite3_vfs aVfs[] = {
 #if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__))
     UNIXVFS("unix",          autolockIoFinder ),
-#elif defined(__GNU__)
-    UNIXVFS("unix",          flockIoFinder ),
 #else
     UNIXVFS("unix",          posixIoFinder ),
 #endif
diff -Nur sqlite3-3.8.7/src/pager.c sqlite3-3.8.7.1/src/pager.c
--- sqlite3-3.8.7/src/pager.c	2014-10-17 18:38:28.000000000 +0000
+++ sqlite3-3.8.7.1/src/pager.c	2014-10-29 21:13:32.000000000 +0000
@@ -1941,6 +1941,14 @@
         rc = SQLITE_OK;
       }else{
         rc = sqlite3OsTruncate(pPager->jfd, 0);
+        if( rc==SQLITE_OK && pPager->fullSync ){
+          /* Make sure the new file size is written into the inode right away.
+          ** Otherwise the journal might resurrect following a power loss and
+          ** cause the last transaction to roll back.  See
+          ** https://bugzilla.mozilla.org/show_bug.cgi?id=1072773
+          */
+          rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);
+        }
       }
       pPager->journalOff = 0;
     }else if( pPager->journalMode==PAGER_JOURNALMODE_PERSIST
diff -Nur sqlite3-3.8.7/src/printf.c sqlite3-3.8.7.1/src/printf.c
--- sqlite3-3.8.7/src/printf.c	2014-10-17 18:38:28.000000000 +0000
+++ sqlite3-3.8.7.1/src/printf.c	2014-10-29 21:13:32.000000000 +0000
@@ -21,11 +21,7 @@
 ** the glibc version so the glibc version is definitely preferred.
 */
 #if !defined(HAVE_STRCHRNUL)
-# if defined(linux)
-#  define HAVE_STRCHRNUL 1
-# else
-#  define HAVE_STRCHRNUL 0
-# endif
+# define HAVE_STRCHRNUL 0
 #endif
 
 
diff -Nur sqlite3-3.8.7/src/sqliteLimit.h sqlite3-3.8.7.1/src/sqliteLimit.h
--- sqlite3-3.8.7/src/sqliteLimit.h	2014-11-06 16:17:55.000000000 +0000
+++ sqlite3-3.8.7.1/src/sqliteLimit.h	2014-10-29 21:13:32.000000000 +0000
@@ -169,7 +169,7 @@
 ** SQLite will choose on its own.
 */
 #ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE
-# define SQLITE_MAX_DEFAULT_PAGE_SIZE 32768
+# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192
 #endif
 #if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
 # undef SQLITE_MAX_DEFAULT_PAGE_SIZE
diff -Nur sqlite3-3.8.7/src/update.c sqlite3-3.8.7.1/src/update.c
--- sqlite3-3.8.7/src/update.c	2014-10-17 18:38:28.000000000 +0000
+++ sqlite3-3.8.7.1/src/update.c	2014-10-29 21:13:32.000000000 +0000
@@ -431,8 +431,8 @@
 
   /* Top of the update loop */
   if( okOnePass ){
-    if( aToOpen[iDataCur-iBaseCur] ){
-      assert( pPk!=0 );
+    if( aToOpen[iDataCur-iBaseCur] && !isView ){
+      assert( pPk );
       sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelBreak, regKey, nKey);
       VdbeCoverageNeverTaken(v);
     }
diff -Nur sqlite3-3.8.7/src/vdbe.c sqlite3-3.8.7.1/src/vdbe.c
--- sqlite3-3.8.7/src/vdbe.c	2014-10-17 18:38:28.000000000 +0000
+++ sqlite3-3.8.7.1/src/vdbe.c	2014-10-29 21:13:32.000000000 +0000
@@ -2441,7 +2441,7 @@
       if( pOp->p4type==P4_MEM ){
         sqlite3VdbeMemShallowCopy(pDest, pOp->p4.pMem, MEM_Static);
       }else{
-        MemSetTypeFlag(pDest, MEM_Null);
+        sqlite3VdbeMemSetNull(pDest);
       }
       goto op_column_out;
     }

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
On 2014-11-06 18:51, Laszlo Boszormenyi (GCS) wrote:
Please consider the latest upload of sqlite3. Its an immediate bugfix
release to fix important issues. Quoting upstream[1]:
In PRAGMA journal_mode=TRUNCATE mode, call fsync() immediately after
truncating the journal file to ensure that the transaction is durable
across a power loss.
  * Fix an assertion fault that can occur when updating the NULL value
    of a field at the end of a table that was added using ALTER TABLE
    ADD COLUMN.
  * Do not attempt to use the strchrnul() function from the standard C
    library unless the HAVE_STRCHRNULL compile-time option is set.
* Fix a couple of problems associated with running an UPDATE or DELETE
    on a VIEW with a rowid in the WHERE clause.

Such releases are rare and should (must) have updates.

Unblocked.

Regards,

Adam

--- End Message ---

Reply to: