Project

General

Profile

Actions

Bug #24824

closed

Alter table in install tool does not work

Added by Adrian Dymorz almost 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2011-01-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the install tool the command

ALTER TABLE tx_openid_assoc_store DROP KEY assoc_handle;

leads to the error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Array' at line 1

URL: https://svn.typo3.org/TYPO3v4/Core/trunk
Revision: 10323

Betriebssystem: Linux 2.6.9-89.0.29.ELsmp
Apache: 2.2.16
PHP Versionen: 5.2.14

dbal is installed
(issue imported from #M17327)


Files

17327.diff (813 Bytes) 17327.diff Administrator Admin, 2011-01-26 12:07

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #24731: Install tool is unable to delete database tablesClosedXavier Perseguers2011-01-23

Actions
Related to TYPO3 Core - Bug #24886: DBAL: Install Tool "COMPARE" fails to update mysql TablesClosedXavier Perseguers2011-01-28

Actions
Actions #2

Updated by Steffen Gebert almost 14 years ago

This only seems to affect DBAL

Actions #3

Updated by Xavier Perseguers almost 14 years ago

Argh! Found the bug, in some rare cases, the [0] was needed...

Actions #4

Updated by Xavier Perseguers almost 14 years ago

May I kindly ask you to test again the whole (both bugs)?

Actions #5

Updated by Adrian Dymorz almost 14 years ago

I just tested your patch with some cases in the install tool:

TRUNCATE TABLE tx_mwimagemap_area; -> no error

ALTER TABLE tx_mwimagemap_map ADD name tinytext NOT NULL; -> no error

ALTER TABLE tx_openid_assoc_store DROP KEY assoc_handle; -> no error, but command is shown again after execution
ALTER TABLE tx_openid_assoc_store ADD KEY assoc_handle (assoc_handle(8)); -> no error, but command is shown again after execution
ALTER TABLE tx_mwimagemap_area CHANGE id id int(11) auto_increment; -> no error
ALTER TABLE tx_mwimagemap_area DROP PRIMARY KEY; -> no error
ALTER TABLE tx_mwimagemap_area ADD PRIMARY KEY (id); -> error: Incorrect table definition; there can be only one auto column and it must be defined as a key

CREATE TABLE tx_mwimagemap_point ( id int(11) NOT NULL auto_increment, aid int(11) NOT NULL default '0', num int(11) NOT NULL default '0', x int(11) NOT NULL default '0', y int(11) NOT NULL default '0', PRIMARY KEY (id), KEY parent (aid) ); -> no error

ALTER TABLE tx_mwimagemap_point_wrong_name RENAME zzz_deleted_tx_mwimagemap_point_wrong_name; -> no error

DROP TABLE zzz_deleted_tx_mwimagemap_point_wrong_name; -> no error

ALTER TABLE tt_content CHANGE tx_mwimagemap zzz_deleted_tx_mwimagemap varchar(255) NOT NULL default ''; -> no error

ALTER TABLE tx_mwimagemap_area RENAME zzz_deleted_tx_mwimagemap_area; -> no error
ALTER TABLE tx_mwimagemap_bcolors RENAME zzz_deleted_tx_mwimagemap_bcolors; -> no error
ALTER TABLE tx_mwimagemap_map RENAME zzz_deleted_tx_mwimagemap_map; -> no error
ALTER TABLE tx_mwimagemap_point RENAME zzz_deleted_tx_mwimagemap_point; -> no error

ALTER TABLE tt_content DROP zzz_deleted_tx_mwimagemap; -> no error

DROP TABLE zzz_deleted_tx_mwimagemap_area; -> no error
DROP TABLE zzz_deleted_tx_mwimagemap_bcolors; -> no error
DROP TABLE zzz_deleted_tx_mwimagemap_map; -> no error
DROP TABLE zzz_deleted_tx_mwimagemap_point; -> no error

At least, there is no error with "ALTER TABLE tx_openid_assoc_store DROP KEY assoc_handle;" and "DROP TABLE xyz;" is still executed correctly, so I would say it is a big improvement.

The commands "ALTER TABLE tx_openid_assoc_store DROP KEY assoc_handle;" and "ALTER TABLE tx_openid_assoc_store ADD KEY assoc_handle (assoc_handle(8));" are executed again and again, but I think this is an other bug.

Actions #6

Updated by Xavier Perseguers almost 14 years ago

Yes, I'll commit that but don't know yet whether I'll will reintegrate this for 4.5.0.

Regarding the other points, one has to know that admin query handling is not completely supported when using DBAL although I agree it would great to support this correctly.

Actions #7

Updated by Xavier Perseguers almost 14 years ago

Committed to:

- DBAL trunk (rev. 42650)
- DBAL_1-2 (rev. 42651)
- DBAL_1-1 (rev. 42652)
- DBAL_1-0 (rev. 42653)

Actions #8

Updated by Adrian Dymorz almost 14 years ago

dbal has been automatically installed in a fresh installation of TYPO3 4.5 around beta 3. It think either this should be disabled for TYPO3 4.5 or your fix should be committed before releasing TYPO3 4.5.0.

Actions #9

Updated by Xavier Perseguers almost 14 years ago

Fix will be part of TYPO 4.5.1, there was no time left for 4.5.0.

Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF