We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
描述 当sql_mode 设置了HIGH_NOT_PRECEDENCE 时,如果列中有not null设置,会得到一个错误,并且没有足够明确的提示信息
重现 例如: CREATE TABLE test ( id BIGINT(19) not null AUTO_INCREMENT COMMENT '主键', user_task_id VARCHAR(200) not null COMMENT '用户任务Id' COLLATE 'utf8mb4_general_ci', PRIMARY KEY (id) USING BTREE ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB AUTO_INCREMENT=167 ; 将会得到下面的提示信息,看起来像把此处的not当作了运算符??,我的理解这个参数应当只是在条件语句中调整运算符优先级 line 2 column 21 near "not null AUTO_INCREMENT COMMENT '主键', user_task_id VARCHAR(200) not null COMMENT '用户任务Id' COLLATE 'utf8mb4_general_ci', PRIMARY KEY (id) USING BTREE ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB AUTO_INCREMENT=167 "
test
id
user_task_id
环境
参数 sql_mode: REAL_AS_FLOAT,PIPES_AS_CONCAT,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION
The text was updated successfully, but these errors were encountered:
可以看下我fork的分支,修复了这个问题https://gitee.com/zhoujin826/goInception
Sorry, something went wrong.
No branches or pull requests
描述
当sql_mode 设置了HIGH_NOT_PRECEDENCE 时,如果列中有not null设置,会得到一个错误,并且没有足够明确的提示信息
重现
例如:
CREATE TABLE
test
(id
BIGINT(19) not null AUTO_INCREMENT COMMENT '主键',user_task_id
VARCHAR(200) not null COMMENT '用户任务Id' COLLATE 'utf8mb4_general_ci',PRIMARY KEY (
id
) USING BTREE)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=167
;
将会得到下面的提示信息,看起来像把此处的not当作了运算符??,我的理解这个参数应当只是在条件语句中调整运算符优先级
line 2 column 21 near "not null AUTO_INCREMENT COMMENT '主键',
user_task_id
VARCHAR(200) not null COMMENT '用户任务Id' COLLATE 'utf8mb4_general_ci', PRIMARY KEY (id
) USING BTREE ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB AUTO_INCREMENT=167 "环境
参数
sql_mode: REAL_AS_FLOAT,PIPES_AS_CONCAT,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION
The text was updated successfully, but these errors were encountered: