bug bestalias homonymes
authorRaphael Marichez <falco@m4x.org>
Sun, 5 Dec 2004 16:32:25 +0000 (16:32 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:26:31 +0000 (23:26 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-52

upgrade/0.9.3/10_aliases.sql

index a8d8471..4217921 100644 (file)
@@ -5,6 +5,7 @@ alter table aliases change column type type enum('a_vie','alias','homonyme','lis
 alter table aliases add index (flags);
 
     update  aliases AS a
-left  join  aliases AS b ON(a.id=b.id and b.alias like '%.%' and length(b.alias)<length(a.alias))
+left  join  aliases AS b 
+       ON(a.id=b.id and b.alias like '%.%' and length(b.alias)<length(a.alias) and b.type!='homonyme')
        set  a.flags=CONCAT(a.flags,',bestalias')
-     where  a.alias LIKE '%.%' and b.alias IS NULL and a.type!='homonyme' and b.type!='homonyme';
+     where  a.alias LIKE '%.%' and b.alias IS NULL and a.type!='homonyme';