[MDEV-13530] VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 Created: 2017-08-15 Updated: 2017-10-13 Resolved: 2017-10-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Data types |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 5.5.58, 10.0.33, 10.1.29, 10.2.10, 10.3.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas Guyot-Sionnest | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Issue Links: |
|
||||||||||||
| Sprint: | 5.5.58 | ||||||||||||
| Description |
|
As pointed out here: https://github.com/bitcoin-abe/bitcoin-abe/issues/227#issuecomment-322396729 Maria auto-convert large VARBINARY to BLOB when they exceed maximum VARBINARY length, but for length 65533, 65534 and 65535 Maria refuses to create the column and fails to convert to BLOB It does convert to blob when length is >65535. For the broken ones it seems it doesn't take into account 3 bytes overhead (BTW I would expect 2... why the 3rd?) Example:
|
| Comments |
| Comment by Alice Sherepa [ 2017-08-15 ] | ||||||||||||||
|
Thanks for the report! The same with VARCHAR.
| ||||||||||||||
| Comment by Sergei Golubchik [ 2017-08-15 ] | ||||||||||||||
|
alice, is it an upstream bug? | ||||||||||||||
| Comment by Alice Sherepa [ 2017-08-15 ] | ||||||||||||||
|
upstream bug, reproducible on MySQL 5.7.18 and 5.6.23 | ||||||||||||||
| Comment by Thomas Guyot-Sionnest [ 2017-08-17 ] | ||||||||||||||
|
Alice, have you tried in upstream with VARBINARY >= 65536? I have a report that on some MySQL version VARBINARY(100000) does not auto-convert to MEDIUMBLOB. It's while testing this that I noticed the bug with sizes 65533-65535. I'm trying to find out what version that was... | ||||||||||||||
| Comment by Alice Sherepa [ 2017-08-17 ] | ||||||||||||||
|
yes, on 5.7.18 there was an error, but only because there was another sql_mode then on 5.6.23, where was only warning about converting to BLOB
| ||||||||||||||
| Comment by Sergei Golubchik [ 2017-10-12 ] | ||||||||||||||
|
ok to push |