Edgewall Software

Opened 18 years ago

Last modified 5 years ago

#3676 closed defect

MySQL: Primary keys are not well designed — at Initial Version

Reported by: Martin Burger <mburger@…> Owned by: Jonas Borgström
Priority: normal Milestone: 1.1.4
Component: version control Version: 0.10b1
Severity: major Keywords: mysql utf8 primary key
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

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.

Change History (0)

Note: See TracTickets for help on using tickets.