jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60889] JMeter JDBC sample will call SELECT USER() when testing with MySQL JDBC
Date Wed, 29 Mar 2017 05:35:00 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60889

Liu XP <liu_xp2003@sina.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #7 from Liu XP <liu_xp2003@sina.com> ---
Hi Philippe,

It is relative with JMeter JDBC Sampler JDBCSampler.java line 88
res.setResponseHeaders(conn.toString());
The toString method is Overrided by DBCP2 DelegatingConnect.java line 101
toString(). And it will call meta.getUserName() in MySQL JDBC function.

I comment conn.toString() line 88 and used following code to set
ResponseHeaders.
It could avoid to calling "SELECT USER()" Query.

            //res.setResponseHeaders(conn.toString());
            res.setResponseHeaders("DB Pool Name: " + getDataSource() +
";\nConnect Catalog: " + conn.getCatalog());

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message