Commit 922633a8 authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic
Browse files

escaping names when showing table / index

(cherry picked from 08939ca2

)

behatnotneeded

Change-Id: Ic725327bff0e6c399c3ddb33ab3e021f19e4eadf
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 83a44d6e
......@@ -345,7 +345,7 @@ class ADODB_mysqli extends ADOConnection {
}
// get index details
$rs = $this->Execute(sprintf('SHOW INDEXES FROM %s',$table));
$rs = $this->Execute(sprintf('SHOW INDEXES FROM `%s`',$table));
// restore fetchmode
if (isset($savem)) {
......@@ -579,10 +579,10 @@ class ADODB_mysqli extends ADOConnection {
if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true;
if ( !empty($owner) ) {
$table = "$owner.$table";
}
$a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table));
if ( !empty($owner) ) {
$table = "$owner.$table";
}
$a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE `%s`', $table));
if ($associative) {
$create_sql = isset($a_create_table["Create Table"]) ? $a_create_table["Create Table"] : $a_create_table["Create View"];
} else $create_sql = $a_create_table[1];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment