迁移到Mysql Connector Jar 5.1.27 [英] Migration to Mysql Connector Jar 5.1.27

查看:133
本文介绍了迁移到Mysql Connector Jar 5.1.27的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的mysql连接器jar 3.1.12替换为5.1.27. 并出现错误

I have just replaced my mysql connector jar 3.1.12 to 5.1.27. and getting error

您需要为Statement.executeUpdate()或Connection.prepareStatement()指定Statement.RETURN_GENERATED_KEYS.

You need to specify Statement.RETURN_GENERATED_KEYS to the Statement.executeUpdate() or Connection.prepareStatement().

我得到了我应该使用的解决方案

I got the solution that i should use

PreparedStatement ps = connection.prepareStatement(SQL, Statement.RETURN_GENERATED_KEYS);

代替

PreparedStatement ps = connection.prepareStatement(SQL); 

主要问题是如何在整个项目中替换它,是否有任何方法可以全局设置它?

The main problem is how can I replace this in whole project and is there any method to set it globally?

我还应该记住5.1.27版本的其他问题吗?

Is there any other Issues with 5.1.27 version which I should keep in mind?

推荐答案

MYSQL团队已经提出了此缺陷,他们已在5.1.8版本中修复了此问题.但是最新版本仍然存在此问题.到目前为止,这还没有解决. 请参考下面的链接以获取更多信息-

This defect is already raised to MYSQL team and they have fixed this issue in version 5.1.8. But this issue still exists for latest versions. So far this has not fixed. Please refer the below link for more info -

http://bugs.mysql.com/bug.php?id=41448

连接器J 5.1.8-工作 连接器J 5.1.10-无法正常工作 连接器J 5.1.18-无法正常工作 连接器J 5.1.21-无法正常工作

Connector J 5.1.8 - Working Connector J 5.1.10 - Not Working Connector J 5.1.18 - Not Working Connector J 5.1.21 - Not Working

这篇关于迁移到Mysql Connector Jar 5.1.27的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆