Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 74527 invoked from network); 16 Aug 2010 06:03:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Aug 2010 06:03:51 -0000 Received: (qmail 69840 invoked by uid 500); 16 Aug 2010 06:03:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 69638 invoked by uid 500); 16 Aug 2010 06:03:48 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 69631 invoked by uid 99); 16 Aug 2010 06:03:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Aug 2010 06:03:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of brett.wooldridge@gmail.com designates 209.85.215.172 as permitted sender) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Aug 2010 06:03:40 +0000 Received: by eyb7 with SMTP id 7so2367671eyb.31 for ; Sun, 15 Aug 2010 23:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=7W+HrKOuzOwmh9Wxq9zhKtsy96n1rHj1HL2xZ+yWovE=; b=Xrdtwf4kjKJcBS1os+ri9PNsguMEZg0xIaq6A4dok/eypvgZ9p7cQrKM/l2C8Llkik YRo9gx7hocLGijR6bhE+WtiIf6n+6Bp8vBWYlU3CzbU+v+UVfCk9Wq2fwifeSV6ckjbR MO4kw7AR8f48faafOMiOO5mOr7do7jaeNwtUs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Whh7p1R2KSFzDaZpepbCqMwWnKpTKh8TnYwUMm1+2GbAWYh6qkpkl8TJ84vOpnjZ85 /kbi+0Tby+1Qh/KYFauFOtPWgnL8GhK023PfdU9e4mwqw0QMEyCH4xE9LpOnevfj6SOF 8eURR0QquLfbSWDbhkA3a8sqy122qCkgfguTE= MIME-Version: 1.0 Received: by 10.213.52.10 with SMTP id f10mr2157441ebg.60.1281938598676; Sun, 15 Aug 2010 23:03:18 -0700 (PDT) Received: by 10.14.37.140 with HTTP; Sun, 15 Aug 2010 23:03:18 -0700 (PDT) Date: Mon, 16 Aug 2010 15:03:18 +0900 Message-ID: Subject: Error using XPLAIN From: Brett Wooldridge To: derby-dev@db.apache.org Content-Type: multipart/alternative; boundary=00163602606dcc4b66048dea96c6 --00163602606dcc4b66048dea96c6 Content-Type: text/plain; charset=ISO-8859-1 Devs, I am encountering an error using the new explain functionality. When I run the following: CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1); CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('APP'); select * from device d where d.network='Default' order by d.ip_high, d.ip_low fetch first 100 rows only; CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0); I get this error: Error: A truncation error was encountered trying to shrink {0} '{1}' to length {2}. SQLState: 22001 ErrorCode: -1 Error occured in: select * from device this_ where this_.network='Default' order by this_.ip_high, this_.ip_low fetch first 100 rows only And the following stack trace on my server: Caused by: ERROR 22001: A truncation error was encountered trying to shrink CHAR 'Thread[DRDAConnThread_27,5,derby.daemons]' to length 32. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.iapi.types.SQLChar.hasNonBlankChars(Unknown Source) at org.apache.derby.iapi.types.SQLChar.normalize(Unknown Source) at org.apache.derby.iapi.types.SQLChar.normalize(Unknown Source) at org.apache.derby.iapi.types.DataTypeDescriptor.normalize(Unknown Source) at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeColumn(Unknown Source) at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(Unknown Source) at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source) at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) ... 15 more Is the XPLAIN functionality only supposed to be use with an embedded driver? If not, the thread names of threads in the networks server are too long to fit into the XPLAIN schema SYSXPLAIN_STATEMENTS(XPLAIN_THREAD_ID). Along that same vein, the TRANSACTION_ID column looks similarly too small to my eye (CHAR 32). I use Bitronix JTA and from my memory the xid are at least 64 characters. -Brett --00163602606dcc4b66048dea96c6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Devs,

I am encountering an error using the new explain f= unctionality. =A0When I run the following:

CA= LL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
CALL SYSCS_UTIL.SYS= CS_SET_XPLAIN_SCHEMA('APP');

select *=A0
from device d=A0
where = d.network=3D'Default'
order by d.ip_high, d.ip_low
<= div>fetch first 100 rows only;

CALL SYSCS_UTIL.SYS= CS_SET_RUNTIMESTATISTICS(0);

I get this error:

E= rror: A truncation error was encountered trying to shrink {0} '{1}'= to length {2}.
SQLState: =A022001
ErrorCode: -1
Error occured in:
select *=A0
from device this_=A0=
where this_.network=3D'Default'
order by this_= .ip_high, this_.ip_low
fetch first 100 rows only
=
And the following stack trace on my server:

=
Caused by: ERROR 22001: A truncation error was encountered trying= to shrink CHAR 'Thread[DRDAConnThread_27,5,derby.daemons]' to leng= th 32.
at or= g.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at= org.apache.derby.iapi.types.SQLChar.hasNonBlankChars(Unknown Source)
at or= g.apache.derby.iapi.types.SQLChar.normalize(Unknown Source)
at org.apache.d= erby.iapi.types.SQLChar.normalize(Unknown Source)
at or= g.apache.derby.iapi.types.DataTypeDescriptor.normalize(Unknown Source)
at o= rg.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeColumn(Unknown= Source)
at or= g.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(Unknown Sou= rce)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore= (Unknown Source)
at or= g.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown So= urce)
<= /span>at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Sou= rce)
at or= g.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source= )
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Sou= rce)
... 1= 5 more

Is the XPLAIN functionality only supp= osed to be use with an embedded driver? =A0If not, the thread names of thre= ads in the networks server are too long to fit into the XPLAIN schema SYSXP= LAIN_STATEMENTS(XPLAIN_THREAD_ID). =A0Along that same vein, the TRANSACTION= _ID column looks similarly too small to my eye (CHAR 32). =A0I use Bitronix= JTA and from my memory the xid are at least 64 characters.

-Brett

--00163602606dcc4b66048dea96c6--