[MDEV-9319] ALTER from a bigger to a smaller blob type truncates too much data Created: 2015-12-24 Updated: 2017-10-12 Resolved: 2015-12-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 5.5.48, 10.0.24, 10.1.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream, upstream-5.5 | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
returns 65000 before ALTER:
and returns 232 after ALTER:
This looks wrong. The expected length after ALTER is 255. It also does not produce any warnings on truncation. Probably it should. |
| Comments |
| Comment by Alexander Barkov [ 2015-12-24 ] | ||||||||||||
|
In case of a multi-byte TEXT field, truncation breaks characters apart:
Notice the the garbage at the end. |