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

Database column type of payload should be VARBINARY, not BINARY #41

Open
lbilger opened this issue Feb 1, 2023 · 2 comments
Open

Database column type of payload should be VARBINARY, not BINARY #41

lbilger opened this issue Feb 1, 2023 · 2 comments
Assignees
Labels
Type: bug Something isn't working
Milestone

Comments

@lbilger
Copy link
Collaborator

lbilger commented Feb 1, 2023

Steps to reproduce

  • Library version: 1.1.0
  • JDK version: irrelevant
  • Operating system: irrelevant
  • Complete executable reproducer: n/a
  • Steps: n/a

The type of the payload column in the database table is currently BINARY (in the MyBatis mapper as well as the DDL in the examples), which is a fixed-length data type. This will take up the maximum space for every row, even if the payload is smaller than that. We should use VARBINARY instead.

Workaround: I haven't tried yet, but I think it should be possible to just use VARBINARY in the actual database table, so this is mainly an issue with the examples.

@lbilger lbilger added the Type: bug Something isn't working label Feb 1, 2023
@zambrovski
Copy link
Member

Have you tried?

@lbilger
Copy link
Collaborator Author

lbilger commented May 31, 2023

Yes, I changed it to VARBINARY(MAX) for one of our apps and it seems to work.

@zambrovski zambrovski added this to the 1.4.0 milestone Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants