提交 4fc52e91 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 9d35faf1
......@@ -108,10 +108,10 @@ That is not easy to say. It is still a quite new product. A lot of tests have be
and the code coverage of these tests is very high. Randomized stress tests
are run regularly. But as this is a relatively new product, there are probably
some problems that have not yet been found.
Areas that are not completely tested:
Areas that are not 100% tested:
</p>
<ul>
<li>Platforms other than Windows XP and the Sun JVM 1.4
<li>Platforms other than Windows XP and the Sun JVM 1.4 and 1.5
</li><li>Data types BLOB, CLOB, VARCHAR_IGNORECASE, OTHER
</li><li>Cluster mode, 2-Phase Commit, Savepoints
</li><li>Server mode (well tested, but not as well as Embedded mode)
......
......@@ -280,6 +280,9 @@ It looks like the development of this database has stopped. The last release was
</tr><tr>
<td><a href="http://www.shellbook.com">Shellbook</a></td>
<td>Desktop publishing application.</td>
</tr><tr>
<td><a href="http://www.intellibo.com">Signsoft intelliBO</a></td>
<td>Persistence middleware supporting the JDO specification.</td>
</tr><tr>
<td><a href="http://sql-workbench.net">SQL Workbench/J</a></td>
<td>Free DBMS-independent SQL tool.</td>
......
......@@ -162,7 +162,6 @@ public class Parser {
private boolean rightsChecked;
private boolean recompileAlways;
private ObjectArray indexedParameterList;
private int tempViewId;
public Parser(Session session) {
this.session = session;
......@@ -741,8 +740,14 @@ public class Parser {
if(isToken("SELECT") || isToken("FROM")) {
Query query = parseQueryWithParams();
String querySQL = query.getSQL();
int id = tempViewId++;
table = new TableView(mainSchema, 0, "TEMP_VIEW_" + id, querySQL, query.getParameters(), null, session, false);
String tempViewName = session.getNextTempViewName();
table = new TableView(mainSchema, 0, tempViewName, querySQL, query.getParameters(), null, session, false);
int testing;
table.setOnCommitDrop(true);
//this.recompileAlways = true;
session.addLocalTempTable(table);
read(")");
} else {
TableFilter top = readTableFilter(fromOuter);
......
/*
* Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.command;
import org.h2.engine.Session;
public class ParserInt extends Parser {
public ParserInt(Session session) {
super(session);
}
}
......@@ -8,6 +8,7 @@ import java.sql.SQLException;
import org.h2.command.Parser;
import org.h2.command.Prepared;
import org.h2.engine.Constants;
import org.h2.engine.Session;
import org.h2.expression.Expression;
import org.h2.expression.Parameter;
......@@ -281,7 +282,12 @@ public class ConstraintReferential extends Constraint {
private boolean found(Session session, Index index, SearchRow check) throws SQLException {
Cursor cursor = index.find(session, check, check);
while(cursor.next()) {
Row found = cursor.get();
SearchRow found;
if(Constants.INDEX_LOOKUP_NEW) {
found = cursor.getSearchRow();
} else {
found = cursor.get();
}
Column[] cols = index.getColumns();
boolean allEqual = true;
for(int i=0; i<columns.length && i<cols.length; i++) {
......
......@@ -18,13 +18,13 @@ package org.h2.engine;
* - Compile with JDK 1.3, 1.4, 1.5 and 1.6:
* set path=C:\jdk1.3.1_19\bin;%PATH%
* set JAVA_HOME=C:\jdk1.3.1_19
* ant codeswitch_jdk13
* ant codeswitchJdk13
* ant compile
* set path=C:\Programme\Java\jdk1.6.0\bin;%PATH%
* set JAVA_HOME=C:\Programme\Java\jdk1.6.0
* ant codeswitch_jdk16
* ant codeswitchJdk16
* ant compile
* ant codeswitch_jdk14
* ant codeswitchJdk14
*
* - Change FAQ (next release planned, known bugs)
* - Check version, change build number in Constants.java and ant-build.properties
......@@ -245,8 +245,9 @@ public class Constants {
public static final int OBJECT_CACHE_MAX_PER_ELEMENT_SIZE = getIntSetting("h2.objectCacheMaxPerElementSize", 4096);
public static final String CLIENT_TRACE_DIRECTORY = getStringSetting("h2.clientTraceDirectory", "trace.db/");
public static int MAX_FILE_RETRY = Math.max(1, getIntSetting("h2.maxFileRetry", 16));
public static boolean INDEX_NEW = getBooleanSetting("h2.indexNew", false);
public static boolean LOB_CLOSE_BETWEEN_READS = getBooleanSetting("h2.lobCloseBetweenReads", false);
public static boolean INDEX_OLD = getBooleanSetting("h2.indexOld", false);
public static final boolean INDEX_LOOKUP_NEW = getBooleanSetting("h2.indexLookupNew", true);
public static boolean getBooleanSetting(String name, boolean defaultValue) {
String s = System.getProperty(name);
......
......@@ -832,6 +832,16 @@ public class Database implements DataHandler {
}
private void closeOpenFilesAndUnlock() throws SQLException {
int testing;
if (persistent && lock == null && fileLockMethod != FileLock.LOCK_NO) {
// everything already closed (maybe in checkPowerOff)
// don't delete temp files in this case because
// the database could be open now (even from within another process)
System.out.println("lock = null!");
// return;
}
if (log != null) {
stopWriter();
log.close();
......@@ -843,9 +853,9 @@ public class Database implements DataHandler {
systemSession.close();
systemSession = null;
}
if (lock != null) {
lock.unlock();
lock = null;
if(lock != null) {
lock.unlock();
lock = null;
}
}
......
......@@ -60,6 +60,7 @@ public class Session implements SessionInterface {
private String currentSchemaName;
private String traceModuleName;
private HashSet unlinkSet;
private int tempViewIndex;
public Table findLocalTempTable(String name) {
Table t = null;
......@@ -89,7 +90,6 @@ public class Session implements SessionInterface {
}
public void addLocalTempTable(Table table) throws SQLException {
cleanTempTables(false);
if(localTempTables == null) {
localTempTables = new HashMap();
}
......@@ -480,5 +480,9 @@ public class Session implements SessionInterface {
unlinkSet.remove(v);
}
}
public String getNextTempViewName() {
return "TEMP_VIEW_" + tempViewIndex++;
}
}
......@@ -17,7 +17,8 @@ import org.h2.result.SearchRow;
public class BtreeCursor implements Cursor {
private BtreeIndex index;
private BtreePosition top;
private Row current;
private SearchRow currentSearchRow;
private Row currentRow;
private boolean first;
private SearchRow last;
......@@ -47,30 +48,39 @@ public class BtreeCursor implements Cursor {
return t;
}
void setCurrentRow(int pos) throws SQLException {
current = pos == POS_NO_ROW ? null : index.getRow(pos);
void setCurrentRow(SearchRow searchRow) throws SQLException {
this.currentSearchRow = searchRow;
currentRow = null;
}
public Row get() throws SQLException {
return current;
if(currentRow == null && currentSearchRow != null) {
currentRow = index.getRow(currentSearchRow.getPos());
}
return currentRow;
}
public SearchRow getSearchRow() throws SQLException {
return currentSearchRow;
}
public int getPos() {
return current.getPos();
return currentSearchRow.getPos();
}
public boolean next() throws SQLException {
if (first) {
first = false;
return current != null;
return currentSearchRow != null;
}
top.page.next(this, top.position);
if(current != null && last != null) {
if (index.compareRows(current, last) > 0) {
current = null;
if(currentSearchRow != null && last != null) {
if (index.compareRows(currentSearchRow, last) > 0) {
currentSearchRow = null;
currentRow = null;
}
}
return current != null;
return currentSearchRow != null;
}
}
......@@ -183,7 +183,7 @@ public class BtreeIndex extends Index implements RecordReader {
} else {
BtreeCursor cursor = new BtreeCursor(this, last);
if (!root.findFirst(cursor, first)) {
cursor.setCurrentRow(Cursor.POS_NO_ROW);
cursor.setCurrentRow(null);
}
return cursor;
}
......
......@@ -160,7 +160,7 @@ public class BtreeLeaf extends BtreePage {
}
cursor.push(this, l);
SearchRow row = (SearchRow) pageData.get(l);
cursor.setCurrentRow(row.getPos());
cursor.setCurrentRow(row);
return true;
}
......@@ -168,7 +168,7 @@ public class BtreeLeaf extends BtreePage {
i++;
if (i < pageData.size()) {
SearchRow r = (SearchRow) pageData.get(i);
cursor.setCurrentRow(r.getPos());
cursor.setCurrentRow(r);
cursor.setStackPosition(i);
return;
}
......@@ -186,13 +186,13 @@ public class BtreeLeaf extends BtreePage {
}
cursor.push(this, 0);
SearchRow row = (SearchRow) pageData.get(0);
cursor.setCurrentRow(row.getPos());
cursor.setCurrentRow(row);
}
private void nextUpper(BtreeCursor cursor) throws SQLException {
BtreePosition upper = cursor.pop();
if (upper == null) {
cursor.setCurrentRow(Cursor.POS_NO_ROW);
cursor.setCurrentRow(null);
} else {
cursor.push(upper.page, upper.position);
upper.page.next(cursor, upper.position);
......
......@@ -268,7 +268,7 @@ public class BtreeNode extends BtreePage {
cursor.pop();
BtreePosition upper = cursor.pop();
if (upper == null) {
cursor.setCurrentRow(Cursor.POS_NO_ROW);
cursor.setCurrentRow(null);
} else {
cursor.push(upper.page, upper.position);
upper.page.next(cursor, upper.position);
......
......@@ -7,6 +7,7 @@ package org.h2.index;
import java.sql.SQLException;
import org.h2.result.Row;
import org.h2.result.SearchRow;
public interface Cursor {
......@@ -14,6 +15,7 @@ public interface Cursor {
int POS_NO_ROW = -1;
Row get() throws SQLException;
SearchRow getSearchRow() throws SQLException;
int getPos();
boolean next() throws SQLException;
......
......@@ -9,6 +9,7 @@ import java.sql.SQLException;
import org.h2.message.Message;
import org.h2.result.LocalResult;
import org.h2.result.Row;
import org.h2.result.SearchRow;
public class FunctionCursor implements Cursor {
......@@ -23,6 +24,10 @@ public class FunctionCursor implements Cursor {
return row;
}
public SearchRow getSearchRow() throws SQLException {
return row;
}
public int getPos() {
throw Message.getInternalError();
}
......
......@@ -4,7 +4,10 @@
*/
package org.h2.index;
import java.sql.SQLException;
import org.h2.result.Row;
import org.h2.result.SearchRow;
/**
* @author Thomas
......@@ -21,6 +24,10 @@ public class HashCursor implements Cursor {
return row;
}
public SearchRow getSearchRow() throws SQLException {
return row;
}
public int getPos() {
return row == null ? -1 : row.getPos();
}
......
......@@ -4,7 +4,10 @@
*/
package org.h2.index;
import java.sql.SQLException;
import org.h2.result.Row;
import org.h2.result.SearchRow;
/**
* @author Thomas
......@@ -21,6 +24,10 @@ public class LinearHashCursor implements Cursor {
return row;
}
public SearchRow getSearchRow() throws SQLException {
return row;
}
public int getPos() {
return row == null ? -1 : row.getPos();
}
......
......@@ -10,6 +10,7 @@ import java.sql.SQLException;
import org.h2.engine.Session;
import org.h2.message.Message;
import org.h2.result.Row;
import org.h2.result.SearchRow;
import org.h2.table.Column;
import org.h2.table.Table;
import org.h2.value.DataType;
......@@ -36,6 +37,10 @@ public class LinkedCursor implements Cursor {
return current;
}
public SearchRow getSearchRow() throws SQLException {
return current;
}
public int getPos() {
throw Message.getInternalError();
}
......
......@@ -8,6 +8,7 @@ import java.sql.SQLException;
import org.h2.message.Message;
import org.h2.result.Row;
import org.h2.result.SearchRow;
import org.h2.util.ObjectArray;
......@@ -29,6 +30,10 @@ public class MetaCursor implements Cursor {
return current;
}
public SearchRow getSearchRow() throws SQLException {
return current;
}
public int getPos() {
throw Message.getInternalError();
}
......
......@@ -8,6 +8,7 @@ import java.sql.SQLException;
import org.h2.message.Message;
import org.h2.result.Row;
import org.h2.result.SearchRow;
import org.h2.value.Value;
import org.h2.value.ValueLong;
......@@ -27,6 +28,10 @@ public class RangeCursor implements Cursor {
public Row get() {
return currentRow;
}
public SearchRow getSearchRow() throws SQLException {
return currentRow;
}
public int getPos() {
throw Message.getInternalError();
......
......@@ -7,6 +7,7 @@ package org.h2.index;
import java.sql.SQLException;
import org.h2.result.Row;
import org.h2.result.SearchRow;
/**
......@@ -24,7 +25,11 @@ public class ScanCursor implements Cursor {
public Row get() {
return row;
}
public SearchRow getSearchRow() {
return row;
}
public int getPos() {
return row == null ? -1 : row.getPos();
}
......
......@@ -28,6 +28,10 @@ public class TreeCursor implements Cursor {
return node == null ? null : node.row;
}
public SearchRow getSearchRow() {
return get();
}
public int getPos() {
return node == null ? -1 : node.row.getPos();
}
......
......@@ -9,6 +9,7 @@ import java.sql.SQLException;
import org.h2.message.Message;
import org.h2.result.LocalResult;
import org.h2.result.Row;
import org.h2.result.SearchRow;
import org.h2.table.Table;
import org.h2.value.Value;
import org.h2.value.ValueNull;
......@@ -28,6 +29,10 @@ public class ViewCursor implements Cursor {
return current;
}
public SearchRow getSearchRow() {
return current;
}
public int getPos() {
throw Message.getInternalError();
}
......
......@@ -1273,8 +1273,8 @@ A
"Other Grammar","Quoted Name","
""anythingExceptDoubleQuote""
","
Quoted names are case sensitive, and can contain spaces.
There is no maximum name length.
Quoted names are case sensitive, and can contain spaces. There is no maximum name length.
Two double quotes can be used to create a single double quote inside an identifier.
","
""FirstName""
"
......@@ -1284,7 +1284,7 @@ There is no maximum name length.
A string starts and ends with a single quote.
Two single quotes can be used to create a single quote inside a string.
","
'Jon''s car'
'John''s car'
"
"Other Grammar","Int","
[- | +] digit [...]
......
......@@ -9,6 +9,7 @@ import org.h2.value.Value;
public class SimpleRowValue implements SearchRow {
private int pos;
private int index;
private int virtualColumnCount;
private Value data;
......@@ -22,14 +23,15 @@ public class SimpleRowValue implements SearchRow {
public int getPos() {
return pos;
}
public Value getValue(int index) {
return data;
public Value getValue(int idx) {
return idx == index ? data : null;
}
public void setPos(int pos) {
this.pos = pos;
}
public void setValue(int idx, Value v) {
index = idx;
data = v;
}
......
......@@ -59,7 +59,6 @@ public class FileStore {
this.mode = mode;
try {
FileUtils.createDirs(name);
// File f = new File(name);
if(FileUtils.exists(name) && !FileUtils.canWrite(name)) {
mode = "r";
this.mode = mode;
......
......@@ -247,11 +247,11 @@ public class Storage {
this.recordCount = recordCount;
}
public void addPage(int i) {
void addPage(int i) {
pages.addValueSorted(i);
}
public void removePage(int i) {
void removePage(int i) {
pages.removeValue(i);
}
......
......@@ -4,6 +4,8 @@
*/
package org.h2.table;
import java.sql.SQLException;
import org.h2.command.dml.Select;
import org.h2.value.Value;
......@@ -12,7 +14,7 @@ public interface ColumnResolver {
String getTableAlias();
Column[] getColumns();
String getSchemaName();
Value getValue(Column column);
Value getValue(Column column) throws SQLException;
TableFilter getTableFilter();
Select getSelect();
......
......@@ -299,10 +299,12 @@ public abstract class Table extends SchemaObject {
}
private void remove(ObjectArray list, DbObject obj) {
int i = list.indexOf(obj);
if(i>=0) {
list.remove(i);
}
if(list != null) {
int i = list.indexOf(obj);
if(i>=0) {
list.remove(i);
}
}
}
public void removeIndex(Index index) {
......
......@@ -44,6 +44,7 @@ public class TableFilter implements ColumnResolver {
// the complete join condition
private Expression joinCondition;
private SearchRow currentSearchRow;
private Row current;
private int state;
......@@ -244,7 +245,9 @@ public class TableFilter implements ColumnResolver {
} else {
scanCount++;
if(cursor.next()) {
current = cursor.get();
currentSearchRow = cursor.getSearchRow();
current = null;
// cursor.get();
state = FOUND;
} else {
state = AFTER_LAST;
......@@ -255,6 +258,7 @@ public class TableFilter implements ColumnResolver {
if(outerJoin && !foundOne) {
state = NULL_ROW;
current = table.getNullRow();
currentSearchRow = current;
} else {
break;
}
......@@ -296,13 +300,17 @@ public class TableFilter implements ColumnResolver {
return Boolean.TRUE.equals(condition.getBooleanValue(session));
}
public Row get() {
public Row get() throws SQLException {
if(current == null && currentSearchRow != null) {
current = cursor.get();
}
return current;
}
public void set(Row current) {
// this is currently only used so that check constraints work - to set the current (new) row
this.current = current;
this.currentSearchRow = current;
}
public String getTableAlias() {
......@@ -506,8 +514,30 @@ public class TableFilter implements ColumnResolver {
return table.getColumns();
}
public Value getValue(Column column) {
return current == null ? null : current.getValue(column.getColumnId());
public Value getValue(Column column) throws SQLException {
if(Constants.INDEX_LOOKUP_NEW) {
if(currentSearchRow == null) {
return null;
}
int columnId = column.getColumnId();
if(current == null) {
Value v = currentSearchRow.getValue(columnId);
if(v != null) {
return v;
}
current = cursor.get();
}
return current.getValue(columnId);
} else {
if(currentSearchRow == null) {
return null;
}
if(current == null) {
current = cursor.get();
}
int columnId = column.getColumnId();
return current.getValue(columnId);
}
}
public TableFilter getTableFilter() {
......
......@@ -13,8 +13,8 @@ import org.h2.engine.Session;
import org.h2.expression.Expression;
import org.h2.index.Index;
import org.h2.index.IndexType;
import org.h2.index.ViewIndexOld;
import org.h2.index.ViewIndex;
import org.h2.index.ViewIndexNew;
import org.h2.message.Message;
import org.h2.result.Row;
import org.h2.schema.Schema;
......@@ -28,8 +28,8 @@ public class TableView extends Table {
private ObjectArray tables;
private String[] columnNames;
private Query viewQuery;
private ViewIndex indexOld;
private ViewIndexNew indexNew;
private ViewIndexOld indexOld;
private ViewIndex indexNew;
private boolean recursive;
private SQLException createException;
......@@ -39,10 +39,10 @@ public class TableView extends Table {
this.columnNames = columnNames;
this.recursive = recursive;
int todoRemoveIndexOld;
if(Constants.INDEX_NEW) {
indexNew = new ViewIndexNew(this, querySQL, params, recursive);
if(Constants.INDEX_OLD) {
indexOld = new ViewIndexOld(this, querySQL, params, recursive);
} else {
indexOld = new ViewIndex(this, querySQL, params, recursive);
indexNew = new ViewIndex(this, querySQL, params, recursive);
}
initColumnsAndTables(session);
}
......@@ -95,10 +95,10 @@ public class TableView extends Table {
for(int i=0; i<columnNames.length; i++) {
cols[i] = new Column(columnNames[i], Value.STRING, 255, 0);
}
if(Constants.INDEX_NEW) {
indexNew.setRecursive(true);
} else {
if(Constants.INDEX_OLD) {
indexOld.setRecursive(true);
} else {
indexNew.setRecursive(true);
}
recursive = true;
createException = null;
......@@ -115,12 +115,12 @@ public class TableView extends Table {
public PlanItem getBestPlanItem(Session session, int[] masks) throws SQLException {
PlanItem item = new PlanItem();
Index i2;
if(Constants.INDEX_NEW) {
item.cost = indexNew.getCost(session, masks);
i2 = new ViewIndexNew(this, indexNew, session, masks);
} else {
if(Constants.INDEX_OLD) {
item.cost = indexOld.getCost(session, masks);
i2 = new ViewIndex(this, indexOld, session, masks);
i2 = new ViewIndexOld(this, indexOld, session, masks);
} else {
item.cost = indexNew.getCost(session, masks);
i2 = new ViewIndex(this, indexNew, session, masks);
}
item.setIndex(i2);
return item;
......
......@@ -132,10 +132,10 @@ public class FileUtils {
throw Message.getInternalError("rename file old=new");
}
if(!oldFile.exists()) {
throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName, newName}, null);
throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName + " (not found)", newName}, null);
}
if(newFile.exists()) {
throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName, newName}, null);
throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName, newName + " (exists)"}, null);
}
for(int i=0; i<Constants.MAX_FILE_RETRY; i++) {
boolean ok = oldFile.renameTo(newFile);
......@@ -401,20 +401,6 @@ public class FileUtils {
} catch (IOException e) {
throw Message.convertIOException(e, path);
}
// try {
// File[] files = new File(path).listFiles();
// if(files == null) {
// return new String[0];
// }
// String[] list = new String[files.length];
// for(int i=0; i<files.length; i++) {
// list[i] = files[i].getCanonicalPath();
// }
// return list;
// } catch (IOException e) {
// throw Message.convert(e);
// }
}
public static boolean isDirectory(String fileName) {
......
......@@ -96,25 +96,6 @@ public class ValueLob extends Value {
return new ValueLob(type, handler, fileName, tableId, objectId, true, precision, compression);
}
// public static ValueLob createClobFromReader(Reader in, long length) throws SQLException {
// try {
// String s = IOUtils.readStringAndClose(in, (int)length);
// byte[] buff = StringUtils.utf8Encode(s);
// return new ValueLob(CLOB, buff);
// } catch (IOException e) {
// throw Message.convert(e);
// }
// }
// public static ValueLob createBlobFromInputStream(InputStream in, long length) throws SQLException {
// try {
// byte[] buff = IOUtils.readBytesAndClose(in, (int)length);
// return new ValueLob(BLOB, buff);
// } catch (IOException e) {
// throw Message.convert(e);
// }
// }
public static ValueLob createClob(Reader in, long length, DataHandler handler) throws SQLException {
try {
boolean compress = handler.getLobCompressionAlgorithm(Value.CLOB) != null;
......@@ -533,11 +514,6 @@ public class ValueLob extends Value {
return small;
}
// public String getJavaString() {
// // TODO value: maybe use another trick (at least the size should be ok?)
// return StringUtils.quoteJavaString(getSQL());
// }
public int getDisplaySize() {
// TODO display size of lob?
return 40;
......
......@@ -228,7 +228,7 @@ INSERT INTO ITEM VALUES(20,
<ul>
<li>The Console is now translated to Japanese thanks to
IKEMOTO, Masahiro (ikeyan (at) arizona (dot) ne (dot) jp).
</li><li>The database engine can now be compiled with JDK 1.3 using ant codeswitch_jdk13.
</li><li>The database engine can now be compiled with JDK 1.3 using ant codeswitch.
There are still some limitations, and the ant script to build the jar does not work yet.
</li><li>SCRIPT NODATA now writes the row count for each table.
</li><li>Timestamps with timezone information (Z or +/-hh:mm) and dates before year 1
......@@ -273,7 +273,7 @@ INSERT INTO ITEM VALUES(19,
longer the application directory. This can be changed using the system
property h2.clientTraceDirectory.
</li><li>Build: Now using ant-build.properties. The JDK is automatically updated
when using ant codeswitch_...
when using ant codeswitch...
</li><li>Cluster: Now the server can detect if a query is read-only, and in this
case the result is only read from the first cluster node. However, there
is currently no load balancing made to avoid problems with transactions
......
......@@ -93,6 +93,42 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
test.printSystem();
/*
create local temporary table a(id int) on commit drop;
select * from a;
create local temporary table b(id int) on commit drop;
select * from a;
select * from b;
commit;
dropping session temp views doesn't work, why?
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
select a.i from t1 a inner join (select a.i from t2 a inner join (select i from t3) b on a.i=b.i) b on a.i=b.i;
SELECT A.I FROM T2 A INNER JOIN TEMP_VIEW_0 B WHERE (A.I = B.I) AND (A.I = 1)
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
select a.i
from t1 a
inner join (
select a.i
from t2 a
inner join (
select i
from t3) b on a.i=b.i
) b on a.i=b.i;
Wre es nicht besser, unabhngig von DB_CLOSE_DELAY eine Datenbank offen
zu halten, solange dafr offene PooledConnections vorhanden sind?
Change documentation and default database for H2 Console: jdbc:h2:~/test
public static final boolean INDEX_LOOKUP_NEW = getBooleanSetting("h2.indexLookupNew", false);
"com.mysql.jdbc.NotUpdatable: Result Set not updatable.This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details."
set new console to be the default (still support old)
......
......@@ -13,8 +13,8 @@ public class TestBigResult extends TestBase {
if(config.memory) {
return;
}
testLimitBufferedResult();
testOrderGroup();
testLimitBufferedResult();
}
private void testLimitBufferedResult() throws Exception {
......
......@@ -35,23 +35,23 @@ public class TestLob extends TestBase {
if(config.memory) {
return;
}
testLobNoClose();
testLobTransactions(10);
// testLobNoClose();
// testLobTransactions(10);
testLobTransactions(10000);
testLobRollbackStop();
testLobCopy();
testLobHibernate();
testLobCopy(false);
testLobCopy(true);
testLobCompression(false);
testLobCompression(true);
testManyLobs();
testClob();
testUpdateLob();
testLobReconnect();
testLob(false);
testLob(true);
testJavaObject();
// testLobRollbackStop();
// testLobCopy();
// testLobHibernate();
// testLobCopy(false);
// testLobCopy(true);
// testLobCompression(false);
// testLobCompression(true);
// testManyLobs();
// testClob();
// testUpdateLob();
// testLobReconnect();
// testLob(false);
// testLob(true);
// testJavaObject();
}
private void testLobNoClose() throws Exception {
......@@ -90,6 +90,9 @@ public class TestLob extends TestBase {
if(config.logMode == 0) {
return;
}
int testing;
Constants.LOB_CLOSE_BETWEEN_READS = true;
deleteDb("lob");
Connection conn = reconnect(null);
conn.createStatement().execute("CREATE TABLE TEST(ID IDENTITY, DATA CLOB, DATA2 VARCHAR)");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论