[TYPO3-english] TYPO3 4.3.0-dev with Oracle
Xavier Perseguers
typo3 at perseguers.ch
Sat May 2 15:40:59 CEST 2009
Hi Ries,
>> FYI, I'm now debugging the SQL parser as DBAL blocks as soon as the
>> table to create specifies an ENGINE to use (InnoDB for cache_* tables)
>> which of course is not available when using an Oracle database.
>>
>> I guess it was not the best idea to append ENGINE specifiers to the
>> ext_tables.sql files.
>>
>> I'll patch the DBAL parser but it would be good to find another way of
>> fine-tuning MySQL without SQL-specific stuff, for instance with
>> something like a ext_tables_mysql.sql file that would be used instead of
>> the standard ext_tables_mysql.sql.
>>
> I believe that AdoDB has a XML schema to specify database tables.
>
> The idea was to make these XML schema's cross DB compatible
> so for MySQL you could specify a storage engine, while this engine
> specifier will be ignore for other databases.
>
> I had the same problem with PostgreSQL..
In fact, I found that the SQL parser relies on a deprecated modifier
"TYPE" after the CREATE TABLE. It is deprecated since MySQL 4.1 as I
found. I modified the parser to accept both TYPE and ENGINE (this latest
is used in fact by ext_tables.sql from core):
Index: t3lib/class.t3lib_sqlparser.php
===================================================================
--- t3lib/class.t3lib_sqlparser.php (revision 5381)
+++ t3lib/class.t3lib_sqlparser.php (working copy)
@@ -487,7 +487,7 @@
// Finding what is after the table definition - table type in MySQL
if ($delim==')') {
- if ($this->nextPart($parseString, '^(TYPE[[:space:]]*=)')) {
+ if ($this->nextPart($parseString, '^((ENGINE|TYPE)[[:space:]]*=)')) {
$result['tableType'] = $parseString;
$parseString = '';
}
This way it now works for Oracle. I don't understand why it did not
crash for MySQL but, anyway... ;-)
I still have a problem with table sys_refindex. I'll debug this too,
then I'll drop all tables and restart the whole process to see whether
it works better.
The idea is then to send a patch to core.
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-english
mailing list