[MDEV-10177] Invisible columns Created: 2016-06-05 Updated: 2022-04-07 Resolved: 2017-12-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Fix Version/s: | 10.3.3 |
| Type: | Task | Priority: | Critical |
| Reporter: | Sergei Golubchik | Assignee: | Sachin Setiya (Inactive) |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | 10.3-beta, Compatibility | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
This feature adds invisible column functionality to server. 1. Not invisible (NOT_INVISIBLE) — Normal columns created by the user 2. A little bit invisible (USER_DEFINED_INVISIBLE) — columns that the 3. More invisible (SYSTEM_INVISIBLE) — Can be queried explicitly, 4. Very invisible (COMPLETELY_INVISIBLE) — as above, but cannot be Invisible Index(HA_INVISIBLE_KEY):- Syntax Details:- Only USER_DEFINED_INVISIBLE column can be created by user. This Create table t1( a int invisible, b int); Rules:- See also Invisible Columns in Oracle and Hidden Columns in DB2. Q: What happens in one declares a hidden column that is NOT NULL and has no default value? Oracle returns an error at INSERT time if the column value was not provided. DB2 does not allow to create such a column. |
| Comments |
| Comment by sachin setiya (Inactive) [ 2016-07-10 ] |
|
What happens in one declares a hidden column that is NOT NULL and has no default value? Oracle returns an error at INSERT time if the column value was not provided. DB2 does not allow to create such a column. |
| Comment by Federico Razzoli [ 2017-07-30 ] |
|
Will user-hidden columns work like other columns in respect to the following features?
Will it be possible to define such columns in temporary tables, and using any storage engine? Thanks |
| Comment by Sergei Golubchik [ 2017-08-02 ] |
|
Yes. user-hidden columns "aren't shown in SELECT * and they don't require values in INSERT table VALUES (...). Otherwise they behave as normal columns." I think, yes. And yes. |
| Comment by Sachin Setiya (Inactive) [ 2017-12-02 ] |
|
Currently all type of invisible column is logged into binlog and replicated , this behaviour will be modified(if needed). |