mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Make the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS
values zero-based to agree with PRAGMA synchronous. FossilOrigin-Name: 592d2104361500e5002783ba329a2609389c57b9
This commit is contained in:
@@ -1006,10 +1006,23 @@ typedef struct With With;
|
||||
#include "mutex.h"
|
||||
|
||||
/*
|
||||
** Default synchronous levels
|
||||
** Default synchronous levels.
|
||||
**
|
||||
** Note that (for historcal reasons) the PAGER_SYNCHRONOUS_* macros differ
|
||||
** from the SQLITE_DEFAULT_SYNCHRONOUS value by 1.
|
||||
**
|
||||
** PAGER_SYNCHRONOUS DEFAULT_SYNCHRONOUS
|
||||
** OFF 1 0
|
||||
** NORMAL 2 1
|
||||
** FULL 3 2
|
||||
** EXTRA 4 3
|
||||
**
|
||||
** The "PRAGMA synchronous" statement also uses the zero-based numbers.
|
||||
** In other words, the zero-based numbers are used for all external interfaces
|
||||
** and the one-based values are used internally.
|
||||
*/
|
||||
#ifndef SQLITE_DEFAULT_SYNCHRONOUS
|
||||
# define SQLITE_DEFAULT_SYNCHRONOUS PAGER_SYNCHRONOUS_FULL
|
||||
# define SQLITE_DEFAULT_SYNCHRONOUS (PAGER_SYNCHRONOUS_FULL-1)
|
||||
#endif
|
||||
#ifndef SQLITE_DEFAULT_WAL_SYNCHRONOUS
|
||||
# define SQLITE_DEFAULT_WAL_SYNCHRONOUS SQLITE_DEFAULT_SYNCHRONOUS
|
||||
|
Reference in New Issue
Block a user