Clear questions and runnable code
get the best and fastest answer
Regexp for Mysql 5.1 join Problemby Ben Win Lue (Friar)
|on Jun 12, 2006 at 14:41 UTC||Need Help??|
Ben Win Lue has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying to find a Perl fix for a Mysql problem. We are trying to migrate from Mysql 4.0something to Mysql 5.1.
Our application has grown organically and is using a couple of thousands of statement of which some have the ugly form:
Statements like this are running with 4.0 smooth but cause errors with 5.1. The problem is caused by the mix of two join syntaxes: comma and "left join".
Since most of our statements are executed by a library function, we had the idea of identifying and fixing these statements on the fly.
The fix would be transforming the above statement to:
which is not causing problems.
Did somebody run already in the same problem and has a neat regexp to identify and fix?