Is there a fixed length Valentina uses to index varchars?
Bart Pietercil
bart.pietercil at cognosis.be
Mon Feb 21 02:12:05 CST 2011
Yes, 127(8?) characters.
The workaround we use is converting the string with the MD5 function, which works for us but is not guaranteed to be unique.
Bart Pietercil
CTO Cognosis NV
On 21 Feb 2011, at 03:29, Chris Jones wrote:
> Hi,
>
> I am working on a table that stores a bunch of file paths, I have created it roughly as so:
>
> fldBasePathID ObjectPtr; -indexed
> fldFilename VarChar(2044); -indexed
> fldPath VarChar(2044);-indexed
> ...
> fldFullPath VarChar(2044), Method: "LOWER( CONCAT( '<', ISNULL(fldBasePathID,'0'), '>', '/', ISNULL(fldPath,''), '/', fldFilename ) )"); -indexed,unqiue
> fldPathLookUp String(32), Method: "MD5( fldFullPath )")
>
> BasePath points to a list of base file paths that are common among many of the files.
> It works great for most data, but I've run into two similar files that conflict:
>
> (2,'Runtime/libraries/Pose/DAZ's Victoria 4/Morph Injections/V4 Elite Ethnic Faces/1_FullHead & Face','AmericanIndian_Faceshape.png')
> (2,'Runtime/libraries/Pose/DAZ's Victoria 4/Morph Injections/V4 Elite Ethnic Faces/1_FullHead & Face','AmericanIndian_Faceshape.pz2')
>
> I've found that if I replace the 'p' (from png or pz2) in either with another letter the records insert fine, but if they are the same letter I get a conflict in the fldFullPath constraint. I've also fund that if I remove the extension completely on one of them but lengthen both paths by the same string it doesn't work either. Is the unique index no taking all the characters into account?
>
> --Christopher Jones
>
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list