]> git.joonet.de Git - adminer.git/commitdiff
MySQL: Fix editing rows by binary values (bug #371)
authorJakub Vrana <jakub@vrana.cz>
Mon, 24 Feb 2014 02:49:58 +0000 (18:49 -0800)
committerJakub Vrana <jakub@vrana.cz>
Mon, 24 Feb 2014 02:49:58 +0000 (18:49 -0800)
adminer/include/functions.inc.php
changes.txt

index a2f804a65ae8be173b81d3a4646e997c384e422f..9d46b2d66a7ed21a9ce039abc6da6937e4314da2 100644 (file)
@@ -385,7 +385,7 @@ function where($where, $fields = array()) {
                                : " = " . unconvert_field($fields[$key], q($val))
                        ) // LIKE because of floats but slow with ints, in MS SQL because of text
                ; //! enum and set
-               if ($jush == "sql" && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
+               if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
                        $return[] = "$column = " . q($val) . " COLLATE utf8_bin";
                }
        }
index 75e7e73273f292734e4e315b441e36a3bb91bac6..7a96c5e313a6bffa6790051dbdc953943510703c 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 4.0.4-dev:
 Display time of the select command
 Improve gzip export ratio (bug #387)
+MySQL: Fix editing rows by binary values (bug #371)
 MySQL: Respect daylight saving time in dump, bug since Adminer 3.6.4
 SQLite: Display auto-created unique indexes, bug since Adminer 3.5.0
 Editor: Fix login() method, bug since Adminer 4.0.0