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

Compatibility issues with MariaDB 10.x and allow_null field attribute #196

Closed
drn05r opened this issue Jan 20, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@drn05r
Copy link
Contributor

drn05r commented Jan 20, 2022

If allow_null is set to 0 for a field (e.g. in cfg/cfg.d/eprint_fields.pl) then when the database is created (in MariaDB 10,5 but possibly also earlier versions of MariaDB 10) the table has an inconsistency which prevents new data objects (e.g. eprints) being created with the following error:

Field 'myfield' doesn't have a default value at /opt/eprints3/perl_lib/EPrints/Database.pm line 1389.

@drn05r drn05r added the bug Something isn't working label Jan 20, 2022
@drn05r drn05r added this to the 3.4.4 milestone Jan 20, 2022
@drn05r drn05r self-assigned this Jan 20, 2022
@drn05r
Copy link
Contributor Author

drn05r commented Jan 21, 2022

There seems to be no good reason for allow_null as a field attribute if you cannot also set the default to be defined with the table structure. Although defaults can be set in eprint_fields_default.pl, these don't look to be passed through to the table structure and they would likely cause hassle even if they did, as it would be difficult to subsequently update the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant