提交 7071b605 authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Formatting, docs, fix test cases

上级 0b48ee6c
......@@ -26,7 +26,7 @@ Change Log
(for example due to "alter table" on a table with a LOB object),
and then re-opening the database.
</li>
<li>Fix for issue #171: Broken QueryStatisticsData duration data when trace level < TraceSystem.INFO
<li>Fix for issue #171: Broken QueryStatisticsData duration data when trace level smaller than TraceSystem.INFO
</li>
<li>Pull request #170: Added SET QUERY_STATISTICS_MAX_ENTRIES
</li>
......
......@@ -78,6 +78,7 @@
90048=Unsupported database file version or invalid file header in file {0}
90049=Encryption error in file {0}
90050=Wrong password format, must be: file password <space> user password
90051=Scale(${0}) must not be bigger than precision({1})
90052=Subquery is not a single column query
90053=Scalar subquery contains more than one row
90054=Invalid use of aggregate function {0}
......
......@@ -946,7 +946,6 @@ public class ErrorCode {
* CREATE TABLE TABLE1 ( FAIL NUMBER(6,24) );
* </pre>
*/
; // message missing
public static final int INVALID_VALUE_SCALE_PRECISION = 90051;
/**
......
......@@ -2312,10 +2312,9 @@ public class Parser {
readExpression(), currentSelect, distinct);
read(",");
agg.setGroupConcatSeparator(readExpression());
if(readIf("ORDER")) {
read("BY");
agg.setGroupConcatOrder(parseSimpleOrderList());
if (readIf("ORDER")) {
read("BY");
agg.setGroupConcatOrder(parseSimpleOrderList());
}
}
r = agg;
......
......@@ -78,6 +78,7 @@
90048=Nepodporovaná verze souboru databáze nebo neplatná hlavička souboru {0}
90049=Chyba šifrování v souboru {0}
90050=Nesprávný formát hesla, musí být: heslo k souboru <mezera> uživatelské heslo
90051=#Scale(${0}) must not be bigger than precision({1})
90052=Vnořený dotaz není pouze jediný sloupec dotazu
90053=Skalární vnořený dotaz obsahuje více než jeden řádek
90054=Neplatné použití agregátní funkce {0}
......
......@@ -38,7 +38,7 @@
90008=Unerlaubter Wert {0} für Parameter {1}
90009=Kann die Sequenz {0} nicht ändern aufgrund falscher Attribute (Start-Wert {1}, Minimal-Wert {2}, Maximal-Wert {3}, Inkrement {4})
90010=Ungültiges TO_CHAR Format {0}
90011=#A file path that is implicitly relative to the current working directory is not allowed in the database URL {0}. Use an absolute path, ~/name, ./name, or the baseDir setting instead.
90011=Ein implizit relativer Pfad zum Arbeitsverzeichnis ist nicht erlaubt in der Datenbank URL {0}. Bitte absolute Pfade, ~/name, ./name, oder baseDir verwenden.
90012=Parameter {0} wurde nicht gesetzt
90013=Datenbank {0} nicht gefunden
90014=Fehler beim Parsen von {0}
......@@ -66,7 +66,7 @@
90036=Sequenz {0} nicht gefunden
90037=View {0} nicht gefunden
90038=View {0} besteht bereits
90039=#This CLOB or BLOB reference timed out: {0}
90039=Diese CLOB oder BLOB Reference ist abgelaufen: {0}
90040=Für diese Operation werden Administrator-Rechte benötigt
90041=Trigger {0} besteht bereits
90042=Trigger {0} nicht gefunden
......@@ -78,6 +78,7 @@
90048=Datenbank Datei Version wird nicht unterstützt oder ungültiger Dateikopf in Datei {0}
90049=Verschlüsselungsfehler in Datei {0}
90050=Falsches Passwort Format, benötigt wird: Datei-Passwort <Leerschlag> Benutzer-Passwort
90051=Skalierung(${0}) darf nicht grösser als Präzision sein({1})
90052=Unterabfrage gibt mehr als eine Feld zurück
90053=Skalar-Unterabfrage enthält mehr als eine Zeile
90054=Ungültige Verwendung der Aggregat Funktion {0}
......@@ -164,7 +165,7 @@
90139=Die (public static) Java Funktion wurde nicht gefunden: {0}
90140=Die Resultat-Zeilen können nicht verändert werden. Mögliche Lösung: conn.createStatement(.., ResultSet.CONCUR_UPDATABLE).
90141=Serialisierer kann nicht geändert werden wenn eine Daten-Tabelle existiert: {0}
90142=#Step size must not be zero
90142=Schrittgrösse darf nicht 0 sein
HY000=Allgemeiner Fehler: {0}
HY004=Unbekannter Datentyp: {0}
HYC00=Dieses Feature wird nicht unterstützt: {0}
......
......@@ -78,6 +78,7 @@
90048=Versión del archivo de base de datos no soportada ó encabezado de archivo invalido en archivo {0}
90049=Error de Encriptación en archivo {0}
90050=Formato de password erroneo, debe ser: archivo password <space> Usuario password
90051=#Scale(${0}) must not be bigger than precision({1})
90052=El Subquery no es un query escalar (debe devolver una sola columna)
90053=El Subquery escalar contiene mas de una fila
90054=Uso Invalido de la función de columna agregada {0}
......
......@@ -78,6 +78,7 @@
90048=ファイル {0} は、未サポートのバージョンか、不正なファイルヘッダを持つデータベースファイルです
90049=ファイル {0} の暗号化エラーです
90050=不正なパスワードフォーマットです。正しくは: ファイルパスワード <空白> ユーザパスワード
90051=#Scale(${0}) must not be bigger than precision({1})
90052=サブクエリが単一列のクエリではありません
90053=数値サブクエリが複数の行を含んでいます
90054=集約関数 {0} の不正な使用
......
......@@ -78,6 +78,7 @@
90048=Nieprawidłowa wersja pliku bazy danych lub nieprawidłowy nagłówek pliku {0}
90049=Błąd szyfrowania pliku {0}
90050=Zły format hasła, powinno być: plik hasło <spacja> użytkownik hasło
90051=#Scale(${0}) must not be bigger than precision({1})
90052=Podzapytanie nie jest zapytaniem opartym o jedna kolumnę
90053=Skalarna pod-kwerenda zawiera więcej niż jeden wiersz
90054=Nieprawidłowe użycie funkcji agregującej {0}
......
......@@ -78,6 +78,7 @@
90048=Versão do arquivo de base de dados não é suportado, ou o cabeçalho do arquivo é inválido, no arquivo {0}
90049=Erro de encriptação no arquivo {0}
90050=Erro no formato da senha, deveria ser: arquivo de senha <espaço> senha do usuário
90051=#Scale(${0}) must not be bigger than precision({1})
90052=A Subquery não é de coluna única
90053=A Subquery contém mais de uma linha
90054=Uso inválido da função {0} agregada
......
......@@ -78,6 +78,7 @@
90048=Неподдерживаемая версия файлов базы данных или некорректный заголовок в файле {0}
90049=Ошибка шифрования в файле {0}
90050=Некорректный формат пароля, должен быть: пароль файла <пробел> пароль пользователя
90051=#Scale(${0}) must not be bigger than precision({1})
90052=Подзапрос выбирает более одного столбца
90053=Подзапрос выбирает более одной строки
90054=Некорректное использование агрегирующей функции {0}
......
......@@ -78,6 +78,7 @@
90048=Nepodporovaná verzia databázového súboru alebo chybná hlavička súuboru {0}
90049=Chyba šifrovania súboru {0}
90050=Nesprávny formát hesiel, musí byť: súborové heslo <medzera> používateľské heslo
90051=#Scale(${0}) must not be bigger than precision({1})
90052=Vnorený dopyt (subquery) nie je dopyt na jeden stĺpec
90053=Skalárny vnorený dopyt (scalar subquery) obsahuje viac ako jeden riadok
90054=Nesprávne použitie agregačnej funkcie {0}
......
......@@ -78,6 +78,7 @@
90048=不支持的数据库文件版本或无效的文件头 {0}
90049=文件加密错误 {0}
90050=错误的口令格式, 必须为: 文件 口令 <空格> 用户 口令
90051=#Scale(${0}) must not be bigger than precision({1})
90052=子查询非单一字段查询
90053=标量子查询(Scalar subquery)包含多于一行结果
90054=非法使用聚合函数 {0}
......
......@@ -460,6 +460,10 @@ Changes the password of the current user."
SET QUERY_STATISTICS { TRUE | FALSE }
","
Disabled or enables query statistics gathering for the whole database."
"Commands (Other)","SET QUERY_STATISTICS_MAX_ENTRIES","
SET QUERY_STATISTICS int
","
Set the maximum number of entries in query statistics meta-table."
"Commands (Other)","SET QUERY_TIMEOUT","
SET QUERY_TIMEOUT int
","
......
......@@ -61,7 +61,8 @@ public class TestTempTables extends TestBase {
for (int i = 0; i < 10000; i++) {
prep.execute();
}
stat.execute("create local temporary table test2(id identity) as select x from system_range(1, 10)");
stat.execute("create local temporary table " +
"test2(id identity) as select x from system_range(1, 10)");
conn.close();
}
......
......@@ -46,9 +46,8 @@ public class TestNestedJoins extends TestBase {
return;
}
deleteDb("nestedJoins");
// testCases2();
testCases();
// bug somewhere in our join handling and planning code
//testCases2();
testRandom();
deleteDb("nestedJoins");
}
......@@ -643,23 +642,14 @@ public class TestNestedJoins extends TestBase {
private void testCases2() throws Exception {
Connection conn = getConnection("nestedJoins");
Statement stat = conn.createStatement();
stat.execute("CREATE TABLE A (ID INT NOT NULL UNIQUE, DTYPE VARCHAR(31), GUID text, UUID VARCHAR NOT NULL UNIQUE, PRIMARY KEY (ID))");
stat.execute("CREATE TABLE B (ID INT NOT NULL, A_ID BIGINT, PRIMARY KEY (ID))");
stat.execute("CREATE TABLE C (ID INT NOT NULL, PRIMARY KEY (ID))");
stat.execute("ALTER TABLE B ADD CONSTRAINT FK_B_A_ID FOREIGN KEY (A_ID) REFERENCES A (ID)");
stat.execute("ALTER TABLE B ADD CONSTRAINT FK_B_ID FOREIGN KEY (ID) REFERENCES A (ID)");
stat.execute("ALTER TABLE C ADD CONSTRAINT FK_C_ID FOREIGN KEY (ID) REFERENCES A (ID)");
stat.execute("CREATE SEQUENCE A_SEQ INCREMENT BY 50 START WITH 50");
stat.execute("INSERT INTO A(ID, DTYPE, GUID, UUID) VALUES (1, 'Complextest1ClassC', '6e05c875-734c-4dfd-867f-a903ba7ddd4a', '1aedabd9-0cf6-4d7f-ab36-6ec136B14ac')");
stat.execute("INSERT INTO A(ID, DTYPE, GUID, UUID) VALUES (2, 'Complextest1ClassB', 'cB97305-15d7-41b2-87a9-f4cf9cc7a70a', '927d0b8f-e298-4368-af8a-388b752701a3')");
stat.execute("INSERT INTO C(ID) VALUES (1)");
stat.execute("INSERT INTO B(ID, A_ID) VALUES (2,1)");
stat.executeQuery("SELECT t0.ID, t0.DTYPE, t0.GUID, t0.UUID, t1.ID, t1.A_ID " +
"FROM A " +
" LEFT OUTER JOIN (A t0 JOIN B t1 ON (t1.ID = t0.ID)) ON (t1.A_ID = A.ID), " +
" C " +
"WHERE (A.ID = 1) AND (C.ID = A.ID) AND (A.DTYPE = 'Complextest1ClassC')");
stat.execute("create table a(id int primary key)");
stat.execute("create table b(id int primary key)");
stat.execute("create table c(id int primary key)");
stat.execute("insert into a(id) values(1)");
stat.execute("insert into c(id) values(1)");
stat.execute("insert into b(id) values(1)");
stat.executeQuery("select 1 from a left outer join " +
"(a t0 join b t1 on 1 = 1) on t1.id = 1, c");
conn.close();
deleteDb("nestedJoins");
}
......
/*
* 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
*/
package org.h2.test.synth;
import java.sql.Connection;
......@@ -11,28 +16,30 @@ import org.h2.test.TestBase;
*/
public class TestStringAggCompatibility extends TestBase {
public static final String STRING_AGG_DB = "stringAgg";
private Connection conn;
public static void main(String[] args) throws Exception {
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
TestBase.createCaller().init().test();
}
@Override
public void test() throws Exception {
deleteDb(STRING_AGG_DB);
conn = getConnection(STRING_AGG_DB);
deleteDb(getTestName());
conn = getConnection(getTestName());
prepareDb();
testWhenOrderByMissing();
testWithOrderBy();
conn.close();
}
private void testWithOrderBy() throws SQLException {
ResultSet result = query("select string_agg(b, ', ' order by b desc) from stringAgg group by a; ");
ResultSet result = query(
"select string_agg(b, ', ' order by b desc) from stringAgg group by a; ");
assertTrue(result.next());
assertEquals("3, 2, 1", result.getString(1));
......@@ -54,7 +61,10 @@ public class TestStringAggCompatibility extends TestBase {
}
private void prepareDb() throws SQLException {
exec("create table stringAgg(\n" + " a int not null,\n" + " b varchar(50) not null\n" + ");");
exec("create table stringAgg(\n" +
" a int not null,\n" +
" b varchar(50) not null\n" +
");");
exec("insert into stringAgg values(1, '1')");
exec("insert into stringAgg values(1, '2')");
......
......@@ -776,5 +776,5 @@ huff frequencies freq frequency divisors asymmetric ideal nth prob ans
bradmesserle dan incorporated keegan industries tagtraum cyr israels rafel
dance schedule hitting reverted youngest footers inliner deadlocked reorder nger
nullid syspublic sysibmts sysibminternal syscat sysfun sysstat systools sysibmadm
sysproc jcc expecting gpg showed
sysproc jcc expecting gpg showed unreferenced activating cvf
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论