Opened 16 years ago
Closed 16 years ago
#8733 closed defect (fixed)
(insert|update)_dtv_multiplex debug output does not include values being updated
| Reported by: | Nick Morrott <knowledgejunkie (at) gmail (dot) com> | Owned by: | robertm |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.24 |
| Component: | MythTV - Channel Scanner | Version: | Master Head |
| Severity: | medium | Keywords: | channel scanner debug log output |
| Cc: | Ticket locked: | no |
Description
The VB_CHANSCAN output emitted to the logfile when insert_dtv_multiplex() in called (line 193 of mythtv/libs/libmythtv/channelutil.cpp) does not contain the actual values of the settings being inserted/updated. Instead, the string contains the names of the variables being bound in the SQL query but not their values.
This results in the log being "spammed" with the following duplicated line for each channel added (and for DVB-S, this can be several hundred channels).
INSERT INTO dtv_multiplex (sourceid, sistandard, frequency, modulation, transportid, networkid, symbolrate, bandwidth, polarity, inversion, transmission_mode, fec, constellation, hierarchy, hp_code_rate, lp_code_rate, guard_interval, mod_sys, rolloff) VALUES (:SOURCEID, :SISTANDARD, :FREQUENCY1, :MODULATION, :TRANSPORTID, :NETWORKID, :SYMBOLRATE, :BANDWIDTH, :POLARITY, :INVERSION, :TRANS_MODE, :INNER_FEC, :CONSTELLATION, :HIERARCHY, :HP_CODE_RATE, :LP_CODE_RATE, :GUARD_INTERVAL, :MOD_SYS, :ROLLOFF);
The log of a full UK DVB-T scan which includes this is attached to #8731
Attachments (1)
Change History (9)
comment:1 by , 16 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 16 years ago
| Status: | assigned → infoneeded |
|---|
by , 16 years ago
| Attachment: | channelutil.logging.diff added |
|---|
Output last executed query in logging of channel scanner.
comment:3 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | infoneeded → closed |
comment:4 by , 16 years ago
In testing with a debug build of r26195, the update did not fix the issue but replaced each bound variable's name with a question mark. First few inserts follow:
2010-09-10 08:44:59.348 New DB DataDirect connection 2010-09-10 08:44:59.349 Connected to database 'mythconverg' at host: localhost 2010-09-10 08:44:59.351 insert_dtv_multiplex(1, 'dvb', 746000000, auto, 24576, 9018...) mplexid:0 2010-09-10 08:44:59.352 insert_dtv_multiplex -- insert 0 INSERT INTO dtv_multiplex (sourceid, sistandard, frequency, modulation, transportid, networkid, symbolrate, bandwidth, polarity, inversion, transmission_mode, fec, constellation, hierarchy, hp_code_rate, lp_code_rate, guard_interval, mod_sys, rolloff) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); 2010-09-10 08:44:59.352 insert_dtv_multiplex -- inserted 1 Insert(dvb): 18 2010-09-10 08:44:59.355 insert_dtv_multiplex(1, 'dvb', 746000000, auto, 24576, 9018...) mplexid:1 2010-09-10 08:44:59.356 insert_dtv_multiplex -- update 1 UPDATE dtv_multiplex SET frequency = ?, modulation = ?, symbolrate = ?, bandwidth = ?, polarity = ?, inversion = ?, transmission_mode= ?, fec = ?, constellation = ?, hierarchy = ?, hp_code_rate = ?, lp_code_rate = ?, guard_interval = ?, mod_sys = ?, rolloff = ? WHERE sourceid = ? AND sistandard = ? AND transportid = ? AND networkid = ? Insert(dvb): 21 2010-09-10 08:44:59.359 insert_dtv_multiplex(1, 'dvb', 746000000, auto, 24576, 9018...) mplexid:1 2010-09-10 08:44:59.360 insert_dtv_multiplex -- update 1 UPDATE dtv_multiplex SET frequency = ?, modulation = ?, symbolrate = ?, bandwidth = ?, polarity = ?, inversion = ?, transmission_mode= ?, fec = ?, constellation = ?, hierarchy = ?, hp_code_rate = ?, lp_code_rate = ?, guard_interval = ?, mod_sys = ?, rolloff = ? WHERE sourceid = ? AND sistandard = ? AND transportid = ? AND networkid = ? Insert(dvb): 12 2010-09-10 08:44:59.363 insert_dtv_multiplex(1, 'dvb', 746000000, auto, 24576, 9018...) mplexid:1 2010-09-10 08:44:59.364 insert_dtv_multiplex -- update 1 UPDATE dtv_multiplex SET frequency = ?, modulation = ?, symbolrate = ?, bandwidth = ?, polarity = ?, inversion = ?, transmission_mode= ?, fec = ?, constellation = ?, hierarchy = ?, hp_code_rate = ?, lp_code_rate = ?, guard_interval = ?, mod_sys = ?, rolloff = ? WHERE sourceid = ? AND sistandard = ? AND transportid = ? AND networkid = ?
On a more general note, why does the log output not include the channel data being inserted (which is always different) and instead duplicate the same multiplex information a dozen or more times? Would it not be more useful to first log the list of muxes being inserted/updated, and then log the list of channels being inserted from the scan?
comment:5 by , 16 years ago
| Milestone: | unknown → 0.24 |
|---|---|
| Resolution: | fixed |
| Status: | closed → new |
I'll look at this over the weekend
comment:6 by , 16 years ago
| Status: | new → assigned |
|---|
comment:7 by , 16 years ago
| Owner: | changed from to |
|---|
comment:8 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

Nick, can you please test this patch?