[Mono-dev] New Mono.Data.Sqlite problems with UTF8 conversion on Windows

Marek Habersack grendello at gmail.com
Tue Jun 5 06:36:54 EDT 2007


On Sat, 2 Jun 2007 18:27:30 +0200, "Kamil Skalski" <kamil.skalski at gmail.com>
scribbled:

> Hello!
Hello Kamil,

> 
> I was trying to use the new implementation of Sqlite provider
> available now on mono, but I had  several problems with it...
> First of all it failed to perform BindParameters properly when I tried
> to use named parameters. After some debugging it appeared that the
> names of parameters are improperly read from data returned by sqlite
> native function. The problem was the usage of
> Marshal.PtrToStrAuto   in SQLiteConvert.cs
> function, which didn't properly decode strings on Windows system.
> I patched the implementation with the way it is done in old
> Mono.Data.SqliteClient - the implementation isn't very elegant, since
> it adds usage of unsafe pointer, but it worked well in the old
> implementation. If anybody knows a better way to convert unmanaged
> utf8 strings into managed string, without adding dependency on other
> libraries, then we could do this better.
I've applied your patch to svn, revision 78615. Thanks.

> The second problem I encounter with new implementation is that it
> seems to deadlock when there are two threads using the same
> data-base... I use separate connections for each thread, but it looks
> like when I perform data-modify operations from both, it locks totally
> (concurrent reads seems to be ok). If anyone has some suggestions,
> please let me know. For now I will stick with old implementation.
Could you file a bug with a simple test case and assign it to
mhabersack at novell.com? Thanks.

best regards,

marek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070605/d7def499/attachment.bin 


More information about the Mono-devel-list mailing list