
|
If you were logged in you would be able to see more operations.
|
|
|
|
File Attachments:
|
|
|
Environment:
|
------------------ Java Information ------------------
Java Version: 1.6.0_03
Java Vendor: Sun Microsystems Inc.
Java home: D:\Programs\Java\jre1.6.0_03
Java classpath: derbytools.jar
OS name: Windows XP
OS architecture: x86
OS version: 5.1
Java user name: Donatas
Java user home: C:\Documents and Settings\Donatas
Java user dir: d:\java\derby-10.3.2.1\lib
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[D:\java\derby-10.3.2.1\lib\derbytools.jar] 10.3.2.1 - (599110)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------
------------------ Java Information ------------------
Java Version: 1.6.0_03
Java Vendor: Sun Microsystems Inc.
Java home: D:\Programs\Java\jre1.6.0_03
Java classpath: derbytools.jar
OS name: Windows XP
OS architecture: x86
OS version: 5.1
Java user name: Donatas
Java user home: C:\Documents and Settings\Donatas
Java user dir: d:\java\derby-10.3.2.1\lib
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[D:\java\derby-10.3.2.1\lib\derbytools.jar] 10.3.2.1 - (599110)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------
|
|
Issue Links:
|
Reference
|
|
|
|
This issue is related to:
|
|
DERBY-681
Eliminate the parser's rewriting of the abstract syntax tree for queries with GROUP BY and/or HAVING clauses
|
|
|
|
|
|
|
| Urgency: |
Normal
|
| Bug behavior facts: |
Regression
|
| Resolution Date: |
21/Feb/08 05:46 PM
|
|
Derby throws ArrayIndexOutOfBoundsException when I try to execute SQL query shown below.
This is a regression, since Derby 10.2.2.0 executes this query without problems.
Attached are DDL statements to create DB tables, and database itself (with data).
2008-01-08 12:32:34.461 GMT Thread[DRDAConnThread_5,6,derby.daemons] (XID = 1497), (SESSIONID = 0), (DATABASE = InventorizacijaDB), (DRDAID = NF000001.G46A-666250070078662256{1}), Failed Statement is: select MAX(preke0_.BARKODAS) as col_0_0_, MAX(preke0_.PAVADINIMAS) as col_1_0_, MAX(preke0_.KIEKIS) as col_2_0_, SUM(irasas1_.FAKTINIS_KIEKIS) as col_3_0_ from PREKE preke0_, IRASAS irasas1_, IRASU_BLOKAS irasubloka2_ where irasas1_.IRASU_BLOKAS=irasubloka2_.ID and preke0_.UNIKALUS_KODAS=irasas1_.UNIKALUS_KODAS and irasubloka2_.INVENTORIZACIJA=? group by irasas1_.UNIKALUS_KODAS order by abs(SUM(irasas1_.FAKTINIS_KIEKIS)-MAX(preke0_.KIEKIS)) DESC with 1 parameters begin parameter #1: 1 :end parameter
java.lang.ArrayIndexOutOfBoundsException: 5
at org.apache.derby.impl.store.access.sort.MergeSort.compare(Unknown Source)
at org.apache.derby.impl.store.access.sort.SortBuffer.insert(Unknown Source)
at org.apache.derby.impl.store.access.sort.MergeInserter.insert(Unknown Source)
at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(Unknown Source)
at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown Source)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
|
|
Description
|
Derby throws ArrayIndexOutOfBoundsException when I try to execute SQL query shown below.
This is a regression, since Derby 10.2.2.0 executes this query without problems.
Attached are DDL statements to create DB tables, and database itself (with data).
2008-01-08 12:32:34.461 GMT Thread[DRDAConnThread_5,6,derby.daemons] (XID = 1497), (SESSIONID = 0), (DATABASE = InventorizacijaDB), (DRDAID = NF000001.G46A-666250070078662256{1}), Failed Statement is: select MAX(preke0_.BARKODAS) as col_0_0_, MAX(preke0_.PAVADINIMAS) as col_1_0_, MAX(preke0_.KIEKIS) as col_2_0_, SUM(irasas1_.FAKTINIS_KIEKIS) as col_3_0_ from PREKE preke0_, IRASAS irasas1_, IRASU_BLOKAS irasubloka2_ where irasas1_.IRASU_BLOKAS=irasubloka2_.ID and preke0_.UNIKALUS_KODAS=irasas1_.UNIKALUS_KODAS and irasubloka2_.INVENTORIZACIJA=? group by irasas1_.UNIKALUS_KODAS order by abs(SUM(irasas1_.FAKTINIS_KIEKIS)-MAX(preke0_.KIEKIS)) DESC with 1 parameters begin parameter #1: 1 :end parameter
java.lang.ArrayIndexOutOfBoundsException: 5
at org.apache.derby.impl.store.access.sort.MergeSort.compare(Unknown Source)
at org.apache.derby.impl.store.access.sort.SortBuffer.insert(Unknown Source)
at org.apache.derby.impl.store.access.sort.MergeInserter.insert(Unknown Source)
at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter(Unknown Source)
at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown Source)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
at org.apache.derby.impl.drda.DRDAStatement.execute(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) |
Show » |
made changes - 08/Jan/08 01:26 PM
| Field |
Original Value |
New Value |
|
Attachment
|
|
db.zip
[ 12372712
]
|
made changes - 08/Jan/08 01:31 PM
|
Attachment
|
|
ddl.sql
[ 12372713
]
|
made changes - 15/Feb/08 06:42 PM
|
Attachment
|
|
d3303_v1.patch
[ 12375702
]
|
made changes - 15/Feb/08 06:43 PM
|
Derby Info
|
[Regression]
|
[Patch Available, Regression]
|
|
Affects Version/s
|
|
10.4.0.0
[ 12312540
]
|
|
Assignee
|
|
A B
[ army
]
|
made changes - 15/Feb/08 06:45 PM
|
Derby Info
|
[Regression, Patch Available]
|
[Patch Available, Regression]
|
|
Affects Version/s
|
|
10.3.1.4
[ 12312590
]
|
made changes - 16/Feb/08 12:24 AM
|
Attachment
|
|
d3303_v2.patch
[ 12375732
]
|
made changes - 18/Feb/08 05:22 PM
|
Fix Version/s
|
|
10.4.0.0
[ 12312540
]
|
|
Derby Info
|
[Patch Available, Regression]
|
[Regression]
|
made changes - 18/Feb/08 05:22 PM
|
Component/s
|
|
SQL
[ 11408
]
|
made changes - 20/Feb/08 05:04 PM
|
Fix Version/s
|
|
10.3.2.2
[ 12312885
]
|
made changes - 21/Feb/08 05:46 PM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
made changes - 21/Feb/08 05:46 PM
|
Status
|
Resolved
[ 5
]
|
Closed
[ 6
]
|
made changes - 30/Jun/09 03:55 PM
|
Bug behavior facts
|
|
[Regression]
|
|