dbsql/test/scr022/chk.rr

29 lines
727 B
Text
Raw Normal View History

2007-03-10 19:04:07 +00:00
#!/bin/sh -
#
# Check for DB_RUNRECOVERY being specified instead of a call to dbsql_panic.
2007-03-10 19:04:07 +00:00
d=../..
t1=__1
trap 'rm -f $t1' 0 1 2 3 13 15
egrep DBSQL_RUNRECOVERY $d/*/*.c $d/*/*/*.c |
sed -e '/__db_panic(.*, DBSQL_RUNRECOVERY)/d' \
-e '/case DBSQL_RUNRECOVERY:/d' \
-e '/db_dispatch.c:.*if (ret == DBSQL_RUNRECOVERY/d' \
2007-03-10 19:04:07 +00:00
-e '/db_err.c:/d' \
-e '/os_errno.c:.*evalue == DBSQL_RUNRECOVERY/d' \
2007-03-10 19:04:07 +00:00
-e '/\/php_db4\//d' \
-e '/rep_backup.c:.*Panic the env and return DBSQL_RUNRECOVERY/d' \
-e '/txn.c:.* \* DBSQL_RUNRECOVERY and we need to/d' \
-e '/txn.c:.*returned DBSQL_RUNRECOVERY and we need to/d' \
2007-03-10 19:04:07 +00:00
> $t1
[ -s $t1 ] && {
echo "DBSQL_RUNRECOVERY used; should be a call to dbsql_panic."
2007-03-10 19:04:07 +00:00
cat $t1
exit 1
}
exit 0