apenwarr-redo/t/flush-cache.sh
Avery Pennarun 1355ade7c7 Correctly handle a checksummed file that depends on a non-checksummed file.
We were rebuilding the checksummed file every time because redo-ifchange was
incorrectly assuming that a child's changed_runid that's greater than my
changed_runid means I'm dirty.  But if my checked_runid is >= the child's
checked_runid, then I'm clean, because my checksum didn't change.

Clear as mud?
2010-12-11 05:54:39 -08:00

9 lines
298 B
Bash
Executable file

#!/bin/sh
#echo "Flushing redo cache..." >&2
(
echo ".timeout 5000"
echo "pragma synchronous = off;"
echo "update Files set checked_runid=checked_runid-1, " \
" changed_runid=changed_runid-1, " \
" failed_runid=failed_runid-1;"
) | sqlite3 "$REDO_BASE/.redo/db.sqlite3"