Page 1 of 1

V3.0.3.1148 Entering "; in search bar causes Error dialog

Posted: Wed Apr 02, 2008 4:42 pm
by chrisjj
... saying:
There was a problem querying the database:
Error executing SQL "SELECT Songs.*
FROM Songs WHERE (((Songs.SongTitle like '%;%' OR Songs.Custom1 like '%;%' OR Songs.Custom2 like '%;%' OR
Songs.Custom3 like '%;%' OR Songs.Custom4 like '%;%' OR Songs.Custom5 like '%;%' OR () OR Songs.Copyright like
'%;%' OR Songs.Publisher like '%;%' OR Songs.Encoder like '%;%' OR Songs.InvolvedPeople like '%;%' OR
Songs.OrigTitle like '%;%' OR Songs.OrigArtist like '%;%' OR Songs.OrigLyricist like '%;%' OR Songs.GroupDesc like
'%;%' OR Songs.SubTitle like '%;%' OR Songs.ISRC like '%;%' OR Songs.MediaType like '%;%' OR Songs.ID in
(SELECT ArtistsSongs.IDSong FROM ArtistsSongs,Artists WHERE ArtistsSongs.IDArtist=Artists.ID AND (Artists.Artist
like '%;%' OR Artists.Comment like '%;%')UNION SELECT GenresSongs.IDSong FROM GenresSongs,Genres WHERE
GenresSongs.IDGenre=Genres.IDGenre AND Genres.GenreName like '%;%' UNION SELECT ListsSongs.IDSong FROM
ListsSongs,Lists WHERE ListsSongs.IDList=Lists.ID AND Lists.TextData like '%;%' UNION SELECT Songs.ID FROM
Songs WHERE Songs.IDAlbum in (SELECT ArtistsAlbums.IDAlbum FROM ArtistsAlbums,Artists WHERE
ArtistsAlbums.IDArtist=Artists.ID AND Artists.Artist like '%;%' UNION SELECT ID FROM Albums WHERE Albums.Album
like '%;%' OR Albums.Comment like '%;%')))))
" : near ")": syntax error (1, 1)

Posted: Wed Apr 02, 2008 4:50 pm
by Bex
There was a problem querying the database:
Error executing SQL "SELECT Songs.*
FROM Songs WHERE (((Songs.SongTitle like '%;%' OR Songs.Custom1 like '%;%' OR Songs.Custom2 like '%;%' OR
Songs.Custom3 like '%;%' OR Songs.Custom4 like '%;%' OR Songs.Custom5 like '%;%' OR () OR Songs.Copyright like
'%;%' OR Songs.Publisher like '%;%' OR Songs.Encoder like '%;%' OR Songs.InvolvedPeople like '%;%' OR
Songs.OrigTitle like '%;%' OR Songs.OrigArtist like '%;%' OR Songs.OrigLyricist like '%;%' OR Songs.GroupDesc like
'%;%' OR Songs.SubTitle like '%;%' OR Songs.ISRC like '%;%' OR Songs.MediaType like '%;%' OR Songs.ID in
(SELECT ArtistsSongs.IDSong FROM ArtistsSongs,Artists WHERE ArtistsSongs.IDArtist=Artists.ID AND (Artists.Artist
like '%;%' OR Artists.Comment like '%;%')UNION SELECT GenresSongs.IDSong FROM GenresSongs,Genres WHERE
GenresSongs.IDGenre=Genres.IDGenre AND Genres.GenreName like '%;%' UNION SELECT ListsSongs.IDSong FROM
ListsSongs,Lists WHERE ListsSongs.IDList=Lists.ID AND Lists.TextData like '%;%' UNION SELECT Songs.ID FROM
Songs WHERE Songs.IDAlbum in (SELECT ArtistsAlbums.IDAlbum FROM ArtistsAlbums,Artists WHERE
ArtistsAlbums.IDArtist=Artists.ID AND Artists.Artist like '%;%' UNION SELECT ID FROM Albums WHERE Albums.Album
like '%;%' OR Albums.Comment like '%;%')))))
" : near ")": syntax error (1, 1)
I highlighted the error (OR () OR)

Posted: Thu Apr 03, 2008 10:33 am
by Ludek
Thank you for reporting this. It is a regression. Will be fixed in the next beta release.

Posted: Thu Apr 03, 2008 10:49 am
by chrisjj
You're welcome!

Posted: Tue Apr 15, 2008 4:13 am
by chrisjj
> 4570 Fixed Searching with a quote triggers an SQL error for some fields

Confirmed on 1159 this search no longer causes any error. Thanks.