[Mono-bugs] [Bug 77263][Wis] New - Sqlite Command Crashes on Trailing Whitespace

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jan 15 01:56:48 EST 2006


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 jhill at arcfocus.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77263

--- shadow/77263	2006-01-15 01:56:48.000000000 -0500
+++ shadow/77263.tmp.24173	2006-01-15 01:56:48.000000000 -0500
@@ -0,0 +1,84 @@
+Bug#: 77263
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Data.SqlClient
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: jhill at arcfocus.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Sqlite Command Crashes on Trailing Whitespace
+
+Description of Problem:
+In Sqlite, SQL statements with trailing whitespace, for instance:
+
+"SELECT * FROM FirstTable;   "
+
+will crash, whereas
+
+"SELECT * FROM FirstTable;"
+
+will execute okay.
+
+Steps to reproduce the problem:
+1. Create and populate a sqlite database:
+
+CREATE TABLE `FirstTable` (
+  `Name` TEXT NOT NULL default ''
+);
+
+INSERT INTO FirstTable Values ("FirstTable FirstRow");
+INSERT INTO FirstTable Values ("FirstTable SecondRow");
+
+2. Create a C# program to access this data:
+using System;
+using System.Data;
+using Mono.Data.SqliteClient;
+
+namespace AppX
+{
+	class X
+	{
+		static void Main(string[] args)
+		{
+			SqliteCommand cmd = new SqliteCommand();
+			SqliteConnection connection = new
+SqliteConnection(@"version=3,URI=file:C:\Temp\x.db");
+			connection.Open();
+			cmd.Connection = connection;
+			cmd.CommandText = "SELECT * FROM FirstTable; ";
+			cmd.CommandType = CommandType.Text;
+					
+			SqliteDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
+
+			while(dr.Read()) {
+				Console.WriteLine(dr[0].ToString());
+			}
+		}
+	}
+}
+
+3. Build x.cs:
+mcs x.cs -r:Mono.Data.SqliteClient -r:System.Data
+
+4. Execute x.exe
+mono x.exe
+
+Actual Results:
+Crash.  On windows, the error is "Fatal error in gc" "Too many heap sections"
+
+Expected Results:
+FirstTable FirstRow
+FirstTable SecondRow
+
+How often does this happen? 
+Always
+
+Additional Information:


More information about the mono-bugs mailing list