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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79476 --- 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 +Resolution: +Severity: +Priority: Normal +Component: Sys.Data +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +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 +pattern. + +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 +allowed. + +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". + +http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html + + +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 1.1.17.1. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
