[Phpmyadmin-devel] Table Search: expected behavior
Kasun Chathuranga
chathuranga.jayaneththi at gmail.com
Fri Apr 5 14:17:08 CEST 2013
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.
MySQL LIKE clause takes a regular expression as its argument[2]. 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.
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#operator_like
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20130405/ddeeffc1/attachment.html>
More information about the Developers
mailing list