[Phpmyadmin-devel] Table Search: expected behavior
chathuranga.jayaneththi at gmail.com
Fri Apr 5 14:17:08 CEST 2013
I'm trying to fix bug #3865 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. 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Developers