diff options
author | dkl%redhat.com <> | 2004-07-08 09:19:42 +0000 |
---|---|---|
committer | dkl%redhat.com <> | 2004-07-08 09:19:42 +0000 |
commit | a46c91543e36ebf4644e022453b47d381220df2e (patch) | |
tree | 7b1ecc46a6878f9123f18909dc2a1d86104e83d2 /checksetup.pl | |
parent | e09a3eae0f1068e40ae8e09f4ba7e090fd4b54e4 (diff) | |
download | bugs-a46c91543e36ebf4644e022453b47d381220df2e.tar bugs-a46c91543e36ebf4644e022453b47d381220df2e.tar.gz bugs-a46c91543e36ebf4644e022453b47d381220df2e.tar.bz2 bugs-a46c91543e36ebf4644e022453b47d381220df2e.tar.xz bugs-a46c91543e36ebf4644e022453b47d381220df2e.zip |
Patch for bug 190432; saving a named query uses REPLACE INTO (not ANSI); patch by David Lawrence <dkl@redhat.com>; r=vladd; a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-x | checksetup.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/checksetup.pl b/checksetup.pl index 3c4793407..c9ced42ec 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -2094,12 +2094,14 @@ sub AddFDef ($$$) { my ($fieldid) = ($sth->fetchrow_array()); if (!$fieldid) { $fieldid = 'NULL'; - } - - $dbh->do("REPLACE INTO fielddefs " . + $dbh->do("INSERT INTO fielddefs " . "(fieldid, name, description, mailhead, sortkey) VALUES " . "($fieldid, $name, $description, $mailhead, $headernum)"); - $headernum++; + $headernum++; + } else { + $dbh->do("UPDATE fielddefs SET name = $name, description = $description, " . + "mailhead = $mailhead WHERE fieldid = $fieldid"); + } } |