Skip to content
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

mysql timestamp server default compare breaks in mariadb 10.2 #455

Closed
sqlalchemy-bot opened this issue Oct 4, 2017 · 7 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot
Copy link

commented Oct 4, 2017

Migrated issue, originally created by Michael Bayer (@zzzeek)

due to "timestamp()" syntax, see https://bitbucket.org/zzzeek/sqlalchemy/issues/4096

@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Oct 5, 2017

Michael Bayer (@zzzeek) wrote:

Accommodate for mariadb 10.2 function reflection style

Fixed bug where server default comparison of CURRENT_TIMESTAMP would fail
on MariaDB 10.2 due to a change in how the function is
represented by the database during reflection.

Also implement mariadb 10.2 checks from SQLAlchemy to skip
other CHECK contraint related tests that can't pass.

Change-Id: Id77b527d3215d06e2f44a6cddeb77583e5b39101
Fixes: #455

c2745d4

@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Oct 5, 2017

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Feb 19, 2018

Michael Bayer (@zzzeek) wrote:

unfortunately the regexp here is entirely wrong:

>>> re.sub(r'(.*)(\(\))?$', '\1', "timestamp()")
'\x01'

add the r:

>>> re.sub(r'(.*)(\(\))?$', r'\1', "timestamp()")
'timestamp()'

should be:

>>> re.sub(r'(.*?)(?:\(\))?$', r'\1', rendered_inspector_default)
'current_timestamp'
@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Feb 19, 2018

Changes by Michael Bayer (@zzzeek):

  • changed status to reopened
@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Feb 19, 2018

Michael Bayer (@zzzeek) wrote:

this is in https://gerrit.sqlalchemy.org/#/c/zzzeek/alembic/+/670 along with #483

@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Feb 20, 2018

Michael Bayer (@zzzeek) wrote:

Repair server default comparison for MySQL / MariaDB

The regexp for comparing the TIMESTAMP function
was obliterating all other comparisons as it was incorrect.
Add new regexp for integers that also adjusts for
mariadb 10.2 quoting differences vs. mariadb 10.1

Change-Id: I7bdaceb7e0dbe06bc2c3690cd5dd8e737716278c
Fixes: #455
Fixes: #483

c551955

@sqlalchemy-bot

This comment has been minimized.

Copy link
Author

commented Feb 20, 2018

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added the bug label Nov 27, 2018

vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019

Repair server default comparison for MySQL / MariaDB
The regexp for comparing the TIMESTAMP function
was obliterating all other comparisons as it was incorrect.
Add new regexp for integers that also adjusts for
mariadb 10.2 quoting differences vs. mariadb 10.1

Change-Id: I7bdaceb7e0dbe06bc2c3690cd5dd8e737716278c
Fixes: sqlalchemy#455
Fixes: sqlalchemy#483

vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019

Repair server default comparison for MySQL / MariaDB
The regexp for comparing the TIMESTAMP function
was obliterating all other comparisons as it was incorrect.
Add new regexp for integers that also adjusts for
mariadb 10.2 quoting differences vs. mariadb 10.1

Change-Id: I7bdaceb7e0dbe06bc2c3690cd5dd8e737716278c
Fixes: sqlalchemy#455
Fixes: sqlalchemy#483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.