[mythtv-commits] Ticket #11588: Patch: housekeeping upgrade conflicts when hostnames contain dashes

MythTV noreply at mythtv.org
Mon Jun 10 18:50:19 UTC 2013


#11588: Patch: housekeeping upgrade conflicts when hostnames contain dashes
------------------------------------+----------------------------------
 Reporter:  Bill Meek <keemllib@…>  |           Type:  Patch - Bug Fix
   Status:  new                     |       Priority:  minor
Milestone:  unknown                 |      Component:  MythTV - General
  Version:  Master Head             |       Severity:  medium
 Keywords:                          |  Ticket locked:  0
------------------------------------+----------------------------------
 changeset:463953f upgrades mythconverg from DBSchemaVer 1310 to 1311.

 Upgrade failure case:

 Full backend log addached, but the failure was:
 {{{
 Duplicate entry 'JobQueueRecover-mc1' for key 'task'
 }}}

 My host is 'mc0' and my test platform ('mc1') can
 be run as a slave to it, and is named 'slave-mc1'.

 Unfortunately, the slave was initially named 'mc1'.

 Full dump of housekeeping before the upgrade is attached,
 but the failure is generated because of these two entries:
 {{{
 ('JobQueueRecover-mc1','2013-03-07 00:02:53')
 ('JobQueueRecover-slave-mc1','2013-05-10 22:19:05');
 }}}

 Attempts to re-run the upgrade result in failures
 due to the oldhousekeeping table already existing.

 Since the failure was caused by the last two lines
 in the existing table, all of the other entries
 were converted to the new format successfully.

 Users with (non-host-matching) dashes case:

 Users with -'s in their hostnames (or profile IDs)
 would have their housekeeping entries truncated.
 So, mythtv-backend would become just backend.

 The patch is untested (but it compiles OK,) and
 the following were done on mysql 5.5.31.
 {{{
 SELECT RIGHT('abc-def-xyz', LENGTH('abc-def-xyz') - LENGTH(SUBSTRING_INDEX
 ('abc-def-xyz', '-', 1)) -1);
 SELECT RIGHT('abc-defxyz', LENGTH('abc-defxyz') - LENGTH(SUBSTRING_INDEX
 ('abc-defxyz', '-', 1)) -1);

 SELECT SUBSTRING('abc-def-ghi' FROM LENGTH(SUBSTRING_INDEX('abc-def-ghi',
 '-', 1)) +2);
 SELECT SUBSTRING('abc-defghi' FROM LENGTH(SUBSTRING_INDEX('abc-defghi',
 '-', 1)) +2);
 }}}
 Returns: def-xyz and defxyz respectively.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/11588>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list