Project

General

Profile

Actions

Bug #21408

closed

Various crashes in SQL parsing when using install tool to compare and fix database.

Added by Karsten Dambekalns about 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-10-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I tried updating a rather outdated TYPO3 database and got a few errors.

When updating a table where the engine type is the only difference I get:
ERROR: Query could not be parsed: "SQL engine parse ERROR: No action CHANGE, DROP or ADD found!: near "ENGINE=InnoDB "". Query: "ALTER TABLE cache_hash ENGINE=InnoDB;"

When removing a field by prefixing the field type is missing:
ERROR: Query could not be parsed: "SQL engine parse ERROR: Field type unknown in parseFieldDef()!: near "(250) default '' "". Query: "ALTER TABLE cache_hash CHANGE identifier zzz_deleted_identifier (250) default '';"

When dropping all tables and setting up from scratch a compare gives tons of differences in engine type and field defaults...

PHP 5.3.0, MySQL 5.0.86, TYPO3 4.x trunk as of today, 11:00+1
(issue imported from #M12404)

Actions #1

Updated by Rupert Germann about 15 years ago

Hi Karsten,
I tried to reproduce the described issue but wasn't able to. The error message you mentioned is produced by class t3lib_sqlengine which is only involved if there's a value greater than 1 set for $TYPO3_CONF_VARS['SYS']['multiplyDBfieldSize'].
So I set this value to 2 but then I get only "Fatal error: Call to protected method t3lib_sqlparser::compileFieldCfg() from context 't3lib_install' in /srv/SVN/forge.typo3.org/Core/trunk/t3lib/class.t3lib_install.php on line 468"
This is a new bug which was introduced by rev 6280
http://forge.typo3.org/repositories/diff/typo3v4-core/trunk/t3lib/class.t3lib_sqlparser.php?rev=6280

If I set the method to public I get lots of sql errors - depending on the value of 'multiplyDBfieldSize'. But all of them are about key lenght
eg: BLOB/TEXT column 'identifier' used in key specification without a key length
lastBuiltQuery: ALTER TABLE cachingframework_cache_pages_tags CHANGE identifier identifier text;

but no Problems when changing the engine. Neither when upgrading from older versions nor when changing the engine manually in phpMyAdmin.

question: what is the state of 'multiplyDBfieldSize'? is this still needed?

Actions #2

Updated by Rupert Germann about 15 years ago

I tried to reproduce the other issue you described: "removing/renaming fields"
works as expected.

are there any other special pre-conditions needed to get this errors?

Actions #3

Updated by Rupert Germann about 15 years ago

unable to reproduce

Actions

Also available in: Atom PDF