1
votes

I made some jdbc test query using Jmeter JDBC test from JMETER JDBC MENUAL

And I encountered some problem. After I executed below query, I couldn'd found any inserted row from real DB.

Request :

[Commit] SELECT @userId := MAX(userId) + 1 FROM userconnection;
SELECT @providerUserId := MAX(providerUserId) + 1 FROM userconnection;
INSERT INTO userconnection(userId, providerId, providerUserId, rank, profileUrl, imageUrl, accessToken, secret)
VALUES (@userId, 'twitter', @providerUserId, 1, '', '', '', '');

Sampler result :

Thread Name: jp@gc - Ultimate Thread Group 1-200
Sample Start: 2014-11-26 17:07:05 KST
Load time: 2
Latency: 2
Size in bytes: 6
Headers size in bytes: 0
Body size in bytes: 6
Sample Count: 1
Error Count: 0
Response code: 200
Response message: OK
Response headers:
com.mysql.jdbc.Connection@1b520e68
SampleResult fields:
ContentType: text/plain
DataEncoding: UTF-8

Why the result is not affected Real Database? Are Any rows rollback after executing jemter test?

1

1 Answers

0
votes

Try using below SQL statement:

INSERT INTO userconnection VALUES ((select max(userid) +1 from userconnection), 'twitter', (select max(providerUserId) +1 from userconnection), 1, '', '', '', '');

Hope this will help.