Skip to content

Nullable Timestamp Column Fix#7740

Merged
systay merged 5 commits intovitessio:masterfrom
planetscale:nullable-timestamp
Mar 30, 2021
Merged

Nullable Timestamp Column Fix#7740
systay merged 5 commits intovitessio:masterfrom
planetscale:nullable-timestamp

Conversation

@GuptaManan100
Copy link
Contributor

Description

Running a query like

create table foo (
    id int primary key,
    a varchar(255) null,
    b varchar(255) null default 'foo',
    c timestamp null default current_timestamp()
)

on vitess got rewritten to

create table foo (
    id int primary key,
    a varchar(255),
    b varchar(255) default 'foo',
    c timestamp default current_timestamp()
)

but this is incorrect because by default timestamp column is not nullable. This PR fixes this issue.

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Signed-off-by: GuptaManan100 <manan@planetscale.com>
…umn definition

Signed-off-by: GuptaManan100 <manan@planetscale.com>
GuptaManan100 and others added 2 commits March 25, 2021 17:01
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@systay systay merged commit 2fcfe29 into vitessio:master Mar 30, 2021
@systay systay deleted the nullable-timestamp branch March 30, 2021 06:22
@askdba askdba added this to the v10.0 milestone Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Nullable value in timestamp column

4 participants