зеркало из https://github.com/Azure/YCSB.git
[postgrenosql] Read ResultSet was not iterated correctly. (#1376)
The first ResultSet.next() call to test if the ResultSet was empty moved the cursor without adding the resulting row to the YCSB result callback.
This commit is contained in:
Родитель
49ce12a399
Коммит
bee93f2a8c
|
@ -151,11 +151,11 @@ public class PostgreNoSQLDBClient extends DB {
|
|||
|
||||
if (result != null) {
|
||||
if (fields == null){
|
||||
while (resultSet.next()){
|
||||
do{
|
||||
String field = resultSet.getString(2);
|
||||
String value = resultSet.getString(3);
|
||||
result.put(field, new StringByteIterator(value));
|
||||
}
|
||||
}while (resultSet.next());
|
||||
} else {
|
||||
for (String field : fields) {
|
||||
String value = resultSet.getString(field);
|
||||
|
|
Загрузка…
Ссылка в новой задаче