Mark an branch in alter.c as always false. Only run the assert() on
the sqlite3_aggregate_count() function in func.c if the SQLITE_OMIT_DEPRECATED compile-time option is off. (CVS 6508) FossilOrigin-Name: c0bba77ae619e709f3fb068526073a4a83cf33b6
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that used to generate VDBE code
|
||||
** that implements the ALTER TABLE command.
|
||||
**
|
||||
** $Id: alter.c,v 1.55 2009/03/24 15:08:10 drh Exp $
|
||||
** $Id: alter.c,v 1.56 2009/04/15 13:39:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -225,7 +225,7 @@ static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
|
||||
#endif
|
||||
|
||||
v = sqlite3GetVdbe(pParse);
|
||||
if( !v ) return;
|
||||
if( NEVER(v==0) ) return;
|
||||
assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
|
||||
iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
|
||||
assert( iDb>=0 );
|
||||
|
||||
+3
-1
@@ -16,7 +16,7 @@
|
||||
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
|
||||
** All other code has file scope.
|
||||
**
|
||||
** $Id: func.c,v 1.231 2009/04/08 23:04:14 drh Exp $
|
||||
** $Id: func.c,v 1.232 2009/04/15 13:39:48 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdlib.h>
|
||||
@@ -1179,12 +1179,14 @@ static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
|
||||
p->n++;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
/* The sqlite3_aggregate_count() function is deprecated. But just to make
|
||||
** sure it still operates correctly, verify that its count agrees with our
|
||||
** internal count when using count(*) and when the total count can be
|
||||
** expressed as a 32-bit integer. */
|
||||
assert( argc==1 || p==0 || p->n>0x7fffffff
|
||||
|| p->n==sqlite3_aggregate_count(context) );
|
||||
#endif
|
||||
}
|
||||
static void countFinalize(sqlite3_context *context){
|
||||
CountCtx *p;
|
||||
|
||||
Reference in New Issue
Block a user