[Koha-bugs] [Bug 8471] loading an sql file into mysql, often fails when loading the 'letter' table

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 11 16:41:24 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8471

--- Comment #1 from Mason James <mtj at kohaaloha.com> ---
(In reply to comment #0)
> loading an sql file into mysql, often fails when loading the 'letter' table
> 
> i have no idea why. the quick-fix is to drop - then create the database
> 
> 
> $ mysql koha_test < koha.sql
> ERROR 1005 (HY000) at line 3237: Can't create table 'koha_test.letter'
> (errno: 150)
> 
> 
> http://koha.1045719.n5.nabble.com/MySQL-Database-Restoring-Problem-from-3-4-
> x-to-3-8-0-td5710925.html


hmmm, i bumped into this problem again... 

'show engine innodb status' hints that its a foreign-key problem?

------------------------
LATEST FOREIGN KEY ERROR
------------------------
121212  4:06:49 Error in foreign key constraint of table
head/message_transports
:
there is no index in referenced table which would contain
the columns as the first columns, or the data types in the
referenced table do not match the ones in table. Constraint:
,
  CONSTRAINT "message_transports_ibfk_3" FOREIGN KEY ("letter_module",
"letter_c
ode", "branchcode") REFERENCES "letter" ("module", "code", "branchcode") ON
DELE
TE CASCADE ON UPDATE CASCADE
The index in the foreign key in table is "message_transports_ibfk_3"
See http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html
for correct foreign key definition.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list