| Summary: | search in collection browser returns inaccurate results | ||
|---|---|---|---|
| Product: | [Applications] amarok | Reporter: | Ljubomir <ljubomir> |
| Component: | Collection Browser | Assignee: | Amarok Bugs <amarok-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.4-SVN | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Ljubomir
2006-12-19 10:08:28 UTC
Same here, except I get alway the 3 same results no matters what I search. Same here, always the same results. And all contain the per cent sign %. the search is broken using a sqlite database, but works with MySql. There are no sql errors im Amarok's debug output. I broke something in the like function, then. SVN commit 615053 by aoliveira:
Oops...
Fix the search problems with sqlite.
BUG: 139002
M +3 -2 collectiondb.cpp
--- trunk/extragear/multimedia/amarok/src/collectiondb.cpp #615052:615053
@@ -6241,9 +6241,10 @@
int begin = pattern.startsWith( "%" ), end = pattern.endsWith( "%" );
if (begin)
- pattern = pattern.right( 1 );
+ pattern = pattern.right( pattern.length() - 1 );
if (end)
- pattern = pattern.left( pattern.length() - 2 );
+ pattern = pattern.left( pattern.length() - 1 );
+
if( argc == 3 ) // The function is given an escape character. In likeCondition() it defaults to '/'
pattern.replace( "/%", "%" ).replace( "/_", "_" ).replace( "//", "/" );
Yeah, fixed. Thx! |