Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98405109FB for ; Tue, 24 Feb 2015 03:23:37 +0000 (UTC) Received: (qmail 77122 invoked by uid 500); 24 Feb 2015 03:23:32 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 76606 invoked by uid 500); 24 Feb 2015 03:23:31 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 76276 invoked by uid 99); 24 Feb 2015 03:23:31 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2015 03:23:31 +0000 Date: Tue, 24 Feb 2015 03:23:31 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (DBCP-168) [dbcp] add/enhance toString() Method to DelegatingCallableStatement for sql debugging MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBCP-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed DBCP-168. ---------------------------- > [dbcp] add/enhance toString() Method to DelegatingCallableStatement for sql debugging > ------------------------------------------------------------------------------------- > > Key: DBCP-168 > URL: https://issues.apache.org/jira/browse/DBCP-168 > Project: Commons Dbcp > Issue Type: Improvement > Environment: Operating System: All > Platform: PC > Reporter: Ralf Hauser > Priority: Minor > > one of the beauties of mysql connector-J is that a stmt.toString() not just > produces the object reference string but also the sql-statement that will be > executed on the RDBMS server. (Thanks Mark Matthews!) > Recently, I went through the excercise of porting a larger jdbc code-base from > mysql to oracle. There may be many reasons to do this, but error handling in > ojdbc14.jar is not one of it :( {the usual laziness of programmers when > throwing an error: not saying which of the parameters caused it, not citing > offending values, string positions of invalid characters, ... - it would cost > them a few minutes to do better and save the developers using their jar days if > not weeks!} > Therefore the RFE: > Not only directly pass on all values in DelegatingCallableStatement and > DelegatingPreparedStatement to the delegate, but in the set*() methods gather > enough information to be able to do something along the lines of > com.mysql.jdbc.PreparedStatement.asSql() > Sure one might say that this causes unneccessary overhead for production > environments - o.k. perhaps there needs to be a configuration flag to set > whether dbcp shall do this or operate as is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)