/ Check-in [72911fb1b0]
Login

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

Overview
Comment:Add the new noop_nd() debugging function to the noop.c extension.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 72911fb1b010ae093a161b9c0d21cbdedcbc1f924a55f12227fbe342bd978e08
User & Date: drh 2020-01-14 16:33:07
Context
2020-01-14
16:39
Remove an ALWAYS on a branch for improved database corruption detection in btree.c:freeSpace(). Test case found by dbsqlfuzz. (check-in: 54bf048119 user: drh tags: trunk)
16:33
Add the new noop_nd() debugging function to the noop.c extension. (check-in: 72911fb1b0 user: drh tags: trunk)
13:24
For the showdb utility program, more accurate detection of when the database is in autovacuum mode for the "pgidx" subcommand. (check-in: 9ce2192b81 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/misc/noop.c.

7
8
9
10
11
12
13







14
15
16
17
18
19
20
..
49
50
51
52
53
54
55




56
57
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** This SQLite extension implements a noop() function used for testing.







*/
#include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1
#include <assert.h>
#include <string.h>

/*
................................................................................
  rc = sqlite3_create_function(db, "noop_i", 1,
                     SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS,
                     0, noopfunc, 0, 0);
  if( rc ) return rc;
  rc = sqlite3_create_function(db, "noop_do", 1,
                     SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY,
                     0, noopfunc, 0, 0);




  return rc;
}







>
>
>
>
>
>
>







 







>
>
>
>


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
..
56
57
58
59
60
61
62
63
64
65
66
67
68
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** This SQLite extension implements a noop() function used for testing.
**
** Variants:
**
**    noop(X)           The default.  Deterministic.
**    noop_i(X)         Deterministic and innocuous.
**    noop_do(X)        Deterministic and direct-only.
**    noop_nd(X)        Non-deterministic.
*/
#include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1
#include <assert.h>
#include <string.h>

/*
................................................................................
  rc = sqlite3_create_function(db, "noop_i", 1,
                     SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS,
                     0, noopfunc, 0, 0);
  if( rc ) return rc;
  rc = sqlite3_create_function(db, "noop_do", 1,
                     SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY,
                     0, noopfunc, 0, 0);
  if( rc ) return rc;
  rc = sqlite3_create_function(db, "noop_nd", 1,
                     SQLITE_UTF8,
                     0, noopfunc, 0, 0);
  return rc;
}