MySQL: Primary keys are not well designed
|Reported by:||Owned by:||Jun Omae|
|Severity:||major||Keywords:||mysql utf8 primary key|
Add an auto-increment primary key to
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 (34)
comment:29 by , 8 years ago
|Release Notes:||modified (diff)|
|Status:||assigned → closed|