[MCOL-1388] CHAR datatype doesn't accept string with spaces only Created: 2018-05-04 Updated: 2018-05-08 Resolved: 2018-05-08 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.1.4 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Kotsinova (Inactive) | Assignee: | Andrew Hutchings (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Execute:
Result: Error is displayed for every char column in the table. Additional notes: |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2018-05-04 ] | |||||||||||||
|
Spaces are truncated for CHAR columns so this behaviour is correct, with MyISAM:
| |||||||||||||
| Comment by Elena Kotsinova (Inactive) [ 2018-05-08 ] | |||||||||||||
|
Your example confirms the issue. The ColumnStore engine doesn't allow insertion and displays error during INSERT operation. Additional notes: Also this error appears only for CHAR datatype. | |||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2018-05-08 ] | |||||||||||||
|
No, my example confirms there is no issue. When you insert just spaces into a CHAR this is the same as inserting an empty string. Which in ColumnStore is the equivalent of NULL. You cannot insert NULL into a NOT NULL column, this means you cannot insert an empty string into a NOT NULL column (as documented). We don't support collations in ColumnStore yet. When we do support them along with NOPAD I expect the behaviour will change for us. Also when we support true NULLs then the behaviour will be different (there are tickets for both of these things already). |