Hi devs, I am refactoring sql.php and I realized in line 389 of file the check for a call to a stored procedure is done by using regexp. I would like to know is it ok to keep it like that or is there any better approach to handle that.
Regards Supun.
Supun Nakandala a écrit :
Hi devs, I am refactoring sql.php and I realized in line 389 of file the check for a call to a stored procedure is done by using regexp. I would like to know is it ok to keep it like that or is there any better approach to handle that.
Regards Supun.
Hi Supun, the better approach is to move this test to the SQL analyzer, like you did a few days ago for other cases.
Using preg_match() can lead to mistake (for example, a SQL comment located in the query and containing the word "call").
On Tue, Jun 18, 2013 at 5:43 PM, Marc Delisle marc@infomarc.info wrote:
Supun Nakandala a écrit :
Hi devs, I am refactoring sql.php and I realized in line 389 of file the check
for
a call to a stored procedure is done by using regexp. I would like to
know
is it ok to keep it like that or is there any better approach to handle that.
Regards Supun.
Hi Supun, the better approach is to move this test to the SQL analyzer, like you did a few days ago for other cases.
Hi Marc,
I checked PMA_SQP_analyze() method with a test query calling a stored procedure. But it didn't returned any information. Can you guide me how to implement the required behavior in PMA_SQP_analyze() method such that it can identify a call to a stored procedure.
Using preg_match() can lead to mistake (for example, a SQL comment located in the query and containing the word "call").
-- Marc Delisle http://infomarc.info
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Supun Nakandala a écrit :
On Tue, Jun 18, 2013 at 5:43 PM, Marc Delisle marc@infomarc.info wrote:
Supun Nakandala a écrit :
Hi devs, I am refactoring sql.php and I realized in line 389 of file the check
for
a call to a stored procedure is done by using regexp. I would like to
know
is it ok to keep it like that or is there any better approach to handle that.
Regards Supun.
Hi Supun, the better approach is to move this test to the SQL analyzer, like you did a few days ago for other cases.
Hi Marc,
I checked PMA_SQP_analyze() method with a test query calling a stored procedure. But it didn't returned any information. Can you guide me how to implement the required behavior in PMA_SQP_analyze() method such that it can identify a call to a stored procedure.
Hi Supun, first I must ask whether you passed your query to PMA_SQP_parse() and used the output to feed PMA_SQP_analyze().
Using preg_match() can lead to mistake (for example, a SQL comment located in the query and containing the word "call").
On Wed, Jun 19, 2013 at 4:32 PM, Marc Delisle marc@infomarc.info wrote:
Supun Nakandala a écrit :
On Tue, Jun 18, 2013 at 5:43 PM, Marc Delisle marc@infomarc.info
wrote:
Supun Nakandala a écrit :
Hi devs, I am refactoring sql.php and I realized in line 389 of file the check
for
a call to a stored procedure is done by using regexp. I would like to
know
is it ok to keep it like that or is there any better approach to handle that.
Regards Supun.
Hi Supun, the better approach is to move this test to the SQL analyzer, like you did a few days ago for other cases.
Hi Marc,
I checked PMA_SQP_analyze() method with a test query calling a stored procedure. But it didn't returned any information. Can you guide me how
to
implement the required behavior in PMA_SQP_analyze() method such that it can identify a call to a stored procedure.
Hi Supun, first I must ask whether you passed your query to PMA_SQP_parse() and used the output to feed PMA_SQP_analyze().
Hi Marc, Yes I did that way.
Using preg_match() can lead to mistake (for example, a SQL comment located in the query and containing the word "call").
-- Marc Delisle http://infomarc.info
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Supun Nakandala a écrit :
On Wed, Jun 19, 2013 at 4:32 PM, Marc Delisle marc@infomarc.info wrote:
Supun Nakandala a écrit :
On Tue, Jun 18, 2013 at 5:43 PM, Marc Delisle marc@infomarc.info
wrote:
Supun Nakandala a écrit :
Hi devs, I am refactoring sql.php and I realized in line 389 of file the check
for
a call to a stored procedure is done by using regexp. I would like to
know
is it ok to keep it like that or is there any better approach to handle that.
Regards Supun.
Hi Supun, the better approach is to move this test to the SQL analyzer, like you did a few days ago for other cases.
Hi Marc,
I checked PMA_SQP_analyze() method with a test query calling a stored procedure. But it didn't returned any information. Can you guide me how
to
implement the required behavior in PMA_SQP_analyze() method such that it can identify a call to a stored procedure.
Hi Supun, first I must ask whether you passed your query to PMA_SQP_parse() and used the output to feed PMA_SQP_analyze().
Hi Marc, Yes I did that way.
In sqlparser.lib.php there are a few DEBUG comments that deactivate some echo statements. When activated, these will show you what the parser did up to this point; this should show you what's going on in the parsing phase.