Summary: | JDBC Request : since JMeter 3.0, when JDBC auto-commit is false, a rollback statement happens each time a Request is executed | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Liu XP <liu_xp2003> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | regression | CC: | p.mouawad |
Priority: | P2 | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Liu XP
2017-07-07 06:58:11 UTC
Author: pmouawad Date: Sun Jul 16 14:48:48 2017 New Revision: 1802065 URL: http://svn.apache.org/viewvc?rev=1802065&view=rev Log: Bug 61259 - JDBC Request : since JMeter 3.0, when JDBC auto-commit is false, a rollback statement happens each time a Request is executed Bugzilla Id: 61259 Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java jmeter/trunk/xdocs/changes.xml To make different JDBC Sampler committed in one transaction, we also need the following code after fixed line position. dataSource.setEnableAutoCommitOnReturn(false); (In reply to Liu XP from comment #2) > To make different JDBC Sampler committed in one transaction, we also need > the following code after fixed line position. > dataSource.setEnableAutoCommitOnReturn(false); I don't think this is not needed , did you try setting Auto Commit to false in JDBC Connection Configuration ? Thanks Yes. I have verified it and it need to be fixed with the additional setting. dataSource.setEnableAutoCommitOnReturn(false); You can try to test with following three JDBC Sampler with current fix soluction. 1. Prepare some records into AAAA table and truncate table BBBB. 2. Do following SQL with 3 JDBC Sampler in one thread. insert into BBBB (select * from AAAA) select Name from BBBB Query Type with Rollback 3. And then check the BBBB table at last. If transaction worked normally, the BBBB table should be empty.But,you will find the table BBBB is not empty. Author: pmouawad Date: Sat Jul 22 12:55:58 2017 New Revision: 1802688 URL: http://svn.apache.org/viewvc?rev=1802688&view=rev Log: Bug 61259 - JDBC Request : since JMeter 3.0, when JDBC auto-commit is false, a rollback statement happens each time a Request is executed Bugzilla Id: 61259 Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java jmeter/trunk/xdocs/changes.xml This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4420 |