Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13473 closed Patch - Feature (Fixed)

Handle databases that have auto increments other than 1

Reported by: mdabbs Owned by: Peter Bennett
Priority: minor Milestone: 31.0
Component: MythTV - General Version: v30-fixes
Severity: medium Keywords: RecGroupID
Cc: Ticket locked: no

Description

This patch adds a method to retrieve the RecGroupID from the database instead of assuming that the enumerated values match the auto-increments from the DB.

For DBs that have auto-increments of something other than 1, this will provide the correct ID as it was assigned by the DB.

Attachments (1)

mythtv-fixes-30-recording-groups.patch (6.4 KB ) - added by mdabbs 7 years ago.
Patch to provide ability to get RecGroupIDs form the DB instead of the enumeration

Download all attachments as: .zip

Change History (11)

by mdabbs, 7 years ago

Patch to provide ability to get RecGroupIDs form the DB instead of the enumeration

comment:1 by Peter Bennett, 7 years ago

Owner: set to Peter Bennett
Status: newassigned

comment:2 by Peter Bennett, 7 years ago

Before I can do anything about implementing this I need the name and email address of author of the code change to use in the github commit. I have the email address, but I do not know your name.

comment:3 by mdabbs, 7 years ago

Author name: Mike Dabbs

comment:4 by Peter Bennett, 7 years ago

My feelings on this

  • It likely affects very few users.
  • The proposed change adds database accesses.
  • It is possible that some users have decided to update the database and change the name of their default group to something else. The proposed change would clobber them.

I recommend a simple change rather in dbcheck.cpp to insert the special groups with the correct ids in the first place, regardless to the auto increment value. This should have been done at the start and this problem would never have happened.

For those who already have the wrong values, run this:

update recgroups set recgroupid = 1 where recgroup = 'Default';
update recorded set recgroupid = 1 where recgroup = 'Default';

Repeat for the other two special group names.

comment:5 by Peter Bennett <pbennett@…>, 7 years ago

In da558ca5f/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:6 by Peter Bennett <pbennett@…>, 7 years ago

In 5cde0578d8/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:7 by Peter Bennett <pbennett@…>, 7 years ago

In 7668cc59ab/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:8 by Peter Bennett <pbennett@…>, 7 years ago

In bf8956a98/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:9 by Peter Bennett, 7 years ago

Resolution: Fixed
Status: assignedclosed
Summary: Get RecGroupIDs from the DB instead of hard-coding them in an enumHandle databases that have auto increments other than 1

I have updated the title of the bug to reflect the problem that it being fixed. Closing the bug because it has been fixed, in a different way from the original description.

comment:10 by Stuart Auchterlonie, 7 years ago

Milestone: needs_triage31.0
Note: See TracTickets for help on using tickets.