[Sqlalchemy-tickets] Issue #3396: SQLCompiler's _truncated_identifier method may create truncated n
Brought to you by:
zzzeek
|
From: Chung W. <iss...@bi...> - 2015-04-28 19:11:10
|
New issue 3396: SQLCompiler's _truncated_identifier method may create truncated names that collide with untruncated names https://bitbucket.org/zzzeek/sqlalchemy/issue/3396/sqlcompilers-_truncated_identifier-method Chung Wu: Where `label_length` is 63, and current `counter` value is 12, the if I have a name that is 64 characters long, the truncated name will be the first 57 characters plus "c" (which is `hex(12)[2:]`). This would collide with a name that is 58 characters with the same 57-character prefix and ends in "c". A possible fix is to truncate all names that are longer than `label_length - 6`, instead of just those that are longer than `label_length`. |