/ Check-in [051f4635]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix the build when using SQLITE_OMIT_PRAGMA.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 051f4635bf1e9618b108c4177b8ecc5762ed08e7
User & Date: drh 2011-06-03 13:02:57
Context
2011-06-03
13:06
Add shell scripts used for testing compiler warnings (tool/warnings.sh), for verifying that the library exports the correct symbols (tool/symbols.sh), and to demonstrate building a full-featured command-line shell (tool/build-shell.sh). check-in: 3aca9a92 user: drh tags: trunk
13:02
Fix the build when using SQLITE_OMIT_PRAGMA. check-in: 051f4635 user: drh tags: trunk
12:15
Fix an #ifdef of SQLITE_OMIT_VIRTUALTABLE that had an extra "_" character. check-in: 93e0be2b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
..
48
49
50
51
52
53
54






55
56
57
58
59
60
61
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the PRAGMA command.
*/
#include "sqliteInt.h"

/* Ignore this whole file if pragmas are disabled
*/
#if !defined(SQLITE_OMIT_PRAGMA)

/*
** Interpret the given string as a safety level.  Return 0 for OFF,
** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or 
** unrecognized string argument.
**
** Note that the values returned are one less that the values that
** should be passed into sqlite3BtreeSetSafetyLevel().  The is done
................................................................................

/*
** Interpret the given string as a boolean value.
*/
u8 sqlite3GetBoolean(const char *z){
  return getSafetyLevel(z)&1;
}







/*
** Interpret the given string as a locking mode value.
*/
static int getLockingMode(const char *z){
  if( z ){
    if( 0==sqlite3StrICmp(z, "exclusive") ) return PAGER_LOCKINGMODE_EXCLUSIVE;







<
<
<
<







 







>
>
>
>
>
>







9
10
11
12
13
14
15




16
17
18
19
20
21
22
..
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the PRAGMA command.
*/
#include "sqliteInt.h"





/*
** Interpret the given string as a safety level.  Return 0 for OFF,
** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or 
** unrecognized string argument.
**
** Note that the values returned are one less that the values that
** should be passed into sqlite3BtreeSetSafetyLevel().  The is done
................................................................................

/*
** Interpret the given string as a boolean value.
*/
u8 sqlite3GetBoolean(const char *z){
  return getSafetyLevel(z)&1;
}

/* The sqlite3GetBoolean() function is used by other modules but the
** remainder of this file is specific to PRAGMA processing.  So omit
** the rest of the file if PRAGMAs are omitted from the build.
*/
#if !defined(SQLITE_OMIT_PRAGMA)

/*
** Interpret the given string as a locking mode value.
*/
static int getLockingMode(const char *z){
  if( z ){
    if( 0==sqlite3StrICmp(z, "exclusive") ) return PAGER_LOCKINGMODE_EXCLUSIVE;