Re: Re: cvs: php-src /ext/pdo pdo_sql_parser.c pdo_sql_parser.re /ext/pdo/tests bug_43130.phpt
| From: | Lukas Kahwe Smith | Date: | Wed, 14 Nov 2007 15:49:46 +0000 |
| Subject: | Re: Re: cvs: php-src /ext/pdo pdo_sql_parser.c pdo_sql_parser.re /ext/pdo/tests bug_43130.phpt | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-47165@lists.php.net to get a copy of this message | ||
On 01.11.2007, at 00:56, Lorenzo Alberton wrote:
Lukas Kahwe Smith wrote:so please someone revert this change ... or better yet implement the above rules. regards, LukasI talked to Christopher Jones (of Oracle fame) and Lorenzo (MDB2 maintainer). Its clear that the only named parameter supporting database I know does not support dash inside named parameters. Its also dangerous since it means that whitespace typos could have serious hard to spot issues. I think a safe regexp for bound parameters would look something like: /^[a-z0-9][a-z0-9_]{0,30}$/Since I couldn't find any official reference in the oracle documentation, I did further tests. I can reproduce the following behaviour on two different machines (intel P4 and Core2Duo): - if the named parameter is all digits, it must be < 65536 or I get an "ORA-01745" error. - if the name starts with a digit, only digits are allowed (ORA-01036) - the hyphen ("-") is forbidden (ORA-01036) - the name can't start with an underscore (ORA-01036), but can contain it elsewhere - the (alpha-numeric) name must be <= 30 chars(ORA-00972) - trivia: some non-standard ASCII chars (àòùéèç#$!) are considered valid, but not all of them (°§£)