Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3154 closed defect (fixed)

CD Ripper mysql errors

Reported by: stuartm Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythmusic Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no


If either, Artist, Album or Title are empty then the query in Ripper::isNewTune causes an error.

QMYSQL3: Unable to execute query
Database error was:
Got error 'empty (sub)expression' from regexp

I'm not exactly sure I understand the expected behaviour of this function. The REGEXPs seem unlikely to match anything other than an exact match, in which case wouldn't straight matching be a better choice? Or if ignoring punctuation etc is important, then LIKE is probably preferable.

I've attached a patch which uses bindValues and LIKE, together with some checks to see that the artist/album/title aren't empty if it's any use.

Attachments (1)

mythmusic_isnewtune.diff (2.4 KB) - added by stuartm 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by stuartm

Attachment: mythmusic_isnewtune.diff added

comment:1 Changed 14 years ago by stuartm

Resolution: fixed
Status: newclosed

(In [12994]) Closes #3154

Fix mysql errors caused by empty title, artist or album when ripping CDs.

Also replace unnecessary mysql REGEXPs with LIKE.

comment:2 Changed 14 years ago by stuartm

Milestone: unknown0.21
Note: See TracTickets for help on using tickets.