Mercurial > hgrepos > hgweb.cgi > s4
annotate s4-world.sh @ 994:f0a62a22e33c draft
FIX: Too long SQL including binary data put via heredocs.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 15 Oct 2022 17:52:25 +0859 |
parents | 679f621de4b5 |
children |
rev | line source |
---|---|
752 | 1 #!/bin/sh |
2 | |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
3 autoremovestop=2 |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
4 |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
5 # Setup variables for running time |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
6 if $isCGI; then |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
7 case "$S4WORLDLIST" in |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
8 *:*:*) |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
9 worldlistfile=cache/worldlist |
797
56adb6e5ee68
Add world-links to Grps entry of topmenu
HIROSE Yuuji <yuuji@gentei.org>
parents:
796
diff
changeset
|
10 worldgrpfile=cache/worldgrps |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
11 worldoptionfile=cache/worldoption |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
12 worldnamefile=cache/worldname |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
13 if [ ! -e $worldlistfile -o $worldlistfile -ot s4-config.sh \ |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
14 -o ! -e $worldoptionfile -o $worldoptionfile -ot s4-config.sh \ |
794
8448724f69e3
Account sync-ing and migration fixed
HIROSE Yuuji <yuuji@gentei.org>
parents:
791
diff
changeset
|
15 -o s4-world.sh -nt $worldoptionfile ] |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
16 then |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
17 echo S4MASTERURL=$S4MASTERURL >> tmp/debug.out |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
18 cat <<-EOF > $worldlistfile |
797
56adb6e5ee68
Add world-links to Grps entry of topmenu
HIROSE Yuuji <yuuji@gentei.org>
parents:
796
diff
changeset
|
19 <div><table> |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
20 <tr><th>World List</th></tr> |
794
8448724f69e3
Account sync-ing and migration fixed
HIROSE Yuuji <yuuji@gentei.org>
parents:
791
diff
changeset
|
21 <tr><td title="Base World$nl拠点となるWorldです">⇒ |
8448724f69e3
Account sync-ing and migration fixed
HIROSE Yuuji <yuuji@gentei.org>
parents:
791
diff
changeset
|
22 <a href="${S4MASTERURL:-$URL}">Base</a></td></tr> |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
23 EOF |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
24 true > $worldoptionfile |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
25 for i in $S4WORLDLIST; do |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
26 echo $i | { |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
27 IFS=: read name short d |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
28 cgi="s4-world-$short$cgiext" |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
29 conf="s4-config-$short.sh" |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
30 cat<<-EOF >>$worldlistfile |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
31 <tr><td title="$d">⇒ <a href="$cgi">$name</a></td></tr> |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
32 EOF |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
33 cat<<-EOF >>$worldoptionfile |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
34 <option title="$d" value="$conf">$name</option> |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
35 EOF |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
36 echo "$name" > $worldnamefile.$short |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
37 } |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
38 done |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
39 if [ -s "$worldoptionfile" ]; then |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
40 echo "<option value=\"s4-config.sh\">Base</option>" >> $worldoptionfile |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
41 echo "</table>$nl</div>" >> $worldlistfile |
797
56adb6e5ee68
Add world-links to Grps entry of topmenu
HIROSE Yuuji <yuuji@gentei.org>
parents:
796
diff
changeset
|
42 sed 's/href="\([^>]*\)"/href="\1?grps"/' $worldlistfile \ |
56adb6e5ee68
Add world-links to Grps entry of topmenu
HIROSE Yuuji <yuuji@gentei.org>
parents:
796
diff
changeset
|
43 > $worldgrpfile |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
44 else |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
45 true > $worldoptionfile; true > $worldlistfile # Remove contents |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
46 rm -f ${worldnamefile}.* |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
47 fi |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
48 fi |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
49 if [ -s "$worldlistfile" ]; then |
797
56adb6e5ee68
Add world-links to Grps entry of topmenu
HIROSE Yuuji <yuuji@gentei.org>
parents:
796
diff
changeset
|
50 S4WORLDS="▼spaste(\`$worldlistfile')" |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
51 S4WORLDNAME=${S4WORLD:+`cat $worldnamefile.$S4WORLD`} |
797
56adb6e5ee68
Add world-links to Grps entry of topmenu
HIROSE Yuuji <yuuji@gentei.org>
parents:
796
diff
changeset
|
52 S4WORLDGRPS="▼spaste(\`$worldgrpfile')" |
791
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
53 fi |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
54 ;; |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
55 esac |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
56 fi |
567980314463
World and Migration structures refined
HIROSE Yuuji <yuuji@gentei.org>
parents:
771
diff
changeset
|
57 |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
58 |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
59 syncaccount_1() { |
752 | 60 |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
61 n_m=`query "SELECT printf('%d:%d',\ |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
62 (SELECT count(*) FROM m.user), \ |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
63 (SELECT count(*) FROM user));"` |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
64 n=${n_m%:*}; m=${n_m#*:} # n:m |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
65 if [ -z "$n" -o "$n" -lt 2 ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
66 err "Skipping account sync because m.user cannot be reached[n=$n]." |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
67 return -3 |
794
8448724f69e3
Account sync-ing and migration fixed
HIROSE Yuuji <yuuji@gentei.org>
parents:
791
diff
changeset
|
68 fi |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
69 if [ -z "$forceusersync" -a ! -f db/forceusersync ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
70 if [ $((m-n)) -le $((autoremovestop+0)) ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
71 # If if-condition evaluation fails, fall through to else-caluse |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
72 rm -f db/forceusersync |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
73 else |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
74 err "More than $autoremovestop users vanished($((m-n)))." |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
75 err "Automatic removal canceled. If you want to sync user accounts" |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
76 err "forcibly, touch db/forceusersync file each time of world update." |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
77 return -4 |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
78 fi |
966
679f621de4b5
Remove forceusersync file for safety
HIROSE Yuuji <yuuji@gentei.org>
parents:
965
diff
changeset
|
79 else |
679f621de4b5
Remove forceusersync file for safety
HIROSE Yuuji <yuuji@gentei.org>
parents:
965
diff
changeset
|
80 rm -f db/forceusersync # Remove flag file for future |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
81 fi |
885
4c02a9f862d7
Prefix process id in all log entries
HIROSE Yuuji <yuuji@gentei.org>
parents:
881
diff
changeset
|
82 err "`gdate +%S.%3N` Starting account synchronization" |
887 | 83 SYNC_M=1 |
755
1a8291d7fa3d
Annex strategy shifted to World strategy
HIROSE Yuuji <yuuji@gentei.org>
parents:
754
diff
changeset
|
84 |
965
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
85 if [ -s "$syncflag" ]; then |
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
86 prevsync=`tail -1 $syncflag|colrm 20` # 2020-06-21 12:30:00 = 19cols |
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
87 else |
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
88 prevsync="2000-01-01 00:00:00" |
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
89 fi |
835
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
90 syncall=${db%.*}.syncall |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
91 err syncallfile=$syncall |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
92 if [ -e $syncall ]; then |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
93 rm -f "$syncall" |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
94 err "Force update user_m for all users" |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
95 else |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
96 case "$prevsync" in |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
97 [2-9][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]\ [012][0-9]:??:??) |
881
a240c8988c65
Save profile update time stamp in user_s table
HIROSE Yuuji <yuuji@gentei.org>
parents:
880
diff
changeset
|
98 SYNCCOND="WHERE name in (SELECT name FROM m.user_s WHERE key='profupdate' AND val > '$prevsync')" |
880
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
99 err "prevsync=$prevsync" |
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
100 limited=`query "SELECT DISTINCT name FROM m.user_s $SYNCCOND;"` |
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
101 if [ -n "$limited" ]; then |
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
102 err synccond limited to "$limited" |
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
103 else |
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
104 err synccond canceled for user_m |
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
105 SYNCCOND="WHERE NULL" |
887 | 106 SYNC_M= |
880
fa5be649968f
Omit update of user_m when no records in user_s modified
HIROSE Yuuji <yuuji@gentei.org>
parents:
859
diff
changeset
|
107 fi |
835
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
108 err "Touch $syncall (owner=`id -un`) to update all user_m." |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
109 ;; |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
110 *) |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
111 echo arere ;; |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
112 esac |
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
113 fi |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
114 ## num=$(sqlite3 -bail -cmd 'PRAGMA FOREIGN_KEYS=on' $db <<EOF |
903
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
115 result=$(query <<EOF |
752 | 116 BEGIN; |
117 DElETE FROM main.user WHERE rowid NOT IN (SELECT rowid FROM m.user); | |
118 INSERT INTO main.user(rowid, name) | |
119 SELECT rowid, name FROM m.user | |
120 WHERE m.user.rowid NOT IN (SELECT rowid FROM user); | |
904
0352ff0fb37f
Suppress user.name update for unchanged values, which takes a lot time.
HIROSE Yuuji <yuuji@gentei.org>
parents:
903
diff
changeset
|
121 /* PrimaryKey:name cannot be changed, but ensure the integrity of user */ |
0352ff0fb37f
Suppress user.name update for unchanged values, which takes a lot time.
HIROSE Yuuji <yuuji@gentei.org>
parents:
903
diff
changeset
|
122 UPDATE user SET name = (SELECT name FROM m.user WHERE main.user.rowid=m.user.rowid) WHERE name != (SELECT name from m.user WHERE main.user.rowid=m.user.rowid); |
755
1a8291d7fa3d
Annex strategy shifted to World strategy
HIROSE Yuuji <yuuji@gentei.org>
parents:
754
diff
changeset
|
123 DELETE FROM main.user_s WHERE rowid NOT IN (SELECT rowid FROM m.user_s); |
1a8291d7fa3d
Annex strategy shifted to World strategy
HIROSE Yuuji <yuuji@gentei.org>
parents:
754
diff
changeset
|
124 REPLACE INTO main.user_s(rowid, name, key, type, val, bin) |
752 | 125 SELECT rowid,* FROM m.user_s; |
887 | 126 ${SYNC_M:+ |
755
1a8291d7fa3d
Annex strategy shifted to World strategy
HIROSE Yuuji <yuuji@gentei.org>
parents:
754
diff
changeset
|
127 DELETE FROM main.user_m WHERE rowid NOT IN (SELECT rowid FROM m.user_m); |
1a8291d7fa3d
Annex strategy shifted to World strategy
HIROSE Yuuji <yuuji@gentei.org>
parents:
754
diff
changeset
|
128 REPLACE INTO main.user_m(rowid, name, key, type, val, bin) |
835
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
129 SELECT rowid,* FROM m.user_m $SYNCCOND |
834
a87030974b99
Detect defference between src/dest table using EXCEPT.
HIROSE Yuuji <yuuji@gentei.org>
parents:
833
diff
changeset
|
130 EXCEPT |
835
fa23017ba273
Sync only latest entries in user_m
HIROSE Yuuji <yuuji@gentei.org>
parents:
834
diff
changeset
|
131 SELECT rowid,* FROM main.user_m $SYNCCOND |
887 | 132 ;} /* SYNC_M closed here */ |
903
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
133 SELECT 'OK'; |
752 | 134 END; |
903
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
135 EOF |
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
136 ) |
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
137 err "`gdate +%S.%3N` Update account tables finished with result=[$result]" |
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
138 test x"$result" = x"OK" && num=$(query <<EOF |
752 | 139 /* Compare user tables */ |
140 WITH master AS ( | |
141 SELECT p.rowid,* FROM m.user p | |
887 | 142 NATURAL LEFT JOIN m.user_s |
143 ${SYNC_M:+ NATURAL LEFT JOIN m.user_m} | |
903
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
144 $SYNCCOND |
756 | 145 ), thisworld AS ( |
752 | 146 SELECT p.rowid,* FROM user p |
887 | 147 NATURAL LEFT JOIN user_s |
148 ${SYNC_M:+ NATURAL LEFT JOIN user_m} | |
903
d81dd0ed2d6d
Add performance check logging.
HIROSE Yuuji <yuuji@gentei.org>
parents:
892
diff
changeset
|
149 $SYNCCOND |
752 | 150 ), m_a AS ( |
756 | 151 SELECT * FROM master EXCEPT SELECT * FROM thisworld |
752 | 152 ), a_m AS ( |
756 | 153 SELECT * FROM thisworld EXCEPT SELECT * FROM master |
752 | 154 ) SELECT (SELECT count(*) FROM m_a) + (SELECT count(*) FROM a_m); |
155 EOF | |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
156 ) |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
157 if [ -n "$num" -a "$num" -eq 0 ]; then |
885
4c02a9f862d7
Prefix process id in all log entries
HIROSE Yuuji <yuuji@gentei.org>
parents:
881
diff
changeset
|
158 err "`gdate +%S.%3N` Account synchronization done in difference $num" |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
159 echo "`date '+%F %T'`: Sync done by process $$" >> $syncflag |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
160 else |
885
4c02a9f862d7
Prefix process id in all log entries
HIROSE Yuuji <yuuji@gentei.org>
parents:
881
diff
changeset
|
161 err "Account synch failed or bailed with num=[$num]" |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
162 fi |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
163 return $num |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
164 } |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
165 |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
166 syncaccount() { |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
167 forceusersync=$1 |
859 | 168 ## err "db=$db mas=$S4MASTERDB sessdb=$sessdb" |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
169 # If in parent world, no need to do rest of jobs |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
170 if [ -z "$S4MASTERDB" -o ! -s "$S4MASTERDB" ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
171 return |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
172 fi |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
173 # Confim child |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
174 if [ "$db" -ef "$S4MASTERDB" ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
175 return # Points to the same file |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
176 fi |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
177 # File based sync check precedes to DB count check for performance issue |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
178 syncflag=${db%.*}.synctime |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
179 runflag=${db%.*}.run |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
180 userupdateflag=`dirname $S4MASTERDB`/`basename $userupdateflag` |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
181 test ! -e "$userupdateflag" && return |
965
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
182 [ -z "$forceusersync" -a -f "$syncflag" -a \ |
b6d1384e1b2c
s4-newworld fixed so that account sychronization done at the time
HIROSE Yuuji <yuuji@gentei.org>
parents:
904
diff
changeset
|
183 "$syncflag" -nt "$userupdateflag" ] && return |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
184 if [ -s "$runflag" ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
185 limit=`cat $runflag|tr -c -d 0-9` |
892 | 186 err syncaccount: limit=$limit |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
187 if [ -n "$limit" -a "$limit" -gt `date +%s` ]; then |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
188 err "World $S4WORLD account sync withholded by process $$" |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
189 return # Running sync by other process not leaching timeout |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
190 fi |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
191 fi |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
192 echo $((`date +%s` + 10)) > $runflag # Setting running flag by timeout 10s |
892 | 193 err syncaccount: setrunflag[$runflag]=`cat $runflag` |
817
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
194 query<<-EOF |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
195 .bail ON |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
196 ATTACH DATABASE "$S4MASTERDB" AS m; |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
197 EOF |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
198 syncaccount_1 |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
199 rc=$? |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
200 test -e "$runflag" && rm -f "$runflag" |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
201 query<<-EOF |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
202 DETACH DATABASE m; |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
203 .bail OFF |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
204 EOF |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
205 return $rc |
d2c4c473e08e
Account synchronization more prudent
HIROSE Yuuji <yuuji@gentei.org>
parents:
811
diff
changeset
|
206 } |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
207 |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
208 getworldDB() { # $1=conf |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
209 (unset DB; . "$1"; echo ${DB:-$defaultdb}) |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
210 } |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
211 |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
212 worldnameDBlist() { |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
213 echo Base:Base:`getworldDB ./s4-config.sh` |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
214 for w in $S4WORLDLIST; do |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
215 case "$w" in |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
216 *:*:*:*) continue ;; |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
217 *:*:*) w=${w%:*}; name=${w%:*}; world=${w#*:} ;; |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
218 *) continue ;; |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
219 esac |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
220 d=`getworldDB "./s4-config-$world.sh"` |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
221 test -s "$d" && echo ${world}:${name}:$d |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
222 done |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
223 } |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
224 |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
225 grepgrpworld() { |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
226 world=$1; wname=$2; exp=$3; tdb=$4 |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
227 case $world in |
827 | 228 Base) cgi=${S4MASTERURL:-$URL} ;; |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
229 *) cgi=s4-world-$world$cgiext ;; |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
230 esac |
827 | 231 case $exp in |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
232 mem:*) |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
233 arg=${exp#*:} |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
234 cond="user = '$arg'" |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
235 guide="「${S4WORLDNAME:-Base}」以外の世界の所属グループ" |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
236 s="(<a href=\"$cgi?stage=grps&kwd=mem:$arg\">所属絞</a>)" ;; |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
237 *) |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
238 arg=`sqlquote "%$3%"` |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
239 cond="gname LIKE $arg" |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
240 guide="$exp を含むグループは別世界にもあります" |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
241 s="(<a href=\"$cgi?stage=grps&kwd=$exp\">絞込</a>)" ;; |
827 | 242 esac |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
243 query <<-EOF | |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
244 ATTACH DATABASE "$tdb" AS td; |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
245 SELECT DISTINCT td.grp.rowid,hex(gname) |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
246 FROM td.grp NATURAL JOIN td.grp_mem |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
247 WHERE $cond; |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
248 DETACH DATABASE td; |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
249 EOF |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
250 while IFS='|' read rowid hgname; do |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
251 # echo rowid=$rowid - `echo "$hgname"|unhexize|htmlescape` |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
252 htmlgn=`echo $hgname|unhexize|htmlescape` |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
253 printf '<a href="%s?grp+%d">%s</a> ' "$cgi" "$rowid" "$htmlgn" |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
254 done | { |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
255 read ans |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
256 if [ -n "$ans" ]; then |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
257 w=`echo $wname|htmlescape` |
826
f2d69fb3e038
Link to group list in other world with kwd
HIROSE Yuuji <yuuji@gentei.org>
parents:
825
diff
changeset
|
258 u="<a href=\"$cgi?grps\"><span class=\"pre\">$w</span></a>" |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
259 cat<<-EOF |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
260 GUIDE:<h2>`echo "$guide"|htmlescape`</h2> |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
261 <tr> |
826
f2d69fb3e038
Link to group list in other world with kwd
HIROSE Yuuji <yuuji@gentei.org>
parents:
825
diff
changeset
|
262 <tr><td>$u $s</td> |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
263 <td>$ans</td> |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
264 </dl> |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
265 EOF |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
266 fi |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
267 } |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
268 } |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
269 |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
270 peekgrpworlds() ( |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
271 # $1=(Pattern|mem:User) |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
272 # err "pgw-1=[$1]" |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
273 for wd in `worldnameDBlist`; do |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
274 world=${wd%%:*}; wd=${wd#*:} |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
275 worldname=${wd%:*} |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
276 d=${wd#*:} |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
277 if [ ! $db -ef $d -a -s $d ]; then |
827 | 278 grepgrpworld "$world" "$worldname" "$1" "$d" |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
279 fi |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
280 done | { |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
281 result=`cat` |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
282 if [ -n "$result" ]; then |
828
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
283 cat<<-EOF |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
284 `echo "$result"|sed 's/^GUIDE://;2q'` |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
285 <table class="b"> |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
286 `echo "$result"|grep -v '^GUIDE:'` |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
287 </table> |
476a70f667cf
Group search expression formula changed
HIROSE Yuuji <yuuji@gentei.org>
parents:
827
diff
changeset
|
288 EOF |
825
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
289 fi |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
290 } |
e9817a71f332
List groups in other worlds
HIROSE Yuuji <yuuji@gentei.org>
parents:
820
diff
changeset
|
291 ) |