2007-03-10 19:04:07 +00:00
|
|
|
#!/bin/sh -
|
|
|
|
#
|
2009-09-01 23:21:41 +00:00
|
|
|
# Check for DB_RUNRECOVERY being specified instead of a call to dbsql_panic.
|
2007-03-10 19:04:07 +00:00
|
|
|
|
|
|
|
d=../..
|
|
|
|
|
|
|
|
t1=__1
|
|
|
|
|
2009-09-01 23:21:41 +00:00
|
|
|
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' \
|
2009-09-01 23:21:41 +00:00
|
|
|
-e '/os_errno.c:.*evalue == DBSQL_RUNRECOVERY/d' \
|
2007-03-10 19:04:07 +00:00
|
|
|
-e '/\/php_db4\//d' \
|
2009-09-01 23:21:41 +00:00
|
|
|
-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 ] && {
|
2009-09-01 23:21:41 +00:00
|
|
|
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
|