s4
changeset 880:fa5be649968f
Omit update of user_m when no records in user_s modified
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 14 Dec 2020 20:01:07 +0900 |
parents | 188ad98d443f |
children | a240c8988c65 |
files | s4-world.sh |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/s4-world.sh Wed Dec 09 11:51:41 2020 +0900 1.2 +++ b/s4-world.sh Mon Dec 14 20:01:07 2020 +0900 1.3 @@ -89,8 +89,14 @@ 1.4 case "$prevsync" in 1.5 [2-9][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]\ [012][0-9]:??:??) 1.6 SYNCCOND="WHERE name in (SELECT name FROM m.user_s WHERE key='wtime' AND val > '$prevsync')" 1.7 - err synccond limited to \ 1.8 - `query "SELECT DISTINCT name FROM m.user_s $SYNCCOND;"` 1.9 + err "prevsync=$prevsync" 1.10 + limited=`query "SELECT DISTINCT name FROM m.user_s $SYNCCOND;"` 1.11 + if [ -n "$limited" ]; then 1.12 + err synccond limited to "$limited" 1.13 + else 1.14 + err synccond canceled for user_m 1.15 + SYNCCOND="WHERE NULL" 1.16 + fi 1.17 err "Touch $syncall (owner=`id -un`) to update all user_m." 1.18 ;; 1.19 *)