radondb / radon

RadonDB is an open source, cloud-native MySQL database for building global, scalable cloud services

Home Page:https://radondb.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Invalid default value for timestamp

hustjieke opened this issue · comments

bug:

mysql> create table tx(a timestamp null default null, b int key);
ERROR 1067 (42000): Invalid default value for 'a'

After radon parse sql
create table tx(a timestamp null default null, b int key);
and send to backends, the sql will be changed to
create table tx(a timestamp default null, b int key);.
For type timestamp TIMESTAMP fields are NOT NULL by default in 5.7, so we should not remove null after parse.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.