Ferdek, what character set you have specified in my.cnf? I tested your script with latin1 (the default) and 3.23.52, and it seemed to work without errors.
For example, for the table reklamacja you see below it created the 3 foreign key constraints. Can you provide a simple repeatable test case (and my.cnf) where it fails? Regards, Heikki Innobase Oy ...... mysql> show create table reklamacja; +------------+-------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- + | Table | Create Table | +------------+-------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- + | reklamacja | CREATE TABLE `reklamacja` ( `id_zdarzenia` int(10) unsigned NOT NULL auto_increment, `id_czesci` varchar(100) NOT NULL default '', `id_klienta` int(10) unsigned NOT NULL default '0', `data_rekl` date NOT NULL default '0000-00-00', `opis_uszk` text NOT NULL, `uwagi` text, `osprzet` text, `data_odd` date default NULL, `data_nap` date default NULL, `opis_nap` text, `id_zastepczy` varchar(100) default NULL, PRIMARY KEY (`id_zdarzenia`), KEY `id_czesci` (`id_czesci`), KEY `id_klienta` (`id_klienta`), KEY `id_zastepczy` (`id_zastepczy`), FOREIGN KEY (`id_klienta`) REFERENCES `servcontrol.klient` (`id_klienta`) ON D ELETE CASCADE, FOREIGN KEY (`id_czesci`) REFERENCES `servcontrol.czesc` (`id_czesci`) ON DELE TE CASCADE, FOREIGN KEY (`id_zastepczy`) REFERENCES `servcontrol.czesc` (`id_czesci`) ON D ELETE SET NULL ) TYPE=InnoDB | +------------+-------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- ---------------------------------------------------------------------------- ---- + 1 row in set (0.00 sec) --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php