[TYPO3-core] RFC #12440: Copy DBAL-only SQL parser methods from t3lib_sqlparser to ux_t3lib_sqlparser

Xavier Perseguers typo3 at perseguers.ch
Mon Nov 2 23:57:37 CET 2009


Hi,

This is an SVN patch request.

Type: cleanup

References:
http://bugs.typo3.org/view.php?id=12440
typo3.projects.typo3_4-3.general, thread "Deprecating SQL parser in TYPO3 4.3"

Branches: trunk only

Problem:
Limitations of the SQL parser are often the cause of bugs in DBAL. However main parts of the parsing process are located within class t3lib_sqlparser, in Core, although used only by DBAL.

Solution:
Copy methods to DBAL and deprecate them in Core.

How to "crash test" this patch:

Replace the deprecation log call in patch

+		t3lib_div::logDeprecatedFunction();

by

+		print_r(debug_backtrace()); die();

and see that your MySQL website still runs as before.


Additional notes from thread in typo3_4-3.general:

--------
Here is some extract from a discussion I had today with Karsten about what to do with SQL parser included in Core. I'm not speaking about the parser used to allow modifications of the database 
structure (CREATE TABLE, ALTER TABLE, ...) but the SELECT/INSERT/UPDATE parser which is used when installing DBAL but not when using MySQL only.

 > I would probably remove the code from core. [...] that should mean less probability for errors
 >
 > When Kasper put that code in place back in 2004 we all thought/hoped that people would go crazy
 > writing DB handlers, but that has not happened.
 >
 > Time to move the code into the right place, I'd say. And that is DBAL.
--------

DBAL patch will be committed tomorrow, automatically deprecating:

- RFC #12231: New caching framework (4.3-dev) does not work with DBAL (oracle) [nobrainer]
- RFC #10411: sqlparser is not able to parse more than 1 join

Further cleanup in t3lib_sqlparser will certainly occur but later. This is a first "big" step!

Thanks for your understanding.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: core_12440.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20091102/e3e84367/attachment.txt>


More information about the TYPO3-team-core mailing list