1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

MySQL: Speed up updating rows without numeric or UTF-8 primary key

This commit is contained in:
Jakub Vrana
2013-06-04 19:40:17 -07:00
parent 8e0ead4678
commit 7dd90f56f1
9 changed files with 12 additions and 29 deletions

View File

@@ -375,10 +375,6 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
return nl_br(h(preg_replace('~^(\\[[^]]*])+~m', '', $connection->error)));
}
function exact_value($val) {
return q($val);
}
function create_database($db, $collation) {
return queries("CREATE DATABASE " . idf_escape($db) . (eregi('^[a-z0-9_]+$', $collation) ? " COLLATE $collation" : ""));
}

View File

@@ -532,14 +532,6 @@ if (!defined("DRIVER")) {
}
}
/** Return expression for binary comparison
* @param string
* @return string
*/
function exact_value($val) {
return q($val) . " COLLATE utf8_bin";
}
/** Create database
* @param string
* @param string
@@ -983,7 +975,7 @@ if (!defined("DRIVER")) {
$return = "UNHEX($return)";
}
if ($field["type"] == "bit") {
return "CONV($return, 2, 10) + 0";
$return = "CONV($return, 2, 10) + 0";
}
if (ereg("geometry|point|linestring|polygon", $field["type"])) {
$return = "GeomFromText($return)";

View File

@@ -270,10 +270,6 @@ ORDER BY uc.constraint_type, uic.column_position", $connection2) as $row) {
return h($connection->error); //! highlight sqltext from offset
}
function exact_value($val) {
return q($val);
}
function explain($connection, $query) {
$connection->query("EXPLAIN PLAN FOR $query");
return $connection->query("SELECT * FROM plan_table");

View File

@@ -326,10 +326,6 @@ ORDER BY conkey, conname") as $row) {
return nl_br($return);
}
function exact_value($val) {
return q($val);
}
function create_database($db, $collation) {
return queries("CREATE DATABASE " . idf_escape($db) . ($collation ? " ENCODING " . idf_escape($collation) : ""));
}

View File

@@ -348,10 +348,6 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return h($connection->error);
}
function exact_value($val) {
return q($val);
}
function check_sqlite_name($name) {
// avoid creating PHP files on unsecured servers
global $connection;