提交 a77601c8 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 8613b4bc
......@@ -18,7 +18,10 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>The H2 Console web application (war file) did only support ASCII characters.
<ul><li>JdbcConnectionPool: it was possible to set a negative connection pool size.
</li><li>Fulltext search did not support table names with a backslash.
</li><li>The internal IntArray class did not work correctly when initialized with a zero length array.
</li><li>The H2 Console web application (war file) did only support ASCII characters.
Now UTF-8 is supported.
</li><li>DATEADD does no longer require that the argument is a timestamp.
</li><li>The database file locking mechanism didn't work correctly on Mac OS.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -419,12 +419,12 @@ public abstract class Prepared {
protected SQLException setRow(SQLException ex, int rowId, String values) {
if (ex instanceof JdbcSQLException) {
JdbcSQLException e = (JdbcSQLException) ex;
StringBuffer buff = new StringBuffer("VALUES(");
buff.append(values).append(")");
StringBuffer buff = new StringBuffer(sqlStatement);
buff.append(" -- ");
if (rowId > 0) {
buff.append(" -- row #");
buff.append(rowId + 1);
buff.append("row #").append(rowId + 1).append(" ");
}
buff.append("(").append(values).append(")");
e.setSQL(buff.toString());
}
return ex;
......
......@@ -15,6 +15,7 @@ import java.sql.SQLException;
import org.h2.constant.ErrorCode;
import org.h2.engine.SessionInterface;
import org.h2.message.Message;
import org.h2.util.JdbcUtils;
import org.h2.util.ObjectArray;
import org.h2.util.StringUtils;
import org.h2.value.DataType;
......@@ -68,7 +69,10 @@ public class UpdatableRow {
return;
}
}
ResultSet rs = meta.getTables(null, schemaName, tableName, new String[] { "TABLE" });
ResultSet rs = meta.getTables(null,
JdbcUtils.escapeMetaDataPattern(schemaName),
JdbcUtils.escapeMetaDataPattern(tableName),
new String[] { "TABLE" });
if (!rs.next()) {
return;
}
......@@ -77,12 +81,16 @@ public class UpdatableRow {
return;
}
key = new ObjectArray();
rs = meta.getPrimaryKeys(null, schemaName, tableName);
rs = meta.getPrimaryKeys(null,
JdbcUtils.escapeMetaDataPattern(schemaName),
tableName);
while (rs.next()) {
key.add(rs.getString("COLUMN_NAME"));
}
if (key.size() == 0) {
rs = meta.getIndexInfo(null, schemaName, tableName, true, true);
rs = meta.getIndexInfo(null,
JdbcUtils.escapeMetaDataPattern(schemaName),
tableName, true, true);
while (rs.next()) {
key.add(rs.getString("COLUMN_NAME"));
}
......
......@@ -283,8 +283,6 @@ java org.h2.test.TestAll timer
/*
line breaks in grammar (specially select)
test performance with log=2
maybe make log=2 the default option
......@@ -293,8 +291,6 @@ TRANSACTION_ID()
select 1 from dual a where 1 in(select 1 from dual b
where 1 in(select 1 from dual c where a.x=1));
error message on insert / merge: include SQL statement (at least table name)
use 127.0.0.1 if other addresses don't work
select for update in mvcc mode: only lock the selected records?
......
......@@ -16,10 +16,25 @@ import org.h2.util.IntArray;
*/
public class TestIntArray extends TestBase {
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String[] a) throws Exception {
TestBase.createCaller().init().test();
}
public void test() {
testInit();
testRandom();
}
private void testInit() {
IntArray array = new IntArray(new int[0]);
array.add(10);
}
private void testRandom() {
IntArray array = new IntArray();
int[] test = new int[0];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论