]> git.joonet.de Git - adminer.git/commitdiff
Always pass the SRID part of a geometry property with the GeomFromText function
authorDennis Stolmeijer <dstollie@gmail.com>
Mon, 1 Apr 2019 15:57:47 +0000 (17:57 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sat, 18 May 2019 15:24:35 +0000 (17:24 +0200)
adminer/drivers/mysql.inc.php
changes.txt

index 170d57b77a383c97181b285e33dfe1a2dae36ab7..4dc0cc19e95645c60ef6e5b9e94026ea259d9e82 100644 (file)
@@ -1079,7 +1079,7 @@ if (!defined("DRIVER")) {
                        $return = "CONV($return, 2, 10) + 0";
                }
                if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
-                       $return = (min_version(8) ? "ST_" : "") . "GeomFromText($return)";
+                       $return = (min_version(8) ? "ST_" : "") . "GeomFromText($return, SRID($field[field]))";
                }
                return $return;
        }
index d194c2f0897c06f0553a4624e936045ac4bebc12..fc1f48cc5a865915bffaff4730d826b84d68b679 100644 (file)
@@ -3,6 +3,7 @@ Do not attempt logging in without password (bug #676)
 Stretch footer over the whole table width (bug #624)
 Allow overwriting tables when copying them
 MySQL: Fix creating users and changing password in MySQL 8 (bug #663)
+MySQL: Pass SRID to GeomFromText
 
 Adminer 4.7.1 (released 2019-01-24):
 Display the tables scrollbar (bug #647)