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

--no commit message

--no commit message
上级 4fc52e91
......@@ -46,6 +46,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
The old implementation does not work with multi-level nested temporary views
(select * from (select * from (select * from test))).
</li><li>The new view implementation did not work with &lt; and &lt;= comparison. Fixed.
</li><li>Both view implementations did not work with multiple levels of nested temporary views (FROM (SELECT...)). Fixed.
</li><li>The H2 Console can now be run as a standalone web application,
or it can be embedded as a servlet into any existing web application. To build the
'H2 Console' web application, execute 'ant warConsole'.
......@@ -1029,7 +1030,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>Option to globally disable / enable referential integrity checks
</li><li>Support ISO 8601 timestamp / date / time with timezone
</li><li>Support TRANSFORM / PIVOT as in MS Access
</li><li>ALTER SEQUENCE ... RENAME TO ... (http://www.postgresql.org/docs/8.2/static/sql-altersequence.html)
</li><li>Sequence: PostgreSQL compatibility (rename, create) (http://www.postgresql.org/docs/8.2/static/sql-altersequence.html)
</li><li>SELECT * FROM (VALUES (...), (...), ....) AS alias(f1, ...)
</li><li>Support updatable views with join on primary keys (to extend a table)
</li><li>File_Read / File_Store funktionen: FILE_STORE('test.sql', ?), FILE_READ('test.sql')
......@@ -1094,6 +1095,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>Allow execution time prepare for SELECT * FROM CSVREAD(?, 'columnNameString')
</li><li>Support multiple directories (on different hard drives) for the same database
</li><li>Server protocol: use challenge response authentication, but client sends hash(user+password) encrypted with response
</li><li>Support EXEC[UTE] (doesn't return a result set, compatible to MS SQL Server)
</li></ul>
<h3>Not Planned</h3>
......
@java -cp "h2.jar;%H2DRIVERS%;%CLASSPATH%" org.h2.SysTray
@java -cp "h2.jar;%H2DRIVERS%;%CLASSPATH%" org.h2.tools.Console
@if errorlevel 1 pause
\ No newline at end of file
......@@ -140,7 +140,7 @@ Section "All"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetOutPath "$INSTDIR\bin"
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\H2 Console.lnk" "javaw" "-cp $\"$INSTDIR\bin\h2.jar;%H2DRIVERS%;%CLASSPATH%$\" org.h2.SysTray" "$INSTDIR\src\installer\favicon.ico" 0 SW_SHOWMINIMIZED "" "Start the Console"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\H2 Console.lnk" "javaw" "-cp $\"$INSTDIR\bin\h2.jar;%H2DRIVERS%;%CLASSPATH%$\" org.h2.tools.Console" "$INSTDIR\src\installer\favicon.ico" 0 SW_SHOWMINIMIZED "" "Start the Console"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\H2 Console (Command Line).lnk" "cmd" "/c h2.bat" "$INSTDIR\src\installer\favicon.ico" 0 SW_SHOWMINIMIZED "" "Start the Console from command line (using h2.bat)"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\H2 Documentation.lnk" "$INSTDIR\docs\index.html"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
......
......@@ -95,10 +95,9 @@ public abstract class Command implements CommandInterface {
private void stop() throws SQLException {
session.setCurrentCommand(null);
if (!isTransactional()) {
// meta data changes need to commit in any case
session.commit();
session.commit(true);
} else if (session.getAutoCommit()) {
session.commit();
session.commit(false);
}
if (trace.info()) {
long time = System.currentTimeMillis() - startTime;
......
......@@ -742,11 +742,7 @@ public class Parser {
String querySQL = query.getSQL();
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 {
......
......@@ -31,7 +31,7 @@ public class AlterIndexRename extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(getSchema().findIndex(newIndexName) != null || newIndexName.equals(oldIndex.getName())) {
throw Message.getSQLException(Message.INDEX_ALREADY_EXISTS_1, newIndexName);
......
......@@ -42,7 +42,7 @@ public class AlterSequence extends DefineCommand {
public int update() throws SQLException {
// TODO rights: what are the rights required for a sequence?
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(newStart) {
sequence.setStartValue(start);
......
......@@ -59,7 +59,7 @@ public class AlterTableAddConstraint extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(getSchema().findConstraint(constraintName)!=null) {
throw Message.getSQLException(Message.CONSTRAINT_ALREADY_EXISTS_1,
......
......@@ -56,7 +56,7 @@ public class AlterTableAlterColumn extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
session.getUser().checkRight(table, Right.ALL);
table.checkSupportAlter();
......
......@@ -27,7 +27,7 @@ public class AlterTableDropConstraint extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Constraint constraint = getSchema().getConstraint(constraintName);
session.getUser().checkRight(constraint.getTable(), Right.ALL);
session.getUser().checkRight(constraint.getRefTable(), Right.ALL);
......
......@@ -35,7 +35,7 @@ public class AlterTableRename extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(getSchema().findTableOrView(session, newTableName) != null || newTableName.equals(oldTable.getName())) {
throw Message.getSQLException(Message.TABLE_OR_VIEW_ALREADY_EXISTS_1, newTableName);
......
......@@ -37,7 +37,7 @@ public class AlterTableRenameColumn extends DefineCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
session.getUser().checkRight(table, Right.ALL);
table.checkSupportAlter();
......
......@@ -63,7 +63,7 @@ public class AlterUser extends DefineCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
switch(type) {
case SET_PASSWORD:
......
......@@ -23,7 +23,7 @@ public class AlterView extends DefineCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
session.getUser().checkRight(view, Right.ALL);
view.recompile(session);
return 0;
......
......@@ -26,7 +26,7 @@ public class Analyze extends DefineCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
session.getUser().checkAdmin();
ObjectArray tables = db.getAllSchemaObjects(DbObject.TABLE_OR_VIEW);
......
......@@ -30,7 +30,7 @@ public class CreateConstant extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
session.getUser().checkAdmin();
Database db = session.getDatabase();
if(getSchema().findConstant(constantName)!=null) {
......
......@@ -22,7 +22,7 @@ public class CreateFunctionAlias extends DefineCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
session.getUser().checkAdmin();
Database db = session.getDatabase();
if(db.findFunctionAlias(aliasName) != null) {
......
......@@ -57,7 +57,7 @@ public class CreateIndex extends SchemaCommand {
public int update() throws SQLException {
// TODO cancel: may support for index creation
session.commit();
session.commit(true);
Database db = session.getDatabase();
boolean persistent = db.isPersistent();
Table table = getSchema().getTableOrView(session, tableName);
......
......@@ -59,7 +59,7 @@ public class CreateLinkedTable extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
session.getUser().checkAdmin();
if(getSchema().findTableOrView(session, tableName)!=null) {
......
......@@ -30,7 +30,7 @@ public class CreateRole extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(db.findUser(roleName)!=null) {
if (ifNotExists) {
......
......@@ -28,7 +28,7 @@ public class CreateSchema extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
User user = db.getUser(authorization);
user.checkAdmin();
......
......@@ -33,7 +33,7 @@ public class CreateSequence extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(getSchema().findSequence(sequenceName)!=null) {
if (ifNotExists) {
......
......@@ -81,7 +81,7 @@ public class CreateTable extends SchemaCommand {
public int update() throws SQLException {
// TODO rights: what rights are required to create a table?
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(!db.isPersistent()) {
persistent = false;
......
......@@ -74,7 +74,7 @@ public class CreateTrigger extends SchemaCommand {
public int update() throws SQLException {
// TODO rights: what rights are required to create a trigger?
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(getSchema().findTrigger(triggerName)!=null) {
if (ifNotExists) {
......
......@@ -42,7 +42,7 @@ public class CreateUser extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(db.findUser(userName)!=null) {
if (ifNotExists) {
......
......@@ -37,7 +37,7 @@ public class CreateUserDataType extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
session.getUser().checkAdmin();
if(db.findUserDataType(typeName)!=null) {
......
......@@ -41,7 +41,7 @@
public int update() throws SQLException {
// TODO rights: what rights are required to create a view?
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(getSchema().findTableOrView(session, viewName)!=null) {
if (ifNotExists) {
......
......@@ -31,7 +31,7 @@ public class DropConstant extends SchemaCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
Constant constant = getSchema().findConstant(constantName);
if(constant == null) {
......
......@@ -36,7 +36,7 @@ public class DropDatabase extends DefineCommand {
private void dropAllObjects() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
ObjectArray list;
// TODO local temp tables are not removed
......
......@@ -22,7 +22,7 @@ public class DropFunctionAlias extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
FunctionAlias functionAlias = db.findFunctionAlias(aliasName);
if(functionAlias == null) {
......
......@@ -37,7 +37,7 @@ public class DropIndex extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
Index index = getSchema().findIndex(indexName);
if(index == null) {
......
......@@ -27,7 +27,7 @@ public class DropRole extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(roleName.equals(Constants.PUBLIC_ROLE_NAME)) {
throw Message.getSQLException(Message.ROLE_CAN_NOT_BE_DROPPED_1, roleName);
......
......@@ -26,7 +26,7 @@ public class DropSchema extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
Schema schema = db.findSchema(schemaName);
if(schema == null) {
......
......@@ -32,7 +32,7 @@ public class DropSequence extends SchemaCommand {
public int update() throws SQLException {
// TODO rights: what are the rights required for a sequence?
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
Sequence sequence = getSchema().findSequence(sequenceName);
if(sequence == null) {
......
......@@ -79,7 +79,7 @@ public class DropTable extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
prepareDrop();
executeDrop();
return 0;
......
......@@ -32,7 +32,7 @@ public class DropTrigger extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
TriggerObject trigger = getSchema().findTrigger(triggerName);
if(trigger == null) {
......
......@@ -30,7 +30,7 @@ public class DropUser extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
User user = db.findUser(userName);
if(user == null) {
......
......@@ -26,7 +26,7 @@ public class DropUserDataType extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
UserDataType type = db.findUserDataType(typeName);
if(type == null) {
......
......@@ -31,7 +31,7 @@ public class DropView extends SchemaCommand {
public int update() throws SQLException {
// TODO rights: what rights are required to drop a view?
session.commit();
session.commit(true);
Table view = getSchema().findTableOrView(session, viewName);
if(view == null) {
if(!ifExists) {
......
......@@ -57,7 +57,7 @@ public class GrantRevoke extends DefineCommand {
public int update() throws SQLException {
session.getUser().checkAdmin();
session.commit();
session.commit(true);
Database db = session.getDatabase();
if(roleNames != null) {
for(int i=0; i<roleNames.size(); i++) {
......
......@@ -28,7 +28,7 @@ public class SetComment extends DefineCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Database db = session.getDatabase();
session.getUser().checkAdmin();
DbObject object = null;
......
......@@ -25,7 +25,7 @@ public class TruncateTable extends SchemaCommand {
}
public int update() throws SQLException {
session.commit();
session.commit(true);
Table table = getSchema().getTableOrView(session, tableName);
if(!table.canTruncate()) {
throw Message.getSQLException(Message.CANNOT_TRUNCATE_1, tableName);
......
......@@ -56,7 +56,7 @@ public class RunScriptCommand extends ScriptBase {
command.update();
}
if(session.getAutoCommit()) {
session.commit();
session.commit(false);
}
} catch(SQLException e) {
throw Message.addSQL(e, sql);
......
......@@ -52,7 +52,7 @@ public class TransactionCommand extends Prepared {
session.setAutoCommit(false);
break;
case COMMIT:
session.commit();
session.commit(false);
break;
case ROLLBACK:
session.rollback();
......@@ -93,7 +93,7 @@ public class TransactionCommand extends Prepared {
break;
case SHUTDOWN: {
session.getUser().checkAdmin();
session.commit();
session.commit(false);
// close the database, but don't update the persistent setting
session.getDatabase().setCloseDelay(0);
Database db = session.getDatabase();
......
......@@ -156,7 +156,6 @@ public class Constants {
public static final String PUBLIC_ROLE_NAME = "PUBLIC";
public static final String TEMP_TABLE_PREFIX = "TEMP_TABLE_";
public static final String TEMP_TABLE_TRANSACTION_PREFIX = "TEMP_TRANS_TABLE_";
public static final int BIG_DECIMAL_SCALE_MAX = 100000;
......
......@@ -522,7 +522,7 @@ public class Database implements DataHandler {
addDefaultSetting(SetTypes.CLUSTER, Constants.CLUSTERING_DISABLED, 0);
addDefaultSetting(SetTypes.WRITE_DELAY, null, Constants.DEFAULT_WRITE_DELAY);
removeUnusedStorages();
systemSession.commit();
systemSession.commit(true);
if(!readOnly) {
emergencyReserve = openFile(createTempFile(), "rw", false);
emergencyReserve.autoDelete();
......@@ -832,22 +832,18 @@ 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();
log = null;
}
closeFiles();
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)
return;
}
deleteOldTempFiles();
if(systemSession != null) {
systemSession.close();
......@@ -1175,7 +1171,7 @@ public class Database implements DataHandler {
public void setMasterUser(User user) throws SQLException {
synchronized(this) {
addDatabaseObject(systemSession, user);
systemSession.commit();
systemSession.commit(true);
}
}
......
......@@ -117,7 +117,7 @@ public class Engine {
}
}
session.setAllowLiterals(false);
session.commit();
session.commit(true);
session.getDatabase().getTrace(Trace.SESSION).info("connected #" + session.getId());
return session;
}
......
......@@ -39,11 +39,8 @@ public class Session implements SessionInterface {
private int id;
private Database database;
private ObjectArray locks = new ObjectArray();
// TODO big transactions: rollback log should be a sorted result set,
// so that big transactions are possible (delete or update huge tables)
private UndoLog undoLog;
private boolean autoCommit = true;
// TODO function RANDOM: use a own implementation, making it system independent
private Random random;
private LogSystem logSystem;
private int lockTimeout;
......@@ -62,6 +59,9 @@ public class Session implements SessionInterface {
private HashSet unlinkSet;
private int tempViewIndex;
public Session() {
}
public Table findLocalTempTable(String name) {
Table t = null;
if(t == null && localTempTables != null) {
......@@ -78,17 +78,6 @@ public class Session implements SessionInterface {
return list;
}
public String getNewLocalTempTransactionTableName() {
// TODO this is current not used
String name = Constants.TEMP_TABLE_TRANSACTION_PREFIX;
for(int i=0; ; i++) {
String n = name + i;
if(findLocalTempTable(n) == null) {
return n;
}
}
}
public void addLocalTempTable(Table table) throws SQLException {
if(localTempTables == null) {
localTempTables = new HashMap();
......@@ -133,10 +122,6 @@ public class Session implements SessionInterface {
this.lockTimeout = lockTimeout;
}
public Session() {
}
public SessionInterface createSession(ConnectionInfo ci) throws SQLException {
return Engine.getInstance().getSession(ci);
}
......@@ -188,13 +173,15 @@ public class Session implements SessionInterface {
}
}
public void commit() throws SQLException {
public void commit(boolean ddl) throws SQLException {
if(containsUncommitted()) {
// need to commit even if rollback is not possible (create/drop table and so on)
logSystem.commit(this);
}
if(undoLog.size() > 0) {
undoLog.clear();
}
if(!ddl) {
// do not clean the temp tables if the last command was a create/drop
cleanTempTables(false);
}
......
......@@ -42,11 +42,6 @@ public class ViewIndex extends Index {
public ViewIndex(TableView view, ViewIndex index, Session session, int[] masks) throws SQLException {
super(view, 0, null, null, IndexType.createNonUnique(false));
int testing;
if(index == null) {
System.out.println("top");
}
this.querySQL = index.querySQL;
this.originalParameters = index.originalParameters;
this.recursive = index.recursive;
......
......@@ -2799,7 +2799,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
private UpdatableRow getUpdatableRow() throws SQLException {
UpdatableRow row = new UpdatableRow(conn, result, session);
if(!row.isUpdatable()) {
throw Message.getSQLException(Message.NOT_ON_UPDATABLE_ROW);
throw Message.getSQLException(Message.RESULT_SET_NOT_UPDATABLE);
}
return row;
}
......
......@@ -338,6 +338,7 @@ public class Message {
public static final int FILE_NOT_FOUND_1 = 90124;
public static final int INVALID_CLASS_2 = 90125;
public static final int DATABASE_IS_NOT_PERSISTENT = 90126;
public static final int RESULT_SET_NOT_UPDATABLE = 90127;
public static SQLException addSQL(SQLException e, String sql) {
if(e.getMessage().indexOf("SQL")>=0) {
......
......@@ -13,7 +13,7 @@
42000=Syntax error in SQL statement {0}
42001=Syntax error in SQL statement {0}; expected {1}
42S01=Table {0} already exists
42S02=Table {0} not found.
42S02=Table {0} not found
42S11=Index {0} already exists
42S12=Index {0} not found
42S21=Duplicate column name {0}
......@@ -147,6 +147,7 @@
90124=File not found: {0}
90125=Invalid class, expected {0} but got {1}
90126=Database is not persistent
90127=The result set is not updatable. The query must select all columns from a unique key. Only one table may be selected.
HY000=General error: {0}
HY004=Unknown data type: {0}
......
......@@ -96,7 +96,7 @@ public class Sequence extends SchemaObject {
value = realValue;
}
}
s.commit();
s.commit(false);
}
public void close() throws SQLException {
......
......@@ -698,7 +698,7 @@ public class MetaTable extends Table {
add(rows, new String[]{"h2.clientTraceDirectory", Constants.CLIENT_TRACE_DIRECTORY});
add(rows, new String[]{"h2.scriptDirectory", Constants.SCRIPT_DIRECTORY});
add(rows, new String[]{"h2.maxFileRetry", "" + Constants.MAX_FILE_RETRY});
add(rows, new String[]{"h2.lobAlwaysClose", "" + Constants.LOB_CLOSE_BETWEEN_READS});
add(rows, new String[]{"h2.lobCloseBetweenReads", "" + Constants.LOB_CLOSE_BETWEEN_READS});
break;
}
case TYPE_INFO: {
......
......@@ -94,7 +94,7 @@ public class Console implements ActionListener, MouseListener {
icon = Toolkit.getDefaultToolkit().createImage(imageData);
}
if(!createTrayIcon()) {
showWindow();
showWindow(true);
}
} catch (Exception e) {
e.printStackTrace();
......@@ -127,9 +127,9 @@ public class Console implements ActionListener, MouseListener {
itemConsole.setFont(font);
menuConsole.add(itemConsole);
MenuItem itemStatus = new MenuItem("Status");
itemConsole.setActionCommand("status");
itemConsole.addActionListener(this);
itemConsole.setFont(font);
itemStatus.setActionCommand("status");
itemStatus.addActionListener(this);
itemStatus.setFont(font);
menuConsole.add(itemStatus);
MenuItem itemExit = new MenuItem("Exit");
itemExit.setFont(font);
......@@ -163,11 +163,15 @@ public class Console implements ActionListener, MouseListener {
}
}
private void showWindow() {
Frame frame = new Frame("H2 Console");
private void showWindow(final boolean exit) {
final Frame frame = new Frame("H2 Console");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
if(exit) {
System.exit(0);
} else {
frame.dispose();
}
}
});
if(icon != null) {
......@@ -232,7 +236,7 @@ public class Console implements ActionListener, MouseListener {
} else if ("console".equals(command)) {
startBrowser();
} else if ("status".equals(command)) {
showWindow();
showWindow(false);
}
}
......
......@@ -93,64 +93,12 @@ 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)
set new index mechanism to be the default (still support old)
add test case:
create table test1(id int);
insert into test1 values(1);
insert into test1 values(1);
insert into test1 values(2);
insert into test1 values(3);
select sum(C0) from (
select count(*) AS C0 from (select distinct * from
test1) as temp
)
todo: challenge response authentication
make sure INDEX_LOOKUP_NEW = is true by default.
Test Console (batch, javaw, different platforms)
h2 console system tray: menu item to open window
backup.sql / lob file problem
Set h2.indexNew to false
Change documentation and default database for H2 Console: jdbc:h2:~/test
testHalt
......@@ -173,8 +121,6 @@ MySQL, PostgreSQL
http://semmle.com/
try out, find bugs
Mail P2P
Currently there is no such feature, however it is quite simple to add a user defined function
READ_TEXT(fileName String) returning a CLOB. The performance would probably not be optimal,
but it should work. I am not sure if this will read the CLOB in memory however.
......@@ -201,10 +147,6 @@ Automate real power off tests
how to make -baseDir work for H2 Console?
Maybe add a little bit AdSense
Custom Captcha for the forum, to protect against spam bots (required for Google Code?)
http://db.apache.org/ddlutils/ (write a H2 driver)
Negative dictionary:
......@@ -212,14 +154,14 @@ Please note that
timer test
PostgreSQL compatibility:
--SET search_path = public, pg_catalog;
--id serial NOT NULL,
CREATE [ TEMPORARY | TEMP ] SEQUENCE name [ INCREMENT [ BY ] increment ]
[ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
[ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
support translated exceptions (english + translated)
select * from H2.PUBLIC.ORDERS
Wre es nicht besser, unabhngig von DB_CLOSE_DELAY eine Datenbank offen
zu halten, solange dafr offene PooledConnections vorhanden sind?
*/
/*
......
--- special grammar and test cases ---------------------------------------------------------------------------------------------
create table t1 (i int);
> ok
create table t2 (i int);
> ok
create table t3 (i int);
> ok
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;
> I
> -
> rows: 0
drop table t1, t2, t3;
> ok
create table d(d double, r real);
> ok
......
create table test1(id int);
insert into test1 values(1), (1), (2), (3);
select sum(C0) from (select count(*) AS C0 from (select distinct * from test1) as temp);
> 3;
drop table test1;
create table test(id int primary key check id>1);
drop table test;
create table table1(f1 int not null primary key);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论