Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid default value for column 'a_bit_field' #346

Closed
Arrowarcher opened this issue May 24, 2021 · 1 comment
Closed

Invalid default value for column 'a_bit_field' #346

Arrowarcher opened this issue May 24, 2021 · 1 comment

Comments

@Arrowarcher
Copy link

Arrowarcher commented May 24, 2021

描述
创建表时某个字段使用bit类型,默认值设置为NULL,会报错

CREATE TABLE test.test_bit  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `a_bit_field` bit(8) DEFAULT NULL COMMENT 'xxxxxx',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4;

报错:
(2, 'CHECKED', 2, 'Audit Completed', "Invalid default value for column 'a_bit_field'.", "CREATE TABLE test_autodb_t2.test_bit (\n id bigint(20) NOT NULL AUTO_INCREMENT,\n a_bit_field bit(8) DEFAULT NULL COMMENT 'xxxxxx',\n PRIMARY KEY (id)\n)", 0, '0_0_00000001', None, '0', None, '0')

@hanchuanchuan
Copy link
Owner

已修复,可更新到v1.2.4-72版本后重试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants