[MDEV-10935] got error 'Invalid default value for timestamp column' when trying create copy table structure from view Created: 2016-10-01 Updated: 2016-11-18 Resolved: 2016-10-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Temporary |
| Affects Version/s: | 10.1.19 |
| Fix Version/s: | 10.1.19 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mikhail Gavrilov | Assignee: | Oleksandr Byelkin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux Fedora 24 |
||
| Attachments: |
|
| Description |
|
|
| Comments |
| Comment by Elena Stepanova [ 2016-10-01 ] |
|
sanja, could you please take a look? My first thought was that CREATE TABLE .. SELECT <view> is not supposed to inherit default values from the underlying tables; but this 10-year old bug suggests otherwise: |
| Comment by Oleksandr Byelkin [ 2016-10-03 ] |
|
The above mentioned bug was about different - automatic default and NULL/NOT NULL. I doubts that CREATE TABLE ... SELECT could easy extract default from table created from expression (in general case). expression has not attribute default value (but has may be NULL/can not be NULL). So it is not a bug (actually nowhere in the documentation promised transfer of default values because expression do not has it). It is probably feature request for some cases where it is not an expression possible to get default. Internally in 99% cases the transfer has no any sens so it is not done (actually if do it in all cases for temporary tables used inside it bring some performance penalty). |
| Comment by Mikhail Gavrilov [ 2016-11-18 ] |
|
Bug reproduced also in version 10.1.19, please REOPEN bug |