• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

使用mysql的系统中常见sql异常

mysql 搞代码 7年前 (2018-06-06) 572次浏览 已收录 0个评论

使用mysql的系统中常见sql错误

使用mysql的系统中常见的sql错误:

 

1.事务中某些表是非innodb类型。

 

SQLWarning ignored:

SQL state ‘HY000’, error code ‘1592’,

 

message [Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.]

 

 

2.表中的列为特定类型,而所插入的数据类型没与其字段一一对应

 

SQLWarning ignored:

SQL state ‘01000’, error code ‘1265’,

message [Data truncated for column ‘f_birthday’ at row 1]

 

 

3. 连接数已达到pool的上限,无法再创建新的连接。

 

Could not get JDBC Connection;

nested exception is com.atomikos.jdbc.AtomikosSQLException: Failed to grow the connection pool

 

 

4. 连接数用尽

 

Data source rejected establishment of connection, 

message from server: “Too many connections”

 

 

5. 未知的XID(分布式事务错误)

 

SQLWarning ignored: SQL state ‘HY000’,

error code ‘1397’,

message [XAER_NOTA: Unknown XID]

 

 

6. 初步判断:数据源状态异常,导致分布式事务无法将该数据源添加到global transaction中。

 

com.atomikos.datasource.ResourceException: XA resource ‘db/dataSourceDefault’:

resume for XID ‘746D2D706C6174666F726D30303036303030303031:746D2D706C6174666F726D3539’ raised -9:

the XA resource is currently involved in a local (non-XA) transaction

 

 

 7.数据源状态异常,连接错误等引起的

 

com.atomikos.datasource.ResourceException: XA resource ‘db/dataSourceDefault’: resume for XID ‘746D2D706C6174666F726D30303032393030303031: 

746D2D706C6174666F726D3239′ raised -7: the XA resource has become unavailable

 


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:使用mysql的系统中常见sql异常

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址