提交 9b4ca4a4 authored 作者: StuMc's avatar StuMc 提交者: GitHub

Merge branch 'master' into Issue#628

......@@ -123,34 +123,34 @@ MERGE INTO TEST KEY(ID) VALUES(2, 'World')
"
"Commands (DML)","MERGE USING","
MERGE INTO targetTableName [ [AS] targetAlias]
USING { ( select ) | sourceTableName }[ [AS] sourceAlias ]
ON ( expression )
[ WHEN MATCHED THEN [ update ] [ delete] ]
[ WHEN NOT MATCHED THEN insert ]
","
Updates or deletes existing rows, and insert rows that don't exist. The ON clause
specifies the matching column expression and must be specified. If more than one row
is updated per input row, an exception is thrown.
If the source data contains duplicate rows (specifically those columns used in the
row matching ON clause), then an exception is thrown to prevent two updates applying
to the same target row. The embedded update, delete or insert statements can not re-specify
MERGE INTO targetTableName [ [AS] targetAlias]
USING { ( select ) | sourceTableName }[ [AS] sourceAlias ]
ON ( expression )
[ WHEN MATCHED THEN [ update ] [ delete] ]
[ WHEN NOT MATCHED THEN insert ]
","
Updates or deletes existing rows, and insert rows that don't exist. The ON clause
specifies the matching column expression and must be specified. If more than one row
is updated per input row, an exception is thrown.
If the source data contains duplicate rows (specifically those columns used in the
row matching ON clause), then an exception is thrown to prevent two updates applying
to the same target row. The embedded update, delete or insert statements can not re-specify
the target table name.
","
MERGE INTO TARGET_TABLE AS T USING SOURCE_TABLE AS S
ON (T.ID = S.ID)
WHEN MATCHED THEN
UPDATE SET T.COL1 = S.COL1 WHERE T.COL2<>'FINAL'
DELETE WHERE T.COL2='FINAL'
WHEN NOT MATCHED THEN
INSERT (ID,COL1,COL2) VALUES(S.ID,S.COL1,S.COL2)
MERGE INTO TARGET_TABLE AS T USING (SELECT * FROM SOURCE_TABLE) AS S
ON (T.ID = S.ID)
WHEN MATCHED THEN
UPDATE SET T.COL1 = S.COL1 WHERE T.COL2<>'FINAL'
DELETE WHERE T.COL2='FINAL'
WHEN NOT MATCHED THEN
INSERT (ID,COL1,COL2) VALUES(S.ID,S.COL1,S.COL2)
MERGE INTO TARGET_TABLE AS T USING SOURCE_TABLE AS S
ON (T.ID = S.ID)
WHEN MATCHED THEN
UPDATE SET T.COL1 = S.COL1 WHERE T.COL2<>'FINAL'
DELETE WHERE T.COL2='FINAL'
WHEN NOT MATCHED THEN
INSERT (ID,COL1,COL2) VALUES(S.ID,S.COL1,S.COL2)
MERGE INTO TARGET_TABLE AS T USING (SELECT * FROM SOURCE_TABLE) AS S
ON (T.ID = S.ID)
WHEN MATCHED THEN
UPDATE SET T.COL1 = S.COL1 WHERE T.COL2<>'FINAL'
DELETE WHERE T.COL2='FINAL'
WHEN NOT MATCHED THEN
INSERT (ID,COL1,COL2) VALUES(S.ID,S.COL1,S.COL2)
"
"Commands (DML)","RUNSCRIPT","
......
......@@ -47,7 +47,7 @@ Change Log
</li>
<li>Issue #585: MySQL mode DELETE statements compatibility
</li>
<li>PR #586: remove extra tx preparation
<li>PR #586: remove extra tx preparation
</li>
<li>PR #568: Implement MetaData.getColumns() for synonyms.
</li>
......@@ -55,7 +55,7 @@ Change Log
</li>
<li>Fix a deadlock in the TransactionStore
</li>
<li>PR #579: Disallow BLOB type in PostgreSQL mode
<li>PR #579: Disallow BLOB type in PostgreSQL mode
</li>
<li>Issue #576: Common Table Expression (CTE): WITH supports INSERT, UPDATE, MERGE, DELETE, CREATE TABLE ...
</li>
......@@ -71,7 +71,7 @@ Change Log
</li>
<li>Issue #549: Removed UNION ALL requirements for CTE
</li>
<li>Issue #548: Table synonym support
<li>Issue #548: Table synonym support
</li>
<li>Issue #531: Rollback and delayed meta save.
</li>
......
......@@ -537,8 +537,8 @@ public class Session extends SessionWithState {
*
* @param sql the SQL statement
* @param rightsChecked true if the rights have already been checked
* @param literalsChecked true if the sql string has already been checked for literals (only used if
* ALLOW_LITERALS NONE is set).
* @param literalsChecked true if the sql string has already been checked
* for literals (only used if ALLOW_LITERALS NONE is set).
* @return the prepared statement
*/
public Prepared prepare(String sql, boolean rightsChecked, boolean literalsChecked) {
......
......@@ -23,7 +23,6 @@ import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.UUID;
import org.h2.api.Trigger;
import org.h2.command.Parser;
import org.h2.engine.Session;
......@@ -266,7 +265,7 @@ public class FullText {
removeAllTriggers(conn, TRIGGER_PREFIX);
FullTextSettings setting = FullTextSettings.getInstance(conn);
setting.removeAllIndexes();
setting.clearInored();
setting.clearIgnored();
setting.clearWordList();
}
......@@ -751,7 +750,7 @@ public class FullText {
* @param table the table name
*/
private static void createTrigger(Connection conn, String schema,
String table) throws SQLException {
String table) throws SQLException {
createOrDropTrigger(conn, schema, table, true);
}
......@@ -793,11 +792,11 @@ public class FullText {
* @param table the table name
*/
private static void indexExistingRows(Connection conn, String schema,
String table) throws SQLException {
String table) throws SQLException {
FullText.FullTextTrigger existing = new FullText.FullTextTrigger();
existing.init(conn, schema, null, table, false, Trigger.INSERT);
String sql = "SELECT * FROM " + StringUtils.quoteIdentifier(schema) +
"." + StringUtils.quoteIdentifier(table);
String sql = "SELECT * FROM " + StringUtils.quoteIdentifier(schema)
+ "." + StringUtils.quoteIdentifier(table);
ResultSet rs = conn.createStatement().executeQuery(sql);
int columnCount = rs.getMetaData().getColumnCount();
while (rs.next()) {
......@@ -1151,8 +1150,8 @@ public class FullText {
return buff.toString();
}
private PreparedStatement getStatement(Connection conn, int indx) throws SQLException {
return useOwnConnection ? conn.prepareStatement(SQL[indx]) : prepStatements[indx];
private PreparedStatement getStatement(Connection conn, int index) throws SQLException {
return useOwnConnection ? conn.prepareStatement(SQL[index]) : prepStatements[index];
}
}
......
......@@ -5,6 +5,7 @@
*/
package org.h2.fulltext;
import java.io.File;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
......@@ -15,17 +16,25 @@ import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.DateTools;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.Term;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.util.Version;
import org.h2.api.Trigger;
import org.h2.command.Parser;
import org.h2.engine.Session;
......@@ -37,16 +46,6 @@ import org.h2.util.New;
import org.h2.util.StatementBuilder;
import org.h2.util.StringUtils;
import org.h2.util.Utils;
import java.io.File;
import java.util.Map;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.util.Version;
import org.apache.lucene.index.IndexWriter;
/**
* This class implements the full text search based on Apache Lucene.
......@@ -256,7 +255,7 @@ public class FullTextLucene extends FullText {
* @param table the table name
*/
private static void createTrigger(Connection conn, String schema,
String table) throws SQLException {
String table) throws SQLException {
createOrDropTrigger(conn, schema, table, true);
}
......@@ -344,11 +343,11 @@ public class FullTextLucene extends FullText {
* @param table the table name
*/
private static void indexExistingRows(Connection conn, String schema,
String table) throws SQLException {
String table) throws SQLException {
FullTextLucene.FullTextTrigger existing = new FullTextLucene.FullTextTrigger();
existing.init(conn, schema, null, table, false, Trigger.INSERT);
String sql = "SELECT * FROM " + StringUtils.quoteIdentifier(schema) +
"." + StringUtils.quoteIdentifier(table);
String sql = "SELECT * FROM " + StringUtils.quoteIdentifier(schema)
+ "." + StringUtils.quoteIdentifier(table);
ResultSet rs = conn.createStatement().executeQuery(sql);
int columnCount = rs.getMetaData().getColumnCount();
while (rs.next()) {
......@@ -429,9 +428,9 @@ public class FullTextLucene extends FullText {
if (limit == 0) {
limit = docs.totalHits;
}
for (int i = 0, len = docs.scoreDocs.length;
i < limit && i + offset < docs.totalHits
&& i + offset < len; i++) {
for (int i = 0, len = docs.scoreDocs.length; i < limit
&& i + offset < docs.totalHits
&& i + offset < len; i++) {
ScoreDoc sd = docs.scoreDocs[i + offset];
Document doc = searcher.doc(sd.doc);
float score = sd.score;
......@@ -442,17 +441,14 @@ public class FullTextLucene extends FullText {
Session session = (Session) c.getSession();
Parser p = new Parser(session);
String tab = q.substring(0, idx);
ExpressionColumn expr = (ExpressionColumn) p.parseExpression(tab);
ExpressionColumn expr = (ExpressionColumn) p
.parseExpression(tab);
String schemaName = expr.getOriginalTableAliasName();
String tableName = expr.getColumnName();
q = q.substring(idx + " WHERE ".length());
Object[][] columnData = parseKey(conn, q);
result.addRow(
schemaName,
tableName,
columnData[0],
columnData[1],
score);
result.addRow(schemaName, tableName, columnData[0],
columnData[1], score);
} else {
result.addRow(q, score);
}
......
......@@ -13,7 +13,6 @@ import java.sql.Statement;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.h2.util.New;
import org.h2.util.SoftHashMap;
......@@ -69,7 +68,7 @@ final class FullTextSettings {
/**
* Clear set of ignored words
*/
public void clearInored() {
public void clearIgnored() {
synchronized (ignoreList) {
ignoreList.clear();
}
......@@ -274,7 +273,7 @@ final class FullTextSettings {
return whitespaceChars;
}
private String normalizeWord(String word) {
private static String normalizeWord(String word) {
// TODO this is locale specific, document
return word.toUpperCase();
}
......
......@@ -81,7 +81,10 @@ public class TableView extends Table {
String oldQuerySQL = this.querySQL;
Column[] oldColumnTemplates = this.columnTemplates;
boolean oldRecursive = this.recursive;
init(querySQL, null, newColumnTemplates == null ? this.columnTemplates : newColumnTemplates, session, recursive, literalsChecked);
init(querySQL, null,
newColumnTemplates == null ? this.columnTemplates
: newColumnTemplates,
session, recursive, literalsChecked);
DbException e = recompile(session, force, true);
if (e != null) {
init(oldQuerySQL, null, oldColumnTemplates, session, oldRecursive, literalsChecked);
......
......@@ -5,22 +5,20 @@
*/
package org.h2.tools;
import java.io.IOException;
import java.io.PipedReader;
import java.io.PipedWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.h2.api.ErrorCode;
import org.h2.engine.Constants;
import org.h2.util.IOUtils;
import org.h2.util.JdbcUtils;
import org.h2.util.Tool;
import java.io.PipedReader;
import java.io.PipedWriter;
import java.io.IOException;
import java.sql.ResultSet;
/**
* Creates a cluster from a standalone database.
* <br />
......@@ -100,12 +98,12 @@ public class CreateCluster extends Tool {
process(urlSource, urlTarget, user, password, serverList);
}
private void process(String urlSource, String urlTarget,
private static void process(String urlSource, String urlTarget,
String user, String password, String serverList) throws SQLException {
Connection connSource = null, connTarget = null;
Statement statSource = null, statTarget = null;
PipedReader pipeReader = null;
try {
org.h2.Driver.load();
......@@ -146,19 +144,23 @@ public class CreateCluster extends Tool {
statSource.execute("SET EXCLUSIVE 2");
pipeReader = new PipedReader();
try {
// Pipe writer is used + closed in the inner class, in a separate thread (needs to be final).
// It should be initialized within try{} so an exception could be caught if creation fails.
// In that scenario, the the writer should be null and needs no closing,
// and the main goal is that finally{} should bring the source DB
// out of exclusive mode, and close the reader.
/*
* Pipe writer is used + closed in the inner class, in a
* separate thread (needs to be final). It should be initialized
* within try{} so an exception could be caught if creation
* fails. In that scenario, the the writer should be null and
* needs no closing, and the main goal is that finally{} should
* bring the source DB out of exclusive mode, and close the
* reader.
*/
final PipedWriter pipeWriter = new PipedWriter(pipeReader);
// Backup data from source database in script form.
// Start writing to pipe writer in separate thread.
final ResultSet rs = statSource.executeQuery("SCRIPT");
// Delete the target database first.
connTarget = DriverManager.getConnection(
urlTarget + ";CLUSTER=''", user, password);
......@@ -166,9 +168,10 @@ public class CreateCluster extends Tool {
statTarget.execute("DROP ALL OBJECTS DELETE FILES");
connTarget.close();
new Thread(
new Runnable(){
@Override
public void run() {
try {
while (rs.next()) {
......@@ -184,7 +187,7 @@ public class CreateCluster extends Tool {
}
}
).start();
// Read data from pipe reader, restore on target.
connTarget = DriverManager.getConnection(urlTarget, user, password);
RunScript.execute(connTarget,pipeReader);
......@@ -193,7 +196,7 @@ public class CreateCluster extends Tool {
// set the cluster to the serverList on both databases
statSource.executeUpdate("SET CLUSTER '" + serverList + "'");
statTarget.executeUpdate("SET CLUSTER '" + serverList + "'");
} catch (IOException ex) {
throw new SQLException(ex);
} finally {
......
......@@ -568,7 +568,8 @@ public abstract class Value {
* @param precision the precision of the column to convert this value to.
* The special constant <code>-1</code> is used to indicate that
* the precision plays no role when converting the value
* @param column the column that contains the ENUM datatype enumerators, for dealing with ENUM conversions
* @param column the column that contains the ENUM datatype enumerators,
* for dealing with ENUM conversions
* @return the converted value
*/
public Value convertTo(int targetType, int precision, Mode mode, Column column) {
......
......@@ -175,8 +175,8 @@ public class TestScalability implements Database.DatabaseTest {
// calls garbage collection
TestBase.getMemoryUsed();
Database db = dbs.get(i);
System.out.println("Testing the performance of " + db.getName() +
" (" + db.getThreadsCount() + " threads)");
System.out.println("Testing the performance of " + db.getName()
+ " (" + db.getThreadsCount() + " threads)");
db.startServer();
Connection conn = db.openNewConnection();
DatabaseMetaData meta = conn.getMetaData();
......
......@@ -168,7 +168,7 @@ public class TestSetCollation extends TestBase {
}
}
private void insertValues(Connection con, String[] values, int startId) throws SQLException {
private static void insertValues(Connection con, String[] values, int startId) throws SQLException {
PreparedStatement ps = con.prepareStatement("INSERT INTO charsettable VALUES (?, ?)");
int id = startId;
for (String value : values) {
......@@ -179,7 +179,7 @@ public class TestSetCollation extends TestBase {
ps.close();
}
private List<String> loadTableValues(Connection con) throws SQLException {
private static List<String> loadTableValues(Connection con) throws SQLException {
List<String> results = new ArrayList<>();
Statement statement = con.createStatement();
ResultSet resultSet = statement.executeQuery("select testvalue from charsettable order by testvalue");
......
......@@ -5,15 +5,14 @@
*/
package org.h2.test.db;
import org.h2.engine.Constants;
import org.h2.jdbc.JdbcSQLException;
import org.h2.test.TestBase;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.h2.engine.Constants;
import org.h2.jdbc.JdbcSQLException;
import org.h2.test.TestBase;
/**
* Tests for table synonyms.
......@@ -248,7 +247,7 @@ public class TestSynonymForTable extends TestBase {
conn.close();
}
private void deleteFromSynonym(Connection conn, int id) throws SQLException {
private static void deleteFromSynonym(Connection conn, int id) throws SQLException {
PreparedStatement prep = conn.prepareStatement(
"DELETE FROM testsynonym WHERE id = ?");
prep.setInt(1, id);
......@@ -307,21 +306,21 @@ public class TestSynonymForTable extends TestBase {
assertFalse(rs.next());
}
private void insertIntoSynonym(Connection conn, int id) throws SQLException {
private static void insertIntoSynonym(Connection conn, int id) throws SQLException {
PreparedStatement prep = conn.prepareStatement(
"INSERT INTO testsynonym VALUES(?)");
prep.setInt(1, id);
prep.execute();
}
private void insertIntoBackingTable(Connection conn, int id) throws SQLException {
private static void insertIntoBackingTable(Connection conn, int id) throws SQLException {
PreparedStatement prep = conn.prepareStatement(
"INSERT INTO backingtable VALUES(?)");
prep.setInt(1, id);
prep.execute();
}
private void createTableWithSynonym(Connection conn) throws SQLException {
private static void createTableWithSynonym(Connection conn) throws SQLException {
Statement stat = conn.createStatement();
stat.execute("CREATE TABLE IF NOT EXISTS backingtable(id INT PRIMARY KEY)");
stat.execute("CREATE OR REPLACE SYNONYM testsynonym FOR backingtable");
......
......@@ -5,6 +5,15 @@
*/
package org.h2.test.jdbc;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.text.DecimalFormat;
import java.util.Locale;
import org.h2.api.CustomDataTypesHandler;
import org.h2.api.ErrorCode;
import org.h2.message.DbException;
......@@ -20,16 +29,6 @@ import org.h2.value.ValueDouble;
import org.h2.value.ValueJavaObject;
import org.h2.value.ValueString;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.text.DecimalFormat;
import java.util.Locale;
/**
* Tests {@link CustomDataTypesHandler}.
*/
......@@ -300,7 +299,7 @@ public class TestCustomDataTypesHandler extends TestBase {
}
/** Constructs data type instance for complex number type */
private DataType createComplex() {
private static DataType createComplex() {
DataType result = new DataType();
result.type = COMPLEX_DATA_TYPE_ID;
result.name = COMPLEX_DATA_TYPE_NAME;
......
......@@ -115,7 +115,7 @@ public class TestScript extends TestBase {
for (String s : new String[] { "array-contains", "array-get",
"array-length", "autocommit", "cancel-session", "casewhen",
"cast", "coalesce", "convert", "csvread", "csvwrite", "currval",
"database-path", "datebase", "decode", "disk-space-used",
"database-path", "database", "decode", "disk-space-used",
"file-read", "file-write", "greatest", "h2version", "identity",
"ifnull", "least", "link-schema", "lock-mode", "lock-timeout",
"memory-free", "memory-used", "nextval", "nullif", "nvl2",
......@@ -137,7 +137,8 @@ public class TestScript extends TestBase {
private void testScript(String scriptFileName) throws Exception {
deleteDb("script");
// Reset all the state in case there is anything left over from the previous file we processed.
// Reset all the state in case there is anything left over from the previous file
// we processed.
conn = null;
stat = null;
in = null;
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
CREATE VIEW TEST_VIEW(A) AS SELECT 'a';
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
----------------
--- ENUM support
----------------
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
call utf8tostring(decrypt('AES', '00000000000000000000000000000000', 'dbd42d55d4b923c4b03eba0396fac98e'));
> 'Hello World Test'
> ------------------
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
call encrypt('AES', '00000000000000000000000000000000', stringtoutf8('Hello World Test'));
> X'dbd42d55d4b923c4b03eba0396fac98e'
> -----------------------------------
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
call hash('SHA256', stringtoutf8('Hello'), 1);
> X'185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969'
> -------------------------------------------------------------------
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create memory table test(id int primary key, name varchar(255));
> ok
......
-- Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论