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

[TEST] Update test to support for 8.0.19 change #17354

Merged
merged 1 commit into from
May 19, 2020

Conversation

seamuslee001
Copy link
Contributor

Overview

This updates the logging test for changes in MySQL version 8.0.19

Before

Tests could fail because the integer length is no longer reported

After

Tests pass on MySQL version 8.0.19

Technical Details

"Display width specification for integer data types was deprecated in MySQL 8.0.17, and now statements that include data type definitions in their output no longer show the display width for integer types, with these exceptions:

The type is TINYINT(1). MySQL Connectors make the assumption that TINYINT(1) columns originated as BOOLEAN columns; this exception enables them to continue to make that assumption.

The type includes the ZEROFILL attribute.

This change applies to tables, views, and stored routines, and affects the output from SHOW CREATE and DESCRIBE statements, and from INFORMATION_SCHEMA tables.

For DESCRIBE statements and INFORMATION_SCHEMA queries, output is unaffected for objects created in previous MySQL 8.0 versions because information already stored in the data dictionary remains unchanged. This exception does not apply for upgrades from MySQL 5.7 to 8.0, for which all data dictionary information is re-created such that data type definitions do not include display width. (Bug #30556657, Bug #97680)"

Source: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-19.html

ping @eileenmcnaughton @totten @pfigel

@civibot
Copy link

civibot bot commented May 18, 2020

(Standard links)

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 I think for readablily I would add a function to the class like isMysqlVersion8() - but this seems like a sensible change that doesn't detract from the cover

@pfigel
Copy link
Contributor

pfigel commented May 18, 2020

@seamuslee001 This looks reasonable to me - although now that I think about it, using a varchar field in testLengthChange would test the same code path without the version check complexity. Both options would be okay, I think.

@seamuslee001 seamuslee001 force-pushed the mysql8_master branch 2 times, most recently from c30d25c to 7b305ff Compare May 19, 2020 03:48
Update test following Eileen comments
@eileenmcnaughton eileenmcnaughton merged commit 0feda4a into civicrm:master May 19, 2020
@eileenmcnaughton eileenmcnaughton deleted the mysql8_master branch May 19, 2020 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants