/ Check-in [94c95fad]
Login

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

Overview
Comment:Fix a compilation bug with SQLITE_OMIT_AUTOINIT. (CVS 5366)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 94c95fad56965b68176e93f0690f0819ad40bcf7
User & Date: danielk1977 2008-07-08 14:17:35
Context
2008-07-08
14:31
Another corruption related test case. (CVS 5367) check-in: f781a681 user: danielk1977 tags: trunk
14:17
Fix a compilation bug with SQLITE_OMIT_AUTOINIT. (CVS 5366) check-in: 94c95fad user: danielk1977 tags: trunk
12:07
Extra coverage tests for btree.c. (CVS 5365) check-in: 08334f60 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/loadext.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
474
475
476
477
478
479
480

481
482
483
484
485
486
487
488
489
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to dynamically load extensions into
** the SQLite library.
**
** $Id: loadext.c,v 1.50 2008/06/19 15:06:24 drh Exp $
*/

#ifndef SQLITE_CORE
  #define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */
#endif
#include "sqlite3ext.h"
#include "sqliteInt.h"
................................................................................


/*
** Register a statically linked extension that is automatically
** loaded by every new database connection.
*/
int sqlite3_auto_extension(void *xInit){

#ifndef SQLITE_OMIT_AUTOINIT
  int rc = sqlite3_initialize();
  if( rc ){
    return rc;
  }else
#endif
  {
    int i;
#ifndef SQLITE_MUTEX_NOOP







|







 







>

|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to dynamically load extensions into
** the SQLite library.
**
** $Id: loadext.c,v 1.51 2008/07/08 14:17:35 danielk1977 Exp $
*/

#ifndef SQLITE_CORE
  #define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */
#endif
#include "sqlite3ext.h"
#include "sqliteInt.h"
................................................................................


/*
** Register a statically linked extension that is automatically
** loaded by every new database connection.
*/
int sqlite3_auto_extension(void *xInit){
  int rc = SQLITE_OK;
#ifndef SQLITE_OMIT_AUTOINIT
  rc = sqlite3_initialize();
  if( rc ){
    return rc;
  }else
#endif
  {
    int i;
#ifndef SQLITE_MUTEX_NOOP

Changes to src/test_func.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
383
384
385
386
387
388
389

390
391
392
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Code for testing all sorts of SQLite interfaces.  This code
** implements new SQL functions used by the test scripts.
**
** $Id: test_func.c,v 1.6 2008/07/07 14:50:14 drh Exp $
*/
#include "sqlite3.h"
#include "tcl.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>

................................................................................
     { "autoinstall_test_functions",    autoinstall_test_funcs },
     { "abuse_create_function",         abuse_create_function  },
  };
  int i;
  for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){
    Tcl_CreateObjCommand(interp, aObjCmd[i].zName, aObjCmd[i].xProc, 0, 0);
  }

  sqlite3_auto_extension((void*)registerTestFunctions);
  return TCL_OK;
}







|







 







>



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
383
384
385
386
387
388
389
390
391
392
393
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Code for testing all sorts of SQLite interfaces.  This code
** implements new SQL functions used by the test scripts.
**
** $Id: test_func.c,v 1.7 2008/07/08 14:17:35 danielk1977 Exp $
*/
#include "sqlite3.h"
#include "tcl.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>

................................................................................
     { "autoinstall_test_functions",    autoinstall_test_funcs },
     { "abuse_create_function",         abuse_create_function  },
  };
  int i;
  for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){
    Tcl_CreateObjCommand(interp, aObjCmd[i].zName, aObjCmd[i].xProc, 0, 0);
  }
  sqlite3_initialize();
  sqlite3_auto_extension((void*)registerTestFunctions);
  return TCL_OK;
}