[
https://issues.jboss.org/browse/ISPN-965?page=com.atlassian.jira.plugin.s...
]
Mircea Markus commented on ISPN-965:
------------------------------------
//Small program I used for testing.
public static void main(String[] args) throws Exception {
try {
Class.forName("org.hsqldb.jdbcDriver" );
} catch (Exception e) {
System.out.println("ERROR: failed to load HSQLDB JDBC driver.");
e.printStackTrace();
return;
}
Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname",
"sa", "");
PreparedStatement preparedStatement = c.prepareStatement("create table
testt(id1 INT, id2 INT)");
preparedStatement.executeUpdate();
preparedStatement.close();
preparedStatement = c.prepareStatement("insert into testt(id1, id2)
values(?,?)");
for (int i = 0;i < 10; i++) {
preparedStatement.setInt(1, i);
preparedStatement.setInt(2, 100 + i);
preparedStatement.addBatch();
}
preparedStatement.executeBatch();
preparedStatement.close();
String toRun = String.format("SELECT TOP ? %s, %s FROM %s ",
"id1", "id2", "testt");
PreparedStatement ps = c.prepareStatement(toRun);
ps.setInt(1,7);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
System.out.println("rs.getString(\"id1\") = " +
rs.getString("id1"));
// System.out.println("rs.getString(\"id2\") = " +
rs.getString("id2"));
}
System.out.println("c = " + c);
}
Query for loading some rows from CacheStore is not correct for HSQLDB
1.8.0.7
-----------------------------------------------------------------------------
Key: ISPN-965
URL:
https://issues.jboss.org/browse/ISPN-965
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 4.2.0.Final
Environment: JBoss AS 5.1.0.GA
HSQLDB 1.8.0.7
Reporter: Anatoliy Bazko
Assignee: Mircea Markus
Fix For: 5.0.0.CR3, 5.0.0.FINAL
Loading data from CacheStore using method public final Set<InternalCacheEntry>
loadSome(int maxEntries) throws CacheLoaderException failed due to query
"SELECT %s, %s FROM %s LIMIT ?" is not correct for HSQLDB 1.8.0.7 since it
required "ORDER BY" before "LIMIT"
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira