SQLCompiler's _truncated_identifier method may create truncated names that collide with untruncated names
Issue #3396
resolved
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
.
Comments (4)
-
repo owner -
repo owner - changed milestone to 1.0.xx
-
repo owner - changed status to resolved
- Fixed bug where the truncation of long labels in SQL could produce
a label that overlapped another label that is not truncated; this
because the length threshhold for truncation was greater than
the portion of the label that remains after truncation. These
two values have now been made the same; label_length - 6.
The effect here is that shorter column labels will be "truncated"
where they would not have been truncated before.
fixes
#3396
→ <<cset ac52239b328f>>
-
repo owner thanks for reporting!
- Log in to comment
I suppose this is what you're talking about:
output: