Opened 18 months ago
Closed 15 months ago
Last modified 15 months 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)
Change History (11)
Changed 18 months ago by
Attachment: | mythtv-fixes-30-recording-groups.patch added |
---|
comment:1 Changed 18 months ago by
Owner: | set to Peter Bennett |
---|---|
Status: | new → assigned |
comment:2 Changed 18 months ago by
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:4 Changed 18 months ago by
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:9 Changed 15 months ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
Summary: | Get RecGroupIDs from the DB instead of hard-coding them in an enum → Handle 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 Changed 15 months ago by
Milestone: | needs_triage → 31.0 |
---|
Patch to provide ability to get RecGroupIDs form the DB instead of the enumeration