[Mono-bugs] [Bug 79476][Nor] New - SQL Parser and LIKE with non literal patterns

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Sep 22 17:44:32 EDT 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 equistango at gmail.com.


--- shadow/79476	2006-09-22 17:44:32.000000000 -0400
+++ shadow/79476.tmp.2698	2006-09-22 17:44:32.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 79476
+Product: Mono: Class Libraries
+Version: 1.1
+OS: SUSE 9.2
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com                            
+ReportedBy: equistango at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: SQL Parser and LIKE with non literal patterns
+Description of Problem:
+The SQL parser does not allow using the LIKE operator with a non literal
+In a sentence like "expression LIKE pattern", 'pattern' is only allowed to
+be a string literal.
+Expressions where 'pattern' is an expression or a column name should be
+From the MySQL 5.0 manual: "The pattern need not be a literal string. For
+example, it can be specified as a string expression or table column".
+Steps to reproduce the problem:
+Use SQL like this:
+  SELECT column FROM table WHERE 'hello' LIKE column
+Additional Information:
+.Net 1.1 and 2.0 allow the above syntax.
+There is a problem in
+class\System.Data\Mono.Data.SqlExpressions\Parser.jay: the definition for
+"LikePredicate" contains "ArithExpr LIKE StringLiteral". That is not
+correct. At least not in MySQL 4 and 5 SQL.
+Using Mono version

More information about the mono-bugs mailing list