[Mono-list] How to fix StrLike bug in 2.4
Andrus
kobruleht2 at hot.ee
Mon Mar 22 15:27:25 EDT 2010
Code below produes invalid result (False) in 2.4 and 2.6
How to fix it so it runs properly in 2.4.2 ?
Andrus.
using System;
using System.IO;
class Program
{
static void Main()
{
string source = @"SELECT COALESCE(kartotee.Aj,0) AS Aj,
kartotee.Doktyyp AS Doktyyp, COALESCE(kartotee.Dokumnr,0) AS Dokumnr,
COALESCE(kartotee.Hind,0) AS Hind, COALESCE(rid.Inpdoktyyp,'') AS
Inpdoktyyp,
COALESCE(rid.Inpdokumnr,0) AS Inpdokumnr, COALESCE(kartotee.Kogpak,0) AS
Kogpak, COALESCE(kartotee.Kogus,0) AS Kogus, kartotee.Kuupaev AS Kuupaev,
COALESCE(kartotee.Partii,'') AS Partii, COALESCE(kartotee.Skaubasumm,0) AS
Skaubasumm, COALESCE(kartotee.St,0) AS St, COALESCE(kartotee.Toode,'') AS
Toode, COALESCE(kartotee.Vkaubasumm,0) AS Vkaubasumm,
COALESCE(kartotee.Vm,0)
AS Vm, COALESCE(kartotee.Yksus,'') AS Yksus, COALESCE(Artliik.Arttyyp,'') AS
ArtliikArttyyp, COALESCE(Dok.Kellaaeg,'') AS DokKellaaeg, Dok.Kuupaev AS
DokKuupaev, COALESCE(Dok.Raha,'') AS DokRaha, COALESCE(Toode.Jaehind,0) AS
ToodeJaehind, COALESCE(Toode.Nimetus,'') AS ToodeNimetus,
COALESCE(Toode.Yhik,'') AS ToodeYhik
FROM ({0}) kartotee
JOIN prpalk ON true
JOIN toode ON kartotee.toode=toode.toode
LEFT JOIN artliik USING(grupp,liik)
LEFT JOIN rid ON rid.id=kartotee.id
LEFT JOIN dok ON kartotee.dokumnr=dok.dokumnr
LEFT JOIN klient ON dok.klient=klient.kood
";
string pattern = @"SELECT*FROM ({0}) *";
var res = Microsoft.VisualBasic.CompilerServices.StringType.StrLike(
source, pattern,
Microsoft.VisualBasic.CompareMethod.Text);
Console.WriteLine(res.ToString());
Console.ReadLine();
}
}
More information about the Mono-list
mailing list