2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A** The author disclaims copyright to this source code. In place of 2N/A** a legal notice, here is a blessing: 2N/A** May you do good and not evil. 2N/A** May you find forgiveness for yourself and forgive others. 2N/A** May you share freely, never taking more than you give. 2N/A************************************************************************* 2N/A** This file implements a simple standalone program used to test whether 2N/A** or not the SQLite library is threadsafe. 2N/A** This file is NOT part of the standard SQLite library. It is used for 2N/A** Name of the database 2N/A** When this variable becomes non-zero, all threads stop 2N/A** what they are doing. 2N/A** Callback from the integrity check. If the result is anything other 2N/A** than "ok" it means the integrity check has failed. Set the "all_stop" 2N/A** global variable to stop all other activity. Print the error message 2N/A** or print OK if the string "ok" is seen. 2N/A /* fprintf(stderr,"pid=%d. OK\n", getpid()); */ 2N/A** Do an integrity check on the database. If the first integrity check 2N/A** fails, try it a second time. 2N/A /* fprintf(stderr,"pid=%d: CHECK\n", getpid()); */ 2N/A** This is the worker thread 2N/A /* fprintf(stderr, "pid=%d: BEGIN\n", getpid()); */ 2N/A /* fprintf(stderr, "pid=%d: END rc=%d\n", getpid(), rc); */ 2N/A** Initialize the database and start the threads