【发布时间】:2014-11-26 08:14:13
【问题描述】:
我使用来自JMETER JDBC MENUAL 的 Jmeter JDBC 测试做了一些 jdbc 测试查询
我遇到了一些问题。执行以下查询后,我无法从真实数据库中找到任何插入的行。
请求:
[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, '', '', '', '');
采样器结果:
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
为什么Real Database的结果不受影响? 执行 jemter 测试后是否有任何行回滚?
【问题讨论】:
-
请使用查询类型作为更新语句。更多信息请参考https://stackoverflow.com/a/55116782/10514096