Révision 01dfd3b5
Ajouté par Assos Assos il y a plus de 3 ans
drupal7/includes/database/mysql/schema.inc | ||
---|---|---|
57 | 57 |
protected function buildTableNameCondition($table_name, $operator = '=', $add_prefix = TRUE) { |
58 | 58 |
$info = $this->connection->getConnectionOptions(); |
59 | 59 |
|
60 |
// Ensure the table name is not surrounded with quotes as that is not |
|
61 |
// appropriate for schema queries. |
|
62 |
$quote_char = variable_get('mysql_identifier_quote_character', MYSQL_IDENTIFIER_QUOTE_CHARACTER_DEFAULT); |
|
63 |
$table_name = str_replace($quote_char, '', $table_name); |
|
64 |
|
|
60 | 65 |
$table_info = $this->getPrefixInfo($table_name, $add_prefix); |
61 | 66 |
|
62 | 67 |
$condition = new DatabaseCondition('AND'); |
... | ... | |
494 | 499 |
$condition->condition('column_name', $column); |
495 | 500 |
$condition->compile($this->connection, $this); |
496 | 501 |
// Don't use {} around information_schema.columns table. |
497 |
return $this->connection->query("SELECT column_comment FROM information_schema.columns WHERE " . (string) $condition, $condition->arguments())->fetchField(); |
|
502 |
return $this->connection->query("SELECT column_comment AS column_comment FROM information_schema.columns WHERE " . (string) $condition, $condition->arguments())->fetchField();
|
|
498 | 503 |
} |
499 | 504 |
$condition->compile($this->connection, $this); |
500 | 505 |
// Don't use {} around information_schema.tables table. |
501 |
$comment = $this->connection->query("SELECT table_comment FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments())->fetchField(); |
|
506 |
$comment = $this->connection->query("SELECT table_comment AS table_comment FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments())->fetchField();
|
|
502 | 507 |
// Work-around for MySQL 5.0 bug http://bugs.mysql.com/bug.php?id=11379 |
503 | 508 |
return preg_replace('/; InnoDB free:.*$/', '', $comment); |
504 | 509 |
} |
Formats disponibles : Unified diff
Udpate to 7.77