explicit_defaults_for_timestamp MySQL 5.6版本引入 explicit_defaults_for_timestamp 来控制对timestamp NULL值的处理 如果该参数不开启,则对timestamp NOT NULL插入NULL值,不报错,无warning,插入后的值为当前时间 如果在my.cnf中explicit_defaults_for_timestamp=1 那么插入该值的时候会报错提示该列can not be null 建议开启该值 mysql…
连接远程MySQL数据库项目启动时,不报错但是卡住不继续启动的, 2018-03-12 17:08:52.532DEBUG[localhost-startStop-1]o.s.beans.factory.support.DefaultListableBeanFactory.doGetBean():251 -Returning cached instance of singleton bean ‘org.springframework.aop.support.DefaultBeanFactoryP…
今天有两台服务器都出现了Can't create a new thread报错. [故障处理过程] 故障发生后登录服务器,检查mysql进程正常,但登录mysql报下面错误 ERROR 1135 (HY000): Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug. 重启mys…
mysql中大数据表alter增加字段报错:"1034 Incorrect key file for table 'table_name'; try to repair it" 现象描述: mysql中大数据表执行alter增加字段时,/tmp的目录爆满,并且报错"1034 Incorrect key file for table 'table_name'; try to repair it". 故障分析: 1.查询MySQL官网得知: *“ALTER TABLE运…
----mysql 5.7.28 中GROUP BY报错问题 SELECT list is not in GROUP BY clause and contains no------ 解决方案: select @@global.sql_mode #将结果集中的 ONLY_FULL_GROUP_BY SQL 字段去除后,重新set一下. .7.28 版本默认 开启了一个ONLY_FULL_GROUP_BY SQL 的一个规范配置,如果sql不符合这个规范的就会报错.如果不需要的话就把这个规范去除就行…
Mysql in子查询中加limit报错 select id from aa where id in ( select id from bb limit 10 ); 改写成 SELECT id FROM aa WHERE id IN ( SELECT * FROM (SELECT id FROM bb LIMIT 10) AS ids );…
1. 在开发两个数据库数据同步功能的时候,需要在本地搭建一个本地的数据库作为一个本地库,然后用于同步开发库中的数据.在插入的时候出现了一个问题. 问题描述: 我们每张表中都会存在一个create_time 以及update_time两个字段.该两个字段的定义如下: `create_date` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期', `update_date` timestamp(0) NOT NULL DEF…
在SqlServer红框中设置主键,右键会有添加主键选项,并且设置不能为null. 当我们插入主键数据如果为null时,会插不进去,这时候我们需要修改一下,如下图: “标识规范”中选择“是”,就可以了.当我们插入的数据为null时,不会报错. 下图我没设置插入主键. /// <summary> /// 增加一条数据 /// </summary> public int Add(string bugstyle, int submitterid, int projectid, strin…
具体报错信息: Cannot add or update a child row: a foreign key constraint fails (`xxx`.`AAA`, CONSTRAINT `tb_competitionmsg_ibfk_2` FOREIGN KEY (`organizerid`) REFERENCES `BBB` (`id`)) 报错信息分析: XXX数据库中的 AAA表 中的 organizerid字段 是BBB表中的id的外键,但是要插入的organizerid值在i…
前言:最近在做一个通用查询单表的组件,所以 sql 的写法就是 select *,然后 resultType="map" ,然后使用 jackson @ResponseBody 返回前端报错. 转载请注明出处:https://www.cnblogs.com/yuxiaole/p/9708485.html 后台报错: 26-Sep-2018 22:18:08.209 WARNING [http-apr-8080-exec-8] org.springframework.web.servle…