Kasun Chathuranga a écrit :
Hi all,
I'm trying to fix bug #3865[1] and I have some queries regarding the expected behavior that I'd like to get clarified.
Hi, I have not yet tried to reproduce this bug, have you?
MySQL LIKE clause takes a regular expression as its argument[2].
Not exactly; it takes a "SQL simple regular expression" which is not the same as a regular expression.
In the table search interface phpMyAdmin facilitate querying a field with a LIKE clause by letting the user select the option from a drop down.
So I'd like to know whether phpMyAdmin should consider the text entered by the user to be a regular expression (and pass it as it is) or consider it to be the text to match (and do the necessary escaping)?
If we are to escape the user entered text following are some of the replacements that should be done % => % _ => _ \ => \ (at the end of the text) or \\ (any where else in the text) \n => \n
If we escape the user entered text, user cannot query with MySQL wildcards % and _, limiting the full power of MySQL pattern matching.
Users expect to be able to enter MySQL wildcards, so this behavior must be maintained.
I would be grateful if you could clarify the expected behavior.
Thanks in advance.
-- Regards Kasun Chathuranga
[1] http://sourceforge.net/p/phpmyadmin/bugs/3865/ [2] http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#oper...
Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel