[MDEV-7650] COLUMN_CHECK() does not always detect data truncation Created: 2015-03-01 Updated: 2016-04-19 Resolved: 2016-04-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Dynamic Columns |
| Affects Version/s: | 10.0.16 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Tom | Assignee: | Oleksandr Byelkin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | verified | ||
| Environment: |
Server version: 10.0.16-MariaDB Homebrew |
||
| Description |
|
Bug is fully described in the following test script:
|
| Comments |
| Comment by Elena Stepanova [ 2015-03-01 ] | |||||||||||||||||||
|
Thanks for the report and the test case. | |||||||||||||||||||
| Comment by Tom [ 2015-03-01 ] | |||||||||||||||||||
|
Dynamic columns are packed into the blob in alphabetical order.
| |||||||||||||||||||
| Comment by Elena Stepanova [ 2015-03-01 ] | |||||||||||||||||||
|
Right. Long ago there was a discussion about consequences of data truncation in dynamic columns (which happens here, all INSERTs produce the warning); but I can't find or remember what the outcome of that discussion was, so I leave it to Sanja to comment, he will remember for sure. | |||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-03-01 ] | |||||||||||||||||||
|
A clearer test case:
| |||||||||||||||||||
| Comment by Tom [ 2015-03-01 ] | |||||||||||||||||||
|
I did not know that blobs were restricted to such a small size. This was therefore my foolish error. Caught out again by the crazy selection of MySQL types. I do not know how to delete or close this issue. | |||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-03-02 ] | |||||||||||||||||||
|
While we can close it, I'd suggest to keep it as a COLUMN_CHECK bug. I'll change the subject to better reflect what this bug is about. | |||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2016-04-19 ] | |||||||||||||||||||
|
It is not a bug. Dynamic columns goal was to keep everything compact but not check integrity. Length of the string is not stored, it detected by beginning of other dynamic field or by end of whole string where dynamic fields stored. So if last field happened to be string you can chop from string as much as string length without destroying internal data integrity. If one need to check integrity other means should be used (like SHA1 or control sum or even signature). |