mysql中sqlexception分类_使用mysql的系统中常见sql异常

使用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

原创文章,转载请注明: 转载自搞代码

e7ce419cf2d6ad34d01da2ceb8829eed.png

微信 赏一包辣条吧~

023a57327877fb4402bcc76911ec18ea.png

支付宝 赏一听可乐吧~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值