Are foreign keys supported in MySQL partitioning at all? I'm having the following problem when I run the patch.sql script to upgrade my database from 1.8.10.
$ time mysql -u root -p zabbix2 --verbose < patch.sql
Enter password:
--------------
ALTER TABLE acknowledges MODIFY acknowledgeid bigint unsigned NOT NULL,
MODIFY userid bigint unsigned NOT NULL,
MODIFY eventid bigint unsigned NOT NULL
--------------
--------------
DELETE FROM acknowledges WHERE NOT userid IN (SELECT userid FROM users)
--------------
--------------
DELETE FROM acknowledges WHERE NOT eventid IN (SELECT eventid FROM events)
--------------
--------------
ALTER TABLE acknowledges ADD CONSTRAINT c_acknowledges_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE
--------------
ERROR 1506 (HY000) at line 6: Foreign key clause is not yet supported in conjunction with partitioning
real 0m12.286s
user 0m0.003s
sys 0m0.005s
It looked like there was another post started on this in Russian. (http://www.zabbix.com/forum/showthread.php?t=26321)
$ time mysql -u root -p zabbix2 --verbose < patch.sql
Enter password:
--------------
ALTER TABLE acknowledges MODIFY acknowledgeid bigint unsigned NOT NULL,
MODIFY userid bigint unsigned NOT NULL,
MODIFY eventid bigint unsigned NOT NULL
--------------
--------------
DELETE FROM acknowledges WHERE NOT userid IN (SELECT userid FROM users)
--------------
--------------
DELETE FROM acknowledges WHERE NOT eventid IN (SELECT eventid FROM events)
--------------
--------------
ALTER TABLE acknowledges ADD CONSTRAINT c_acknowledges_1 FOREIGN KEY (userid) REFERENCES users (userid) ON DELETE CASCADE
--------------
ERROR 1506 (HY000) at line 6: Foreign key clause is not yet supported in conjunction with partitioning
real 0m12.286s
user 0m0.003s
sys 0m0.005s
It looked like there was another post started on this in Russian. (http://www.zabbix.com/forum/showthread.php?t=26321)
Comment