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

Update MySQL boolean behaviour from TinyInt(1) to TinyInt #5130

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

MalloD12
Copy link
Contributor

@MalloD12 MalloD12 commented Oct 26, 2023

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Starting from 8.0.17, MySQL shows a warning ("Integer display width is deprecated and will be removed in a future release") when directly using tinyint(1), instead of tinyint. So, here we are updating BooleanType class to address this change.

Fixes #5069

Things to be aware of

  • None

Things to worry about

  • None

Additional Context

@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@rberezen
Copy link
Contributor

Possibly there could be some test harness failures (I searched through code, I guess should be fine), but we can't check until we merge, since test-harness execution is broken currently.

@MalloD12
Copy link
Contributor Author

Possibly there could be some test harness failures (I searched through code, I guess should be fine), but we can't check until we merge, since test-harness execution is broken currently.

Yeap, test harness will fail but I have created this PR for that which I'll ask interop team to merge it when have this one merged.

@rberezen
Copy link
Contributor

Possibly there could be some test harness failures (I searched through code, I guess should be fine), but we can't check until we merge, since test-harness execution is broken currently.

Yeap, test harness will fail but I have created this PR for that which I'll ask interop team to merge it when have this one merged.

oh,nice! I have not found anything related to TinyInt(1) cause I have an old repo state...Thanks Daniel!

@filipelautert filipelautert added this to the 1NEXT milestone Nov 24, 2023
@filipelautert filipelautert merged commit 11da6e4 into master Dec 4, 2023
31 of 32 checks passed
@filipelautert filipelautert deleted the fix-issue-5069 branch December 4, 2023 16:21
@PetterIsberg
Copy link

I know this is already merged so I should probably create a proper issue for it, but the mysql jdbc driver can convert between TINYINT(1) and BOOLEAN automatically. This is because boolean is an alias for tinyint(1) in mysql.
Creating a column with type boolean in mysql server will create it as tinyint(1) without any warnings.
This PR will probably break the auto-conversion functionality, as columns created in Liquibase as booleans will no longer be tinyint(1) and thus not identified as booleans by the jdbc connector.
Hope my explanation makes sense.
"BOOL, BOOLEAN These types are synonyms for TINYINT(1)" [ https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html ]
if tinyInt1isBit=true return boolean : [ https://dev.mysql.com/doc/connector-j/en/connector-j-reference-type-conversions.html ]

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

Successfully merging this pull request may close these issues.

MYSQL - Update TinyInt(1) boolean behavior to TinyInt
4 participants