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

2007-06-05 Thread Marek Habersack
On Sat, 2 Jun 2007 18:27:30 +0200, Kamil Skalski [EMAIL PROTECTED]
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
[EMAIL PROTECTED] Thanks.

best regards,

marek



signature.asc
Description: PGP signature
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


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

2007-06-04 Thread Kamil Skalski

Hello!

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.

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.

--
Kamil Skalski
http://nazgul.omega.pl


sqlite_utf.diff
Description: Binary data
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list