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 /query.cgi | |
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 'query.cgi')
-rwxr-xr-x | query.cgi | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -84,14 +84,16 @@ if ($user) { my ($name, $cookiename, $value) = (@$ref); if ($value) { my $qname = SqlQuote($name); + SendSQL("LOCK TABLES namedqueries WRITE"); SendSQL("SELECT query FROM namedqueries " . "WHERE userid = $userid AND name = $qname"); my $query = FetchOneColumn(); if (!$query) { - SendSQL("REPLACE INTO namedqueries " . + SendSQL("INSERT INTO namedqueries " . "(userid, name, query) VALUES " . "($userid, $qname, " . SqlQuote($value) . ")"); } + SendSQL("UNLOCK TABLES"); } $cgi->send_cookie(-name => $cookiename, -expires => "Fri, 01-Jan-2038 00:00:00 GMT"); |