Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[MySQL] Fixed bug with comments not adding quotes for tables #218

Merged
merged 1 commit into from

5 participants

Oleksandr Kovalov doctrinebot Christophe Coevoet Benjamin Eberlei Guilherme Blanco
Oleksandr Kovalov

Title describes everything... =)

doctrinebot
Collaborator

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DBAL-366

Oleksandr Kovalov

Failure is due to Travis unable to install build-common.

Christophe Coevoet

What if the comment contains a quote ?

Benjamin Eberlei
Owner

werd, is this untested in DBAL?

Christophe Coevoet

@beberlei btw, it would be great to fix the DBAL testsuite. Having a failing testsuite does not help to know if the PR broke something else or no.

Benjamin Eberlei
Owner

oh didnt see it was broken, will fix

Benjamin Eberlei
Owner

looks good to me when i see the history?

Guilherme Blanco guilhermeblanco merged commit d56c9fe into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
2  lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View
@@ -368,7 +368,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options
$query .= 'TABLE ' . $tableName . ' (' . $queryFields . ') ';
if (isset($options['comment'])) {
- $query .= 'COMMENT = ' . $options['comment'] . ' ';
+ $query .= sprintf("COMMENT = '%s' ", $options['comment']);
}
if ( ! isset($options['charset'])) {
Something went wrong with that request. Please try again.