Skip to content

Commit

Permalink
mytharchive: change offset to offset for MariaDB 10.6
Browse files Browse the repository at this point in the history
MariaDB 10.6 has added a new reserved word offset which
is used in MythTV as a column name in the tables filemarkup
and recordedseek requiring quoting of the name.

(cherry picked from commit 9c16537)
Signed-off-by: Bill Meek <billmeek@mythtv.org>
  • Loading branch information
garybuhrmaster authored and Bill Meek committed Jul 31, 2021
1 parent d59053b commit 46cf50b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchivehelper/main.cpp
Expand Up @@ -566,7 +566,7 @@ int NativeArchive::exportRecording(QDomElement &itemNode,

// add the recordedseek table
QDomElement recordedseek = doc.createElement("recordedseek");
query.prepare("SELECT chanid, starttime, mark, offset, type "
query.prepare("SELECT chanid, starttime, mark, `offset`, type "
"FROM recordedseek "
"WHERE chanid = :CHANID and starttime = :STARTTIME;");
query.bindValue(":CHANID", chanID);
Expand Down Expand Up @@ -1110,7 +1110,7 @@ int NativeArchive::importRecording(const QDomElement &itemNode,
QDomNode n6 = nodeList.item(x);
QDomElement e = n6.toElement();
query.prepare("INSERT INTO recordedseek (chanid, starttime, "
"mark, offset, type)"
"mark, `offset`, type)"
"VALUES(:CHANID,:STARTTIME,:MARK,:OFFSET,:TYPE);");
query.bindValue(":CHANID", chanID);
query.bindValue(":STARTTIME", startTime);
Expand Down

0 comments on commit 46cf50b

Please sign in to comment.