projects
/
public-inbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb7c42b
)
Don't use LIMIT in UPDATE statements
author
Jonathan Corbet <corbet@pi.lwn.net>
Thu, 22 Feb 2018 23:05:46 +0000 (23:05 +0000)
committer
Eric Wong <e@80x24.org>
Thu, 22 Feb 2018 23:38:26 +0000 (23:38 +0000)
...not all distributions build SQLite with that enabled.
[ew: LIMIT shouldn't be necessary because `key' is primary]
lib/PublicInbox/Msgmap.pm
patch
|
blob
|
history
diff --git
a/lib/PublicInbox/Msgmap.pm
b/lib/PublicInbox/Msgmap.pm
index a147b9f346d6ace41c580735b91825270225e271..6b6d1c6ee6086b8fd61ce4a04a45ab5b5619f961 100644
(file)
--- a/
lib/PublicInbox/Msgmap.pm
+++ b/
lib/PublicInbox/Msgmap.pm
@@
-57,7
+57,7
@@
sub meta_accessor {
$prev = $dbh->selectrow_array($sql, undef, $key);
if (defined $prev) {
- $sql = 'UPDATE meta SET val = ? WHERE key = ?
LIMIT 1
';
+ $sql = 'UPDATE meta SET val = ? WHERE key = ?';
$dbh->do($sql, undef, $value, $key);
} else {
$sql = 'INSERT INTO meta (key,val) VALUES (?,?)';