8000 Fix bug #25665: Type of column for timestamp changed to signed by WhiteEagle88 · Pull Request #25667 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fix bug #25665: Type of column for timestamp changed to signed #25667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

WhiteEagle88
Copy link
Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25665
License MIT
Doc PR symfony/symfony-docs#8966

Fix PDO session timestamp out of range for MySQL

@nicolas-grekas
Copy link
Member

this will not fix the issue for people that already have created the table
can we find a solution that doesn't require a DB migration - ie just tweak the query?

@nicolas-grekas
Copy link
Member

ping @WhiteEagle88 ?

Status: needs work

@@ -375,7 +375,7 @@ public function close()
$this->gcCalled = false;

// delete the session records that have expired
$sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - $this->timeCol";
$sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - CAST($this->timeCol AS SIGNED)";
Copy link
Member
@nicolas-grekas nicolas-grekas Jan 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to just change this to $this->lifetimeCol + $this->timeCol < :time? (thus revert the change on the "create table")

@nicolas-grekas
Copy link
Member

Closing in favor of #25922, thanks for proposing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0