| | @@ -244,42 +244,13 @@ |
| 244 | 244 | } |
| 245 | 245 | return 0; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /* |
| 249 | | -** Two SQL functions: |
| 250 | | -** |
| 251 | | -** config_is_reset(int) |
| 252 | | -** config_reset(int) |
| 253 | | -** |
| 254 | | -** The config_is_reset() function takes the integer valued argument and |
| 255 | | -** ANDs it against the static variable "configHasBeenReset" below. The |
| 256 | | -** function returns TRUE or FALSE depending on the result depending on |
| 257 | | -** whether or not the corresponding configuration table has been reset. The |
| 258 | | -** config_reset() function adds the bits to "configHasBeenReset" that |
| 259 | | -** are given in the argument. |
| 260 | | -** |
| 261 | | -** These functions are used below in the WHEN clause of a trigger to |
| 262 | | -** get the trigger to fire exactly once. |
| 249 | +** A mask of all configuration tables that have been reset already. |
| 263 | 250 | */ |
| 264 | 251 | static int configHasBeenReset = 0; |
| 265 | | -static void config_is_reset_function( |
| 266 | | - sqlite3_context *context, |
| 267 | | - int argc, |
| 268 | | - sqlite3_value **argv |
| 269 | | -){ |
| 270 | | - int m = sqlite3_value_int(argv[0]); |
| 271 | | - sqlite3_result_int(context, (configHasBeenReset&m)!=0 ); |
| 272 | | -} |
| 273 | | -static void config_reset_function( |
| 274 | | - sqlite3_context *context, |
| 275 | | - int argc, |
| 276 | | - sqlite3_value **argv |
| 277 | | -){ |
| 278 | | - int m = sqlite3_value_int(argv[0]); |
| 279 | | - configHasBeenReset |= m; |
| 280 | | -} |
| 281 | 252 | |
| 282 | 253 | /* |
| 283 | 254 | ** Mask of modified configuration sets |
| 284 | 255 | */ |
| 285 | 256 | static int rebuildMask = 0; |
| 286 | 257 | |