Bug #21100
closedUpdate sys_registry - wrong sql
0%
Description
ALTER TABLE sys_registry ADD UNIQUE entry_identifier (entry_namespace,entry_key(320));
entry_namespace has no key lenght.
(issue imported from #M12009)
Updated by Steffen Kamper almost 15 years ago
wasn't it the case, that sql parser isn't able to handle this? This was the reason for reverting a simular index by stucki for table sys_refindex
Updated by Björn Jacob almost 14 years ago
Today I've installed TYPO3 4.4.2 on my machine. I've got many TYPO3 within this environment. They are all setup up as symlink installations. I've recognized a strange behaviour today. I've tried to create all database tables. But there is a problem with the table sys_registry. It couldn't be created. The following SQL throws an error:
CREATE TABLE sys_registry ( uid int(11) unsigned NOT NULL auto_increment, entry_namespace varchar(128) NOT NULL default '', entry_key varchar(128) NOT NULL default '', entry_value blob, PRIMARY KEY (uid), UNIQUE entry_identifier (entry_namespace,entry_key) );
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 'UNIQUE (Array) )' at line 7
So I've exported the structure of this table from another 4.4 installation:
CREATE TABLE `sys_registry` (
`uid` int(11) unsigned NOT NULL AUTO_INCREMENT,
`entry_namespace` varchar(128) NOT NULL DEFAULT '',
`entry_key` varchar(128) NOT NULL DEFAULT '',
`entry_value` blob,
PRIMARY KEY (`uid`),
UNIQUE KEY `entry_identifier` (`entry_namespace`,`entry_key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
That one is working on my machine (PHP 5, MySQL 5.1.45).
Can someone confirm this behaviour?