Opened 13 years ago

Closed 13 years ago

#1740 closed patch (fixed)

code around perl database warnings in myth.rebuilddatabase.pl

Reported by: gnassas@… Owned by: Isaac Richards
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Apparantly sql statements that don't return rows cause certain versions of perl or its database packages to emit "FREE ERROR BIND" messages to stderr. There is just such a statement in the rebuilddb script so this ticket codes around the issue.

Also, we now include the RecordFilePrefix? when building the commflag command so you don't have to be in the recordings directory when you import.

Also, filenames are now escaped for those who use the --norename option and build seek entries.

Also, a comment was realigned to sit with the code it's commenting on.

Also, various typos and half-truths were corrected.

Also, the version number was ticked up ever so slightly to reflect the umpteen changes that have happened over the years.

Attachments (2)

rebuild.diff.gz (1.7 KB) - added by gnassas@… 13 years ago.
da patch
rebuild-better.diff.gz (2.3 KB) - added by gnassas@… 13 years ago.
da better patch

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by gnassas@…

Attachment: rebuild.diff.gz added

da patch

comment:1 Changed 13 years ago by gnassas@…

A new patch follows with further improvements based on comments from Otto Kolsi:

DB does not accept null values into the time columns. If user does not 
give starttime, script should either use current time or take file 
timestamp and use that. It might suggest one of these values by default.

If 24-hour clock is used and user gives program length in minutes, 
script inserts endtime in 12-hour format to the DB. So that 60min 
program starts 21:00 and ends 10:00. Not sure if frontend cares about 
this but mythweb does not show these programs at all.

Changing time format from HH:mm.. to hh:mm.. in the only time_format() 
call (time_format("yyyy-mm{on}-dd HH:mm{in}:ss" ...) fixes this issue 
for me. Not sure if this is okay for 12-hour users.

sorry about the HH/hh 12/24 hour thing, I was looking at the manpage as I coded that and still picked the wrong one :/

With this update a reasonable default is chosen for program title so it's possible to run the script with no input and get acceptable results.

Changed 13 years ago by gnassas@…

Attachment: rebuild-better.diff.gz added

da better patch

comment:2 Changed 13 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [10047]) Enhancements to the rebuilddatabase script.

See ticket #1740 for all the gory details.

Closes #1740.

Note: See TracTickets for help on using tickets.