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

errors when running mythfilldatabase with Qt6 and NOT NULL database fields #962

Open
garybuhrmaster opened this issue Nov 6, 2024 · 0 comments · May be fixed by #963
Open

errors when running mythfilldatabase with Qt6 and NOT NULL database fields #962

garybuhrmaster opened this issue Nov 6, 2024 · 0 comments · May be fixed by #963

Comments

@garybuhrmaster
Copy link
Contributor

Platform: Fedora 41, building/running with Qt6 6.8.0.

There are some cases in Fedora 41 with Qt6 in which showtype, colorcode, and title_pronounce are used as a null rather than an empty string, resulting in errors when running mythfilldatabase of the form:

Original query failed, but resend with empty strings in place of NULL strings worked.
DB Error (MSqlQuery):
Query was:
REPLACE INTO program (  chanid,         title,          subtitle,        description,   category,       category_type,    starttime,      endtime,   closecaptioned, stereo,         hdtv,            subtitled,   subtitletypes,  audioprop,      video>
Driver error was [2/1048]:
QMYSQL: Unable to execute statement
Database error was:
Column 'showtype' cannot be null

The showtype, colorcode, and title_pronounce columns are defined as NOT NULL, so it would seem that these should always have been surrounded with a denullify().  While for Qt5 null values are converted to empty strings, for Qt6 it must be explicit. In the case of inetref, while it is defined as possible being NULL, the Qt5 implementations stored it as empty, so match that behavior in Qt6 (as the expression "= NULL" is not the same as "is NULL").


PR will be created with a proposed fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant