[prev in list] [next in list] [prev in thread] [next in thread]
List: mythtv-commits
Subject: [mythtv-commits] [MythTV/mythtv] 26804b: No NULL strings in SQL query for Gallery.
From: kmdewaal via mythtv-commits <mythtv-commits () mythtv ! org>
Date: 2022-10-11 20:12:48
Message-ID: MythTV/mythtv/push/refs/heads/master/84a913-26804b () github ! com
[Download RAW message or body]
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 26804b7c612a92e1e725a05a821c3ac7cb140835
https://github.com/MythTV/mythtv/commit/26804b7c612a92e1e725a05a821c3ac7cb140835
Author: Klaas de Waal <klaas@kldo.nl>
Date: 2022-10-11 (Tue, 11 Oct 2022)
Changed paths:
M mythtv/libs/libmythmetadata/imagemanager.cpp
Log Message:
-----------
No NULL strings in SQL query for Gallery.
String fields filename, name, path (comment) and extension in database table \
gallery_files cannot be NULL. Scanning the storage group for pictures can result in a \
database error like this: 2022-10-11 21:56:11.606192 E Original query failed, but \
resend with empty strings in place of NULL strings worked. DB Error (MSqlQuery):
Query was:
INSERT INTO gallery_files (file_id, filename, name, dir_id, type, modtime, size, \
extension, date, hidden, orientation, angle, path, zoom) VALUES (0, ?, ?, ?, ?, \
?, ?, ?, ?, ?, ?, ?, ?, ?); Bindings were:
> COMMENT="", :COVER=0, :DATE=1665518171, :EXTENSION=NULL, :FILEPATH="", :FS=0,
> HIDDEN=false, :MODTIME=1665518171, :NAME="", :ORIENT=0, :PARENT=0, :SIZE=0,
> TYPE=1
Driver error was [2/1048]:
QMYSQL3: Unable to execute statement
Database error was:
Column 'extension' cannot be null
This is fixed for all four string fields by using the bindValueNoNull function to \
bind the value.
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic