View | Details | Raw Unified | Return to bug 53073
Collapse All | Expand All

(-)src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java (+12 lines)
Lines 241-246 Link Here
241
            }
241
            }
242
        } while (result || (updateCount != -1));
242
        } while (result || (updateCount != -1));
243
        if (out!=null && pstmt instanceof CallableStatement){
243
        if (out!=null && pstmt instanceof CallableStatement){
244
            ArrayList<Object> outputValues = new ArrayList<Object>();
244
            CallableStatement cs = (CallableStatement) pstmt;
245
            CallableStatement cs = (CallableStatement) pstmt;
245
            sb.append("Output variables by position:\n");
246
            sb.append("Output variables by position:\n");
246
            for(int i=0; i < out.length; i++){
247
            for(int i=0; i < out.length; i++){
Lines 252-257 Link Here
252
                    sb.append("\n");
253
                    sb.append("\n");
253
                }
254
                }
254
            }
255
            }
256
            String varnames[] = getVariableNames().split(COMMA);
257
            if(varnames.length > 0) {
258
        	JMeterVariables jmvars = getThreadContext().getVariables();
259
                for(int i = 0; i < varnames.length && i < outputValues.size(); i++) {
260
                    String name = varnames[i].trim();
261
                    if (name.length()>0){ // Save the value in the variable if present
262
                        Object o = outputValues.get(i);
263
                        jmvars.put(name, o == null ? null : o.toString());
264
                    }
265
                }
266
            }
255
        }
267
        }
256
        return sb.toString();
268
        return sb.toString();
257
    }
269
    }

Return to bug 53073