Skip to content

Commit

Permalink
bug #34410 [HttpFoundation] Fix MySQL column type definition. (jbrout…
Browse files Browse the repository at this point in the history
…ier)

This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[HttpFoundation] Fix MySQL column type definition.

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  |no
| Deprecations? | no
| Tickets       | Fix #34409
| License       | MIT
| Doc PR        | symfony/symfony-docs#12641

Fix wrong MySQL column type definition causing Numeric value out of range exception.

Commits
-------

51c5f69 Fix MySQL column type definition.
  • Loading branch information
nicolas-grekas committed Nov 16, 2019
2 parents d43a20a + 51c5f69 commit 83a1061
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -218,7 +218,7 @@ public function createTable()
// - trailing space removal
// - case-insensitivity
// - language processing like é == e
$sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol MEDIUMINT NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8_bin, ENGINE = InnoDB";
$sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8_bin, ENGINE = InnoDB";
break;
case 'sqlite':
$sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)";
Expand Down

0 comments on commit 83a1061

Please sign in to comment.