Ticket #3676 (reopened defect)
MySQL: Primary keys are not well designed
| Reported by: | Martin Burger <mburger@…> | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.13 |
| Component: | version control | Version: | 0.10b1 |
| Severity: | major | Keywords: | mysql utf8 primary key |
| Cc: |
Description
The automated computation of primary key sizes in mysql_backend.py (compare #3673) is not well designed. For example: primary key of table node_change.
PRIMARY KEY (`rev`(111),`path`(111),`change_type`(111)
In this way, all three keys have a maximal length of 111 characters. Now, we have a too strict constraint on the length of pathes in Subversion: A path cannot be longer than 111 characters. If a revision contains too long pathes, you will get an "1062 - Duplicate entry" error (the path is truncated).
The change_type is just one char long, and I have never seen a revision nummber that is 111 digits long. ;-)
In general, I think you should use ids instead of composed primary keys.


