]> git.joonet.de Git - adminer.git/commitdiff
Don't use LIMIT 1 if inline updating unique row
authorJakub Vrana <jakub@vrana.cz>
Fri, 24 May 2013 20:38:54 +0000 (13:38 -0700)
committerJakub Vrana <jakub@vrana.cz>
Fri, 24 May 2013 20:38:54 +0000 (13:38 -0700)
adminer/select.inc.php
changes.txt

index c9e9e565058efa01d884ff4bdb160b125e7d7645..c6eef8566b31fa68f8e4c6d99d281e5b189e3781 100644 (file)
@@ -149,7 +149,7 @@ if ($_POST && !$error) {
                                        }
                                        $query = table($TABLE) . " SET " . implode(", ", $set);
                                        $where2 = " WHERE " . where_check($unique_idf, $fields) . ($where ? " AND " . implode(" AND ", $where) : "");
-                                       $result = queries("UPDATE" . ($is_group ? " $query$where2" : limit1($query, $where2))); // can change row on a different page without unique key
+                                       $result = queries("UPDATE" . ($is_group || $unselected === array() ? " $query$where2" : limit1($query, $where2))); // can change row on a different page without unique key
                                        if (!$result) {
                                                break;
                                        }
index 6f24878a0b11023c8780ea2352145b729fab22e7..3dd29ec758ea3c07ae5b8822fa6151d9b6ff6f24 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 3.7.1-dev:
 Increase click target for checkboxes
 Use shadow for highlighting default button
+Don't use LIMIT 1 if inline updating unique row
 PostgreSQL: Order table list by name
 PostgreSQL: Fix detecting oid column in PDO