diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index cc1464f13..815583acb 100644 --- a/src/main.c +++ b/src/main.c @@ -4255,7 +4255,28 @@ int sqlite3_test_control(int op, ...){ break; } - + /* sqlite3_test_control(SQLITE_TESTCTRL_TRACEFLAGS, op, ptr) + ** + ** "ptr" is a pointer to a u32. + ** + ** op==0 Store the current sqlite3SelectTrace in *ptr + ** op==1 Set sqlite3SelectTrace to the value *ptr + ** op==3 Store the current sqlite3WhereTrace in *ptr + ** op==3 Set sqlite3WhereTrace to the value *ptr + */ + case SQLITE_TESTCTRL_TRACEFLAGS: { +#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG) + int op = va_arg(ap, int); + u32 *ptr = va_arg(ap, u32*); + switch( op ){ + case 0: *ptr = sqlite3SelectTrace; break; + case 1: sqlite3SelectTrace = *ptr; break; + case 2: *ptr = sqlite3WhereTrace; break; + case 3: sqlite3WhereTrace = *ptr; break; + } + break; +#endif + } } va_end(ap); #endif /* SQLITE_UNTESTABLE */ |