Mercurial > hgrepos > hgweb.cgi > s4
changeset 124:9742dbee5cba
Call large query with SQL script in par2table() - at edit
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 06 Aug 2015 00:19:30 +0900 |
parents | 718abe22a5d1 |
children | ae059dc709cd |
files | s4-funcs.sh |
diffstat | 1 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-funcs.sh Wed Aug 05 23:49:14 2015 +0900 +++ b/s4-funcs.sh Thu Aug 06 00:19:30 2015 +0900 @@ -2212,15 +2212,26 @@ ;; esac ;; - *) # maybe `keep', do not modify value + *) # maybe "keep", do not modify value continue ;; esac -# err newsql=$newsql + # err newsql=$newsql sql=$sql$nl"$newsql where rowid=$st_rowid;" done - query "$sql + + if [ x"$bin" = x"NULL" ]; then + err repl:normal sql=`echo $sql` + query "$sql delete from $tb2 where type='string' and val='';" + err repl:normal done + else + sqlfile="$tmpd/sqlf.$$" + echo "$sql" > $sqlfile + err repl:sqlfile=`ls -lF $sqlfile` + query ".read $sqlfile" + err repl:done + fi # Rest of kt==m: set multiple mode nr=`getparcount $col` else @@ -2283,7 +2294,7 @@ else sqlfile="$tmpd/query.$$" echo "$sql" > $sqlfile - # err sqlfile=$sqlfile # `ls -lF $sqlfile` + err sqlfile=`ls -lF $sqlfile` query ".read $sqlfile" fi err p2t done