[Mono-bugs] [Bug 76494][Min] Changed - Mono.Data.SqliteClient
Memory corruption when reusing connection after DELETE with
named parameters
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Oct 24 18:16:43 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by tekhedd at byteheaven.net.
http://bugzilla.ximian.com/show_bug.cgi?id=76494
--- shadow/76494 2005-10-24 17:55:12.000000000 -0400
+++ shadow/76494.tmp.29609 2005-10-24 18:16:43.000000000 -0400
@@ -165,6 +165,46 @@
events warrant.
------- Additional Comments From tekhedd at byteheaven.net 2005-10-24 17:55 -------
Created an attachment (id=15983)
An updated patch against svn that explicitly marshals text parameters as 16-bit (aka unicode)
+
+------- Additional Comments From tekhedd at byteheaven.net 2005-10-24 18:16 -------
+About patch 15983.
+
+This patch is untested against sqlite2. I wonder how to install them
+in parallel on gentoo?
+
+Changes:
+
+- Explicitly marshals the query and string parameters as 16-bit (aka
+"unicode") for sqlite 3, regardless of the "native" format of strings.
+Since internal strings are natively unicode, this should be more
+efficient in most situations.
+
+- Passed a delegate for string destruction, so sqlite does not have to
+immediately copy string parameters. I'm not sure whether the sqlite
+engine takes advantage of this feature, but it is obviously there for
+efficiency. The delegate creation may actually reduce efficiency for
+large strings, but I don't know if it's worth throwing in a "string
+length" conditional. If this turns into a bottleneck it should show up
+in memory profiling.
+
+- This has a fix where the return value of sqlite3_bind_parameter_name
+was not marshalled. This resulted in heap corruption in some cases.
+
+- The Interop wrapper for sqlite3_bind_int64 had its parameters in the
+wrong order, which would result in garbage being saved when using long
+(Int64) parameters.
+
+- BeginTransaction(IsolationLevel) was not implemented, and returning
+null (but not throwing NotImplemented, which is odd). I have converted
+this to a wrapper which simply calls BeginTransaction(), but I am not
+entirely certain that this is correct behavior.
+
+So, it is obvious that I need to spend more time with the sqlite test
+suite and update the tests to detect these things. Also, this code
+should be tested under sqlite2.
+
+Apologies for any departures from mono best practices. I am sort of in
+a crunch right now. :)
More information about the mono-bugs
mailing list