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

Fix various bugs found when testing strict SQL modes #1947

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jpwhite4
Copy link
Member

This pul request contains fixes for four different issues found when testing strict SQL mode. Each one is a different commit (for ease of review). The full changes needed to support strict SQL modes is a bit more involved - these are just the trivial ones.

Fix storage aggregator.

The physical_usage column in the fact table is nullable, but the one in the
aggregates table is not. This updates the load SQL to coalesce the null to 0 if necessary.

Fix SQL update string for XDUser

You can't call SQL function in PDO parameters. This code changes it so the that call to the MySQL
NOW() function is done good and proper like.

Update default values for XDUser's fks

Null is not an allowed value for the not null foreign keys to the organization
and person tables. This change initializes them to a valid value (-1 == Unknown)

Fix filter in Report Generator

The filter string was filtering out valid values for the Report Generator
delivery mode. This results in the valid string "E-mail" being converted to
a null which then getes converted to "E-mail" on the sql load if the
sql_mode is set empty. _Sigh_

The filter string was filtering out valid values for the Report Generator
delivery mode. This results in the valid string "E-mail" being converted to
a null which then getes converted to "E-mail" on the sql load if the
sql_mode is set empty. _Sigh_
Null is not an allowed value for the not null foreign keys to the organization
and person tables. This change initializes them to a valid value (-1 == Unknown)
You can't call SQL function in PDO parameters. This code changes it so the that call to the MySQL
NOW() function is done good and proper like.
The physical_usage column in the fact table is nullable, but the one in the
aggregates table is not. This updates the load SQL to coalesce the null to 0 if necessary.
@jpwhite4 jpwhite4 added the bug Bugfixes label Nov 22, 2024
@jpwhite4 jpwhite4 added this to the 11.5.0 milestone Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant