Ticket #1351 (reopened defect)
Fixtures for Searchable on I18n with MySQL InnoDB cause MySQL error
| Reported by: | eXtreme | Owned by: | jwage |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.2.0 |
| Component: | Data Fixtures | Version: | 1.0.0 |
| Severity: | Keywords: | searchable, i18n, fixtures | |
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | no |
Description (last modified by jwage) (diff)
Using fixtures for InnoDB tables acting as I18n and Searchable as a child causes MySQL error. Schema:
---
Table:
actAs:
I18n:
fields: [name]
actAs:
Searchable:
fields: [name]
columns:
id:
primary: true
autoincrement: true
type: integer(10)
name:
type: string(100)
Fixture:
Table:
Record:
Translation:
pl:
name: foobar
en:
name: foobar_en
Importing this fixture generates mysql error:
SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constraint fails (`test_doctrine/table_translation`, CONSTRAINT `table3_translation_ibfk_1` FOREIGN KEY (`id`, `lang`) REFERENCES `table3_translation_index` (`id`, `lang`))
It seems to be a problem with innodb foreign keys. Everything works when we switch to other mysql engine like myisam.
I don't know how to make a failing testcase for this.
Change History
Note: See
TracTickets for help on using
tickets.