Mailing List Archive

[MythTV/mythtv] 7ec562: DB Schema Update: Change lambda capture from 'by v...
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 7ec562f39820b92c672d430058d2c81cf4844bbd
https://github.com/MythTV/mythtv/commit/7ec562f39820b92c672d430058d2c81cf4844bbd
Author: Patrick J. Maloney <patrick@patrickjmaloneyllc.com>
Date: 2024-01-01 (Mon, 01 Jan 2024)

Changed paths:
M mythtv/libs/libmythtv/dbcheck.cpp

Log Message:
-----------
DB Schema Update: Change lambda capture from 'by value' to 'by reference'

This fix corrects a program abort when updating from db version 1302 to 1303.
The problem is that the 'ORDER BY' column name is not specified, causing a
fatal SQL error. The column name should be either 'starttime' or '-starttime'
depending on your time zone.

This occurs because the lambda capture is 'by value' and takes on the value
at the time it was created (which is empty). Further updates to the local
variable are not available to the lambda expression.

Switching the lambda capture to 'by reference' resolves this issue.

Signed-off-by: Klaas de Waal <klaas@kldo.nl>


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits