Introduced new schema debugdb_disk (on disk) and table debug_log .
Debug entries will now go to this new table based on the value of
variable admin-debug_output . If:
1) default behavior: write to stderr
2) write only to debugdb_disk.debug_log
3) 3 = 1+2 = write to stderr and to debugdb_disk.debug_log
All these functionalities exist only on debug build.
Table debugdb_disk.debug_log has also a column named "note" that can be used
to write user notes during debugging.
debugdb_disk->execute("CREATE TABLE IF NOT EXISTS debug_log (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , time INT NOT NULL , lapse INT NOT NULL , thread INT NOT NULL , file VARCHAR NOT NULL , line INT NOT NULL , funct VARCHAR NOT NULL , modnum INT NOT NULL , modname VARCHAR NOT NULL , verbosity INT NOT NULL , message VARCHAR , note VARCHAR , backtrace VARCHAR)");
debugdb_disk->execute("CREATE INDEX IF NOT EXISTS idx_debug_log_time ON debug_log (time)");
debugdb_disk->execute("CREATE INDEX IF NOT EXISTS idx_debug_log_thread ON debug_log (thread)");
debugdb_disk->execute("CREATE INDEX IF NOT EXISTS idx_debug_log_file ON debug_log (file)");
debugdb_disk->execute("CREATE INDEX IF NOT EXISTS idx_debug_log_file_line ON debug_log (file,line)");
debugdb_disk->execute("CREATE INDEX IF NOT EXISTS idx_debug_log_funct ON debug_log (funct)");
debugdb_disk->execute("CREATE INDEX IF NOT EXISTS idx_debug_log_modnum ON debug_log (modnum)");
debugdb_disk->execute("PRAGMA synchronous=0");
stringcmd="ATTACH DATABASE '"+debugdb_disk_path+"' AS debugdb_disk";