# HG changeset patch # User HIROSE Yuuji # Date 1636362993 -32400 # Node ID 93c38e425c85500bee1e32328299ae17c176443a # Parent d5e87825195f5aea170695b465e8c2056808a4db Do not insert null new record. diff -r d5e87825195f -r 93c38e425c85 s4-funcs.sh --- a/s4-funcs.sh Mon Nov 08 18:15:52 2021 +0900 +++ b/s4-funcs.sh Mon Nov 08 18:16:33 2021 +0900 @@ -4304,7 +4304,10 @@ esac ## err p2t: "replace into $tb2 values($pval, \"$col\", $type, $val, bin...);" #query "replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" - sql="replace into $tb2 values($pval, \"$col\", $type, $val, $bin);" + if [ x"$val" = x"NULL" -a x"$bin" = x"NULL" ]; then + continue # Do not insert completely NULL record 2021-11-08 + fi + sql="REPLACE into $tb2 values($pval, \"$col\", $type, $val, $bin);" if [ x"$bin" = x"NULL" ]; then ## err Normal-query: `echo $sql` if [ -n "$transaction" ]; then