diff -Nru hsqldb-2.6.1/debian/changelog hsqldb-2.7.0/debian/changelog --- hsqldb-2.6.1/debian/changelog 2021-10-22 10:46:07.000000000 +0000 +++ hsqldb-2.7.0/debian/changelog 2022-08-06 10:56:15.000000000 +0000 @@ -1,3 +1,10 @@ +hsqldb (2.7.0-1) unstable; urgency=medium + + * New upstream version 2.7.0. + * Declare compliance with Debian Policy 4.6.1. + + -- Markus Koschany Sat, 06 Aug 2022 12:56:15 +0200 + hsqldb (2.6.1-1) unstable; urgency=medium * New upstream version 2.6.1. diff -Nru hsqldb-2.6.1/debian/control hsqldb-2.7.0/debian/control --- hsqldb-2.6.1/debian/control 2021-10-22 10:46:07.000000000 +0000 +++ hsqldb-2.7.0/debian/control 2022-08-06 10:56:15.000000000 +0000 @@ -11,7 +11,7 @@ javahelper, libservlet-api-java, maven-repo-helper -Standards-Version: 4.6.0 +Standards-Version: 4.6.1 Vcs-Git: https://salsa.debian.org/java-team/hsqldb.git Vcs-Browser: https://salsa.debian.org/java-team/hsqldb Homepage: http://hsqldb.org/ diff -Nru hsqldb-2.6.1/debian/copyright hsqldb-2.7.0/debian/copyright --- hsqldb-2.6.1/debian/copyright 2021-10-22 10:46:07.000000000 +0000 +++ hsqldb-2.7.0/debian/copyright 2022-08-06 10:56:15.000000000 +0000 @@ -5,6 +5,8 @@ *.jar *.zip */apidocs/* + hsqldb/doc/apidocssqltool/jquery/* + hsqldb/doc/apidocssqltool/member-search-index.js Files: * Copyright: The HSQL Development Group @@ -46,11 +48,15 @@ Copyright: Apache Software Foundation License: Apache-2.0 +Files: hsqldb/doc/apidocssqltool/script.js +Copyright: Oracle and or its affiliates +License: GPL-2-with-classpath-exception + Files: debian/* Copyright: 2005-2007, Peter Eisentraut 2007-2013, Rene Engelhard 2013, Niels Thykier - 2015-2021, Markus Koschany + 2015-2022, Markus Koschany License: BSD-3-clause-HSQLDB License: BSD-3-clause-HSQLDB @@ -142,3 +148,42 @@ On Debian systems, the full text of the Apache license 2.0 can be found in the file '/usr/share/common-licenses/Apache-2.0' +License: GPL-2-with-classpath-exception + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License 2 as published by + the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + . + "CLASSPATH" EXCEPTION TO THE GPL + . + Certain source files distributed by Oracle America and/or its affiliates are + subject to the following clarification and special exception to the GPL, but + only where Oracle has expressly included in the particular source file's header + the words "Oracle designates this particular file as subject to the "Classpath" + exception as provided by Oracle in the LICENSE file that accompanied this code." + . + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + . + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. + diff -Nru hsqldb-2.6.1/debian/patches/build.patch hsqldb-2.7.0/debian/patches/build.patch --- hsqldb-2.6.1/debian/patches/build.patch 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/debian/patches/build.patch 2022-08-06 10:56:15.000000000 +0000 @@ -0,0 +1,22 @@ +From: Markus Koschany +Date: Sat, 6 Aug 2022 13:13:17 +0200 +Subject: build + +--- + hsqldb/build/build.xml | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/hsqldb/build/build.xml b/hsqldb/build/build.xml +index f277928..35a28c1 100644 +--- a/hsqldb/build/build.xml ++++ b/hsqldb/build/build.xml +@@ -256,8 +256,7 @@ examples: + + + - - + + + - + Example cross-compile settings for targeting Java 8. + This is syntax for inclusion in a build.properties file. + Can also set them in the build command with Ant or Gradle -D switches; + or an IDE's Ant or Gradle build settings. + +ant.build.javac.target=8 +javac.bootcp.override=/usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk/jre/lib/jce.jar + --> - - - - - + @@ -48,12 +45,12 @@ - - - - - - + + + + + + @@ -64,7 +61,7 @@ build.properties file. --> - + @@ -114,25 +111,55 @@ this target eliminates the redundancy in those methods by making a single class-existence-test definitively responsible for determining if JVM X is supported. - It is sufficient for this purposes if the test classes used are + It is sufficient for this purpose if the test classes used are verified to be present in version X and in all newer versions (> X) (i.e. that the class is not removed from some higher JVM). --> - - - + + + + + + If cross-compiling, you must set property 'javac.bootcp.override' + + src originally {${ant.build.javac.source}} + + + + + + + + + + + + + + + specified compile target: ${ant.build.javac.target} + derived version: 8?${ant.java.iscjava08} 11?${ant.java.iscjava11} + src (${ant.build.javac.source}) + targ (${ant.build.javac.target}) + bcp (${javac.bootcp.override}) + - - - - - - + + + + + + + + - + - - - - - - - - - - - + + + + + + + - + - - - - - - - + + + + + + + + - - - - - - - + + + - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - "${basedir}/build/jdkcodeswitch.list" - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + + + - - - - - - - - - - + + + + + - + - - - + + @@ -385,16 +359,17 @@ - - + - + + @@ -436,6 +414,7 @@ - - - - - - - - - - - - - - + - + depends="sw-hsqldb"> + - - - - - - - - - - - - - - + + + + + + - - - - - + @@ -586,13 +537,13 @@ - + - + @@ -613,16 +564,12 @@ - - - - - + + - + - - + @@ -639,21 +586,31 @@ - - + + - + - + + + + + Exiting due to 'jar' exit value ${exec.val.1}. +JVM stdout: --------------------------------------------------- +${out.1} +JVM stderr: --------------------------------------------------- +${err.1} - - + @@ -664,23 +621,22 @@ + - - - - + + + + + @@ -696,12 +652,9 @@ - - - - + @@ -711,20 +664,30 @@ + value='hsqldb-${hsqldb.version}.jar hsqldb.jar hsqldbmin.jar hsqldbmain.jar'/> - + - + - + + + + + Exiting due to 'jar' exit value ${exec.val.2}. +JVM stdout: --------------------------------------------------- +${out.2} +JVM stderr: --------------------------------------------------- +${err.2} @@ -772,8 +735,8 @@ - + description="Build the Database Managers jar"> + @@ -783,9 +746,9 @@ value='Utilities runtime, without JDBC driver'/> - + + value='hsqldb-${hsqldb.version}.jar hsqldb.jar hsqldbmin.jar hsqldbmain.jar'/> @@ -795,13 +758,26 @@ - - + if="ant.java.iscjava08" unless="ant.java.iscjava11"> + + + + + + + + + + + + + - + + + - - - - + bottom="<i>Copyright © 2001 - 2022 HSQL Development Group.</i>"> @@ -842,15 +814,48 @@ srcdir="doc/apidocs" includes="**/*.css, **/*.html, **/package-list"/> + + + + + + + + + + + + + + + + + + - + bottom="<i>Copyright © 2001 - 2022 HSQL Development Group.</i>"> + - @@ -937,19 +943,12 @@ - + - - - - - - - @@ -1152,7 +1151,9 @@ - @@ -1160,11 +1161,19 @@ - + - + - + + + + Exiting due to BND JVM exit value ${exec.val.0}. +JVM stdout: --------------------------------------------------- +${out.0} +JVM stderr: --------------------------------------------------- +${err.0} + diff -Nru hsqldb-2.6.1/hsqldb/build/clean.test.suite.cmd hsqldb-2.7.0/hsqldb/build/clean.test.suite.cmd --- hsqldb-2.6.1/hsqldb/build/clean.test.suite.cmd 2018-10-23 07:24:44.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/build/clean.test.suite.cmd 2022-02-21 14:42:10.000000000 +0000 @@ -1,2 +1,2 @@ call setenv.cmd -ant -f test.xml clean.test.suite +call ant -f test.xml clean.test.suite diff -Nru hsqldb-2.6.1/hsqldb/build/mvn-pub.gradle hsqldb-2.7.0/hsqldb/build/mvn-pub.gradle --- hsqldb-2.6.1/hsqldb/build/mvn-pub.gradle 2020-11-24 00:38:10.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/build/mvn-pub.gradle 2022-07-17 10:32:06.000000000 +0000 @@ -20,14 +20,26 @@ * by 'build-dist' not by 'mvn-pub'. * *

- *     gradlew -x sqltool -x osgi -b mvn-pub.gradle
+ *     gradlew -x sqltool -x hsqldb -b mvn-pub.gradle
  * 
* * Now, for each alternative, adjust environment and build properties, like - * by setting env var JAVA_HOME or build property 'build.debug', and run + * by setting build property 'build.debug', and run * *

- *   gradlew -Pclassifier=NEW_CLASSIFIER -b mvn-pub.gradle clean-all uploadArchives
+ *   [single-command no longer works due to broken inter-dependencies:
+ *   gradlew -Pclassifier=NEW_CLASSIFIER -b mvn-pub.gradle clean-all uploadArchives]
+ *   gradlew -b mvn-pub.gradle clean-all
+ *   gradlew -Pclassifier=NEW_CLASSIFIER -b mvn-pub.gradle sqltool
+ *   gradlew -Pclassifier=NEW_CLASSIFIER -b mvn-pub.gradle hsqldb
+ *   gradlew -Pclassifier=NEW_CLASSIFIER -b mvn-pub.gradle -x sqltool -x hsqldb
+ *
+ *   # Restore regular build property values
+ *   pushd ../lib; mkdir ../safe.d; mv -v hsqldb.jar sqltool.jar ../safe.d/
+ *   mv -v hsqldb-jdk8.jar hsqldb.jar && mv -v sqltool-jdk8.jar sqltool.jar
+ *   popd
+ *   gradlew -Pclassifier=jdk8 -b mvn-pub.gradle -x sqltool -x hsqldb
+ *   
  * 
* The clean-all will wipe .../doc, but the .../doc and everything else from * your original dist build will be retained in .../dist/*.zip. @@ -197,18 +209,18 @@ // Funny name is work-around for Gradle sequencing bug task zJarDep { doLast { if (jar.archivePath.exists() && jar.archivePath.lastModified() - < file('../lib/hsqldb-osgi.jar').lastModified()) { + < file('../lib/hsqldb.jar').lastModified()) { logger.warn "Deleting $jar.archivePath.absolutePath" jar.archivePath.delete() } } } jar { doLast { - File srcFile = file('../lib/hsqldb-osgi.jar') + File srcFile = file('../lib/hsqldb.jar') jar.archivePath.setBytes(srcFile.bytes) } } -jar.dependsOn = [osgi, zJarDep] +jar.dependsOn = [hsqldb, zJarDep] if (project.hasProperty('classifier')) jar.classifier = project.classifier clean.dependsOn = [prohibitionMap['clean']] @@ -233,10 +245,10 @@ sqltoolJar.archivePath.setBytes(srcFile.bytes) } } -task sourcesJar(type: Jar, dependsOn:classes) { - classifier = 'sources' - //from sourceSets.main.allSource - from fileTree(dir: '../src') +task sourcesJar(type: Jar, dependsOn:hsqldbsources) { + classifier = 'sources' + //from sourceSets.main.allSource + from { zipTree '../lib/hsqldb-sources.jar' } } sourcesJar.description = 'Build sources jar file' @@ -247,11 +259,11 @@ } javadocJar.description = 'Build javadoc jar file' -task sqltoolSourcesJar(type: Jar, dependsOn:classes) { +task sqltoolSourcesJar(type: Jar, dependsOn:sqltoolsources) { archiveBaseName = 'sqltool' classifier = 'sources' //from sourceSets.main.allSource - from fileTree(dir: '../src') + from { zipTree '../lib/sqltool-sources.jar' } } sqltoolSourcesJar.description = 'Build Sqltool sources jar file' @@ -259,7 +271,7 @@ archiveBaseName = 'sqltool' classifier = 'javadoc' //from javadoc.destinationDir - from fileTree(dir: '../doc/apidocs') + from fileTree(dir: '../doc/apidocssqltool') } sqltoolJavadocJar.description = 'Build Sqltool javadoc jar file' diff -Nru hsqldb-2.6.1/hsqldb/build/setenv.cmd hsqldb-2.7.0/hsqldb/build/setenv.cmd --- hsqldb-2.6.1/hsqldb/build/setenv.cmd 2018-10-23 07:24:42.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/build/setenv.cmd 2022-02-21 14:42:08.000000000 +0000 @@ -1,7 +1,7 @@ REM basic environment setup REM change as needed -set JAVA_HOME=C:\Program Files\Java\jdk7 -set ANT_HOME=C:\java\lib\ant +set JAVA_HOME=C:\Program Files\Java\jdk8 +set ANT_HOME=C:\Program Files\NetBeans-12.6\netbeans\extide\ant set ANT_OPTS=-Xmx512m set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH% diff -Nru hsqldb-2.6.1/hsqldb/build/test.xml hsqldb-2.7.0/hsqldb/build/test.xml --- hsqldb-2.6.1/hsqldb/build/test.xml 2021-03-20 09:02:12.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/build/test.xml 2022-05-18 09:38:44.000000000 +0000 @@ -21,7 +21,7 @@ + value="2.7.0"/> @@ -30,7 +30,7 @@ value="The HSQL Development Group"/> + value="SQL:2016 / JDBC 4.3 Conformance and Supporing Library Test Cases"/> @@ -258,7 +258,9 @@ errorproperty="tests.failed" > + includes="org/hsqldb/jdbc/**/*Test.java" + excludes="org/hsqldb/jdbc/ScriptedTest.java" + /> + + + + +All Classes (HSQLDB 2.7.0 API) + + + + + + + + + + + + +

All Classes

+
+ +
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/allclasses-index.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/allclasses-index.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/allclasses-index.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/allclasses-index.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,209 @@ + + + + + +All Classes (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes

+
+
+ +
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/allpackages-index.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/allpackages-index.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/allpackages-index.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/allpackages-index.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,169 @@ + + + + + +All Packages (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
+
    +
  • + + + + + + + + + + + + +
    Package Summary 
    PackageDescription
    org.hsqldb.cmdline +
    Contains the SqlTool command-line tool
    +
    +
  • +
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/constant-values.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/constant-values.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/constant-values.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/constant-values.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,231 @@ + + + + + +Constant Field Values (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+ + +
+

org.hsqldb.*

+ +
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/deprecated-list.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/deprecated-list.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/deprecated-list.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/deprecated-list.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,149 @@ + + + + + +Deprecated List (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/element-list hsqldb-2.7.0/hsqldb/doc/apidocssqltool/element-list --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/element-list 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/element-list 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,2 @@ +module:org.hsqldb.sqltool +org.hsqldb.cmdline diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/help-doc.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/help-doc.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/help-doc.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/help-doc.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,286 @@ + + + + + +API Help (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +
    +

    Module

    +

    Each module has a page that contains a list of its packages, dependencies on other modules, and services, with a summary for each. These page may contain three categories:

    +
      +
    • Packages
    • +
    • Modules
    • +
    • Services
    • +
    +
    +
  • +
  • +
    +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:

    +
      +
    • Interfaces
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
    +
  • +
  • +
    +

    Class or Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class Inheritance Diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class or Interface Declaration
    • +
    • Class or Interface Description
    • +
    +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Property Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
    +
      +
    • Field Detail
    • +
    • Property Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
    +
  • +
  • +
    +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type Declaration
    • +
    • Annotation Type Description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
    +
  • +
  • +
    +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum Declaration
    • +
    • Enum Description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
    +
  • +
  • +
    +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its "Use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
    +
  • +
  • +
    +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
    • +
    +
    +
  • +
  • +
    +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
    +
  • +
  • +
    +

    Index

    +

    The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.

    +
    +
  • +
  • +
    +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
    +
  • +
  • +
    +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
    +
  • +
  • +
    +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
    +
  • +
  • +
    +

    Search

    +

    You can search for definitions of modules, packages, types, fields, methods and other terms defined in the API, using some or all of the name. "Camel-case" abbreviations are supported: for example, "InpStr" will find "InputStream" and "InputStreamReader".

    +
    +
  • +
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + Binary files /tmp/tmp_0bpm_7m/9POo46eOkt/hsqldb-2.6.1/hsqldb/doc/apidocssqltool/hsqldbs.png and /tmp/tmp_0bpm_7m/lrkf8so7nm/hsqldb-2.7.0/hsqldb/doc/apidocssqltool/hsqldbs.png differ diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/index-all.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/index-all.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/index-all.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/index-all.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,952 @@ + + + + + +Index (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
A B C D E F G H I J L M N O P Q R S T V 
All Classes All Packages + + +

A

+
+
a_setting - org.hsqldb.cmdline.SqltoolRB
+
 
+
aborting - org.hsqldb.cmdline.SqltoolRB
+
 
+
addMacros(Map<String, Token>) - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
addUserVars(Map<String, String>) - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
append_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
arrayimp_jvmreq - org.hsqldb.cmdline.SqltoolRB
+
 
+
arrayval_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
auto_unset_warning - org.hsqldb.cmdline.SqltoolRB
+
 
+
autocommit_fetchfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

B

+
+
bad_time_format - org.hsqldb.cmdline.SqltoolRB
+
 
+
bang_command_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
bang_incomplete - org.hsqldb.cmdline.SqltoolRB
+
 
+
binary_filefail - org.hsqldb.cmdline.SqltoolRB
+
 
+
binary_loadedbytesinto - org.hsqldb.cmdline.SqltoolRB
+
 
+
binbuf_write - org.hsqldb.cmdline.SqltoolRB
+
 
+
binbuffer_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
bitCharsToBytes(String) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Just a stub for now.
+
+
boolean_bad - org.hsqldb.cmdline.SqltoolRB
+
 
+
break_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
break_unsatisfied - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_executing - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_extrachars - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_help - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_instructions - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_restored - org.hsqldb.cmdline.SqltoolRB
+
 
+
buffer_unknown - org.hsqldb.cmdline.SqltoolRB
+
 
+
bufhist_unspecified - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

C

+
+
c_setting - org.hsqldb.cmdline.SqltoolRB
+
 
+
canDisplayType(int) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
This method is used to tell SqlFile whether this Sql Type must + ALWAYS be loaded to the binary buffer without displaying.
+
+
causereport - org.hsqldb.cmdline.SqltoolRB
+
 
+
closeReader() - Method in class org.hsqldb.cmdline.SqlFile
+
+
Close the reader.
+
+
commandnum_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
committed - org.hsqldb.cmdline.SqltoolRB
+
 
+
conndata_retrieval_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
connect_failure - org.hsqldb.cmdline.SqltoolRB
+
 
+
connected_fallbackmsg - org.hsqldb.cmdline.SqltoolRB
+
 
+
CONNECTERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
connection_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
continue_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
continue_unsatisfied - org.hsqldb.cmdline.SqltoolRB
+
 
+
convertEscapes(String) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Translates user-supplied escapes into the traditionaly + corresponding binary characters.
+
+
csv_coldelim_present - org.hsqldb.cmdline.SqltoolRB
+
 
+
csv_quote_unterminated - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

D

+
+
d_options - org.hsqldb.cmdline.SqltoolRB
+
 
+
DEFAULT_RCFILE - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
deprecated_noop - org.hsqldb.cmdline.SqltoolRB
+
 
+
describe_table_datatype - org.hsqldb.cmdline.SqltoolRB
+
 
+
describe_table_name - org.hsqldb.cmdline.SqltoolRB
+
 
+
describe_table_nonulls - org.hsqldb.cmdline.SqltoolRB
+
 
+
describe_table_precision - org.hsqldb.cmdline.SqltoolRB
+
 
+
describe_table_scale - org.hsqldb.cmdline.SqltoolRB
+
 
+
describe_table_width - org.hsqldb.cmdline.SqltoolRB
+
 
+
destfile_demand - org.hsqldb.cmdline.SqltoolRB
+
 
+
desturl_nowrite - org.hsqldb.cmdline.SqltoolRB
+
 
+
disconnect_failure - org.hsqldb.cmdline.SqltoolRB
+
 
+
disconnect_success - org.hsqldb.cmdline.SqltoolRB
+
 
+
disconnected_msg - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_bincol - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_colcount_mismatch - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_coldelim_present - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_constcols_nullcol - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_header_matchernonhead - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_header_none - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_header_nonswitched - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_header_noswitchmatch - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_header_noswitchtarg - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_import_summary - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_insertcol_mismatch - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_m_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_metadata_mismatch - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_nocolheader - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_nocolsleft - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_nullrep_present - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_options - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_q_nodblquote - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_recin_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_rejectfile_purgefail - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_rejectfile_setupfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_rejectreport_purgefail - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_rejectreport_setupfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_rowdelim_present - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_skipcols_missing - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_targetfile_demand - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsv_x_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
dsvSafe(String) - Method in class org.hsqldb.cmdline.SqlFile
+
+
Validate that String is safe to write TO DSV file.
+
+
dumpload_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
dumpload_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

E

+
+
edit_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
editbuffer_contents - org.hsqldb.cmdline.SqltoolRB
+
 
+
else_without_if - org.hsqldb.cmdline.SqltoolRB
+
 
+
encode_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
end_noblock - org.hsqldb.cmdline.SqltoolRB
+
 
+
errorat - org.hsqldb.cmdline.SqltoolRB
+
 
+
escapeHtml(String) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Escaping rules taken from 'Reserved Characters in HTML table at + http://www.w3schools.com/tags/ref_entities.asp
+
+
exectime_report - org.hsqldb.cmdline.SqltoolRB
+
 
+
exectime_reporting - org.hsqldb.cmdline.SqltoolRB
+
 
+
execute() - Method in class org.hsqldb.cmdline.SqlFile
+
+
Process all the commands from the file or Reader associated with + "this" object.
+
+
+ + + +

F

+
+
file_appendfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
file_readfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
file_writefail - org.hsqldb.cmdline.SqltoolRB
+
 
+
file_wrotechars - org.hsqldb.cmdline.SqltoolRB
+
 
+
FILEERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
+ + + +

G

+
+
getBanner(Connection) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Returns a String report for the specified JDBC Connection.
+
+
getConnection() - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
getCurrentSchema() - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
getExpandedString() - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getExpandedString(String...) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getMacros() - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
getString() - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int, int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int, int, int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int, int, String) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int, String) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int, String, int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(int, String, String) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(String...) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(String, int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(String, int, int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(String, int, String) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(String, String, int) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getString(Throwable) - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
getUserVars() - Method in class org.hsqldb.cmdline.SqlFile
+
+
Get a reference to the user variable map.
+
+
+ + + +

H

+
+
hexCharOctetsToBytes(String) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Convert a String to a byte array by interpreting every 2 characters as an + octal byte value.
+
+
history_back - org.hsqldb.cmdline.SqltoolRB
+
 
+
history_backto - org.hsqldb.cmdline.SqltoolRB
+
 
+
history_none - org.hsqldb.cmdline.SqltoolRB
+
 
+
history_number_req - org.hsqldb.cmdline.SqltoolRB
+
 
+
history_unavailable - org.hsqldb.cmdline.SqltoolRB
+
 
+
history_upto - org.hsqldb.cmdline.SqltoolRB
+
 
+
html_mode - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

I

+
+
ifwhile_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
illegal_at - org.hsqldb.cmdline.SqltoolRB
+
 
+
import_col_dup - org.hsqldb.cmdline.SqltoolRB
+
 
+
importDsv(URL, String) - Method in class org.hsqldb.cmdline.SqlFile
+
+
Name is self-explanatory.
+
+
input_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
input_movedtobuffer - org.hsqldb.cmdline.SqltoolRB
+
 
+
input_unterminated - org.hsqldb.cmdline.SqltoolRB
+
 
+
INPUTERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
inputfile_closefail - org.hsqldb.cmdline.SqltoolRB
+
 
+
inputrec_modified - org.hsqldb.cmdline.SqltoolRB
+
 
+
insertion_preparefail - org.hsqldb.cmdline.SqltoolRB
+
 
+
insertions_notcommitted - org.hsqldb.cmdline.SqltoolRB
+
 
+
IOERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
+ + + +

J

+
+
jdbc_established - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

L

+
+
loadBinary(File) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Legacy function.
+
+
loadBinary(URL) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Binary file load
+
+
log_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
log_syntax_error - org.hsqldb.cmdline.SqltoolRB
+
 
+
logical_unrecognized - org.hsqldb.cmdline.SqltoolRB
+
 
+
LS - Static variable in class org.hsqldb.cmdline.SqlFile
+
+
Platform-specific line separator
+
+
LS - Static variable in class org.hsqldb.cmdline.SqlTool
+
+
Platform-specific line separator
+
+
LS - Static variable in class org.hsqldb.cmdline.SqlToolSprayer
+
 
+
+ + + +

M

+
+
macro_help - org.hsqldb.cmdline.SqltoolRB
+
 
+
macro_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
macro_tip - org.hsqldb.cmdline.SqltoolRB
+
 
+
macro_undefined - org.hsqldb.cmdline.SqltoolRB
+
 
+
macrodef_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
macrodef_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
macrodef_semi - org.hsqldb.cmdline.SqltoolRB
+
 
+
main(String[]) - Static method in class org.hsqldb.cmdline.SqlTool
+
+
A static wrapper for objectMain, so that that method may be executed + as a Java "program".
+
+
main(String[]) - Static method in class org.hsqldb.cmdline.SqlToolSprayer
+
 
+
math_expr_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
metadata_fetch_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
metadata_fetch_failfor - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

N

+
+
no_required_conn - org.hsqldb.cmdline.SqltoolRB
+
 
+
no_timestamp_format - org.hsqldb.cmdline.SqltoolRB
+
 
+
no_vendor_schemaspt - org.hsqldb.cmdline.SqltoolRB
+
 
+
nobuffer_yet - org.hsqldb.cmdline.SqltoolRB
+
 
+
none - org.hsqldb.cmdline.SqltoolRB
+
 
+
noresult - org.hsqldb.cmdline.SqltoolRB
+
 
+
null_assignment - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

O

+
+
objectMain(String[]) - Static method in class org.hsqldb.cmdline.SqlTool
+
+
Connect to a JDBC Database and execute the commands given on + stdin or in SQL file(s).
+
+
org.hsqldb.cmdline - package org.hsqldb.cmdline
+
+
Contains the SqlTool command-line tool
+
+
org.hsqldb.sqltool - module org.hsqldb.sqltool
+
 
+
outputfile_header - org.hsqldb.cmdline.SqltoolRB
+
 
+
outputfile_nonetoclose - org.hsqldb.cmdline.SqltoolRB
+
 
+
outputfile_reopening - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

P

+
+
password_readfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
passwordFor_prompt - org.hsqldb.cmdline.SqltoolRB
+
 
+
pipeclose_failure - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_assign - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_block_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_block_unterminated - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_control - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_help - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_list_lengths - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_list_parens - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_malformat_specific - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_unknown - org.hsqldb.cmdline.SqltoolRB
+
 
+
pl_unset_nomoreargs - org.hsqldb.cmdline.SqltoolRB
+
 
+
plalias_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
plvar_nameempty - org.hsqldb.cmdline.SqltoolRB
+
 
+
plvar_nocolon - org.hsqldb.cmdline.SqltoolRB
+
 
+
plvar_set_incomplete - org.hsqldb.cmdline.SqltoolRB
+
 
+
plvar_tildedash_nomoreargs - org.hsqldb.cmdline.SqltoolRB
+
 
+
plvar_undefined - org.hsqldb.cmdline.SqltoolRB
+
 
+
plvar_unterminated - org.hsqldb.cmdline.SqltoolRB
+
 
+
prepare_demandqm - org.hsqldb.cmdline.SqltoolRB
+
 
+
primaryinput_accessfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

Q

+
+
query_metadatafail - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

R

+
+
raw_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
raw_leadin - org.hsqldb.cmdline.SqltoolRB
+
 
+
raw_movedtobuffer - org.hsqldb.cmdline.SqltoolRB
+
 
+
rawmode_prompt - org.hsqldb.cmdline.SqltoolRB
+
 
+
rcdata_driver_conflict - org.hsqldb.cmdline.SqltoolRB
+
 
+
rcdata_genfromvalues_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
rcdata_inline_extravars - org.hsqldb.cmdline.SqltoolRB
+
 
+
rcdata_inlineurl_missing - org.hsqldb.cmdline.SqltoolRB
+
 
+
rcdata_password_visible - org.hsqldb.cmdline.SqltoolRB
+
 
+
RCERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
read_convertfail - org.hsqldb.cmdline.SqltoolRB
+
 
+
read_partial - org.hsqldb.cmdline.SqltoolRB
+
 
+
read_toobig - org.hsqldb.cmdline.SqltoolRB
+
 
+
regex_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
reject_rpc - org.hsqldb.cmdline.SqltoolRB
+
 
+
rejectreport_bottom - org.hsqldb.cmdline.SqltoolRB
+
 
+
rejectreport_row - org.hsqldb.cmdline.SqltoolRB
+
 
+
rejectreport_top - org.hsqldb.cmdline.SqltoolRB
+
 
+
remove_empty_vars_suggestset - org.hsqldb.cmdline.SqltoolRB
+
 
+
rollingback - org.hsqldb.cmdline.SqltoolRB
+
 
+
row_update_multiple - org.hsqldb.cmdline.SqltoolRB
+
 
+
row_update_singular - org.hsqldb.cmdline.SqltoolRB
+
 
+
rows_fetched - org.hsqldb.cmdline.SqltoolRB
+
 
+
rows_fetched_dsv - org.hsqldb.cmdline.SqltoolRB
+
 
+
rpc_autocommit_failure - org.hsqldb.cmdline.SqltoolRB
+
 
+
rpc_commit_failure - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

S

+
+
schemaname_retrieval_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
setAutoClose(boolean) - Method in class org.hsqldb.cmdline.SqlFile
+
+
Specify whether the supplied or generated input Reader should + automatically be closed by the execute() method.
+
+
setConnection(Connection) - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
setContinueOnError(boolean) - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
setMaxHistoryLength(int) - Method in class org.hsqldb.cmdline.SqlFile
+
 
+
special_b_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_d_like - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_d_unknown - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_extrachars - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_help - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_unknown - org.hsqldb.cmdline.SqltoolRB
+
 
+
special_unspecified - org.hsqldb.cmdline.SqltoolRB
+
 
+
sqlarray_badjvm - org.hsqldb.cmdline.SqltoolRB
+
 
+
SQLERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
SqlFile - Class in org.hsqldb.cmdline
+
+
Encapsulation of SQL text and the environment under which it will be + executed with a JDBC Connection.
+
+
SqlFile(File) - Constructor for class org.hsqldb.cmdline.SqlFile
+
+
Convenience wrapper for the SqlFile(File, String) constructor
+
+
SqlFile(File, String) - Constructor for class org.hsqldb.cmdline.SqlFile
+
+
Convenience wrapper for the SqlFile(File, String, boolean) constructor
+
+
SqlFile(File, String, boolean) - Constructor for class org.hsqldb.cmdline.SqlFile
+
+
Constructor for non-interactive usage with a SQL file, using the + specified encoding and sending normal output to stdout.
+
+
SqlFile(Reader, String, PrintStream, String, boolean, File) - Constructor for class org.hsqldb.cmdline.SqlFile
+
+
Legacy constructor.
+
+
SqlFile(Reader, String, PrintStream, String, boolean, URL) - Constructor for class org.hsqldb.cmdline.SqlFile
+
+
Instantiate a SqlFile instance for SQL input from 'reader'.
+
+
SqlFile(String, boolean) - Constructor for class org.hsqldb.cmdline.SqlFile
+
+
Constructor for interactive usage with stdin/stdout
+
+
SqlFile(URL) - Constructor for class org.hsqldb.cmdline.SqlFile
+
 
+
SqlFile(URL, String) - Constructor for class org.hsqldb.cmdline.SqlFile
+
 
+
SqlFile(URL, String, boolean) - Constructor for class org.hsqldb.cmdline.SqlFile
+
 
+
SqlFile_banner - org.hsqldb.cmdline.SqltoolRB
+
 
+
sqlfile_execute_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
sqlfile_name_demand - org.hsqldb.cmdline.SqltoolRB
+
 
+
SqlFile.BadSpecial - Exception in org.hsqldb.cmdline
+
+
Utility nested Exception class for internal use only.
+
+
sqlstatement_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
sqltempfile_fail - org.hsqldb.cmdline.SqltoolRB
+
 
+
SqlTool - Class in org.hsqldb.cmdline
+
+
A command-line JDBC SQL tool supporting both interactive and + non-interactive usage.
+
+
SqlTool() - Constructor for class org.hsqldb.cmdline.SqlTool
+
 
+
SqlTool_abort_continue_mutuallyexclusive - org.hsqldb.cmdline.SqltoolRB
+
 
+
SqlTool_params_redundant - org.hsqldb.cmdline.SqltoolRB
+
 
+
SqlTool_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
SqlTool_varset_badformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
SqlTool.SqlToolException - Exception in org.hsqldb.cmdline
+
 
+
SQLTOOLERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
SqlToolError - Exception in org.hsqldb.cmdline
+
+
Exceptions thrown by the SqlTool system externally to SqlFile.
+
+
SqlToolError() - Constructor for exception org.hsqldb.cmdline.SqlToolError
+
 
+
SqlToolError(String) - Constructor for exception org.hsqldb.cmdline.SqlToolError
+
 
+
SqlToolError(String, Throwable) - Constructor for exception org.hsqldb.cmdline.SqlToolError
+
 
+
SqlToolError(Throwable) - Constructor for exception org.hsqldb.cmdline.SqlToolError
+
 
+
SqltoolRB - Enum in org.hsqldb.cmdline
+
+
Resource Bundle for SqlTool and associated classes.
+
+
SqlToolSprayer - Class in org.hsqldb.cmdline
+
+
Sql Tool Sprayer.
+
+
SqlToolSprayer() - Constructor for class org.hsqldb.cmdline.SqlToolSprayer
+
 
+
sqlTypeToString(int) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
Return a String representation of the specified java.sql.Types type.
+
+
streamread_failure - org.hsqldb.cmdline.SqltoolRB
+
 
+
streamToBytes(InputStream) - Static method in class org.hsqldb.cmdline.SqlFile
+
+
As the name says...
+
+
streamToString(InputStream, String) - Method in class org.hsqldb.cmdline.SqlFile
+
+
As the name says...
+
+
substitution_malformat - org.hsqldb.cmdline.SqltoolRB
+
 
+
substitution_nomatch - org.hsqldb.cmdline.SqltoolRB
+
 
+
substitution_syntax - org.hsqldb.cmdline.SqltoolRB
+
 
+
suggest_j - org.hsqldb.cmdline.SqltoolRB
+
 
+
SYNTAXERR_EXITVAL - Static variable in class org.hsqldb.cmdline.SqlTool
+
 
+
sysprop_empty - org.hsqldb.cmdline.SqltoolRB
+
 
+
sysprop_undefined - org.hsqldb.cmdline.SqltoolRB
+
 
+
sysprop_unterminated - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

T

+
+
time_bad - org.hsqldb.cmdline.SqltoolRB
+
 
+
toPaddedString(String, int, char, boolean) - Static method in class org.hsqldb.cmdline.SqlFile
+
 
+
toString() - Method in enum org.hsqldb.cmdline.SqltoolRB
+
 
+
transiso_report - org.hsqldb.cmdline.SqltoolRB
+
 
+
+ + + +

V

+
+
valueOf(String) - Static method in enum org.hsqldb.cmdline.SqltoolRB
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum org.hsqldb.cmdline.SqltoolRB
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
var_infinite - org.hsqldb.cmdline.SqltoolRB
+
 
+
varname_warning - org.hsqldb.cmdline.SqltoolRB
+
 
+
vendor_derby_dr - org.hsqldb.cmdline.SqltoolRB
+
 
+
vendor_derby_du - org.hsqldb.cmdline.SqltoolRB
+
 
+
vendor_nosup_d - org.hsqldb.cmdline.SqltoolRB
+
 
+
vendor_nosup_sysschemas - org.hsqldb.cmdline.SqltoolRB
+
 
+
vendor_oracle_dS - org.hsqldb.cmdline.SqltoolRB
+
 
+
+A B C D E F G H I J L M N O P Q R S T V 
All Classes All Packages
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/index.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/index.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/index.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/index.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,23 @@ + + + + + +HSQLDB 2.7.0 API + + + + + + + +
+ +

org.hsqldb.sqltool/module-summary.html

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/javadoc.css hsqldb-2.7.0/hsqldb/doc/apidocssqltool/javadoc.css --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/javadoc.css 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/javadoc.css 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,600 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:16px; +} +h2 { + font-size:15px; +} +h3 { + font-size:14px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} + +/* HyperSQL Javadoc styles */ +DIV.ReleaseSpecificDocumentation { + color: #006A00; + background-color: #EEEEFF; + border: none; + padding-top: 5px; + padding-right: 10px; + padding-bottom: 5px; + padding-left: 10px; +} + +DIV.ReleaseSpecificDocumentation h1 { + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; + padding-top: 14px; + padding-right: 0px; + padding-bottom: 15px; + padding-left: 50px; + background: url(hsqldbs.png) #E6E6FF no-repeat left center; + border: none; + font-size: 14px; + +} + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/module-search-index.js hsqldb-2.7.0/hsqldb/doc/apidocssqltool/module-search-index.js --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/module-search-index.js 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/module-search-index.js 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1 @@ +moduleSearchIndex = [{"l":"org.hsqldb.sqltool"}] \ No newline at end of file diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/module-summary.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/module-summary.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/module-summary.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/module-summary.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,196 @@ + + + + + +org.hsqldb.sqltool (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Module org.hsqldb.sqltool

+
+
+
    +
  • +
      +
    • + + + + +

      Packages

      + + + + + + + + + + + + +
      Exports 
      PackageDescription
      org.hsqldb.cmdline +
      Contains the SqlTool command-line tool
      +
      +
    • +
    +
  • +
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.BadSpecial.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.BadSpecial.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.BadSpecial.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.BadSpecial.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,178 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqlFile.BadSpecial (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqlFile.BadSpecial

+
+
+ +
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlFile.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,149 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqlFile (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqlFile

+
+
No usage of org.hsqldb.cmdline.SqlFile
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolError.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolError.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolError.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolError.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,201 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqlToolError (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqlToolError

+
+
+
    +
  • +
      +
    • +
      + + +

      Uses of SqlToolError in org.hsqldb.cmdline

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods in org.hsqldb.cmdline that throw SqlToolError 
      Modifier and TypeMethodDescription
      voidSqlFile.dsvSafe​(java.lang.String s) +
      Validate that String is safe to write TO DSV file.
      +
      voidSqlFile.execute() +
      Process all the commands from the file or Reader associated with + "this" object.
      +
      java.lang.StringSqlFile.getCurrentSchema() 
      voidSqlFile.importDsv​(java.net.URL fileUrl, + java.lang.String skipPrefix) +
      Name is self-explanatory.
      +
      +
      +
    • +
    +
  • +
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,149 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqlTool (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqlTool

+
+
No usage of org.hsqldb.cmdline.SqlTool
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqltoolRB.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqltoolRB.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqltoolRB.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqltoolRB.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,188 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqltoolRB (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqltoolRB

+
+
+
    +
  • + +
  • +
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolSprayer.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolSprayer.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolSprayer.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlToolSprayer.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,149 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqlToolSprayer (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqlToolSprayer

+
+
No usage of org.hsqldb.cmdline.SqlToolSprayer
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.SqlToolException.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.SqlToolException.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.SqlToolException.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/class-use/SqlTool.SqlToolException.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,181 @@ + + + + + +Uses of Class org.hsqldb.cmdline.SqlTool.SqlToolException (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.hsqldb.cmdline.SqlTool.SqlToolException

+
+
+ +
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-summary.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-summary.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-summary.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-summary.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,233 @@ + + + + + +org.hsqldb.cmdline (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+ +

Package org.hsqldb.cmdline

+
+
+
+ + +
Contains the SqlTool command-line tool
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    SqlFile +
    Encapsulation of SQL text and the environment under which it will be + executed with a JDBC Connection.
    +
    SqlTool +
    A command-line JDBC SQL tool supporting both interactive and + non-interactive usage.
    +
    SqlToolSprayer +
    Sql Tool Sprayer.
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    SqltoolRB +
    Resource Bundle for SqlTool and associated classes.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + +
    Exception Summary 
    ExceptionDescription
    SqlFile.BadSpecial +
    Utility nested Exception class for internal use only.
    +
    SqlTool.SqlToolException 
    SqlToolError +
    Exceptions thrown by the SqlTool system externally to SqlFile.
    +
    +
  • +
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-tree.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-tree.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-tree.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-tree.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,191 @@ + + + + + +org.hsqldb.cmdline Class Hierarchy (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.hsqldb.cmdline

+
+
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) +
        +
      • org.hsqldb.cmdline.SqltoolRB (implements org.hsqldb.cmdline.libclone.RefCapableRBInterface)
      • +
      +
    • +
    +
  • +
+
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-use.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-use.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-use.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/package-use.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,187 @@ + + + + + +Uses of Package org.hsqldb.cmdline (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.hsqldb.cmdline

+
+
+ +
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.BadSpecial.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.BadSpecial.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.BadSpecial.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.BadSpecial.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,285 @@ + + + + + +SqlFile.BadSpecial (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Class SqlFile.BadSpecial

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.hsqldb.cmdline.libclone.AppendableException
        • +
        • +
            +
          • org.hsqldb.cmdline.SqlFile.BadSpecial
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    SqlFile
    +
    +
    +
    public static class SqlFile.BadSpecial
    +extends org.hsqldb.cmdline.libclone.AppendableException
    +
    Utility nested Exception class for internal use only. + + Do not instantiate with null message.
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class org.hsqldb.cmdline.libclone.AppendableException

        +appendages, LS
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class org.hsqldb.cmdline.libclone.AppendableException

        +appendMessage, getMessage
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlFile.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,1289 @@ + + + + + +SqlFile (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Class SqlFile

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hsqldb.cmdline.SqlFile
    • +
    +
  • +
+
+
    +
  • +
    +
    public class SqlFile
    +extends java.lang.Object
    +
    Encapsulation of SQL text and the environment under which it will be + executed with a JDBC Connection. + 'SqlInputStream' would be a more precise name, but the content we are + talking about here is what is colloqially known as the contents of + "SQL file"s. +

    + The file src/org/hsqldb/sample/SqlFileEmbedder.java + in the HSQLDB distribution provides an example for using SqlFile to + execute SQL files directly from your own Java classes. +

    + The complexities of passing userVars and macros maps are to facilitate + strong scoping (among blocks and nested scripts). +

    + Some implementation comments and variable names use keywords based + on the following definitions.

      +
    • COMMAND = Statement || SpecialCommand || BufferCommand +
    • Statement = SQL statement like "SQL Statement;" +
    • SpecialCommand = Special Command like "\x arg..." +
    • BufferCommand = Editing/buffer command like ":s/this/that/" +
    +

    + When entering SQL statements, you are always "appending" to the + "immediate" command (not the "buffer", which is a different thing). + All you can do to the immediate command is append new lines to it, + execute it, or save it to buffer. + When you are entering a buffer edit command like ":s/this/that/", + your immediate command is the buffer-edit-command. The buffer + is the command string that you are editing. + The buffer usually contains either an exact copy of the last command + executed or sent to buffer by entering a blank line, + but BUFFER commands can change the contents of the buffer. +

    + In general, the special commands mirror those of Postgresql's psql, + but SqlFile handles command editing very differently than Postgresql + does, in part because of Java's lack of support for raw tty I/O. + The \p special command, in particular, is very different from psql's. +

    + Buffer commands are unique to SQLFile. The ":" commands allow + you to edit the buffer and to execute the buffer. +

    + \d commands are very poorly supported for Mysql because + (a) Mysql lacks most of the most basic JDBC support elements, and + the most basic role and schema features, and + (b) to access the Mysql data dictionary, one must change the database + instance (to do that would require work to restore the original state + and could have disastrous effects upon transactions). +

    + The process*() methods, other than processBuffHist() ALWAYS execute + on "buffer", and expect it to contain the method specific prefix + (if any). +

    + The input/output Reader/Stream are generally managed by the caller. + An exception is that the input reader may be closed automatically or on + demand by the user, since in some cases this class builds the Reader. + There is no corresponding functionality for output since the user always + has control over that object (which may be null or System.out).

    +
    +
    Author:
    +
    Blaine Simpson (blaine dot simpson at admc dot com)
    +
    See Also:
    +
    + The SqlTool chapter of the + HyperSQL Utilities Guide
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class SqlFile.BadSpecial +
      Utility nested Exception class for internal use only.
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringLS +
      Platform-specific line separator
      +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      SqlFile​(java.io.File inputFile) +
      Convenience wrapper for the SqlFile(File, String) constructor
      +
      SqlFile​(java.io.File inputFile, + java.lang.String encoding) +
      Convenience wrapper for the SqlFile(File, String, boolean) constructor
      +
      SqlFile​(java.io.File inputFile, + java.lang.String encoding, + boolean interactive) +
      Constructor for non-interactive usage with a SQL file, using the + specified encoding and sending normal output to stdout.
      +
      SqlFile​(java.io.Reader reader, + java.lang.String inputStreamLabel, + java.io.PrintStream psStd, + java.lang.String encoding, + boolean interactive, + java.io.File atBaseFile) +
      Legacy constructor.
      +
      SqlFile​(java.io.Reader reader, + java.lang.String inputStreamLabel, + java.io.PrintStream psStd, + java.lang.String encoding, + boolean interactive, + java.net.URL atBase) +
      Instantiate a SqlFile instance for SQL input from 'reader'.
      +
      SqlFile​(java.lang.String encoding, + boolean interactive) +
      Constructor for interactive usage with stdin/stdout
      +
      SqlFile​(java.net.URL inputUrl) 
      SqlFile​(java.net.URL inputUrl, + java.lang.String encoding) 
      SqlFile​(java.net.URL inputUrl, + java.lang.String encoding, + boolean interactive) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidaddMacros​(java.util.Map<java.lang.String,​org.hsqldb.cmdline.sqltool.Token> newMacros) 
      voidaddUserVars​(java.util.Map<java.lang.String,​java.lang.String> newUserVars) 
      static byte[]bitCharsToBytes​(java.lang.String hexChars) +
      Just a stub for now.
      +
      static booleancanDisplayType​(int i) +
      This method is used to tell SqlFile whether this Sql Type must + ALWAYS be loaded to the binary buffer without displaying.
      +
      voidcloseReader() +
      Close the reader.
      +
      static java.lang.StringconvertEscapes​(java.lang.String inString) +
      Translates user-supplied escapes into the traditionaly + corresponding binary characters.
      +
      voiddsvSafe​(java.lang.String s) +
      Validate that String is safe to write TO DSV file.
      +
      static java.lang.StringescapeHtml​(java.lang.String s) +
      Escaping rules taken from 'Reserved Characters in HTML table at + http://www.w3schools.com/tags/ref_entities.asp
      +
      voidexecute() +
      Process all the commands from the file or Reader associated with + "this" object.
      +
      static java.lang.StringgetBanner​(java.sql.Connection c) +
      Returns a String report for the specified JDBC Connection.
      +
      java.sql.ConnectiongetConnection() 
      java.lang.StringgetCurrentSchema() 
      java.util.Map<java.lang.String,​org.hsqldb.cmdline.sqltool.Token>getMacros() 
      java.util.Map<java.lang.String,​java.lang.String>getUserVars() +
      Get a reference to the user variable map.
      +
      static byte[]hexCharOctetsToBytes​(java.lang.String hexChars) +
      Convert a String to a byte array by interpreting every 2 characters as an + octal byte value.
      +
      voidimportDsv​(java.net.URL fileUrl, + java.lang.String skipPrefix) +
      Name is self-explanatory.
      +
      static byte[]loadBinary​(java.io.File binFile) +
      Legacy function.
      +
      static byte[]loadBinary​(java.net.URL binUrl) +
      Binary file load
      +
      voidsetAutoClose​(boolean autoClose) +
      Specify whether the supplied or generated input Reader should + automatically be closed by the execute() method.
      +
      voidsetConnection​(java.sql.Connection jdbcConn) 
      voidsetContinueOnError​(boolean continueOnError) 
      voidsetMaxHistoryLength​(int maxHistoryLength) 
      static java.lang.StringsqlTypeToString​(int i) +
      Return a String representation of the specified java.sql.Types type.
      +
      static byte[]streamToBytes​(java.io.InputStream is) +
      As the name says...
      +
      java.lang.StringstreamToString​(java.io.InputStream is, + java.lang.String cs) +
      As the name says...
      +
      static java.lang.StringtoPaddedString​(java.lang.String source, + int length, + char pad, + boolean trailing) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        LS

        +
        public static final java.lang.String LS
        +
        Platform-specific line separator
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.io.File inputFile)
        +        throws java.io.IOException
        +
        Convenience wrapper for the SqlFile(File, String) constructor
        +
        +
        Parameters:
        +
        inputFile - input file
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        See Also:
        +
        SqlFile(File, String)
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.net.URL inputUrl)
        +        throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.io.File inputFile,
        +               java.lang.String encoding)
        +        throws java.io.IOException
        +
        Convenience wrapper for the SqlFile(File, String, boolean) constructor
        +
        +
        Parameters:
        +
        inputFile - the input File
        +
        encoding - is applied to both the given File and other files read + in or written out. Null will use your env+JVM settings.
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        See Also:
        +
        SqlFile(File, String, boolean)
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.net.URL inputUrl,
        +               java.lang.String encoding)
        +        throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.io.File inputFile,
        +               java.lang.String encoding,
        +               boolean interactive)
        +        throws java.io.IOException
        +
        Constructor for non-interactive usage with a SQL file, using the + specified encoding and sending normal output to stdout.
        +
        +
        Parameters:
        +
        inputFile - the input File
        +
        encoding - is applied to the given File and other files + read in or written out. Null will use your env+JVM settings.
        +
        interactive - If true, prompts are printed, the interactive + Special commands are enabled, and + continueOnError defaults to true.
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        See Also:
        +
        SqlFile(Reader, String, PrintStream, String, boolean, File)
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.net.URL inputUrl,
        +               java.lang.String encoding,
        +               boolean interactive)
        +        throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.lang.String encoding,
        +               boolean interactive)
        +        throws java.io.IOException
        +
        Constructor for interactive usage with stdin/stdout
        +
        +
        Parameters:
        +
        encoding - is applied to other files read in or written out (but + not to stdin or stdout). + Null will use your env+JVM settings.
        +
        interactive - If true, prompts are printed, the interactive + Special commands are enabled, and + continueOnError defaults to true.
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        See Also:
        +
        SqlFile(Reader, String, PrintStream, String, boolean, File)
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.io.Reader reader,
        +               java.lang.String inputStreamLabel,
        +               java.io.PrintStream psStd,
        +               java.lang.String encoding,
        +               boolean interactive,
        +               java.io.File atBaseFile)
        +        throws java.io.IOException
        +
        Legacy constructor. See following constructor for documentation.
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        SqlFile

        +
        public SqlFile​(java.io.Reader reader,
        +               java.lang.String inputStreamLabel,
        +               java.io.PrintStream psStd,
        +               java.lang.String encoding,
        +               boolean interactive,
        +               java.net.URL atBase)
        +        throws java.io.IOException
        +
        Instantiate a SqlFile instance for SQL input from 'reader'. + + After any needed customization, the SQL can be executed by the + execute method. +

        + Most Special Commands and many Buffer commands are only for + interactive use. +

        + This program never writes to an error stream (stderr or alternative). + All meta messages and error messages are written using the logging + facility. +

        +
        +
        Parameters:
        +
        reader - Source for the SQL to be executed. + Caller is responsible for setting up encoding. + (the 'encoding' parameter will NOT be applied + to this reader).
        +
        inputStreamLabel - the lable
        +
        psStd - PrintStream for normal output. + If null, normal output will be discarded. + Caller is responsible for settingup encoding + (the 'encoding' parameter will NOT be applied + to this stream).
        +
        encoding - the encoding
        +
        interactive - If true, prompts are printed, the interactive + Special commands are enabled, and + continueOnError defaults to true.
        +
        atBase - the base dir
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        See Also:
        +
        execute()
        +
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setConnection

        +
        public void setConnection​(java.sql.Connection jdbcConn)
        +
      • +
      + + + +
        +
      • +

        getConnection

        +
        public java.sql.Connection getConnection()
        +
      • +
      + + + +
        +
      • +

        setContinueOnError

        +
        public void setContinueOnError​(boolean continueOnError)
        +
      • +
      + + + +
        +
      • +

        setMaxHistoryLength

        +
        public void setMaxHistoryLength​(int maxHistoryLength)
        +
      • +
      + + + +
        +
      • +

        addMacros

        +
        public void addMacros​(java.util.Map<java.lang.String,​org.hsqldb.cmdline.sqltool.Token> newMacros)
        +
      • +
      + + + +
        +
      • +

        addUserVars

        +
        public void addUserVars​(java.util.Map<java.lang.String,​java.lang.String> newUserVars)
        +
      • +
      + + + +
        +
      • +

        getUserVars

        +
        public java.util.Map<java.lang.String,​java.lang.String> getUserVars()
        +
        Get a reference to the user variable map. + + Since you are getting a reference to the private map used inside this + class, update this map with great caution and attention to lifecycle + handling of the variable map.
        +
        +
        Returns:
        +
        user variable map
        +
        +
      • +
      + + + +
        +
      • +

        getMacros

        +
        public java.util.Map<java.lang.String,​org.hsqldb.cmdline.sqltool.Token> getMacros()
        +
      • +
      + + + +
        +
      • +

        setAutoClose

        +
        public void setAutoClose​(boolean autoClose)
        +
        Specify whether the supplied or generated input Reader should + automatically be closed by the execute() method. +

        + execute() will close the Reader by default (i.e. 'autoClose' defaults + to true). + You may want to set this to false if you want to stop execution with + \q or similar, then continue using the Reader or underlying Stream. +

        + The caller is always responsible for closing the output object (if any) + used by SqlFile.

        +
        +
        Parameters:
        +
        autoClose - boolean
        +
        +
      • +
      + + + +
        +
      • +

        execute

        +
        public void execute()
        +             throws SqlToolError,
        +                    java.sql.SQLException
        +
        Process all the commands from the file or Reader associated with + "this" object. + SQL commands in the content get executed against the current JDBC + data source connection.
        +
        +
        Throws:
        +
        java.sql.SQLException - thrown by JDBC driver. + Only possible if in "\c false" mode.
        +
        SqlToolError - all other errors. + This includes QuitNow, BreakException, + ContinueException for recursive calls only.
        +
        +
      • +
      + + + +
        +
      • +

        closeReader

        +
        public void closeReader()
        +
        Close the reader. + + The execute method will run this automatically, by default.
        +
      • +
      + + + + + + + +
        +
      • +

        streamToString

        +
        public java.lang.String streamToString​(java.io.InputStream is,
        +                                       java.lang.String cs)
        +                                throws java.io.IOException
        +
        As the name says... + + This method always closes the input stream.
        +
        +
        Parameters:
        +
        is - InputStream
        +
        cs - String
        +
        Returns:
        +
        String
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        +
      • +
      + + + +
        +
      • +

        streamToBytes

        +
        public static byte[] streamToBytes​(java.io.InputStream is)
        +                            throws java.io.IOException
        +
        As the name says...
        +
        +
        Parameters:
        +
        is - input
        +
        Returns:
        +
        byte[]
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        +
      • +
      + + + +
        +
      • +

        loadBinary

        +
        public static byte[] loadBinary​(java.io.File binFile)
        +                         throws java.io.IOException
        +
        Legacy function. + See following function for documentation.
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        loadBinary

        +
        public static byte[] loadBinary​(java.net.URL binUrl)
        +                         throws java.io.IOException
        +
        Binary file load
        +
        +
        Parameters:
        +
        binUrl - url
        +
        Returns:
        +
        The bytes which are the content of the file
        +
        Throws:
        +
        java.io.IOException - on read errors
        +
        +
      • +
      + + + +
        +
      • +

        canDisplayType

        +
        public static boolean canDisplayType​(int i)
        +
        This method is used to tell SqlFile whether this Sql Type must + ALWAYS be loaded to the binary buffer without displaying. +

        + N.b.: If this returns "true" for a type, then the user can never + "see" values for these columns. + Therefore, if a type may-or-may-not-be displayable, better to return + false here and let the user choose. + In general, if there is a toString() operator for this Sql Type + then return false, since the JDBC driver should know how to make the + value displayable. +

        +
        +
        Parameters:
        +
        i - JDBC type number
        +
        Returns:
        +
        boolean
        +
        See Also:
        +
        http://java.sun.com/docs/books/tutorial/jdbc/basics/retrieving.html + The table on this page lists the most common SqlTypes, all of which + must implement toString(), +Types
        +
        +
      • +
      + + + +
        +
      • +

        sqlTypeToString

        +
        public static java.lang.String sqlTypeToString​(int i)
        +
        Return a String representation of the specified java.sql.Types type.
        +
        +
        Parameters:
        +
        i - int
        +
        Returns:
        +
        String
        +
        +
      • +
      + + + +
        +
      • +

        dsvSafe

        +
        public void dsvSafe​(java.lang.String s)
        +             throws SqlToolError
        +
        Validate that String is safe to write TO DSV file.
        +
        +
        Parameters:
        +
        s - String
        +
        Throws:
        +
        SqlToolError - if validation fails.
        +
        +
      • +
      + + + +
        +
      • +

        convertEscapes

        +
        public static java.lang.String convertEscapes​(java.lang.String inString)
        +
        Translates user-supplied escapes into the traditionaly + corresponding binary characters. + + Allowed sequences: +
          +
        • \0\d+ (an octal digit) +
        • \[0-9]\d* (a decimal digit) +
        • \[Xx][0-9]{2} (a hex digit) +
        • \n Newline (Ctrl-J) +
        • \r Carriage return (Ctrl-M) +
        • \t Horizontal tab (Ctrl-I) +
        • \f Form feed (Ctrl-L) +
        + + Java 1.4 String methods will make this into a 1 or 2 line task.
        +
        +
        Parameters:
        +
        inString - input string
        +
        Returns:
        +
        converted string
        +
        +
      • +
      + + + +
        +
      • +

        importDsv

        +
        public void importDsv​(java.net.URL fileUrl,
        +                      java.lang.String skipPrefix)
        +               throws SqlToolError
        +
        Name is self-explanatory.
        +
        +
        Parameters:
        +
        fileUrl - String
        +
        skipPrefix - String
        +
        Throws:
        +
        SqlToolError - Would prefer to throw an internal exception, + but we want this method to have external + visibility.
        +
        +
      • +
      + + + +
        +
      • +

        hexCharOctetsToBytes

        +
        public static byte[] hexCharOctetsToBytes​(java.lang.String hexChars)
        +
        Convert a String to a byte array by interpreting every 2 characters as an + octal byte value.
        +
        +
        Parameters:
        +
        hexChars - String
        +
        Returns:
        +
        byte[]
        +
        +
      • +
      + + + +
        +
      • +

        bitCharsToBytes

        +
        public static byte[] bitCharsToBytes​(java.lang.String hexChars)
        +
        Just a stub for now.
        +
        +
        Parameters:
        +
        hexChars - String
        +
        Returns:
        +
        byte[]
        +
        +
      • +
      + + + +
        +
      • +

        getBanner

        +
        public static java.lang.String getBanner​(java.sql.Connection c)
        +
        Returns a String report for the specified JDBC Connection. For databases + with poor JDBC support, you won't get much detail.
        +
        +
        Parameters:
        +
        c - Connection
        +
        Returns:
        +
        String
        +
        +
      • +
      + + + +
        +
      • +

        escapeHtml

        +
        public static java.lang.String escapeHtml​(java.lang.String s)
        +
        Escaping rules taken from 'Reserved Characters in HTML table at + http://www.w3schools.com/tags/ref_entities.asp
        +
        +
        Parameters:
        +
        s - String
        +
        Returns:
        +
        String
        +
        +
      • +
      + + + +
        +
      • +

        toPaddedString

        +
        public static java.lang.String toPaddedString​(java.lang.String source,
        +                                              int length,
        +                                              char pad,
        +                                              boolean trailing)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolError.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolError.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolError.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolError.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,373 @@ + + + + + +SqlToolError (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Class SqlToolError

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.hsqldb.cmdline.libclone.AppendableException
        • +
        • +
            +
          • org.hsqldb.cmdline.SqlToolError
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class SqlToolError
    +extends org.hsqldb.cmdline.libclone.AppendableException
    +
    Exceptions thrown by the SqlTool system externally to SqlFile. + (As opposed to the nested Exceptions within those classes). + This class is misnamed, because it is not only errors. + When there is time, this file and class should be renamed. +

    + This class has a misleading name and should really be renamed. + It is Java Exception, not a Java Error. +

    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class org.hsqldb.cmdline.libclone.AppendableException

        +appendages, LS
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      SqlToolError() 
      SqlToolError​(java.lang.String s) 
      SqlToolError​(java.lang.String string, + java.lang.Throwable cause) 
      SqlToolError​(java.lang.Throwable cause) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class org.hsqldb.cmdline.libclone.AppendableException

        +appendMessage, getMessage
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SqlToolError

        +
        public SqlToolError​(java.lang.Throwable cause)
        +
      • +
      + + + +
        +
      • +

        SqlToolError

        +
        public SqlToolError()
        +
      • +
      + + + +
        +
      • +

        SqlToolError

        +
        public SqlToolError​(java.lang.String s)
        +
      • +
      + + + +
        +
      • +

        SqlToolError

        +
        public SqlToolError​(java.lang.String string,
        +                    java.lang.Throwable cause)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,606 @@ + + + + + +SqlTool (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Class SqlTool

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hsqldb.cmdline.SqlTool
    • +
    +
  • +
+
+
    +
  • +
    +
    public class SqlTool
    +extends java.lang.Object
    +
    A command-line JDBC SQL tool supporting both interactive and + non-interactive usage. +

    + See JavaDocs for the main method for syntax of how to run from the + command-line. +

    + Programmatic users will usually want to use the objectMain(String[]) method + if they want arguments and behavior exactly like command-line SqlTool. + But in many cases, you will have better control and efficiency by using + the SqlFile class directly. The file + src/org/hsqldb/sample/SqlFileEmbedder.java + in the HSQLDB distribution provides an example for this latter strategy.

    +
    +
    Author:
    +
    Blaine Simpson (blaine dot simpson at admc dot com)
    +
    See Also:
    +
    + The SqlTool chapter of the + HyperSQL Utilities Guide, +main(String[]), +objectMain(String[]), +SqlFile
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class SqlTool.SqlToolException 
      +
    • +
    +
    + +
    + +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      SqlTool() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidmain​(java.lang.String[] args) +
      A static wrapper for objectMain, so that that method may be executed + as a Java "program".
      +
      static voidobjectMain​(java.lang.String[] arg) +
      Connect to a JDBC Database and execute the commands given on + stdin or in SQL file(s).
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_RCFILE

        +
        public static final java.lang.String DEFAULT_RCFILE
        +
      • +
      + + + +
        +
      • +

        SQLTOOLERR_EXITVAL

        +
        public static final int SQLTOOLERR_EXITVAL
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        SYNTAXERR_EXITVAL

        +
        public static final int SYNTAXERR_EXITVAL
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + +
        +
      • +

        INPUTERR_EXITVAL

        +
        public static final int INPUTERR_EXITVAL
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        CONNECTERR_EXITVAL

        +
        public static final int CONNECTERR_EXITVAL
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        LS

        +
        public static final java.lang.String LS
        +
        Platform-specific line separator
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SqlTool

        +
        public SqlTool()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main​(java.lang.String[] args)
        +
        A static wrapper for objectMain, so that that method may be executed + as a Java "program". +

        + Throws only RuntimeExceptions or Errors, because this method is intended + to System.exit() for all but disastrous system problems, for which + the inconvenience of a stack trace would be the least of your worries. +

        + If you don't want SqlTool to System.exit(), then use the method + objectMain() instead of this method.

        +
        +
        Parameters:
        +
        args - arguments
        +
        See Also:
        +
        objectMain(String[])
        +
        +
      • +
      + + + +
        +
      • +

        objectMain

        +
        public static void objectMain​(java.lang.String[] arg)
        +                       throws SqlTool.SqlToolException
        +
        Connect to a JDBC Database and execute the commands given on + stdin or in SQL file(s). +

        + This method is changed for HSQLDB 1.8.0.8 and later to never + System.exit(). + Developers may catch Throwables to handle all fatal situations.

        +
        +
        Parameters:
        +
        arg - Run "java... org.hsqldb.cmdline.SqlTool --help" for syntax.
        +
        Throws:
        +
        SqlTool.SqlToolException - Upon any fatal error, with useful + reason as the exception's message.
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqltoolRB.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqltoolRB.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqltoolRB.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqltoolRB.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,3519 @@ + + + + + +SqltoolRB (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Enum SqltoolRB

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<SqltoolRB>
    • +
    • +
        +
      • org.hsqldb.cmdline.SqltoolRB
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<SqltoolRB>, org.hsqldb.cmdline.libclone.RefCapableRBInterface
    +
    +
    +
    public enum SqltoolRB
    +extends java.lang.Enum<SqltoolRB>
    +implements org.hsqldb.cmdline.libclone.RefCapableRBInterface
    +
    Resource Bundle for SqlTool and associated classes. + + Purpose of this class is to wrap a RefCapablePropertyResourceBundle to + reliably detect any possible use of a missing property key as soon as + this class is clinitted. + The reason for this is to allow us developers to detect all such errors + before end-users ever use this class.
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        SqlTool_syntax

        +
        public static final SqltoolRB SqlTool_syntax
        +
      • +
      + + + +
        +
      • +

        passwordFor_prompt

        +
        public static final SqltoolRB passwordFor_prompt
        +
      • +
      + + + +
        +
      • +

        SqlTool_varset_badformat

        +
        public static final SqltoolRB SqlTool_varset_badformat
        +
      • +
      + + + +
        +
      • +

        SqlTool_abort_continue_mutuallyexclusive

        +
        public static final SqltoolRB SqlTool_abort_continue_mutuallyexclusive
        +
      • +
      + + + +
        +
      • +

        sqltempfile_fail

        +
        public static final SqltoolRB sqltempfile_fail
        +
      • +
      + + + +
        +
      • +

        rcdata_inlineurl_missing

        +
        public static final SqltoolRB rcdata_inlineurl_missing
        +
      • +
      + + + +
        +
      • +

        rcdata_inline_extravars

        +
        public static final SqltoolRB rcdata_inline_extravars
        +
      • +
      + + + +
        +
      • +

        rcdata_driver_conflict

        +
        public static final SqltoolRB rcdata_driver_conflict
        +
      • +
      + + + +
        +
      • +

        rcdata_password_visible

        +
        public static final SqltoolRB rcdata_password_visible
        +
      • +
      + + + +
        +
      • +

        password_readfail

        +
        public static final SqltoolRB password_readfail
        +
      • +
      + + + +
        +
      • +

        connection_fail

        +
        public static final SqltoolRB connection_fail
        +
      • +
      + + + +
        +
      • +

        rcdata_genfromvalues_fail

        +
        public static final SqltoolRB rcdata_genfromvalues_fail
        +
      • +
      + + + +
        +
      • +

        conndata_retrieval_fail

        +
        public static final SqltoolRB conndata_retrieval_fail
        +
      • +
      + + + +
        +
      • +

        jdbc_established

        +
        public static final SqltoolRB jdbc_established
        +
      • +
      + + + +
        +
      • +

        SqlTool_params_redundant

        +
        public static final SqltoolRB SqlTool_params_redundant
        +
      • +
      + + + +
        +
      • +

        SqlFile_banner

        +
        public static final SqltoolRB SqlFile_banner
        +
      • +
      + + + +
        +
      • +

        buffer_help

        +
        public static final SqltoolRB buffer_help
        +
      • +
      + + + +
        +
      • +

        special_help

        +
        public static final SqltoolRB special_help
        +
      • +
      + + + +
        +
      • +

        pl_help

        +
        public static final SqltoolRB pl_help
        +
      • +
      + + + +
        +
      • +

        pl_control

        +
        public static final SqltoolRB pl_control
        +
      • +
      + + + +
        +
      • +

        pl_assign

        +
        public static final SqltoolRB pl_assign
        +
      • +
      + + + +
        +
      • +

        dsv_options

        +
        public static final SqltoolRB dsv_options
        +
      • +
      + + + +
        +
      • +

        d_options

        +
        public static final SqltoolRB d_options
        +
      • +
      + + + +
        +
      • +

        raw_leadin

        +
        public static final SqltoolRB raw_leadin
        +
      • +
      + + + +
        +
      • +

        errorat

        +
        public static final SqltoolRB errorat
        +
      • +
      + + + +
        +
      • +

        rejectreport_top

        +
        public static final SqltoolRB rejectreport_top
        +
      • +
      + + + +
        +
      • +

        rejectreport_row

        +
        public static final SqltoolRB rejectreport_row
        +
      • +
      + + + +
        +
      • +

        rejectreport_bottom

        +
        public static final SqltoolRB rejectreport_bottom
        +
      • +
      + + + +
        +
      • +

        macro_help

        +
        public static final SqltoolRB macro_help
        +
      • +
      + + + +
        +
      • +

        rawmode_prompt

        +
        public static final SqltoolRB rawmode_prompt
        +
      • +
      + + + +
        +
      • +

        raw_movedtobuffer

        +
        public static final SqltoolRB raw_movedtobuffer
        +
      • +
      + + + +
        +
      • +

        input_movedtobuffer

        +
        public static final SqltoolRB input_movedtobuffer
        +
      • +
      + + + +
        +
      • +

        sqlstatement_empty

        +
        public static final SqltoolRB sqlstatement_empty
        +
      • +
      + + + +
        +
      • +

        causereport

        +
        public static final SqltoolRB causereport
        +
      • +
      + + + +
        +
      • +

        break_unsatisfied

        +
        public static final SqltoolRB break_unsatisfied
        +
      • +
      + + + +
        +
      • +

        continue_unsatisfied

        +
        public static final SqltoolRB continue_unsatisfied
        +
      • +
      + + + +
        +
      • +

        primaryinput_accessfail

        +
        public static final SqltoolRB primaryinput_accessfail
        +
      • +
      + + + +
        +
      • +

        input_unterminated

        +
        public static final SqltoolRB input_unterminated
        +
      • +
      + + + +
        +
      • +

        plvar_set_incomplete

        +
        public static final SqltoolRB plvar_set_incomplete
        +
      • +
      + + + +
        +
      • +

        aborting

        +
        public static final SqltoolRB aborting
        +
      • +
      + + + +
        +
      • +

        rollingback

        +
        public static final SqltoolRB rollingback
        +
      • +
      + + + +
        +
      • +

        special_unspecified

        +
        public static final SqltoolRB special_unspecified
        +
      • +
      + + + +
        +
      • +

        bufhist_unspecified

        +
        public static final SqltoolRB bufhist_unspecified
        +
      • +
      + + + +
        +
      • +

        buffer_executing

        +
        public static final SqltoolRB buffer_executing
        +
      • +
      + + + +
        +
      • +

        nobuffer_yet

        +
        public static final SqltoolRB nobuffer_yet
        +
      • +
      + + + +
        +
      • +

        commandnum_malformat

        +
        public static final SqltoolRB commandnum_malformat
        +
      • +
      + + + +
        +
      • +

        buffer_restored

        +
        public static final SqltoolRB buffer_restored
        +
      • +
      + + + +
        +
      • +

        substitution_malformat

        +
        public static final SqltoolRB substitution_malformat
        +
      • +
      + + + +
        +
      • +

        substitution_nomatch

        +
        public static final SqltoolRB substitution_nomatch
        +
      • +
      + + + +
        +
      • +

        substitution_syntax

        +
        public static final SqltoolRB substitution_syntax
        +
      • +
      + + + +
        +
      • +

        buffer_unknown

        +
        public static final SqltoolRB buffer_unknown
        +
      • +
      + + + +
        +
      • +

        special_extrachars

        +
        public static final SqltoolRB special_extrachars
        +
      • +
      + + + +
        +
      • +

        buffer_extrachars

        +
        public static final SqltoolRB buffer_extrachars
        +
      • +
      + + + +
        +
      • +

        special_malformat

        +
        public static final SqltoolRB special_malformat
        +
      • +
      + + + +
        +
      • +

        html_mode

        +
        public static final SqltoolRB html_mode
        +
      • +
      + + + +
        +
      • +

        dsv_targetfile_demand

        +
        public static final SqltoolRB dsv_targetfile_demand
        +
      • +
      + + + +
        +
      • +

        file_wrotechars

        +
        public static final SqltoolRB file_wrotechars
        +
      • +
      + + + +
        +
      • +

        file_writefail

        +
        public static final SqltoolRB file_writefail
        +
      • +
      + + + +
        +
      • +

        special_d_like

        +
        public static final SqltoolRB special_d_like
        +
      • +
      + + + +
        +
      • +

        outputfile_nonetoclose

        +
        public static final SqltoolRB outputfile_nonetoclose
        +
      • +
      + + + +
        +
      • +

        outputfile_reopening

        +
        public static final SqltoolRB outputfile_reopening
        +
      • +
      + + + +
        +
      • +

        outputfile_header

        +
        public static final SqltoolRB outputfile_header
        +
      • +
      + + + +
        +
      • +

        destfile_demand

        +
        public static final SqltoolRB destfile_demand
        +
      • +
      + + + +
        +
      • +

        buffer_empty

        +
        public static final SqltoolRB buffer_empty
        +
      • +
      + + + +
        +
      • +

        file_appendfail

        +
        public static final SqltoolRB file_appendfail
        +
      • +
      + + + +
        +
      • +

        sqlfile_name_demand

        +
        public static final SqltoolRB sqlfile_name_demand
        +
      • +
      + + + +
        +
      • +

        sqlfile_execute_fail

        +
        public static final SqltoolRB sqlfile_execute_fail
        +
      • +
      + + + +
        +
      • +

        a_setting

        +
        public static final SqltoolRB a_setting
        +
      • +
      + + + +
        +
      • +

        committed

        +
        public static final SqltoolRB committed
        +
      • +
      + + + +
        +
      • +

        special_b_malformat

        +
        public static final SqltoolRB special_b_malformat
        +
      • +
      + + + +
        +
      • +

        binary_loadedbytesinto

        +
        public static final SqltoolRB binary_loadedbytesinto
        +
      • +
      + + + +
        +
      • +

        binary_filefail

        +
        public static final SqltoolRB binary_filefail
        +
      • +
      + + + +
        +
      • +

        c_setting

        +
        public static final SqltoolRB c_setting
        +
      • +
      + + + +
        +
      • +

        bang_incomplete

        +
        public static final SqltoolRB bang_incomplete
        +
      • +
      + + + +
        +
      • +

        bang_command_fail

        +
        public static final SqltoolRB bang_command_fail
        +
      • +
      + + + +
        +
      • +

        special_unknown

        +
        public static final SqltoolRB special_unknown
        +
      • +
      + + + +
        +
      • +

        dsv_m_syntax

        +
        public static final SqltoolRB dsv_m_syntax
        +
      • +
      + + + +
        +
      • +

        dsv_x_syntax

        +
        public static final SqltoolRB dsv_x_syntax
        +
      • +
      + + + +
        +
      • +

        raw_empty

        +
        public static final SqltoolRB raw_empty
        +
      • +
      + + + +
        +
      • +

        dsv_nocolsleft

        +
        public static final SqltoolRB dsv_nocolsleft
        +
      • +
      + + + +
        +
      • +

        dsv_skipcols_missing

        +
        public static final SqltoolRB dsv_skipcols_missing
        +
      • +
      + + + +
        +
      • +

        plalias_malformat

        +
        public static final SqltoolRB plalias_malformat
        +
      • +
      + + + +
        +
      • +

        plvar_undefined

        +
        public static final SqltoolRB plvar_undefined
        +
      • +
      + + + +
        +
      • +

        sysprop_empty

        +
        public static final SqltoolRB sysprop_empty
        +
      • +
      + + + +
        +
      • +

        sysprop_unterminated

        +
        public static final SqltoolRB sysprop_unterminated
        +
      • +
      + + + +
        +
      • +

        sysprop_undefined

        +
        public static final SqltoolRB sysprop_undefined
        +
      • +
      + + + +
        +
      • +

        var_infinite

        +
        public static final SqltoolRB var_infinite
        +
      • +
      + + + +
        +
      • +

        plvar_nameempty

        +
        public static final SqltoolRB plvar_nameempty
        +
      • +
      + + + +
        +
      • +

        plvar_unterminated

        +
        public static final SqltoolRB plvar_unterminated
        +
      • +
      + + + +
        +
      • +

        pl_malformat

        +
        public static final SqltoolRB pl_malformat
        +
      • +
      + + + +
        +
      • +

        deprecated_noop

        +
        public static final SqltoolRB deprecated_noop
        +
      • +
      + + + +
        +
      • +

        end_noblock

        +
        public static final SqltoolRB end_noblock
        +
      • +
      + + + +
        +
      • +

        continue_syntax

        +
        public static final SqltoolRB continue_syntax
        +
      • +
      + + + +
        +
      • +

        break_syntax

        +
        public static final SqltoolRB break_syntax
        +
      • +
      + + + +
        +
      • +

        pl_list_parens

        +
        public static final SqltoolRB pl_list_parens
        +
      • +
      + + + +
        +
      • +

        pl_list_lengths

        +
        public static final SqltoolRB pl_list_lengths
        +
      • +
      + + + +
        +
      • +

        dumpload_malformat

        +
        public static final SqltoolRB dumpload_malformat
        +
      • +
      + + + +
        +
      • +

        plvar_nocolon

        +
        public static final SqltoolRB plvar_nocolon
        +
      • +
      + + + +
        +
      • +

        plvar_tildedash_nomoreargs

        +
        public static final SqltoolRB plvar_tildedash_nomoreargs
        +
      • +
      + + + +
        +
      • +

        dumpload_fail

        +
        public static final SqltoolRB dumpload_fail
        +
      • +
      + + + +
        +
      • +

        pl_malformat_specific

        +
        public static final SqltoolRB pl_malformat_specific
        +
      • +
      + + + +
        +
      • +

        pl_block_fail

        +
        public static final SqltoolRB pl_block_fail
        +
      • +
      + + + +
        +
      • +

        ifwhile_malformat

        +
        public static final SqltoolRB ifwhile_malformat
        +
      • +
      + + + +
        +
      • +

        pl_unknown

        +
        public static final SqltoolRB pl_unknown
        +
      • +
      + + + +
        +
      • +

        pl_block_unterminated

        +
        public static final SqltoolRB pl_block_unterminated
        +
      • +
      + + + +
        +
      • +

        vendor_oracle_dS

        +
        public static final SqltoolRB vendor_oracle_dS
        +
      • +
      + + + +
        +
      • +

        vendor_derby_dr

        +
        public static final SqltoolRB vendor_derby_dr
        +
      • +
      + + + +
        +
      • +

        vendor_nosup_d

        +
        public static final SqltoolRB vendor_nosup_d
        +
      • +
      + + + +
        +
      • +

        vendor_derby_du

        +
        public static final SqltoolRB vendor_derby_du
        +
      • +
      + + + +
        +
      • +

        special_d_unknown

        +
        public static final SqltoolRB special_d_unknown
        +
      • +
      + + + +
        +
      • +

        metadata_fetch_fail

        +
        public static final SqltoolRB metadata_fetch_fail
        +
      • +
      + + + +
        +
      • +

        metadata_fetch_failfor

        +
        public static final SqltoolRB metadata_fetch_failfor
        +
      • +
      + + + +
        +
      • +

        prepare_demandqm

        +
        public static final SqltoolRB prepare_demandqm
        +
      • +
      + + + +
        +
      • +

        binbuffer_empty

        +
        public static final SqltoolRB binbuffer_empty
        +
      • +
      + + + +
        +
      • +

        vendor_nosup_sysschemas

        +
        public static final SqltoolRB vendor_nosup_sysschemas
        +
      • +
      + + + +
        +
      • +

        noresult

        +
        public static final SqltoolRB noresult
        +
      • +
      + + + +
        +
      • +

        dsv_bincol

        +
        public static final SqltoolRB dsv_bincol
        +
      • +
      + + + +
        +
      • +

        binbuf_write

        +
        public static final SqltoolRB binbuf_write
        +
      • +
      + + + +
        +
      • +

        rows_fetched

        +
        public static final SqltoolRB rows_fetched
        +
      • +
      + + + +
        +
      • +

        rows_fetched_dsv

        +
        public static final SqltoolRB rows_fetched_dsv
        +
      • +
      + + + +
        +
      • +

        row_update_singular

        +
        public static final SqltoolRB row_update_singular
        +
      • +
      + + + +
        +
      • +

        row_update_multiple

        +
        public static final SqltoolRB row_update_multiple
        +
      • +
      + + + +
        +
      • +

        history_unavailable

        +
        public static final SqltoolRB history_unavailable
        +
      • +
      + + + +
        +
      • +

        history_none

        +
        public static final SqltoolRB history_none
        +
      • +
      + + + +
        +
      • +

        editbuffer_contents

        +
        public static final SqltoolRB editbuffer_contents
        +
      • +
      + + + +
        +
      • +

        buffer_instructions

        +
        public static final SqltoolRB buffer_instructions
        +
      • +
      + + + +
        +
      • +

        history_number_req

        +
        public static final SqltoolRB history_number_req
        +
      • +
      + + + +
        +
      • +

        history_backto

        +
        public static final SqltoolRB history_backto
        +
      • +
      + + + +
        +
      • +

        history_upto

        +
        public static final SqltoolRB history_upto
        +
      • +
      + + + +
        +
      • +

        history_back

        +
        public static final SqltoolRB history_back
        +
      • +
      + + + +
        +
      • +

        describe_table_name

        +
        public static final SqltoolRB describe_table_name
        +
      • +
      + + + +
        +
      • +

        describe_table_datatype

        +
        public static final SqltoolRB describe_table_datatype
        +
      • +
      + + + +
        +
      • +

        describe_table_width

        +
        public static final SqltoolRB describe_table_width
        +
      • +
      + + + +
        +
      • +

        describe_table_nonulls

        +
        public static final SqltoolRB describe_table_nonulls
        +
      • +
      + + + +
        +
      • +

        describe_table_precision

        +
        public static final SqltoolRB describe_table_precision
        +
      • +
      + + + +
        +
      • +

        describe_table_scale

        +
        public static final SqltoolRB describe_table_scale
        +
      • +
      + + + +
        +
      • +

        logical_unrecognized

        +
        public static final SqltoolRB logical_unrecognized
        +
      • +
      + + + +
        +
      • +

        read_toobig

        +
        public static final SqltoolRB read_toobig
        +
      • +
      + + + +
        +
      • +

        read_partial

        +
        public static final SqltoolRB read_partial
        +
      • +
      + + + +
        +
      • +

        read_convertfail

        +
        public static final SqltoolRB read_convertfail
        +
      • +
      + + + +
        +
      • +

        dsv_coldelim_present

        +
        public static final SqltoolRB dsv_coldelim_present
        +
      • +
      + + + +
        +
      • +

        dsv_rowdelim_present

        +
        public static final SqltoolRB dsv_rowdelim_present
        +
      • +
      + + + +
        +
      • +

        dsv_nullrep_present

        +
        public static final SqltoolRB dsv_nullrep_present
        +
      • +
      + + + +
        +
      • +

        dsv_constcols_nullcol

        +
        public static final SqltoolRB dsv_constcols_nullcol
        +
      • +
      + + + +
        +
      • +

        file_readfail

        +
        public static final SqltoolRB file_readfail
        +
      • +
      + + + +
        +
      • +

        inputfile_closefail

        +
        public static final SqltoolRB inputfile_closefail
        +
      • +
      + + + +
        +
      • +

        dsv_header_none

        +
        public static final SqltoolRB dsv_header_none
        +
      • +
      + + + +
        +
      • +

        dsv_header_noswitchtarg

        +
        public static final SqltoolRB dsv_header_noswitchtarg
        +
      • +
      + + + +
        +
      • +

        dsv_header_noswitchmatch

        +
        public static final SqltoolRB dsv_header_noswitchmatch
        +
      • +
      + + + +
        +
      • +

        dsv_header_nonswitched

        +
        public static final SqltoolRB dsv_header_nonswitched
        +
      • +
      + + + +
        +
      • +

        dsv_nocolheader

        +
        public static final SqltoolRB dsv_nocolheader
        +
      • +
      + + + +
        +
      • +

        dsv_metadata_mismatch

        +
        public static final SqltoolRB dsv_metadata_mismatch
        +
      • +
      + + + +
        +
      • +

        query_metadatafail

        +
        public static final SqltoolRB query_metadatafail
        +
      • +
      + + + +
        +
      • +

        dsv_rejectfile_setupfail

        +
        public static final SqltoolRB dsv_rejectfile_setupfail
        +
      • +
      + + + +
        +
      • +

        dsv_rejectreport_setupfail

        +
        public static final SqltoolRB dsv_rejectreport_setupfail
        +
      • +
      + + + +
        +
      • +

        none

        +
        public static final SqltoolRB none
        +
      • +
      + + + +
        +
      • +

        insertion_preparefail

        +
        public static final SqltoolRB insertion_preparefail
        +
      • +
      + + + +
        +
      • +

        dsv_header_matchernonhead

        +
        public static final SqltoolRB dsv_header_matchernonhead
        +
      • +
      + + + +
        +
      • +

        dsv_colcount_mismatch

        +
        public static final SqltoolRB dsv_colcount_mismatch
        +
      • +
      + + + +
        +
      • +

        dsv_insertcol_mismatch

        +
        public static final SqltoolRB dsv_insertcol_mismatch
        +
      • +
      + + + +
        +
      • +

        time_bad

        +
        public static final SqltoolRB time_bad
        +
      • +
      + + + +
        +
      • +

        boolean_bad

        +
        public static final SqltoolRB boolean_bad
        +
      • +
      + + + +
        +
      • +

        inputrec_modified

        +
        public static final SqltoolRB inputrec_modified
        +
      • +
      + + + +
        +
      • +

        dsv_recin_fail

        +
        public static final SqltoolRB dsv_recin_fail
        +
      • +
      + + + +
        +
      • +

        dsv_import_summary

        +
        public static final SqltoolRB dsv_import_summary
        +
      • +
      + + + +
        +
      • +

        insertions_notcommitted

        +
        public static final SqltoolRB insertions_notcommitted
        +
      • +
      + + + +
        +
      • +

        autocommit_fetchfail

        +
        public static final SqltoolRB autocommit_fetchfail
        +
      • +
      + + + +
        +
      • +

        dsv_rejectfile_purgefail

        +
        public static final SqltoolRB dsv_rejectfile_purgefail
        +
      • +
      + + + +
        +
      • +

        dsv_rejectreport_purgefail

        +
        public static final SqltoolRB dsv_rejectreport_purgefail
        +
      • +
      + + + +
        +
      • +

        edit_malformat

        +
        public static final SqltoolRB edit_malformat
        +
      • +
      + + + +
        +
      • +

        input_malformat

        +
        public static final SqltoolRB input_malformat
        +
      • +
      + + + +
        +
      • +

        append_empty

        +
        public static final SqltoolRB append_empty
        +
      • +
      + + + +
        +
      • +

        transiso_report

        +
        public static final SqltoolRB transiso_report
        +
      • +
      + + + +
        +
      • +

        exectime_reporting

        +
        public static final SqltoolRB exectime_reporting
        +
      • +
      + + + +
        +
      • +

        exectime_report

        +
        public static final SqltoolRB exectime_report
        +
      • +
      + + + +
        +
      • +

        regex_malformat

        +
        public static final SqltoolRB regex_malformat
        +
      • +
      + + + +
        +
      • +

        encode_fail

        +
        public static final SqltoolRB encode_fail
        +
      • +
      + + + +
        +
      • +

        macro_tip

        +
        public static final SqltoolRB macro_tip
        +
      • +
      + + + +
        +
      • +

        macrodef_malformat

        +
        public static final SqltoolRB macrodef_malformat
        +
      • +
      + + + +
        +
      • +

        macrodef_empty

        +
        public static final SqltoolRB macrodef_empty
        +
      • +
      + + + +
        +
      • +

        macrodef_semi

        +
        public static final SqltoolRB macrodef_semi
        +
      • +
      + + + +
        +
      • +

        macro_malformat

        +
        public static final SqltoolRB macro_malformat
        +
      • +
      + + + +
        +
      • +

        macro_undefined

        +
        public static final SqltoolRB macro_undefined
        +
      • +
      + + + +
        +
      • +

        log_syntax

        +
        public static final SqltoolRB log_syntax
        +
      • +
      + + + +
        +
      • +

        log_syntax_error

        +
        public static final SqltoolRB log_syntax_error
        +
      • +
      + + + +
        +
      • +

        reject_rpc

        +
        public static final SqltoolRB reject_rpc
        +
      • +
      + + + +
        +
      • +

        rpc_autocommit_failure

        +
        public static final SqltoolRB rpc_autocommit_failure
        +
      • +
      + + + +
        +
      • +

        rpc_commit_failure

        +
        public static final SqltoolRB rpc_commit_failure
        +
      • +
      + + + +
        +
      • +

        disconnect_success

        +
        public static final SqltoolRB disconnect_success
        +
      • +
      + + + +
        +
      • +

        disconnect_failure

        +
        public static final SqltoolRB disconnect_failure
        +
      • +
      + + + +
        +
      • +

        no_required_conn

        +
        public static final SqltoolRB no_required_conn
        +
      • +
      + + + +
        +
      • +

        disconnected_msg

        +
        public static final SqltoolRB disconnected_msg
        +
      • +
      + + + +
        +
      • +

        connected_fallbackmsg

        +
        public static final SqltoolRB connected_fallbackmsg
        +
      • +
      + + + +
        +
      • +

        no_vendor_schemaspt

        +
        public static final SqltoolRB no_vendor_schemaspt
        +
      • +
      + + + +
        +
      • +

        schemaname_retrieval_fail

        +
        public static final SqltoolRB schemaname_retrieval_fail
        +
      • +
      + + + +
        +
      • +

        remove_empty_vars_suggestset

        +
        public static final SqltoolRB remove_empty_vars_suggestset
        +
      • +
      + + + +
        +
      • +

        auto_unset_warning

        +
        public static final SqltoolRB auto_unset_warning
        +
      • +
      + + + +
        +
      • +

        pl_unset_nomoreargs

        +
        public static final SqltoolRB pl_unset_nomoreargs
        +
      • +
      + + + +
        +
      • +

        dsv_q_nodblquote

        +
        public static final SqltoolRB dsv_q_nodblquote
        +
      • +
      + + + +
        +
      • +

        connect_failure

        +
        public static final SqltoolRB connect_failure
        +
      • +
      + + + +
        +
      • +

        streamread_failure

        +
        public static final SqltoolRB streamread_failure
        +
      • +
      + + + +
        +
      • +

        illegal_at

        +
        public static final SqltoolRB illegal_at
        +
      • +
      + + + +
        +
      • +

        suggest_j

        +
        public static final SqltoolRB suggest_j
        +
      • +
      + + + +
        +
      • +

        pipeclose_failure

        +
        public static final SqltoolRB pipeclose_failure
        +
      • +
      + + + +
        +
      • +

        arrayimp_jvmreq

        +
        public static final SqltoolRB arrayimp_jvmreq
        +
      • +
      + + + +
        +
      • +

        arrayval_malformat

        +
        public static final SqltoolRB arrayval_malformat
        +
      • +
      + + + +
        +
      • +

        sqlarray_badjvm

        +
        public static final SqltoolRB sqlarray_badjvm
        +
      • +
      + + + +
        +
      • +

        csv_coldelim_present

        +
        public static final SqltoolRB csv_coldelim_present
        +
      • +
      + + + +
        +
      • +

        csv_quote_unterminated

        +
        public static final SqltoolRB csv_quote_unterminated
        +
      • +
      + + + +
        +
      • +

        math_expr_fail

        +
        public static final SqltoolRB math_expr_fail
        +
      • +
      + + + +
        +
      • +

        varname_warning

        +
        public static final SqltoolRB varname_warning
        +
      • +
      + + + +
        +
      • +

        null_assignment

        +
        public static final SqltoolRB null_assignment
        +
      • +
      + + + +
        +
      • +

        bad_time_format

        +
        public static final SqltoolRB bad_time_format
        +
      • +
      + + + +
        +
      • +

        no_timestamp_format

        +
        public static final SqltoolRB no_timestamp_format
        +
      • +
      + + + +
        +
      • +

        else_without_if

        +
        public static final SqltoolRB else_without_if
        +
      • +
      + + + +
        +
      • +

        import_col_dup

        +
        public static final SqltoolRB import_col_dup
        +
      • +
      + + + +
        +
      • +

        desturl_nowrite

        +
        public static final SqltoolRB desturl_nowrite
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static SqltoolRB[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (SqltoolRB c : SqltoolRB.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static SqltoolRB valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString()
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<SqltoolRB>
        +
        +
      • +
      + + + +
        +
      • +

        getExpandedString

        +
        public java.lang.String getExpandedString()
        +
        +
        Specified by:
        +
        getExpandedString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getExpandedString

        +
        public java.lang.String getExpandedString​(java.lang.String... strings)
        +
        +
        Specified by:
        +
        getExpandedString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(java.lang.Throwable t)
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(java.lang.String... strings)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1,
        +                                  int i2)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1,
        +                                  int i2,
        +                                  int i3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1,
        +                                  java.lang.String s2)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(java.lang.String s1,
        +                                  int i2)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1,
        +                                  int i2,
        +                                  java.lang.String s3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1,
        +                                  java.lang.String s2,
        +                                  int i3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(java.lang.String s1,
        +                                  int i2,
        +                                  int i3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(int i1,
        +                                  java.lang.String s2,
        +                                  java.lang.String s3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(java.lang.String s1,
        +                                  java.lang.String s2,
        +                                  int i3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        public java.lang.String getString​(java.lang.String s1,
        +                                  int i2,
        +                                  java.lang.String s3)
        +
        +
        Specified by:
        +
        getString in interface org.hsqldb.cmdline.libclone.RefCapableRBInterface
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolSprayer.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolSprayer.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolSprayer.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlToolSprayer.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,368 @@ + + + + + +SqlToolSprayer (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Class SqlToolSprayer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hsqldb.cmdline.SqlToolSprayer
    • +
    +
  • +
+
+
    +
  • +
    +
    public class SqlToolSprayer
    +extends java.lang.Object
    +
    Sql Tool Sprayer. + Invokes SqlTool.objectMain() multiple times with the same SQL. + Invokes for multiple urlids and/or retries. + + See JavaDocs for the main method for syntax of how to run. + + System properties used if set: +
      +
    • sqltoolsprayer.period (in ms.)
    • +
    • sqltoolsprayer.maxtime (in ms.)
    • +
    • sqltoolsprayer.rcfile (filepath)
    • +
    +
    +
    Author:
    +
    Blaine Simpson (blaine dot simpson at admc dot com)
    +
    See Also:
    +
    main(String[])
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringLS 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      SqlToolSprayer() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidmain​(java.lang.String[] sa) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        LS

        +
        public static final java.lang.String LS
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SqlToolSprayer

        +
        public SqlToolSprayer()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main​(java.lang.String[] sa)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.SqlToolException.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.SqlToolException.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.SqlToolException.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/org.hsqldb.sqltool/org/hsqldb/cmdline/SqlTool.SqlToolException.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,253 @@ + + + + + +SqlTool.SqlToolException (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ + +

Class SqlTool.SqlToolException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • org.hsqldb.cmdline.SqlTool.SqlToolException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    SqlTool
    +
    +
    +
    public static class SqlTool.SqlToolException
    +extends java.lang.Exception
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/overview-tree.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/overview-tree.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/overview-tree.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/overview-tree.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,195 @@ + + + + + +Class Hierarchy (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) +
        +
      • org.hsqldb.cmdline.SqltoolRB (implements org.hsqldb.cmdline.libclone.RefCapableRBInterface)
      • +
      +
    • +
    +
  • +
+
+
+
+
+ +

Copyright © 2001 - 2022 HSQL Development Group.

+
+ + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/package-search-index.js hsqldb-2.7.0/hsqldb/doc/apidocssqltool/package-search-index.js --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/package-search-index.js 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/package-search-index.js 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","url":"allpackages-index.html"},{"m":"org.hsqldb.sqltool","l":"org.hsqldb.cmdline"}] \ No newline at end of file Binary files /tmp/tmp_0bpm_7m/9POo46eOkt/hsqldb-2.6.1/hsqldb/doc/apidocssqltool/resources/glass.png and /tmp/tmp_0bpm_7m/lrkf8so7nm/hsqldb-2.7.0/hsqldb/doc/apidocssqltool/resources/glass.png differ Binary files /tmp/tmp_0bpm_7m/9POo46eOkt/hsqldb-2.6.1/hsqldb/doc/apidocssqltool/resources/x.png and /tmp/tmp_0bpm_7m/lrkf8so7nm/hsqldb-2.7.0/hsqldb/doc/apidocssqltool/resources/x.png differ diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/script.js hsqldb-2.7.0/hsqldb/doc/apidocssqltool/script.js --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/script.js 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/script.js 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'jquery/jszip/dist/jszip.js'); + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js'); + if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 || + window.navigator.userAgent.indexOf('Edge/') > 0) { + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js'); + } + createElem(doc, tag, 'search.js'); + + $.get(pathtoroot + "module-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("module-search-index.json").async("text").then(function(content){ + moduleSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "package-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("package-search-index.json").async("text").then(function(content){ + packageSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "type-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("type-search-index.json").async("text").then(function(content){ + typeSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "member-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("member-search-index.json").async("text").then(function(content){ + memberSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "tag-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("tag-search-index.json").async("text").then(function(content){ + tagSearchIndex = JSON.parse(content); + }); + }); + }); + }); + if (!moduleSearchIndex) { + createElem(doc, tag, 'module-search-index.js'); + } + if (!packageSearchIndex) { + createElem(doc, tag, 'package-search-index.js'); + } + if (!typeSearchIndex) { + createElem(doc, tag, 'type-search-index.js'); + } + if (!memberSearchIndex) { + createElem(doc, tag, 'member-search-index.js'); + } + if (!tagSearchIndex) { + createElem(doc, tag, 'tag-search-index.js'); + } + $(window).resize(function() { + $('.navPadding').css('padding-top', $('.fixedNav').css("height")); + }); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(type) { + count = 0; + for (var key in data) { + var row = document.getElementById(key); + if ((data[key] & type) !== 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) { + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} + +function updateModuleFrame(pFrame, cFrame) { + top.packageFrame.location = pFrame; + top.classFrame.location = cFrame; +} diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/search.js hsqldb-2.7.0/hsqldb/doc/apidocssqltool/search.js --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/search.js 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/search.js 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "SearchTags"; +var highlight = "$&"; +var camelCaseRegexp = ""; +var secondaryMatcher = ""; +function getHighlightedText(item) { + var ccMatcher = new RegExp(camelCaseRegexp); + var label = item.replace(ccMatcher, highlight); + if (label === item) { + label = item.replace(secondaryMatcher, highlight); + } + return label; +} +function getURLPrefix(ui) { + var urlPrefix=""; + if (useModuleDirectories) { + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if ((ui.item.category === catTypes && ui.item.p) || ui.item.category === catMembers) { + $.each(packageSearchIndex, function(index, item) { + if (ui.item.p == item.l) { + urlPrefix = item.m + slash; + } + }); + return urlPrefix; + } else { + return urlPrefix; + } + } + return urlPrefix; +} +var watermark = 'Search'; +$(function() { + $("#search").val(''); + $("#search").prop("disabled", false); + $("#reset").prop("disabled", false); + $("#search").val(watermark).addClass('watermark'); + $("#search").blur(function() { + if ($(this).val().length == 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + $("#search").on('click keydown', function() { + if ($(this).val() == watermark) { + $(this).val('').removeClass('watermark'); + } + }); + $("#reset").click(function() { + $("#search").val(''); + $("#search").focus(); + }); + $("#search").focus(); + $("#search")[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this, + currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.l !== noResult.l && item.category !== currentCategory) { + ul.append("
  • " + item.category + "
  • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "resultItem"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "resultItem"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + if (item.category === catModules) { + label = getHighlightedText(item.l); + } else if (item.category === catPackages) { + label = (item.m) + ? getHighlightedText(item.m + "/" + item.l) + : getHighlightedText(item.l); + } else if (item.category === catTypes) { + label = (item.p) + ? getHighlightedText(item.p + "." + item.l) + : getHighlightedText(item.l); + } else if (item.category === catMembers) { + label = getHighlightedText(item.p + "." + (item.c + "." + item.l)); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + div.html(label); + } + return li; + } +}); +$(function() { + $("#search").catcomplete({ + minLength: 1, + delay: 100, + source: function(request, response) { + var result = new Array(); + var presult = new Array(); + var tresult = new Array(); + var mresult = new Array(); + var tgresult = new Array(); + var secondaryresult = new Array(); + var displayCount = 0; + var exactMatcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(request.term) + "$", "i"); + camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join("([a-z0-9_$]*?)"); + var camelCaseMatcher = new RegExp("^" + camelCaseRegexp); + secondaryMatcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); + + // Return the nested innermost name from the specified object + function nestedName(e) { + return e.l.substring(e.l.lastIndexOf(".") + 1); + } + + function concatResults(a1, a2) { + a1 = a1.concat(a2); + a2.length = 0; + return a1; + } + + if (moduleSearchIndex) { + var mdleCount = 0; + $.each(moduleSearchIndex, function(index, item) { + item.category = catModules; + if (exactMatcher.test(item.l)) { + result.push(item); + mdleCount++; + } else if (camelCaseMatcher.test(item.l)) { + result.push(item); + } else if (secondaryMatcher.test(item.l)) { + secondaryresult.push(item); + } + }); + displayCount = mdleCount; + result = concatResults(result, secondaryresult); + } + if (packageSearchIndex) { + var pCount = 0; + var pkg = ""; + $.each(packageSearchIndex, function(index, item) { + item.category = catPackages; + pkg = (item.m) + ? (item.m + "/" + item.l) + : item.l; + if (exactMatcher.test(item.l)) { + presult.push(item); + pCount++; + } else if (camelCaseMatcher.test(pkg)) { + presult.push(item); + } else if (secondaryMatcher.test(pkg)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(presult, secondaryresult)); + displayCount = (pCount > displayCount) ? pCount : displayCount; + } + if (typeSearchIndex) { + var tCount = 0; + $.each(typeSearchIndex, function(index, item) { + item.category = catTypes; + var s = nestedName(item); + if (exactMatcher.test(s)) { + tresult.push(item); + tCount++; + } else if (camelCaseMatcher.test(s)) { + tresult.push(item); + } else if (secondaryMatcher.test(item.p + "." + item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(tresult, secondaryresult)); + displayCount = (tCount > displayCount) ? tCount : displayCount; + } + if (memberSearchIndex) { + var mCount = 0; + $.each(memberSearchIndex, function(index, item) { + item.category = catMembers; + var s = nestedName(item); + if (exactMatcher.test(s)) { + mresult.push(item); + mCount++; + } else if (camelCaseMatcher.test(s)) { + mresult.push(item); + } else if (secondaryMatcher.test(item.c + "." + item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(mresult, secondaryresult)); + displayCount = (mCount > displayCount) ? mCount : displayCount; + } + if (tagSearchIndex) { + var tgCount = 0; + $.each(tagSearchIndex, function(index, item) { + item.category = catSearchTags; + if (exactMatcher.test(item.l)) { + tgresult.push(item); + tgCount++; + } else if (secondaryMatcher.test(item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(tgresult, secondaryresult)); + displayCount = (tgCount > displayCount) ? tgCount : displayCount; + } + displayCount = (displayCount > 500) ? displayCount : 500; + var counter = function() { + var count = {Modules: 0, Packages: 0, Types: 0, Members: 0, SearchTags: 0}; + var f = function(item) { + count[item.category] += 1; + return (count[item.category] <= displayCount); + }; + return f; + }(); + response(result.filter(counter)); + }, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search").empty(); + } + }, + autoFocus: true, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.l !== noResult.l) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + if (useModuleDirectories) { + url += "module-summary.html"; + } else { + url = ui.item.l + "-summary.html"; + } + } else if (ui.item.category === catPackages) { + if (ui.item.url) { + url = ui.item.url; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.url) { + url = ui.item.url; + } else if (ui.item.p === "") { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === "") { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.url) { + url += ui.item.url; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search").focus(); + } + } + }); +}); diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/serialized-form.html hsqldb-2.7.0/hsqldb/doc/apidocssqltool/serialized-form.html --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/serialized-form.html 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/serialized-form.html 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1,197 @@ + + + + + +Serialized Form (HSQLDB 2.7.0 API) + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    +
    + +
    +
    +
    + +

    Copyright © 2001 - 2022 HSQL Development Group.

    +
    + + diff -Nru hsqldb-2.6.1/hsqldb/doc/apidocssqltool/type-search-index.js hsqldb-2.7.0/hsqldb/doc/apidocssqltool/type-search-index.js --- hsqldb-2.6.1/hsqldb/doc/apidocssqltool/type-search-index.js 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/apidocssqltool/type-search-index.js 2022-07-26 20:23:02.000000000 +0000 @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes","url":"allclasses-index.html"},{"p":"org.hsqldb.cmdline","l":"SqlFile.BadSpecial"},{"p":"org.hsqldb.cmdline","l":"SqlFile"},{"p":"org.hsqldb.cmdline","l":"SqlTool"},{"p":"org.hsqldb.cmdline","l":"SqlToolError"},{"p":"org.hsqldb.cmdline","l":"SqlTool.SqlToolException"},{"p":"org.hsqldb.cmdline","l":"SqltoolRB"},{"p":"org.hsqldb.cmdline","l":"SqlToolSprayer"}] \ No newline at end of file diff -Nru hsqldb-2.6.1/hsqldb/doc/changelist_2_0.txt hsqldb-2.7.0/hsqldb/doc/changelist_2_0.txt --- hsqldb-2.6.1/hsqldb/doc/changelist_2_0.txt 2021-10-20 09:34:48.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/changelist_2_0.txt 2022-07-26 20:22:38.000000000 +0000 @@ -1,3 +1,20 @@ +30 May 2022 - version 2.7.0 +-- version 2.7.0 jar requires JRE 11 or later - tested up to Java 17 +-- version 2.7.0 alternative jar requires JRE 8 or later +-- added support for JSON constructor functions +-- added support for microsecond precision CURRENT_TIMESTAMP and similar functions +-- added support for GRANT and REVOKE on all objects in a schema +-- added support for CSV file data import and export +-- added support for regional time zones such as 'America/New_York' in conversions +-- added SET DATABASE SQL MAX RECURSIVE (sql.max_recursive) setting +-- changed the default for SET DATABASE SQL SYS INDEX NAMES (sql.sys_index_names) to true +-- changed the properties reported by JDBC DatabaseMetaDat::getClientInfoProperties() method +-- improved JDBC DatabaseMetaDat::getTablePrivileges() method to cover fine-grained privileges +-- improved error messages for SQL settings statements +-- improved documentation +-- added some minor enhancements +-- fixed a number of reported regressions and bugs (see tracker) + 21 October 2021 - version 2.6.1 -- version 2.6.1 is a bug fix release -- added sql.lowercase_ident property for extra compatibility with PostgreSQL and MySQL unquoted identifier names diff -Nru hsqldb-2.6.1/hsqldb/doc/guide/accesscontrol-chapt.html hsqldb-2.7.0/hsqldb/doc/guide/accesscontrol-chapt.html --- hsqldb-2.6.1/hsqldb/doc/guide/accesscontrol-chapt.html 2021-10-20 09:33:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/guide/accesscontrol-chapt.html 2022-07-26 20:21:48.000000000 +0000 @@ -48,8 +48,8 @@
    - -

    Copyright 2010-2021 Fred Toussi. Permission is granted to + +

    Copyright 2010-2022 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQL Development Group to distribute this document with or without alterations under the @@ -57,7 +57,7 @@

    -

    2021-10-21

    +

    2022-07-26

    @@ -84,6 +84,9 @@ Access Rights
    +Simple Access Control +
    +
    Fine-Grained Data Access Control
    @@ -103,24 +106,27 @@ -

    This chapter is about access control to database objects such as - tables, inside the database engine. Other issues related to security - include user authentication, password complexity and secure connections +

    This chapter is about controlling access to database objects such as + tables and routines. Other topics related to security include user + authentication, password complexity and secure connections. These topics are covered in the System Management chapter and the HyperSQL Network Listeners (Servers) chapter.

    Apart from schemas and their object, each HyperSQL catalog has USER and ROLE objects. These objects are collectively called authorizations. Each AUTHORIZATION has some access - rights on some of the schemas or the objects they contain. The persistent - elements of an SQL environment are database objects

    -

    Authorization names are stored in the database in the case-normal - form. When connecting to a database via JDBC, the user name and password - must match the case of this case-normal form.

    -

    When a user is created with the CREATE USER statement, if the user - name is enclosed in double quotes, the exact name is used as the - case-normal form. But if it is not enclosed in double quotes, the name is - converted to uppercase and this uppercase version is stored in the - database as the case-normal form.

    + rights on some of the schemas and the database objects such as tables and + routines contained in those schemas.

    +

    Authorization names are stored in the database in case-normal form. + When a user is created with the CREATE USER statement, if the user name is + enclosed in double quotes, the exact name is used as the case-normal form. + But if it is not enclosed in double quotes, the name is converted to + uppercase and this uppercase version is stored in the database as the + case-normal form. When connecting to a database via JDBC, the user name + and password must match the case of the stored form.

    +

    Each database has at least one admin user. When the first connection + to a non-existent database is made, the admin user is created with the the + user name for the connection. The user name SA is + suggested in the documentation but you can use any name.

    @@ -131,41 +137,45 @@
    +

    In general, ROLE and USER objects simply control access to schema - objects. This is the scope of the SQL Standard. However, there are special - roles that allow the creation of USER and ROLE objects and also allow some - special operations on the database as a whole. These roles are not defined - by the Standard, which has left it to implementers to define such roles as - they are needed for the particular SQL implementation.

    + objects. There is the built-in DBA role that allows full access to all + possible operations on the database, including the creation of USER and + ROLE objects and schemas. There are other built-in roles that allow some + special operations on the database as a whole. Admin users have the DBA + role.

    A ROLE has a name, a collection of zero or more other roles, plus some privileges (access rights). A USER has a name and a password. It similarly has a collection of zero or more roles plus some privileges.

    -

    USER objects existed in the SQL-92, but ROLE objects were introduced - in SQL:1999. Originally it was intended that USER objects would normally - be the same as the operating system USER objects and their authentication - would be handled outside the SQL environment. The co-existence of ROLE and - USER objects results in complexity. With the addition of ROLE objects, - there is no rationale, other than legacy support, for granting privileges - to USER objects directly. It is better to create roles and grant - privileges to them, then grant the roles to USER objects.

    +

    USER objects existed in SQL-92, but ROLE objects were introduced in + SQL:1999. The co-existence of ROLE and USER objects results in complexity. + With the addition of ROLE objects, there is no rationale, other than + legacy support, for granting privileges to USER objects directly. It is + better to create roles and grant privileges to them, then grant the roles + to USER objects.

    The Standard effectively defines a special ROLE, named PUBLIC. All authorizations have the PUBLIC role, which cannot be removed from them. Therefore, any access right assigned to the PUBLIC role applies to all authorizations in the database. For many simple databases, it is adequate - to create a single, non-admin user, then assign access rights to the - pre-existing PUBLIC role. Access to INFORMATION_SCHEMA views is granted to + to create one or more non-admin user, then assign access rights to the + tables and sequences to the PUBLIC role.

    +

    The PUBLIC role is separate from the default PUBLIC schema. The + contents of this schema is not visible to non-admin users unless access is + granted by the DBA role.

    +

    Access to INFORMATION_SCHEMA views is automatically granted to PUBLIC; therefore these views are accessible to all. However, the contents of each view depend on the ROLE or USER (AUTHORIZATION) that is in force - while accessing the view.

    + while accessing the view. This means a user cannot even see the existence + of tables and other objects when it has no access rights on those + objects.

    Each schema has a single AUTHORIZATION. This is commonly known as the owner of the schema. All the objects in the schema inherit the schema owner. The schema owner can add objects to the - schema, drop them or alter them.

    -

    By default, the objects in a schema can only be accessed by the - schema owner. The schema owner can grant access rights on the objects to - other users or roles.

    - + schema, drop them or alter them. By default, the objects in a schema can + only be accessed by the schema owner. The schema owner can grant access + rights on the objects to other users or roles.

    +

    authorization identifier @@ -188,29 +198,31 @@ +

    There are some pre-defined roles in each database; some defined by the SQL Standard, some by HyperSQL. These roles can be assigned to users (directly or via other, user-defined roles). In addition, there is the - initial SYS user created with each new database. The initial user name + initial admin user created with each new database. The initial user name and password is defined in the connection properties when the first connection to the database is made. In older versions of HSQLDB, this name was always SA. But in the latest version, the name can be defined as a different string.

    - +

    -SYS User +Admin User

    -the SYS user (HyperSQL-specific) +the Admin user + (HyperSQL-specific)

    This user is automatically created with a new database and has the DBA role. This user name and its password are defined in the connection properties when connecting to the new database to create the - database. As this user, it is possible to change the password, create - other users and created new schema objects. The initial SYS user can be + database. This user can change the password, create other users and + create new schemas and other objects. The initial admin user can be dropped by another user that has the DBA role. As a result, there is - always at least one SYS user in the database.

    - + always at least one admin user in the database.

    +

    PUBLIC

    @@ -222,7 +234,7 @@ the INFORMATION_SCHEMA with limited visibility. Any roles or rights granted to this role, are in effect granted to all users of the database.

    - +

    _SYSTEM

    @@ -232,7 +244,7 @@

    This role is the authorization for the pre-defined (system) objects in the database, including the INFORMATION_SCHEMA. This role cannot be assigned to any authorization (user or role).

    - +

    DBA

    @@ -244,8 +256,9 @@ role can also act as a proxy for all the roles and users in the database. This means it can do everything the authorization for a schema can do, including dropping the schema or its objects, or granting rights - on the schema objects to a grantee.

    - + on the schema objects to a grantee. All admin users have this + role.

    +

    CREATE_SCHEMA

    @@ -256,7 +269,7 @@

    An authorization that has this role, can create schemas. The DBA authorization has this role and can grant it to other authorizations.

    - +

    CHANGE_AUTHORIZATION

    @@ -269,7 +282,7 @@ (otherwise, the original user would gain DBA privileges). The DBA authorization has this role and can grant it to other authorizations.

    - +

    SCRIPT_OPS

    @@ -290,8 +303,10 @@ +

    Tables in the INFORMATION_SCHEMA contain the list of users and - roles for the database.

    + roles for the database. Only admin users can see the full contents of + these tables.

    The SYSTEM_USERS tables contains the list of users, with some extra settings for each user. The AUTHORIZATIONS table contains a list of both users and roles.

    @@ -314,10 +329,19 @@ -

    By default, the objects in a schema can only be accessed by the - schema owner. But the schema owner can grant privileges (access rights) - on the objects to other users or roles.

    -

    Things can get far more complex, because the grant of privileges + +

    The create schema statements has an optional AUTHORIZATION clause: + For example:

    +
    +
     CREATE SCHEMA mySchema AUTHORIZATION aUserOrRole
    +
    +
    +

    If the authorization is not specified, the DBA role becomes the + authorization. This authorization is the owner of the schema. By + default, the objects in a schema can only be accessed by the schema + owner. But the schema owner can grant privileges (access rights) on the + objects to other users or roles.

    +

    Things can get far more complex because the grant of privileges can be made WITH GRANT OPTION. In this case, the role or user that has been granted the privilege can grant the privilege to other roles and users.

    @@ -325,9 +349,9 @@

    The statements for granting and revoking privileges normally specify which privileges are granted or revoked. However, there is a shortcut, ALL PRIVILEGES, which means all the privileges that the - <grantor> has on the schema object. The - <grantor> is normally the CURRENT_USER of the - session that issues the statement.

    + <grantor> has on the specified schema object. + The <grantor> is normally the CURRENT_USER of + the session that issues the statement.

    The user or role that is granted privileges is referred to as <grantee> for the granted privileges.

    @@ -385,16 +409,75 @@

    +Simple Access Control

    +
    +
    + + +

    The simplest form of access control is when the DBA user creates a + single non-admin user, then creates the tables and other objects in the + PUBLIC schema, and grants access to the objects to PUBLIC. A grant to + PUBLIC applies to all non-admin users, including any users that are + created later.

    +
    +
    CREATE USER generalUser PASSWORD 'aPassword'
    +
    +-- the objects are created one by one in the PUBLIC schema 
    +SET SCHEMA PUBLIC
    +CREATE TABLE aTable ...
    +CREATE TABLE anotherTable ...
    +...
    +CREATE SEQUENCE aSequence ...
    +CREATE PROCECURE aProc ...
    +'''
    +
    +-- access rights are granted to PUBLIC, which includes the generalUser
    +GRANT ALL ON ALL TABLES IN SCHEMA public TO PUBLIC
    +GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO PUBLIC
    +GRANT ALL ON ALL ROUTINES IN SCHEMA public TO PUBLIC
    +
    +
    +

    When different users need to have different levels of access, the + privileges are granted to individual users as opposed to PUBLIC. In the + example below there are 2 users with different access rights to the + objects in the schema.

    +
    +
    -- two users are created first
    +CREATE USER generalUser PASSWORD 'aPassword'
    +CREATE USER auditUser PASSWORD 'anotherPassword'
    +
    +-- the schema and its objects are created with a single compound statement 
    +CREATE SCHEMA mySchema AUTHORIZATION DBA
    +    CREATE TABLE aTable ...
    +    CREATE TABLE anotherTable ...
    +    ...
    +    CREATE SEQUENCE aSequence ...
    +    CREATE PROCECURE aProc ...
    +    ''';
    +
    +-- different access rights are granted to the users
    +GRANT ALL ON ALL TABLES IN SCHEMA mySchema TO generalUser
    +GRANT USAGE ON ALL SEQUENCES IN SCHEMA mySchema TO generalUser
    +GRANT EXECUTE ON ALL ROUTINES IN SCHEMA mySchema TO generalUser
    +GRANT SELECT ON ALL TABLES IN SCHEMA mySchema TO auditUser;
    +
    +
    + +
    +
    +
    +
    +

    Fine-Grained Data Access Control

    - -

    As mentioned above, a USER or ROLE that does not own a schema can - be granted access to individual columns of a table in the schema. - HyperSQL adds a feature that is not part of the SQL Standard to allow - this access to be granted to a ROLE only for certain rows of a table, - based on a FILTER condition.

    + +

    A USER or ROLE that does not own a schema can be granted access to + individual columns of a table in the schema. HyperSQL adds a feature + that is not part of the SQL Standard to allow access to be granted to a + ROLE only for certain rows of a table, based on a FILTER + condition.

    When the GRANT statement contains a FILTER condition, the condition is applied to each row of the table that a SELECT, INSERT, UPDATE, DELETE or MERGE statement tries to access. Only the rows that @@ -407,7 +490,7 @@ A group of ordinary users with the eu_admin role is only allowed to access the data for a certain region. Another group with the eu_user role is only allowed to access the rows - before the expiration date.

    + before the expiration date.

    CREATE TABLE info(id INT PRIMARY KEY, info VARCHAR(100), region VARCHAR(32) NOT NULL, expires DATE NOT NULL)
     -- there is also a foreign key constraint on the REGION column to reference a list of valid region names.
    @@ -430,11 +513,11 @@
           rows they cannot access.

    The <filter clause> can be used for other forms of fine-grained access control. In the example below, the - COMMON_USER role is defined and granted access during office hours + COMMON_ROLE role is defined and granted access during office hours only.

    -
    CREATE ROLE common_user
    -GRANT SELECT FILTER (WHERE EXTRACT(HOUR FROM CURRENT_TIMESTAMP) BETWEEN 9 AND 17) ON TABLE info TO common_user
    +
    CREATE ROLE common_role
    +GRANT SELECT FILTER (WHERE EXTRACT(HOUR FROM CURRENT_TIMESTAMP) BETWEEN 9 AND 17) ON TABLE info TO common_role
     

    Fine-grained data access control can also be used to implement @@ -467,7 +550,7 @@ assigned to other roles or to users. The same statements are also used in a different form to assign privileges on schema objects to users and roles.

    - +

    CREATE USER @@ -486,7 +569,7 @@ characters and is case-sensitive. If ADMIN is specified, the DBA role is granted to the new user. Only a user with the DBA role can execute this statement.

    - +

    DROP USER

    @@ -501,7 +584,7 @@ authorization for a schema, the schema is destroyed.

    Only a user with the DBA role can execute this statement.

    - +

    ALTER USER ... SET PASSWORD @@ -520,7 +603,7 @@ <password> is a string enclosed with single quote characters and is case-sensitive.

    Only a user with the DBA role can execute this command.

    - +

    ALTER USER ... SET INITIAL SCHEMA @@ -542,7 +625,7 @@ session.

    Only a user with the DBA role can execute this statement.

    - +

    ALTER USER ... SET LOCAL @@ -563,7 +646,7 @@ authentication for a specific user.

    Only a user with the DBA role can execute this statement.

    - +

    SET PASSWORD @@ -578,7 +661,7 @@

    Set the password for the current user. <password> is a string enclosed with single quote characters and is case-sensitive.

    - +

    SET INITIAL SCHEMA

    @@ -596,7 +679,7 @@ for all users is used as the initial schema for the current user. The separate SET SCHEMA command allows the user to change the schema for the duration of the session. See also the Sessions and Transactions chapter.

    - +

    SET DATABASE DEFAULT INITIAL SCHEMA @@ -613,7 +696,7 @@

    Sets the initial schema for new users. This schema can later be changed with the <set initial schema statement> command.

    - +

    CREATE ROLE

    @@ -627,7 +710,7 @@

    Defines a new role. Initially the role has no rights, except those of the PUBLIC role. Only a user with the DBA role can execute this command.

    - +

    DROP ROLE

    @@ -641,7 +724,7 @@

    Drop (destroy) a role. If the specified role is the authorization for a schema, the schema is destroyed. Only a user with the DBA role can execute this statement.

    - +

    GRANTED BY

    @@ -660,7 +743,7 @@ clause can be used in various statements that perform GRANT or REVOKE actions. If the clause is not used, the authorization is CURRENT_USER. Otherwise, it is the specified authorization.

    - +

    GRANT

    @@ -697,13 +780,21 @@ EXECUTE

    -<object name> ::= [ TABLE ] <table name> | - DOMAIN <domain name> | COLLATION <collation name> | CHARACTER - SET <character set name> | TRANSLATION <transliteration name> - | TYPE <user-defined type name> | SEQUENCE <sequence generator - name> | <specific routine designator> | ROUTINE <routine - name> | FUNCTION <function name> | PROCEDURE <procedure - name> +<object name> ::= { <single object name> | + <schema object set name> } +

    +

    +<simple object name> ::= [ TABLE ] <table + name> | DOMAIN <domain name> | COLLATION <collation name> | + CHARACTER SET <character set name> | TRANSLATION <transliteration + name> | TYPE <user-defined type name> | SEQUENCE <sequence + generator name> | <specific routine designator> | ROUTINE + <routine name> | FUNCTION <function name> | PROCEDURE + <procedure name> +

    +

    +<schema object set name> ::= ALL { TABLES | + SEQUENCES | ROUTINES } IN SCHEMA <schema name>

    <privilege column list> ::= <column name @@ -722,27 +813,33 @@ are discussed in the previous section. For a table or view, if <privilege column list> is not specified, then the privilege is granted on the table, which includes all of its columns - and any column that may be added to it in the future. For routines, the - name of the routine can be specified in two ways, either as the generic - name, or as the specific name for a signature. HyperSQL allows referencing - the generic name which covers all overloaded versions of a routine at the - same time. This is an extension to the SQL Standard which requires the use - of <specific routine designator> to grant - privileges separately on each different signature of the - routine.

    + and any column that may be added to it in the future.

    +

    For routines, the name of the routine can be specified in two + ways, either as the generic name, or as the specific name for a signature. + HyperSQL allows referencing the generic name which covers all overloaded + versions of a routine at the same time. This is an extension to the SQL + Standard, which requires the use of <specific routine + designator> to grant privileges separately on each different + signature of the routine.

    +

    HyperSQL also adds the <schema object set + name> option as an extension to the SQL Standard. This form + grants the privileges to all the tables of the schema with a single GRANT + statement.

    The <filter clause> can be specified after the <object name> to limit access for all - the granted privileges, or it can be used after individual privileges. -

    + the granted privileges, or it can be used after individual + privileges.

    Each <grantee> is the name of a role or a user. Examples of GRANT statement are given below:

     GRANT ALL ON SEQUENCE aSequence TO roleOrUser 
    - GRANT SELECT ON aTable TO roleOrUser  
    + GRANT SELECT ON aTable TO roleOrUser
    + GRANT SELECT(col3, col5) ON aTable TO aRole  
      GRANT SELECT, UPDATE FILTER(WHERE aColumn > 2) ON aTABLE TO role1 -- filter only for update
      GRANT SELECT, UPDATE ON aTable FILTER(WHERE aColumn > 2) TO role2 -- filter for both select and update
      GRANT SELECT(columnA, columnB), UPDATE(columnA, columnB) ON TABLE aTable TO user1, role1, role2
      GRANT EXECUTE ON SPECIFIC ROUTINE aroutine_1234 TO roleOrUser
    + GRANT SELECT ON ALL TABLES IN SCHEMA mySchema TO PUBLIC
     

    As mentioned in the general discussion, it is better to define a @@ -751,7 +848,7 @@ privileges of this role, they are automatically reflected in all the users that have the role. Fine-grained privileges (those with a FILTER clause) can be granted to roles only.

    - +

    GRANT

    @@ -780,7 +877,7 @@ GRANT EXECUTE ON ROUTINE aroutine TO approle
    - +

    REVOKE privilege

    @@ -793,8 +890,9 @@ <grantee> }... ] [ GRANTED BY <grantor> ] RESTRICT | CASCADE

    -

    Revoke privileges from a user or role.

    - +

    Revoke privileges from a user or role. The syntax elements are + similar to the GRANT statements.

    +

    REVOKE role

    @@ -815,7 +913,7 @@

    -

    $Revision: 6369 $

    +

    $Revision: 6474 $

    - -
    -
    - -

    -Table 14.7. Closing old ResultSet when Statement is reused +Table 14.6. Closing old ResultSet when Statement is reused

    @@ -632,9 +573,9 @@
    - +

    -Table 14.8. Column Names in JDBC ResultSet +Table 14.7. Column Names in JDBC ResultSet

    @@ -677,9 +618,9 @@
    - +

    -Table 14.9. In-memory LOBs from JDBC ResultSet +Table 14.8. In-memory LOBs from JDBC ResultSet

    @@ -717,9 +658,9 @@
    - +

    -Table 14.10. Empty batch in JDBC PreparedStatement +Table 14.9. Empty batch in JDBC PreparedStatement

    @@ -762,9 +703,9 @@
    - +

    -Table 14.11. Automatic Shutdown +Table 14.10. Automatic Shutdown

    @@ -815,6 +756,44 @@
    +
    + +

    +Table 14.11. OpenOffice and Libre Office usage +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    default_schemafalseOpenOffice and LibreOffice connections
    +

    When HyperSQL is used with + OpenOffice.org as an external database, the property + "default_schema=true" must be set on the URL, otherwise the + program will not operate correctly as it does with its built-in + hsqldb instance.

    +

    The default is + false.

    +
     jdbc:hsqldb:hsql://localhost/enrolments;default_schema=true
    +
    +
    +
    +
    @@ -835,11 +814,16 @@ corresponding SQL command is given for each property. For a server, these properties can be appended to the database path URL in server.properties or the server command line.

    +

    When connecting to an in-process database + creates a new database, or opens an existing database (i.e. it is the + first connection made to the database by the application), all the + user-defined database properties listed in this section can be specified + as URL properties.

    Note the preferred method of setting database properties is by using a set of SQL statements. These statements can be used both for a new database or an existing database, unlike URL properties that are generally effective for new databases only.

    -

    If the properties are used for connection to an existing database, +

    If these properties are used for connection to an existing database, they are ignored.

    The exceptions are the following property settings that are allowed for the first connection to an existing database (the connection which @@ -865,7 +849,7 @@ statements are described more extensively in the System Management chapter.

    - +

    Table 14.12. Validity Check Property

    @@ -899,6 +883,70 @@

    +
    + +

    +Table 14.13. Creating New Database Check Property +

    +
    + +++++ + + + + + + + + + + + + + + + + + + + +
    NameDefaultDescription
    ifexistsfalseconnect only if database already exists
    +

    Has an effect only with + mem: and file: + database. When true, will not create a new database if one does + not already exist for the URL.

    +

    When the property is + false (the default), a new mem: or + file: database will be created if it does + not exist.

    +

    Setting the property to true is useful when + troubleshooting as no database is created if the URL is malformed. + Example below:

    +
     jdbc:hsqldb:file:accounts;ifexists=true
    +
    createtruecreate the database if it does not exist
    +

    Similar to the ifexists + property, but with opposite meaning.

    +

    Has an effect + only with mem: and + file: databases. When false, will not + create a new database if one does not already exist for the + URL.

    +

    When the property is true (the default), a new + mem: or file: + database will be created if it does not exist.

    +

    Setting + the property to true is useful when troubleshooting as no database + is created if the URL is malformed. Example + below:

    +
     jdbc:hsqldb:file:enrolments;create=false
    +
    +
    +
    +
    @@ -909,9 +957,9 @@
    - +

    -Table 14.13. Execution of Multiple SQL Statements etc. +Table 14.14. Execution of Multiple SQL Statements etc.

    @@ -957,9 +1005,9 @@
    - +

    -Table 14.14. SQL Keyword Use as Identifier +Table 14.15. SQL Keyword Use as Identifier

    @@ -991,9 +1039,9 @@
    - +

    -Table 14.15. SQL Keyword Starting with the Underscore or Containing Dollar +Table 14.16. SQL Keyword Starting with the Underscore or Containing Dollar Characters

    @@ -1028,9 +1076,9 @@

    - +

    -Table 14.16. Reference to Columns Names +Table 14.17. Reference to Columns Names

    @@ -1065,9 +1113,9 @@
    - +

    -Table 14.17. String Size Declaration +Table 14.18. String Size Declaration

    @@ -1103,9 +1151,46 @@
    - + +

    +Table 14.19. Truncation of trailing spaces from string +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    sql.truncate_trailingtruetruncation of long strings with trailing spaces
    +

    When a string that is + longer than the maximum size of a column is inserted, the + default behaviour is to remove any trailing spaces until the + length of the string equals the maximum size of the column. When + this property is set to false, long strings are always rejected + and an exception is raised.

    +
    SET DATABASE SQL TRUNCATE TRAILING { TRUE | FALSE }
    +
    +
    +
    +
    +
    +

    -Table 14.18. Type Enforcement in Comparison and Assignment +Table 14.20. Type Enforcement in Comparison and Assignment

    @@ -1142,9 +1227,9 @@
    - +

    -Table 14.19. Foreign Key Triggered Data Change +Table 14.21. Foreign Key Triggered Data Change

    @@ -1204,9 +1289,9 @@
    - +

    -Table 14.20. Use of LOB for LONGVAR Types +Table 14.22. Use of LOB for LONGVAR Types

    @@ -1240,9 +1325,9 @@
    - +

    -Table 14.21. Type of string literals in CASE WHEN +Table 14.23. Type of string literals in CASE WHEN

    @@ -1277,9 +1362,9 @@
    - +

    -Table 14.22. Concatenation with NULL +Table 14.24. Concatenation with NULL

    @@ -1312,9 +1397,9 @@
    - +

    -Table 14.23. NULL in Multi-Column UNIQUE Constraints +Table 14.25. NULL in Multi-Column UNIQUE Constraints

    @@ -1348,9 +1433,9 @@
    - +

    -Table 14.24. Truncation or Rounding in Type Conversion +Table 14.26. Truncation or Rounding in Type Conversion

    @@ -1384,9 +1469,9 @@
    - +

    -Table 14.25. Decimal Scale of Division and AVG Values +Table 14.27. Decimal Scale of Division and AVG Values

    @@ -1424,9 +1509,9 @@
    - +

    -Table 14.26. Support for NaN values +Table 14.28. Support for NaN values

    @@ -1459,9 +1544,9 @@
    - +

    -Table 14.27. Sort order of NULL values +Table 14.29. Sort order of NULL values

    @@ -1495,9 +1580,9 @@
    - +

    -Table 14.28. Sort order of NULL values with DESC +Table 14.30. Sort order of NULL values with DESC

    @@ -1533,9 +1618,9 @@
    - +

    -Table 14.29. String Comparison with Padding +Table 14.31. String Comparison with Padding

    @@ -1573,9 +1658,9 @@
    - +

    -Table 14.30. Default Locale Language Collation +Table 14.32. Default Locale Language Collation

    @@ -1608,9 +1693,9 @@
    - +

    -Table 14.31. Case-Insensitive Varchar columns +Table 14.33. Case-Insensitive Varchar columns

    @@ -1646,9 +1731,9 @@
    - +

    -Table 14.32. Lowercase column identifiers in ResultSet +Table 14.34. Lowercase column identifiers in ResultSet

    @@ -1685,9 +1770,9 @@
    - +

    -Table 14.33. Storage of Live Java Objects +Table 14.35. Storage of Live Java Objects

    @@ -1722,9 +1807,9 @@
    - +

    -Table 14.34. Names of System Indexes Used for Constraints +Table 14.36. Names of System Indexes Used for Constraints

    @@ -1740,16 +1825,21 @@ - + @@ -1759,9 +1849,9 @@
    - +

    -Table 14.35. DB2 Style Syntax +Table 14.37. DB2 Style Syntax

    sql.sys_index_namesfalsename of system generated indexes for constraintssql.sys_index_namestruename of system generated indexes for constraints

    HSQLDB automatically creates a system index for each PRIMARY KEY, UNIQUE and FOREIGN - KEY constraint. By default the names of those indexes are - generated the system as a string beginning with SYS_. When the - setting is changed to true, the names will be the same as the - constraint names.

    + KEY constraint. If a constraint is not defined with a name, the + system generates a name. By default, the names of these indexes + will be the same as the constraint names. This helps associating + the index name with the user-defined constraint name. When this + property is false, the names of those indexes are generated the + system as a string beginning with SYS_.

    +

    The default + value for this property was false before version + 2.7.0.

    SET DATABASE SQL SYS INDEX NAMES { TRUE | FALSE }
    @@ -1793,9 +1883,9 @@
    - +

    -Table 14.36. MSSQL Style Syntax +Table 14.38. MSSQL Style Syntax

    @@ -1828,9 +1918,9 @@
    - +

    -Table 14.37. MySQL Style Syntax +Table 14.39. MySQL Style Syntax

    @@ -1863,9 +1953,9 @@
    - +

    -Table 14.38. Oracle Style Syntax +Table 14.40. Oracle Style Syntax

    @@ -1899,9 +1989,9 @@
    - +

    -Table 14.39. PostgreSQL Style Syntax +Table 14.41. PostgreSQL Style Syntax

    @@ -1933,6 +2023,44 @@
    +
    + +

    +Table 14.42. Maximum Iterations of Recursive Queries +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    sql.max_recursive256maximum number of iterations of a recursive query
    +

    Recursive queries + terminate if they are not completed when the maximum number of + iterations is reached. This is to avoid long-running queries + that may never actually finish.

    +

    The default value is + fine for most use-cases. You can change the default if you need + to.

    +
    SET DATABASE SQL MAX RECURSIVE <count>
    +
    +
    +
    +
    @@ -1944,9 +2072,9 @@
    - +

    -Table 14.40. Default Table Type +Table 14.43. Default Table Type

    @@ -1982,9 +2110,9 @@
    - +

    -Table 14.41. Transaction Control Mode +Table 14.44. Transaction Control Mode

    @@ -2018,9 +2146,9 @@
    - +

    -Table 14.42. Default Isolation Level for Sessions +Table 14.45. Default Isolation Level for Sessions

    @@ -2054,9 +2182,9 @@
    - +

    -Table 14.43. Transaction Rollback in Deadlock +Table 14.46. Transaction Rollback in Deadlock

    @@ -2097,9 +2225,9 @@
    - +

    -Table 14.44. Transaction Rollback on Interrupt +Table 14.47. Transaction Rollback on Interrupt

    @@ -2135,9 +2263,9 @@
    - +

    -Table 14.45. Time Zone and Interval Types +Table 14.48. Time Zone and Interval Types

    @@ -2153,18 +2281,20 @@ - + @@ -2173,6 +2303,44 @@
    +
    + +

    +Table 14.49. Temporary Result Rows in Memory +

    +
    +
    hsqldb.translate_tti_typestrueusage of type codes for advanced datetime and interval - typeshsqldb.translate_tti_typestrueusage of type codes for advanced interval types

    If the property is true, - the TIME / TIMESTAMP WITH TIME ZONE types and INTERVAL types are - represented in JDBC methods of + the INTERVAL types are represented in JDBC methods of ResultSetMetaData and - DatabaseMetaData as JDBC datetime types - without time zone and the VARCHAR type respectively. The + DatabaseMetaData as the VARCHAR type. The original type names are preserved.

    +

    JDBC does not + have direct support for names and codes of INTERVAL types. From + Java 8, getting and setting INTERVAL values is possible via + getObject() and setObject() methods of ResultSet and + PreparedStatement.

    SET DATABASE SQL TRANSLATE TTI TYPES { TRUE | FALSE }
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    hsqldb.result_max_memory_rows0storage of temporary results and tables in memory or on + disk
    +

    This property can be set + to specify how many rows of each results or temporary table are + stored in memory before the table is written to disk. The + default is zero and means data is always stored in memory. If + this setting is used, it should be set above + 1000.

    +
    SET DATABASE DEFAULT RESULT MEMORY ROWS <numeric value>
    +
    +
    +
    +
    @@ -2184,9 +2352,9 @@
    - +

    -Table 14.46. Opening Database as Read Only +Table 14.50. Opening Database as Read Only

    @@ -2222,9 +2390,9 @@
    - +

    -Table 14.47. Opening Database Without Modifying the Files +Table 14.51. Opening Database Without Modifying the Files

    @@ -2259,12 +2427,12 @@
    - +

    -Table 14.48. Huge database files and tables +Table 14.52. Event Logging

    -
    +
    @@ -2277,31 +2445,32 @@ - + - - -
    hsqldb.large_datafalseenable huge database files - can also be used to open an - existing file: databasehsqldb.applog0application logging level - can also be used when opening + an existing file: database
    -

    By default, up to 2 - billion rows can be stored in all disk-based CACHED tables. - Setting this property to true increases the limit to 256 billion - rows. This property is used as a connection - property.

    -
    this property cannot be set with an SQL statement - it can be used as a connection property for the connection that opens the database
    -
    +

    The default level 0 + indicates no logging. Level 1 results in minimal logging, + including any failures. Level 2 indicates all events, including + ordinary events. LEVEL 3 adds details of some of the normal + operations. The events are logged in a file ending with + ".app.log".

    +
    SET DATABASE EVENT LOG LEVEL { 0 | 1 | 2 | 3}
    + + + +

    - +

    -Table 14.49. Event Logging +Table 14.53. SQL Logging

    - +
    @@ -2314,18 +2483,20 @@ - + @@ -2334,12 +2505,12 @@
    - +

    -Table 14.50. SQL Logging +Table 14.54. Table Spaces for Cached Tables

    -
    hsqldb.applog0application logging level - can also be used when opening - an existing file: databasehsqldb.sqllog0sql logging level - can also be used when opening an + existing file: database

    The default level 0 - indicates no logging. Level 1 results in minimal logging, - including any failures. Level 2 indicates all events, including - ordinary events. LEVEL 3 adds details of some of the normal - operations. The events are logged in a file ending with - ".app.log".

    -
    SET DATABASE EVENT LOG LEVEL { 0 | 1 | 2 | 3}
    + indicates no logging. Level 1 logs only commits and rollbacks. + Level 2 logs all the SQL statements executed, together with + their parameter values. Long statements and parameter values are + truncated. Level 3 is similar to Level 2 but does not truncate + long statements and values. The events are logged in a file + ending with ".sql.log". This property applies to existing file: + databases as well as new databases.

    +
    SET DATABASE EVENT LOG SQL LEVEL { 0 | 1 | 2 | 3}
    +
    @@ -2352,20 +2523,54 @@ - + + + + + +
    hsqldb.sqllog0sql logging level - can also be used when opening an +hsqldb.files_spacefalseuse of separate table spaces for each CACHED + table
    +

    The default value is + false, indicating table space management is not used. When the + value is true at the time of creation of a new database, the + directory structures are created inside the .data file and table + space support is enabled

    +
    SET FILES SPACE { TRUE | FALSE }
    +
    +
    +
    +
    +
    + +

    +Table 14.55. Huge database files and tables +

    +
    + +++++ + + + + + + + + @@ -2374,12 +2579,12 @@
    - +

    -Table 14.51. Temporary Result Rows in Memory +Table 14.56. Use of NIO for Disk Table Storage

    -
    NameDefaultDescription
    hsqldb.large_datafalseenable huge database files - can also be used to open an existing file: database
    -

    The default level 0 - indicates no logging. Level 1 logs only commits and rollbacks. - Level 2 logs all the SQL statements executed, together with - their parameter values. Long statements and parameter values are - truncated. Level 3 is similar to Level 2 but does not truncate - long statements and values. The events are logged in a file - ending with ".sql.log". This property applies to existing file: - databases as well as new databases.

    -
    SET DATABASE EVENT LOG SQL LEVEL { 0 | 1 | 2 | 3}
    +

    By default, up to 2 + billion rows can be stored in all disk-based CACHED tables. + Setting this property to true increases the limit to 256 billion + rows. This property is used as a connection + property.

    +
    this property cannot be set with an SQL statement - it can be used as a connection property for the connection that opens the database
    +
    @@ -2392,18 +2597,99 @@ - + + + +
    hsqldb.result_max_memory_rows0storage of temporary results and tables in memory or on - diskhsqldb.nio_data_filetrueuse of nio access methods for the .data file
    -

    This property can be set - to specify how many rows of each results or temporary table are - stored in memory before the table is written to disk. The - default is zero and means data is always stored in memory. If - this setting is used, it should be set above - 1000.

    -
    SET DATABASE DEFAULT RESULT MEMORY ROWS <numeric value>
    +

    Setting this property to + false will avoid the use of nio access + methods, resulting in somewhat reduced speed. If the data file + is larger than hsqldb.nio_max_size (default + 256MB) when it is first opened (or when its size is increased), + nio access methods are not used. Also, if the file gets larger + than the amount of available computer memory that needs to be + allocated for nio access, non-nio access methods are + used.

    +
    SET FILES NIO { TRUE | FALSE }
    +
    +
    +
    +
    +
    + +

    +Table 14.57. Use of NIO for Disk Table Storage +

    +
    + +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    hsqldb.nio_max_size256nio buffer size limit
    +

    The maximum size of .data + file in mega bytes that can use the nio access method. When the + file gets larger than this limit, non-nio access methods are + used. Values 64, 128, 256, 512, 1024, and larger multiples of + 512 can be used. The default is + 256MB.

    +
    SET FILES NIO SIZE <numeric value>
    +
    +
    +
    +
    +
    + +

    +Table 14.58. Internal Backup of the .data File +

    +
    + +++++ + + + + + + + + + + + @@ -2412,9 +2698,9 @@
    - +

    -Table 14.52. Unused Space Recovery +Table 14.59. Unused Space Recovery

    NameDefaultDescription
    hsqldb.inc_backuptrueincremental backup of data file - NOW OBSOLETE
    +

    As the contents of the + .data file are modified during database operation, the original + contents are backed up gradually. This allows fast checkpoint + and shutdown.

    +

    With HSQLDB up to version 2.5 it was + possible to set the property false in order to have the .data + file backed up entirely at the time of checkpoint and + shutdown.

    +

    From version 2.5.1, this property has no + effect and backup is always + incremental.

    +
    SET FILES BACKUP INCREMENT { TRUE | FALSE }
    @@ -2444,6 +2730,10 @@ are deleted, the smaller recovered spaces are lost and the largest ones are retained for later use. Normally there is no need to set this property.

    +

    When table space + management is turned on (see hsqldb.files_space property) this + property has little effect as unused spaces are always + recovered.

    this property cannot be set with an SQL statement
    @@ -2453,9 +2743,9 @@
    - +

    -Table 14.53. Rows Cached In Memory +Table 14.60. Rows Cached In Memory

    @@ -2491,9 +2781,9 @@
    - +

    -Table 14.54. Size of Rows Cached in Memory +Table 14.61. Size of Rows Cached in Memory

    @@ -2536,9 +2826,9 @@
    - +

    -Table 14.55. Size Scale of Disk Table Storage +Table 14.62. Size Scale of Disk Table Storage

    @@ -2572,9 +2862,9 @@
    - +

    -Table 14.56. Size Scale of LOB Storage +Table 14.63. Size Scale of LOB Storage

    @@ -2608,9 +2898,9 @@
    - +

    -Table 14.57. Compression of BLOB and CLOB data +Table 14.64. Compression of BLOB and CLOB data

    @@ -2643,51 +2933,9 @@
    - +

    -Table 14.58. Internal Backup of Database Files -

    -
    -
    ----- - - - - - - - - - - - - - -
    NameDefaultDescription
    hsqldb.inc_backuptrueincremental backup of data file
    -

    As the contents of the - .data file are modified during database operation, the original - contents are backed up gradually. This allows fast checkpoint - and shutdown.

    -

    With HSQLDB up to version 2.5.0 it was - possible to set the property false in order to have the .data - file backed up entirely at the time of checkpoint and - shutdown.

    -

    From version 2.5.1, this property has no - effect and backup is always - incremental.

    -
    SET FILES BACKUP INCREMENT { TRUE | FALSE }
    -
    -
    -
    -
    -
    - -

    -Table 14.59. Use of Lock File +Table 14.65. Use of Lock File

    @@ -2724,9 +2972,9 @@
    - +

    -Table 14.60. Logging Data Change Statements +Table 14.66. Logging Data Change Statements

    @@ -2750,11 +2998,10 @@ to false when database recovery in the event of an unexpected crash is not necessary. A database that is used as a temporary cache is an example. Regardless of the value of - this property, if there is a proper shutdown of the database, - all the changed data is stored. A checkpoint or shutdown still - rewrites the .script file and saves the - .backup file according to the other - settings.

    + this property, a checkpoint or shutdown still writes the + .script file and saves the + .data file in full, therefore persisting all + the changes.

    SET FILES LOG  { TRUE | FALSE }
    @@ -2764,9 +3011,9 @@
    - +

    -Table 14.61. Automatic Checkpoint Frequency +Table 14.67. Automatic Checkpoint Frequency

    @@ -2800,9 +3047,9 @@
    - +

    -Table 14.62. Automatic Defrag at Checkpoint +Table 14.68. Automatic Defrag at Checkpoint

    @@ -2840,9 +3087,9 @@
    - +

    -Table 14.63. Compression of the .script file +Table 14.69. Compression of the .script file

    @@ -2877,9 +3124,9 @@
    - +

    -Table 14.64. Logging Data Change Statements Frequency +Table 14.70. Logging Data Change Statements Frequency

    @@ -2916,9 +3163,9 @@
    - +

    -Table 14.65. Logging Data Change Statements Frequency +Table 14.71. Logging Data Change Statements Frequency

    @@ -2954,86 +3201,9 @@
    - +

    -Table 14.66. Use of NIO for Disk Table Storage -

    -
    -
    ----- - - - - - - - - - - - - - -
    NameDefaultDescription
    hsqldb.nio_data_filetrueuse of nio access methods for the .data file
    -

    Setting this property to - false will avoid the use of nio access - methods, resulting in somewhat reduced speed. If the data file - is larger than hsqldb.nio_max_size (default - 256MB) when it is first opened (or when its size is increased), - nio access methods are not used. Also, if the file gets larger - than the amount of available computer memory that needs to be - allocated for nio access, non-nio access methods are - used.

    -
    SET FILES NIO { TRUE | FALSE }
    -
    -
    -
    -
    -
    - -

    -Table 14.67. Use of NIO for Disk Table Storage -

    -
    - ----- - - - - - - - - - - - - - -
    NameDefaultDescription
    hsqldb.nio_max_size256nio buffer size limit
    -

    The maximum size of .data - file in mega bytes that can use the nio access method. When the - file gets larger than this limit, non-nio access methods are - used. Values 64, 128, 256, 512, 1024, and larger multiples of - 512 can be used. The default is - 256MB.

    -
    SET FILES NIO SIZE <numeric value>
    -
    -
    -
    -
    -
    - -

    -Table 14.68. Recovery Log Processing +Table 14.72. Recovery Log Processing

    @@ -3071,9 +3241,9 @@
    - +

    -Table 14.69. Default Properties for TEXT Tables +Table 14.73. Default Properties for TEXT Tables

    @@ -3108,9 +3278,9 @@
    - +

    -Table 14.70. Forcing Garbage Collection +Table 14.74. Forcing Garbage Collection

    @@ -3126,14 +3296,14 @@ - + @@ -3154,9 +3324,9 @@
    - +

    -Table 14.71. Crypt Property For LOBs +Table 14.75. Crypt Property For LOBs

    runtime.gc_interval0forced garbage collectionruntime.gc_interval0forced garbage collection - NOW OBSOLETE

    No-op setting previously used to forces garbage collection each time a set number of result set row or cache row objects are created. This setting - has no effect in version 2.5.0 or + has no effect in version 2.5 or later,

    SET DATABASE GC <numeric value>
    @@ -3191,9 +3361,9 @@
    - +

    -Table 14.72. Cipher Key for Encrypted Database +Table 14.76. Cipher Key for Encrypted Database

    @@ -3224,9 +3394,9 @@
    - +

    -Table 14.73. Cipher Initialization Vector for Encrypted Database +Table 14.77. Cipher Initialization Vector for Encrypted Database

    @@ -3258,9 +3428,9 @@
    - +

    -Table 14.74. Crypt Provider Encrypted Database +Table 14.78. Crypt Provider Encrypted Database

    @@ -3292,9 +3462,9 @@
    - +

    -Table 14.75. Cipher Specification for Encrypted Database +Table 14.79. Cipher Specification for Encrypted Database

    @@ -3324,15 +3494,6 @@
    -

    When connecting to an in-process database - creates a new database, or opens an existing database (i.e. it is the - first connection made to the database by the application), all the - user-defined database properties listed in this section can be specified - as URL properties.

    -

    When HyperSQL is used with OpenOffice.org as an external - database, the property "default_schema=true" must be set on the URL, - otherwise the program will not operate correctly as it does with its - built-in hsqldb instance.

    @@ -3348,9 +3509,9 @@ Java command line or by calling System.setProperty() from the user's program. They are not valid as URL or connection properties.

    - +

    -Table 14.76. Logging Framework +Table 14.80. Logging Framework

    @@ -3382,9 +3543,9 @@
    - +

    -Table 14.77. Text Tables +Table 14.81. Text Tables

    @@ -3418,9 +3579,9 @@
    - +

    -Table 14.78. Java Functions +Table 14.82. Java Functions

    @@ -3454,7 +3615,7 @@
    -

    $Revision: 6369 $

    +

    $Revision: 6474 $

    diff -Nru hsqldb-2.6.1/hsqldb/doc/guide/deployment-chapt.html hsqldb-2.7.0/hsqldb/doc/guide/deployment-chapt.html --- hsqldb-2.6.1/hsqldb/doc/guide/deployment-chapt.html 2021-10-20 09:33:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/guide/deployment-chapt.html 2022-07-26 20:21:48.000000000 +0000 @@ -44,12 +44,12 @@
    -

    $Revision: 6279 $

    +

    $Revision: 6556 $

    - -

    Copyright 2002-2021 Fred Toussi. Permission is granted to + +

    Copyright 2002-2022 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQL Development Group to distribute this document with or without alterations under the @@ -57,7 +57,7 @@

    -

    2021-10-21

    +

    2022-07-26

    @@ -165,7 +165,7 @@ - +

    Memory used by the program can be thought of as two distinct pools: memory used for table data which is not released unless the data is deleted and memory that can be released or is released automatically, @@ -342,7 +342,7 @@ change the lob schema storage to CACHED tables with the following statements:

    - +

    Example 12.1. Using CACHED tables for the LOB schema

    @@ -717,7 +717,7 @@ arguments (if any), then an empty string to separate it from the next main class.

    - +

    Example 12.2. MainInvoker Example

    @@ -769,17 +769,15 @@
    - -

    HSQLDB version 2.6.0 and later can open databases created with - version 2.0 and above. It will not open databases created with older - versions. It is a good idea to perform SHUTDOWN COMPACT after the - upgrade.

    -

    Downgrading is also possible. Once a database is upgraded to 2.6.0, - you need to perform SHUTDOWN SCRIPT before you open it with previous 2.x.x - versions of HyperSQL.

    + +

    HSQLDB can open databases created with version 2.0 and above. It is + a good idea to perform SHUTDOWN COMPACT to complete the upgrade.

    +

    Downgrading is also possible. A database created with the current + version can be closed with SHUTDOWN SCRIPT before you open it with + previous 2.x.x versions of HyperSQL.

    To upgrade an old database created with version 1.8.x, you can use - HSQLDB version 2.3.x to 2.5.0 to open the database and perform SHUTDOWN - SCRIPT. You can then open the database with version 2.6.0 or later.

    + HSQLDB version 2.3.x to 2.5 to open the database and perform SHUTDOWN + SCRIPT. You can then open the database with version 2.6 or later.

    If the 1.8.x database script format is set to BINARY or COMPRESSED (ZIPPED), you must open the database with version 1.8.x and issue the SET SCRIPTFORMAT TEXT and SHUTDOWN SCRIPT commands with the old version, prior @@ -930,7 +928,7 @@ -

    HyperSQL 2 conforms to the SQL Standard better than previous +

    HyperSQL 2.7.0 conforms to the SQL Standard better than previous versions and has many more features. For these reasons, there may be some compatibility issues when converting old database, or using applications that were written for version 1.8.x or earlier. Some of the potential @@ -939,16 +937,17 @@

    • -

      By default, when comparison strings, the shorter string is - padded with spaces. This has an effect on comparing - 'test' and 'test ' which are now - considered equal, despite the length difference. This behaviour is - controlled by the default PAD SPACE property of collations, which can - be changed to NO PAD. See the statement SET DATABASE - COLLATION <name> [ PAD SPACE | NO PAD ].

      +

      By default, when comparing strings, the shorter string is padded + with spaces. This has an effect on comparing 'test' + and 'test ' which are now considered equal, despite + the length difference. This behaviour is controlled by the default PAD + SPACE property of collations, which can be changed to NO PAD. See the + statement SET DATABASE COLLATION <name> [ PAD SPACE | + NO PAD ].

    • -

      User names and passwords are case-sensitive. Check the +

      User names and passwords are case-sensitive. The only exception + is the username 'SA' which is always converted to uppercase. Check the .script file of a database for the correct case of user name and password and use this form in the connection properties or on connection URL.

      @@ -1012,8 +1011,8 @@ T (ID IDENTITY, DAT VARCHAR(20)) is translated into CREATE TABLE T(ID INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, DAT VARCHAR(20)). This last form is the correct - way of defining both autoincrement and primary key in versions 1.8 and - 2.x.

      + way of defining both auto-increment and primary key in versions 1.8 + and 2.x.

    • CREATE ALIAS is now obsolete. Use the new function definition @@ -1057,11 +1056,21 @@ HyperSQL Dependency Settings for Applications

    -

    Dependency settings using Gradle, Ivy, Maven, Groovy

    +

    Java Module Dependency and Dependency settings using Gradle, + Ivy, Maven, Groovy

    -

    This section is about building applications that have build-time +

    HyperSQL and SqlTool version 2.7.0 jars are Java Module jars + compiled with JDK 11. The module name for HyperSQL is + org.hsqldb and for SqlTool, + org.hsqldb.sqltool. In a modular application, these + names are referenced in the module-info.java file for + the user application that accesses these jars.

    +

    For non-modular applications, the jars are simply included the + the classpath. Jars compiled with JDK8 are also provided and can be used + for applications that must run on a JVM older than 11,

    +

    This section is about building applications that have dependencies upon HyperSQL, and for executions that use a dependency library system. Examples of the second type are unit test runs, job runs triggered by a build system, or systems like Grape that pull libraries @@ -1103,7 +1112,7 @@ the suggestions in the appropriate sections below. If you need to specify a specific version, follow the instructions in the range-versioning section but change the version range specifications to - literal versions like 2.6.0.

    + literal versions like 2.7.0.

    @@ -1161,7 +1170,7 @@
    - +

    Example 12.3. Sample Range Ivy Dependency

    @@ -1173,15 +1182,15 @@ because I have so far failed to get that to succeed. Classifiers in in ivy.xml are supported if using Gradle, as covered below.

    -

    At the time that I'm writing this, our builds are only - providing one classifier (besides the default no-classifier, of - course) and its name is "debug". Therefore in all examples for using - a classifier I am using classifier name "debug".

    +

    At the time that I'm writing this, our builds are providing + two classifiers (besides the default no-classifier, of course) named + "debug" and "jdk8". In all examples for using a classifier I am + using classifier name "debug".


    - +

    Example 12.4. Sample Range Maven Dependency

    @@ -1203,7 +1212,7 @@

    - +

    Example 12.5. Sample Range Gradle Dependency

    @@ -1224,7 +1233,7 @@ ivyxml. See the Ivyxml documentation to see exactly how.

    - +

    Example 12.6. Sample Range ivy.xml loaded by Ivyxml plugin

    @@ -1239,7 +1248,7 @@

    - +

    Example 12.7. Sample Range Groovy Dependency, using Grape

    @@ -1254,7 +1263,7 @@

    -

    $Revision: 6369 $

    +

    $Revision: 6474 $

    - +

    Example 12.3. Sample Range Ivy Dependency

    @@ -28103,15 +28585,15 @@ because I have so far failed to get that to succeed. Classifiers in in ivy.xml are supported if using Gradle, as covered below.

    -

    At the time that I'm writing this, our builds are only - providing one classifier (besides the default no-classifier, of - course) and its name is "debug". Therefore in all examples for using - a classifier I am using classifier name "debug".

    +

    At the time that I'm writing this, our builds are providing + two classifiers (besides the default no-classifier, of course) named + "debug" and "jdk8". In all examples for using a classifier I am + using classifier name "debug".


    - +

    Example 12.4. Sample Range Maven Dependency

    @@ -28133,7 +28615,7 @@

    - +

    Example 12.5. Sample Range Gradle Dependency

    @@ -28154,7 +28636,7 @@ ivyxml. See the Ivyxml documentation to see exactly how.

    - +

    Example 12.6. Sample Range ivy.xml loaded by Ivyxml plugin

    @@ -28169,7 +28651,7 @@

    - +

    Example 12.7. Sample Range Groovy Dependency, using Grape

    @@ -28208,8 +28690,8 @@
    - -

    Copyright 2010-2021 Fred Toussi. Permission is granted to + +

    Copyright 2010-2022 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQL Development Group to distribute this document with or without alterations under the @@ -28217,7 +28699,7 @@

    -

    2021-10-21

    +

    2022-07-26

    @@ -28417,7 +28899,7 @@ -

    HyperSQL version 2.6 is highly compatible with MySQL and supports +

    HyperSQL version 2.7 is highly compatible with MySQL and supports most of its non-standard syntax. The latest versions of MySQL have introduced better Standard compatibility but some of these features have to be turned on via properties. You should therefore check the current @@ -28829,7 +29311,7 @@ their SQL Standard equivalents.

  • -

    HyperSQL 2.6 supports several datetime functions in MSS +

    HyperSQL 2.7 supports several datetime functions in MSS compatibility mode. These include DATEPART, DATENAME, EOMONTH and compatible DATEADD and DATEDIFF behaviour.

  • @@ -28869,12 +29351,12 @@
    -

    $Revision: 6366 $

    +

    $Revision: 6491 $

    - -

    Copyright 2002-2021 Fred Toussi. Permission is granted to + +

    Copyright 2002-2022 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQL Development Group to distribute this document with or without alterations under the @@ -28882,7 +29364,7 @@

    -

    2021-10-21

    +

    2022-07-26

    @@ -28898,7 +29380,7 @@ Variables in Connection URL
    -Connection Properties +Connection Properties
    Properties for Individual Connections @@ -28938,9 +29420,9 @@

    The normal method of accessing a HyperSQL catalog is via the JDBC Connection interface. An introduction to different methods of providing - database services and accessing them can be found in the SQL Language chapter. - Details and examples of how to connect via JDBC are provided in our - JavaDoc for JDBCConnection.

    + database services and accessing them can be found in the Running and Using HyperSQL chapter. Details and + examples of how to connect via JDBC are provided in our JavaDoc for + JDBCConnection.

    A uniform method is used to distinguish between different types of connection. The common driver identifier is jdbc:hsqldb: followed by a protocol identifier @@ -28952,7 +29434,7 @@ property / value pairs can be appended to the end of the URL, separated with semicolons.

    - +

    Table 14.1. Memory Database URL

    @@ -29012,7 +29494,7 @@

    - +

    Table 14.2. File Database URL

    @@ -29073,7 +29555,7 @@

    - +

    Table 14.3. Resource Database URL

    @@ -29120,7 +29602,7 @@

    - +

    Table 14.4. Server Database URL

    @@ -29250,12 +29732,12 @@

    -Connection Properties

    +Connection Properties

    There are two types of connection properties: properties for - individual connections, and Properties for the whole database.

    + individual connections, and properties for the whole database.

    The properties for individual connections apply only to the connection that uses them and can be different for different connections. These properties can be used when connecting to in-process and server @@ -29266,9 +29748,14 @@ mem: database. For the connection that creates a new database all the user-defined database properties can be specified as URL properties.

    +

    A few of the properties for the database can be applied to an + existing database when the database is reopened after a shutdown.

    When running a server, these properties are not used on the connection URL but can be appended to the database path URL in server.properties or the server command line.

    +

    Almost all properties for the database listed in this chapter have + corresponding SQL statements which can be used after connecting to the + database. The SQL statement for each property is listed here.

    @@ -29289,7 +29776,7 @@ Connection URL.

     DriverManager.getConnection (String url, Properties info);
    - +

    Table 14.5. User and Password

    @@ -29339,73 +29826,9 @@

    - +

    -Table 14.6. Creating New Database -

    -
    - ----- - - - - - - - - - - - - - - - - - - - -
    NameDefaultDescription
    ifexistsfalseconnect only if database already exists
    -

    Has an effect only with - mem: and file: - database. When true, will not create a new database if one does - not already exist for the URL.

    -

    When the property is - false (the default), a new mem: or - file: database will be created if it does - not exist.

    -

    Setting the property to true is useful when - troubleshooting as no database is created if the URL is malformed. - Example below:

    -
     jdbc:hsqldb:file:accounts;ifexists=true
    -
    createtruecreate the database if it does not exist
    -

    Similar to the ifexists - property, but with opposite meaning.

    -

    Has an effect - only with mem: and - file: databases. When false, will not - create a new database if one does not already exist for the - URL.

    -

    When the property is true (the default), a new - mem: or file: - database will be created if it does not exist.

    -

    Setting - the property to true is useful when troubleshooting as no database - is created if the URL is malformed. Example - below:

    -
     jdbc:hsqldb:file:enrolments;create=false
    -
    -
    -
    -
    -
    - -

    -Table 14.7. Closing old ResultSet when Statement is reused +Table 14.6. Closing old ResultSet when Statement is reused

    @@ -29456,9 +29879,9 @@
    - +

    -Table 14.8. Column Names in JDBC ResultSet +Table 14.7. Column Names in JDBC ResultSet

    @@ -29501,9 +29924,9 @@
    - +

    -Table 14.9. In-memory LOBs from JDBC ResultSet +Table 14.8. In-memory LOBs from JDBC ResultSet

    @@ -29541,9 +29964,9 @@
    - +

    -Table 14.10. Empty batch in JDBC PreparedStatement +Table 14.9. Empty batch in JDBC PreparedStatement

    @@ -29586,9 +30009,9 @@
    - +

    -Table 14.11. Automatic Shutdown +Table 14.10. Automatic Shutdown

    @@ -29639,6 +30062,44 @@
    +
    + +

    +Table 14.11. OpenOffice and Libre Office usage +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    default_schemafalseOpenOffice and LibreOffice connections
    +

    When HyperSQL is used with + OpenOffice.org as an external database, the property + "default_schema=true" must be set on the URL, otherwise the + program will not operate correctly as it does with its built-in + hsqldb instance.

    +

    The default is + false.

    +
     jdbc:hsqldb:hsql://localhost/enrolments;default_schema=true
    +
    +
    +
    +
    @@ -29659,11 +30120,16 @@ corresponding SQL command is given for each property. For a server, these properties can be appended to the database path URL in server.properties or the server command line.

    +

    When connecting to an in-process database + creates a new database, or opens an existing database (i.e. it is the + first connection made to the database by the application), all the + user-defined database properties listed in this section can be specified + as URL properties.

    Note the preferred method of setting database properties is by using a set of SQL statements. These statements can be used both for a new database or an existing database, unlike URL properties that are generally effective for new databases only.

    -

    If the properties are used for connection to an existing database, +

    If these properties are used for connection to an existing database, they are ignored.

    The exceptions are the following property settings that are allowed for the first connection to an existing database (the connection which @@ -29689,7 +30155,7 @@ statements are described more extensively in the System Management chapter.

    - +

    Table 14.12. Validity Check Property

    @@ -29723,6 +30189,70 @@

    +
    + +

    +Table 14.13. Creating New Database Check Property +

    +
    + +++++ + + + + + + + + + + + + + + + + + + + +
    NameDefaultDescription
    ifexistsfalseconnect only if database already exists
    +

    Has an effect only with + mem: and file: + database. When true, will not create a new database if one does + not already exist for the URL.

    +

    When the property is + false (the default), a new mem: or + file: database will be created if it does + not exist.

    +

    Setting the property to true is useful when + troubleshooting as no database is created if the URL is malformed. + Example below:

    +
     jdbc:hsqldb:file:accounts;ifexists=true
    +
    createtruecreate the database if it does not exist
    +

    Similar to the ifexists + property, but with opposite meaning.

    +

    Has an effect + only with mem: and + file: databases. When false, will not + create a new database if one does not already exist for the + URL.

    +

    When the property is true (the default), a new + mem: or file: + database will be created if it does not exist.

    +

    Setting + the property to true is useful when troubleshooting as no database + is created if the URL is malformed. Example + below:

    +
     jdbc:hsqldb:file:enrolments;create=false
    +
    +
    +
    +
    @@ -29733,9 +30263,9 @@
    - +

    -Table 14.13. Execution of Multiple SQL Statements etc. +Table 14.14. Execution of Multiple SQL Statements etc.

    @@ -29781,9 +30311,9 @@
    - +

    -Table 14.14. SQL Keyword Use as Identifier +Table 14.15. SQL Keyword Use as Identifier

    @@ -29815,9 +30345,9 @@
    - +

    -Table 14.15. SQL Keyword Starting with the Underscore or Containing Dollar +Table 14.16. SQL Keyword Starting with the Underscore or Containing Dollar Characters

    @@ -29852,9 +30382,9 @@

    - +

    -Table 14.16. Reference to Columns Names +Table 14.17. Reference to Columns Names

    @@ -29889,9 +30419,9 @@
    - +

    -Table 14.17. String Size Declaration +Table 14.18. String Size Declaration

    @@ -29927,9 +30457,46 @@
    - + +

    +Table 14.19. Truncation of trailing spaces from string +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    sql.truncate_trailingtruetruncation of long strings with trailing spaces
    +

    When a string that is + longer than the maximum size of a column is inserted, the + default behaviour is to remove any trailing spaces until the + length of the string equals the maximum size of the column. When + this property is set to false, long strings are always rejected + and an exception is raised.

    +
    SET DATABASE SQL TRUNCATE TRAILING { TRUE | FALSE }
    +
    +
    +
    +
    +
    +

    -Table 14.18. Type Enforcement in Comparison and Assignment +Table 14.20. Type Enforcement in Comparison and Assignment

    @@ -29966,9 +30533,9 @@
    - +

    -Table 14.19. Foreign Key Triggered Data Change +Table 14.21. Foreign Key Triggered Data Change

    @@ -30028,9 +30595,9 @@
    - +

    -Table 14.20. Use of LOB for LONGVAR Types +Table 14.22. Use of LOB for LONGVAR Types

    @@ -30064,9 +30631,9 @@
    - +

    -Table 14.21. Type of string literals in CASE WHEN +Table 14.23. Type of string literals in CASE WHEN

    @@ -30101,9 +30668,9 @@
    - +

    -Table 14.22. Concatenation with NULL +Table 14.24. Concatenation with NULL

    @@ -30136,9 +30703,9 @@
    - +

    -Table 14.23. NULL in Multi-Column UNIQUE Constraints +Table 14.25. NULL in Multi-Column UNIQUE Constraints

    @@ -30172,9 +30739,9 @@
    - +

    -Table 14.24. Truncation or Rounding in Type Conversion +Table 14.26. Truncation or Rounding in Type Conversion

    @@ -30208,9 +30775,9 @@
    - +

    -Table 14.25. Decimal Scale of Division and AVG Values +Table 14.27. Decimal Scale of Division and AVG Values

    @@ -30248,9 +30815,9 @@
    - +

    -Table 14.26. Support for NaN values +Table 14.28. Support for NaN values

    @@ -30283,9 +30850,9 @@
    - +

    -Table 14.27. Sort order of NULL values +Table 14.29. Sort order of NULL values

    @@ -30319,9 +30886,9 @@
    - +

    -Table 14.28. Sort order of NULL values with DESC +Table 14.30. Sort order of NULL values with DESC

    @@ -30357,9 +30924,9 @@
    - +

    -Table 14.29. String Comparison with Padding +Table 14.31. String Comparison with Padding

    @@ -30397,9 +30964,9 @@
    - +

    -Table 14.30. Default Locale Language Collation +Table 14.32. Default Locale Language Collation

    @@ -30432,9 +30999,9 @@
    - +

    -Table 14.31. Case-Insensitive Varchar columns +Table 14.33. Case-Insensitive Varchar columns

    @@ -30470,9 +31037,9 @@
    - +

    -Table 14.32. Lowercase column identifiers in ResultSet +Table 14.34. Lowercase column identifiers in ResultSet

    @@ -30509,9 +31076,9 @@
    - +

    -Table 14.33. Storage of Live Java Objects +Table 14.35. Storage of Live Java Objects

    @@ -30546,9 +31113,9 @@
    - +

    -Table 14.34. Names of System Indexes Used for Constraints +Table 14.36. Names of System Indexes Used for Constraints

    @@ -30564,16 +31131,21 @@ - + @@ -30583,9 +31155,9 @@
    - +

    -Table 14.35. DB2 Style Syntax +Table 14.37. DB2 Style Syntax

    sql.sys_index_namesfalsename of system generated indexes for constraintssql.sys_index_namestruename of system generated indexes for constraints

    HSQLDB automatically creates a system index for each PRIMARY KEY, UNIQUE and FOREIGN - KEY constraint. By default the names of those indexes are - generated the system as a string beginning with SYS_. When the - setting is changed to true, the names will be the same as the - constraint names.

    + KEY constraint. If a constraint is not defined with a name, the + system generates a name. By default, the names of these indexes + will be the same as the constraint names. This helps associating + the index name with the user-defined constraint name. When this + property is false, the names of those indexes are generated the + system as a string beginning with SYS_.

    +

    The default + value for this property was false before version + 2.7.0.

    SET DATABASE SQL SYS INDEX NAMES { TRUE | FALSE }
    @@ -30617,9 +31189,9 @@
    - +

    -Table 14.36. MSSQL Style Syntax +Table 14.38. MSSQL Style Syntax

    @@ -30652,9 +31224,9 @@
    - +

    -Table 14.37. MySQL Style Syntax +Table 14.39. MySQL Style Syntax

    @@ -30687,9 +31259,9 @@
    - +

    -Table 14.38. Oracle Style Syntax +Table 14.40. Oracle Style Syntax

    @@ -30723,9 +31295,9 @@
    - +

    -Table 14.39. PostgreSQL Style Syntax +Table 14.41. PostgreSQL Style Syntax

    @@ -30757,6 +31329,44 @@
    +
    + +

    +Table 14.42. Maximum Iterations of Recursive Queries +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    sql.max_recursive256maximum number of iterations of a recursive query
    +

    Recursive queries + terminate if they are not completed when the maximum number of + iterations is reached. This is to avoid long-running queries + that may never actually finish.

    +

    The default value is + fine for most use-cases. You can change the default if you need + to.

    +
    SET DATABASE SQL MAX RECURSIVE <count>
    +
    +
    +
    +
    @@ -30768,9 +31378,9 @@
    - +

    -Table 14.40. Default Table Type +Table 14.43. Default Table Type

    @@ -30806,9 +31416,9 @@
    - +

    -Table 14.41. Transaction Control Mode +Table 14.44. Transaction Control Mode

    @@ -30842,9 +31452,9 @@
    - +

    -Table 14.42. Default Isolation Level for Sessions +Table 14.45. Default Isolation Level for Sessions

    @@ -30878,9 +31488,9 @@
    - +

    -Table 14.43. Transaction Rollback in Deadlock +Table 14.46. Transaction Rollback in Deadlock

    @@ -30921,9 +31531,9 @@
    - +

    -Table 14.44. Transaction Rollback on Interrupt +Table 14.47. Transaction Rollback on Interrupt

    @@ -30959,9 +31569,9 @@
    - +

    -Table 14.45. Time Zone and Interval Types +Table 14.48. Time Zone and Interval Types

    @@ -30977,18 +31587,20 @@ - + @@ -30997,6 +31609,44 @@
    +
    + +

    +Table 14.49. Temporary Result Rows in Memory +

    +
    +
    hsqldb.translate_tti_typestrueusage of type codes for advanced datetime and interval - typeshsqldb.translate_tti_typestrueusage of type codes for advanced interval types

    If the property is true, - the TIME / TIMESTAMP WITH TIME ZONE types and INTERVAL types are - represented in JDBC methods of + the INTERVAL types are represented in JDBC methods of ResultSetMetaData and - DatabaseMetaData as JDBC datetime types - without time zone and the VARCHAR type respectively. The + DatabaseMetaData as the VARCHAR type. The original type names are preserved.

    +

    JDBC does not + have direct support for names and codes of INTERVAL types. From + Java 8, getting and setting INTERVAL values is possible via + getObject() and setObject() methods of ResultSet and + PreparedStatement.

    SET DATABASE SQL TRANSLATE TTI TYPES { TRUE | FALSE }
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    hsqldb.result_max_memory_rows0storage of temporary results and tables in memory or on + disk
    +

    This property can be set + to specify how many rows of each results or temporary table are + stored in memory before the table is written to disk. The + default is zero and means data is always stored in memory. If + this setting is used, it should be set above + 1000.

    +
    SET DATABASE DEFAULT RESULT MEMORY ROWS <numeric value>
    +
    +
    +
    +
    @@ -31008,9 +31658,9 @@
    - +

    -Table 14.46. Opening Database as Read Only +Table 14.50. Opening Database as Read Only

    @@ -31046,9 +31696,9 @@
    - +

    -Table 14.47. Opening Database Without Modifying the Files +Table 14.51. Opening Database Without Modifying the Files

    @@ -31083,9 +31733,124 @@
    - +

    -Table 14.48. Huge database files and tables +Table 14.52. Event Logging +

    +
    +
    +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    hsqldb.applog0application logging level - can also be used when opening + an existing file: database
    +

    The default level 0 + indicates no logging. Level 1 results in minimal logging, + including any failures. Level 2 indicates all events, including + ordinary events. LEVEL 3 adds details of some of the normal + operations. The events are logged in a file ending with + ".app.log".

    +
    SET DATABASE EVENT LOG LEVEL { 0 | 1 | 2 | 3}
    +
    +
    +
    +
    +
    + +

    +Table 14.53. SQL Logging +

    +
    + +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    hsqldb.sqllog0sql logging level - can also be used when opening an + existing file: database
    +

    The default level 0 + indicates no logging. Level 1 logs only commits and rollbacks. + Level 2 logs all the SQL statements executed, together with + their parameter values. Long statements and parameter values are + truncated. Level 3 is similar to Level 2 but does not truncate + long statements and values. The events are logged in a file + ending with ".sql.log". This property applies to existing file: + databases as well as new databases.

    +
    SET DATABASE EVENT LOG SQL LEVEL { 0 | 1 | 2 | 3}
    +
    +
    +
    +
    +
    + +

    +Table 14.54. Table Spaces for Cached Tables +

    +
    + +++++ + + + + + + + + + + + + + +
    NameDefaultDescription
    hsqldb.files_spacefalseuse of separate table spaces for each CACHED + table
    +

    The default value is + false, indicating table space management is not used. When the + value is true at the time of creation of a new database, the + directory structures are created inside the .data file and table + space support is enabled

    +
    SET FILES SPACE { TRUE | FALSE }
    +
    +
    +
    +
    +
    + +

    +Table 14.55. Huge database files and tables

    @@ -31120,12 +31885,12 @@
    - +

    -Table 14.49. Event Logging +Table 14.56. Use of NIO for Disk Table Storage

    -
    +
    @@ -31138,18 +31903,20 @@ - + @@ -31158,12 +31925,12 @@
    - +

    -Table 14.50. SQL Logging +Table 14.57. Use of NIO for Disk Table Storage

    -
    hsqldb.applog0application logging level - can also be used when opening - an existing file: databasehsqldb.nio_data_filetrueuse of nio access methods for the .data file
    -

    The default level 0 - indicates no logging. Level 1 results in minimal logging, - including any failures. Level 2 indicates all events, including - ordinary events. LEVEL 3 adds details of some of the normal - operations. The events are logged in a file ending with - ".app.log".

    -
    SET DATABASE EVENT LOG LEVEL { 0 | 1 | 2 | 3}
    +

    Setting this property to + false will avoid the use of nio access + methods, resulting in somewhat reduced speed. If the data file + is larger than hsqldb.nio_max_size (default + 256MB) when it is first opened (or when its size is increased), + nio access methods are not used. Also, if the file gets larger + than the amount of available computer memory that needs to be + allocated for nio access, non-nio access methods are + used.

    +
    SET FILES NIO { TRUE | FALSE }
    +
    @@ -31176,20 +31943,17 @@ - + @@ -31198,12 +31962,12 @@
    - +

    -Table 14.51. Temporary Result Rows in Memory +Table 14.58. Internal Backup of the .data File

    -
    hsqldb.sqllog0sql logging level - can also be used when opening an - existing file: databasehsqldb.nio_max_size256nio buffer size limit
    -

    The default level 0 - indicates no logging. Level 1 logs only commits and rollbacks. - Level 2 logs all the SQL statements executed, together with - their parameter values. Long statements and parameter values are - truncated. Level 3 is similar to Level 2 but does not truncate - long statements and values. The events are logged in a file - ending with ".sql.log". This property applies to existing file: - databases as well as new databases.

    -
    SET DATABASE EVENT LOG SQL LEVEL { 0 | 1 | 2 | 3}
    +

    The maximum size of .data + file in mega bytes that can use the nio access method. When the + file gets larger than this limit, non-nio access methods are + used. Values 64, 128, 256, 512, 1024, and larger multiples of + 512 can be used. The default is + 256MB.

    +
    SET FILES NIO SIZE <numeric value>
    +
    @@ -31216,18 +31980,22 @@ - + @@ -31236,9 +32004,9 @@
    - +

    -Table 14.52. Unused Space Recovery +Table 14.59. Unused Space Recovery

    hsqldb.result_max_memory_rows0storage of temporary results and tables in memory or on - diskhsqldb.inc_backuptrueincremental backup of data file - NOW OBSOLETE
    -

    This property can be set - to specify how many rows of each results or temporary table are - stored in memory before the table is written to disk. The - default is zero and means data is always stored in memory. If - this setting is used, it should be set above - 1000.

    -
    SET DATABASE DEFAULT RESULT MEMORY ROWS <numeric value>
    +

    As the contents of the + .data file are modified during database operation, the original + contents are backed up gradually. This allows fast checkpoint + and shutdown.

    +

    With HSQLDB up to version 2.5 it was + possible to set the property false in order to have the .data + file backed up entirely at the time of checkpoint and + shutdown.

    +

    From version 2.5.1, this property has no + effect and backup is always + incremental.

    +
    SET FILES BACKUP INCREMENT { TRUE | FALSE }
    @@ -31268,6 +32036,10 @@ are deleted, the smaller recovered spaces are lost and the largest ones are retained for later use. Normally there is no need to set this property.

    +

    When table space + management is turned on (see hsqldb.files_space property) this + property has little effect as unused spaces are always + recovered.

    this property cannot be set with an SQL statement
    @@ -31277,9 +32049,9 @@
    - +

    -Table 14.53. Rows Cached In Memory +Table 14.60. Rows Cached In Memory

    @@ -31315,9 +32087,9 @@
    - +

    -Table 14.54. Size of Rows Cached in Memory +Table 14.61. Size of Rows Cached in Memory

    @@ -31360,9 +32132,9 @@
    - +

    -Table 14.55. Size Scale of Disk Table Storage +Table 14.62. Size Scale of Disk Table Storage

    @@ -31396,9 +32168,9 @@
    - +

    -Table 14.56. Size Scale of LOB Storage +Table 14.63. Size Scale of LOB Storage

    @@ -31432,9 +32204,9 @@
    - +

    -Table 14.57. Compression of BLOB and CLOB data +Table 14.64. Compression of BLOB and CLOB data

    @@ -31467,51 +32239,9 @@
    - +

    -Table 14.58. Internal Backup of Database Files -

    -
    -
    ----- - - - - - - - - - - - - - -
    NameDefaultDescription
    hsqldb.inc_backuptrueincremental backup of data file
    -

    As the contents of the - .data file are modified during database operation, the original - contents are backed up gradually. This allows fast checkpoint - and shutdown.

    -

    With HSQLDB up to version 2.5.0 it was - possible to set the property false in order to have the .data - file backed up entirely at the time of checkpoint and - shutdown.

    -

    From version 2.5.1, this property has no - effect and backup is always - incremental.

    -
    SET FILES BACKUP INCREMENT { TRUE | FALSE }
    -
    -
    -
    -
    -
    - -

    -Table 14.59. Use of Lock File +Table 14.65. Use of Lock File

    @@ -31548,9 +32278,9 @@
    - +

    -Table 14.60. Logging Data Change Statements +Table 14.66. Logging Data Change Statements

    @@ -31574,11 +32304,10 @@ to false when database recovery in the event of an unexpected crash is not necessary. A database that is used as a temporary cache is an example. Regardless of the value of - this property, if there is a proper shutdown of the database, - all the changed data is stored. A checkpoint or shutdown still - rewrites the .script file and saves the - .backup file according to the other - settings.

    + this property, a checkpoint or shutdown still writes the + .script file and saves the + .data file in full, therefore persisting all + the changes.

    SET FILES LOG  { TRUE | FALSE }
    @@ -31588,9 +32317,9 @@
    - +

    -Table 14.61. Automatic Checkpoint Frequency +Table 14.67. Automatic Checkpoint Frequency

    @@ -31624,9 +32353,9 @@
    - +

    -Table 14.62. Automatic Defrag at Checkpoint +Table 14.68. Automatic Defrag at Checkpoint

    @@ -31664,9 +32393,9 @@
    - +

    -Table 14.63. Compression of the .script file +Table 14.69. Compression of the .script file

    @@ -31701,9 +32430,9 @@
    - +

    -Table 14.64. Logging Data Change Statements Frequency +Table 14.70. Logging Data Change Statements Frequency

    @@ -31740,9 +32469,9 @@
    - +

    -Table 14.65. Logging Data Change Statements Frequency +Table 14.71. Logging Data Change Statements Frequency

    @@ -31778,86 +32507,9 @@
    - -

    -Table 14.66. Use of NIO for Disk Table Storage -

    -
    -
    ----- - - - - - - - - - - - - - -
    NameDefaultDescription
    hsqldb.nio_data_filetrueuse of nio access methods for the .data file
    -

    Setting this property to - false will avoid the use of nio access - methods, resulting in somewhat reduced speed. If the data file - is larger than hsqldb.nio_max_size (default - 256MB) when it is first opened (or when its size is increased), - nio access methods are not used. Also, if the file gets larger - than the amount of available computer memory that needs to be - allocated for nio access, non-nio access methods are - used.

    -
    SET FILES NIO { TRUE | FALSE }
    -
    -
    -
    -
    -
    - +

    -Table 14.67. Use of NIO for Disk Table Storage -

    -
    - ----- - - - - - - - - - - - - - -
    NameDefaultDescription
    hsqldb.nio_max_size256nio buffer size limit
    -

    The maximum size of .data - file in mega bytes that can use the nio access method. When the - file gets larger than this limit, non-nio access methods are - used. Values 64, 128, 256, 512, 1024, and larger multiples of - 512 can be used. The default is - 256MB.

    -
    SET FILES NIO SIZE <numeric value>
    -
    -
    -
    -
    -
    - -

    -Table 14.68. Recovery Log Processing +Table 14.72. Recovery Log Processing

    @@ -31895,9 +32547,9 @@
    - +

    -Table 14.69. Default Properties for TEXT Tables +Table 14.73. Default Properties for TEXT Tables

    @@ -31932,9 +32584,9 @@
    - +

    -Table 14.70. Forcing Garbage Collection +Table 14.74. Forcing Garbage Collection

    @@ -31950,14 +32602,14 @@ - + @@ -31978,9 +32630,9 @@
    - +

    -Table 14.71. Crypt Property For LOBs +Table 14.75. Crypt Property For LOBs

    runtime.gc_interval0forced garbage collectionruntime.gc_interval0forced garbage collection - NOW OBSOLETE

    No-op setting previously used to forces garbage collection each time a set number of result set row or cache row objects are created. This setting - has no effect in version 2.5.0 or + has no effect in version 2.5 or later,

    SET DATABASE GC <numeric value>
    @@ -32015,9 +32667,9 @@
    - +

    -Table 14.72. Cipher Key for Encrypted Database +Table 14.76. Cipher Key for Encrypted Database

    @@ -32048,9 +32700,9 @@
    - +

    -Table 14.73. Cipher Initialization Vector for Encrypted Database +Table 14.77. Cipher Initialization Vector for Encrypted Database

    @@ -32082,9 +32734,9 @@
    - +

    -Table 14.74. Crypt Provider Encrypted Database +Table 14.78. Crypt Provider Encrypted Database

    @@ -32116,9 +32768,9 @@
    - +

    -Table 14.75. Cipher Specification for Encrypted Database +Table 14.79. Cipher Specification for Encrypted Database

    @@ -32148,15 +32800,6 @@
    -

    When connecting to an in-process database - creates a new database, or opens an existing database (i.e. it is the - first connection made to the database by the application), all the - user-defined database properties listed in this section can be specified - as URL properties.

    -

    When HyperSQL is used with OpenOffice.org as an external - database, the property "default_schema=true" must be set on the URL, - otherwise the program will not operate correctly as it does with its - built-in hsqldb instance.

    @@ -32172,9 +32815,9 @@ Java command line or by calling System.setProperty() from the user's program. They are not valid as URL or connection properties.

    - +

    -Table 14.76. Logging Framework +Table 14.80. Logging Framework

    @@ -32206,9 +32849,9 @@
    - +

    -Table 14.77. Text Tables +Table 14.81. Text Tables

    @@ -32242,9 +32885,9 @@
    - +

    -Table 14.78. Java Functions +Table 14.82. Java Functions

    @@ -32304,12 +32947,12 @@
    -

    $Revision: 6271 $

    +

    $Revision: 6428 $

    - -

    Copyright 2002-2021 Fred Toussi. Permission is granted to + +

    Copyright 2002-2022 Fred Toussi. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Additional permission is granted to the HSQL Development Group to distribute this document with or without alterations under the @@ -32317,7 +32960,7 @@

    -

    2021-10-21

    +

    2022-07-26

    @@ -32502,7 +33145,7 @@ will work). Supported properties and their default values (if any) are as follows:

    - +

    Table 15.1. common server and webserver properties

    @@ -32580,7 +33223,7 @@

    Properties or default values specific to server.properties are:

    - +

    Table 15.2. server properties

    @@ -32614,7 +33257,7 @@

    Properties or default values specific to webserver.properties are:

    - +

    Table 15.3. webserver properties

    @@ -32831,14 +33474,14 @@
    -

    $Revision: 6271 $

    +

    $Revision: 6428 $

    -

    2021-10-21

    +

    2022-07-26

    - +

    This section explains how to encrypt the stream between JDBC network clients and HyperSQL Listeners. If you are running an in-process (non-Listener) setup, this chapter does @@ -32937,7 +33580,7 @@

    You may already have an X509 cert for your server. If you have a server keystore, then you can generate a X509 cert like this.

    - +

    Example 15.1. Exporting certificate from the server's keystore

    @@ -32956,7 +33599,7 @@ existing keystore, or create a new keystore if client.store doesn't exist.

    - +

    Example 15.2. Adding a certificate to the client keystore

    @@ -32980,7 +33623,7 @@ javax.net.ssl.trustStore every time that you run your client program. For example

    - +

    Example 15.3. Specifying your own trust store to a JDBC client

    @@ -33098,7 +33741,7 @@

    Because I have spent a lot of time on this document already, I am just giving you an example.

    - +

    Example 15.4. Getting a pem-style private key into a JKS keystore

    @@ -33162,7 +33805,7 @@ file.

    If you are using a private server certificate, make sure to also set the trust store filepath for relevant urlids in your RC file, as - explained in the sample config + explained in the sample config file.

    @@ -33178,7 +33821,7 @@
    - +

    JDBC connections will always be denied if the supplied user and password are not found in the target catalog. But an HyperSQL listener can also restrict access at the listener level, even protecting private @@ -33274,7 +33917,7 @@ copy it to a temporary file and edit the temporary file). Then use the ServerAcl class to test it.

    - +

    Example 15.5. Validating and Testing an ACL file

    @@ -33328,10 +33971,10 @@
    -

    $Revision: 6155 $

    +

    $Revision: 6474 $

    -

    2021-10-21

    +

    2022-07-26

    @@ -33535,7 +34178,7 @@

    All the files in the zip archive will be extracted to underneath a new subdirectory named like - hsqldb-2.4.1/hsqldb.

    + hsqldb-2.7.0/hsqldb.

    @@ -33547,7 +34190,7 @@ HyperSQL system is hsqldb.jar, which resides in the subdirectory lib. Depending on who built your distribution, your file name may have a version label in it, like - hsqldb-1.2.3.4.jar.

    + hsqldb-2.7.0.jar.

    @@ -33586,7 +34229,7 @@ document. Otherwise build a new hsqldb.jar.

    - +

    Procedure 16.1. Building hsqldb.jar

    @@ -33765,11 +34408,13 @@ HSQLDB_OWNER's home directory. Use chmod to make the file readable and writable only to HSQLDB_OWNER.

    -
    # $Id: sqltool.rc 5871 2018-12-22 16:56:06Z unsaved $
    +
    # $Id: sqltool.rc 6381 2021-11-18 21:45:56Z unsaved $
     
     # This is a sample RC configuration file used by SqlTool, DatabaseManager,
     # and any other program that uses the org.hsqldb.lib.RCData class.
     # See the documentation for SqlTool for various ways to use this file.
    +# This is not a Java Properties file. It uses a custom format with stanzas,
    +# similar to .netrc files.
     
     # If you have the least concerns about security, then secure access to
     # your RC file.
    @@ -33807,6 +34452,41 @@
     #    liberal patterns, and override settings later in the file with more
     #    specific (or exact) patterns.
     
    +# Since service discovery works great in all JREs for many years now, I
    +# have removed all 'driver' specifications here.  JRE discover will
    +# automatically resolve the driver class based on the JDBC URL format.
    +# Most people use default ports, so I have removed port specification from
    +# examples except for Microsoft's Sql Server driver where you can't depend
    +# on a default port.
    +# In all cases, to specify a non-default port, insert colon and port number
    +# after the hostname or ip address in the JDBC URL, like
    +# jdbc:hsqldb:hsql://localhost:9977 or
    +# jdbc:sqlserver://hostname.admc.com:1433;databaseName=dbname
    +
    +# Amazon Aurora instances are access from JDBC exactly the same as the
    +# non-Aurora RDS counterpart.
    +
    +# For using any database engine other than HyperSQL, you must add the
    +# JDBC jar file and the SqlTool jar to your CLASSPATH then run a command like:
    +#     java org.hsqldb.util.SqlTool...
    +# I.e., the "-jar" switch doesn't support modified classpath.
    +# (See SqlTool manual for how to do same thing using Java modules.)
    +# To oversimplify for non-developers, the two most common methods to set
    +# CLASSPATH for an executable tool like SqlTool are to either use the java
    +# "-cp" switch or set environmental variable CLASSPATH.
    +# Windows users can use graphical UI or CLI "set".  Unix shell users must
    +# "export" in addition to assigning.
    +#
    +# All JDBC jar files used in these examples are available from Maven
    +# repositories.  You can also get them from vendor web sites or with product
    +# bundles (especially database distributions).
    +# Most databases provide multiple variants.  Most people will want a type 4
    +# driver supporting your connection mechanism (most commonly TCP/IP service,
    +# but also database file access and others) and your client JRE version.
    +# By convention the variants are distinguished in segments of the jar file
    +# name before the final ".jar" .
    +
    +
     # Global default.  .+ matches all lookups:
     urlid .+ 
     username SA
    @@ -33820,7 +34500,7 @@
     # A personal, local, persistent database.
     # Inherits username and password from default setting above.
     urlid personal
    -url jdbc:hsqldb:file:${user.home}/db/personal;shutdown=true
    +url jdbc:hsqldb:file:${user.home}/db/personal;shutdown=true;ifexist=true
     transiso TRANSACTION_READ_COMMITTED
     # When connecting directly to a file database like this, you should 
     # use the shutdown connection property like this to shut down the DB
    @@ -33829,36 +34509,25 @@
     # This is for a hsqldb Server running with default settings on your local
     # computer (and for which you have not changed the password for "SA").
     # Inherits username and password from default setting above.
    +# Default port 9001
     urlid localhost-sa
     url jdbc:hsqldb:hsql://localhost
     
     
     
     # Template for a urlid for an Oracle database.
    -# You will need to put the oracle.jdbc.OracleDriver class into your 
    -# classpath.
    -# In the great majority of cases, you want to use jhe desired version of a
    -# file odbc*.jar (previously JDBC distributed as classes12.zip),
    -# which you can get from the directory $ORACLE_HOME/jdbc/lib of any
    -# Oracle installation compatible with your server.
    -# Since you need to add to the classpath, you can't invoke SqlTool with
    -# the jar switch, like "java -jar .../sqltool.jar...".
    -# Put both the SqlTool jar and odbc*.jar in your classpath (and export!)
    -# and run something like "java org.hsqldb.util.SqlTool...".
    +# Driver jar files from this century have format like "ojbc*.jar".
    +# Default port 1521
    +urlid localhost-sa
    +# Avoid older drivers because they have quirks.
     # You could use the thick driver instead of the thin, but I know of no reason
     # why any Java app should.
     
     #urlid cardiff2
    -#url jdbc:oracle:thin:@aegir.admc.com:1521:TRAFFIC_SID
    -# Thin SID URLs must specify both port and SID, there are no defaults.
    -# Oracle listens to 1521 by default, so that's what you will usually specify.
    -# But can alternatively use global service name (not tnsnames.ora service
    -# alias, in which case the port does default to 1521):
    -#url jdbc:oracle:thin:@centos.admc.com/tstsid.admc
    +# Can identify target database with either SID or global service name.
    +#url jdbc:oracle:thin:@//centos.admc.com/tstsid.admc
     #username blaine
    -#password secretpassword
    -#driver oracle.jdbc.OracleDriver
    -
    +#password asecret
     
     
     # Template for a TLS-encrypted HSQLDB Server.
    @@ -33868,6 +34537,7 @@
     # You only need to set "truststore" if the server cert is not approved by
     # your system default truststore (which a commercial certificate probably
     # would be).
    +# Port defaults to 554.
     
     #urlid tls
     #url jdbc:hsqldb:hsqls://db.admc.com:9001/lm2
    @@ -33877,77 +34547,84 @@
     
     
     # Template for a Postgresql database
    +# Driver jar files are of format like "postgresql-*.jar"
    +# Port defaults to 5432.
     #urlid blainedb
     #url jdbc:postgresql://idun.africawork.org/blainedb
     #username blaine
    -#password losung1
    -#driver org.postgresql.Driver
    +#password asecret
    +
    +# Amazon RedShift (a fork of Postgresql)
    +# Driver jar files are of format like "redshift-jdbc*.jar"
    +# Port defaults to 5439.
    +#urlid redhshift
    +#url jdbc:redshift://clustername.hex.us-east-1.redshift.amazonaws.com/dev
    +#username awsuser
    +#password asecret
     
     # Template for a MySQL database.  MySQL has poor JDBC support.
    +# The latest driver jar files are of format like "mysql-jdbc*.jar", but not
    +# long ago they were like "mysql-connector-java*.jar".
    +# Port defaults to 3306
     #urlid mysql-testdb
    -#url jdbc:mysql://hostname:3306/dbname
    +#url jdbc:mysql://hostname/dbname
     #username root
    -#password hiddenpwd
    -#driver com.mysql.jdbc.Driver
    +#password asecret
    +# Alternatively, you can access MySQL using jdbc:mariadb URLs and driver.
     
     # Note that "databases" in SQL Server and Sybase are traditionally used for
     # the same purpose as "schemas" with more SQL-compliant databases.
     
     # Template for a Microsoft SQL Server database using Microsoft's Driver
    -# (I find that the JTDS driver is much more responsive than Microsoft's).
    -# Port defaults to 1433.
    +# Seems that some versions default to port 1433 and others to 1434.
     # MSDN implies instances are port-specific, so can specify port or instname.
     #urlid msprojsvr
    -# url/driver for Current 2011 JDBC Driver for Microsoft SQL Server:
    -# Requires just the new sqljdbc4.jar.  (Microsoft just loves back-slashes)
    -#url jdbc:sqlserver://hostname\instname;databaseName=dbname
    -# OR
    +# Driver jar files are of format like "mssql-jdbc-*.jar".
    +# Don't use older MS JDBC drivers (like SQL Server 2000 vintage) because they
    +# are pitifully incompetent, handling transactions incorrectly.
    +# I recommend that you do not use Microsoft's nonstandard format that
    +# includes backslashes.
     #url jdbc:sqlserver://hostname;instanceName=instname;databaseName=dbname
    -#driver com.microsoft.jdbc.sqlserver.SQLServerDriver
    -# See, for example,
    -# https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-2017
    -# url/deriver for OLDER JDBC Driver:
    -#url jdbc:microsoft:sqlserver://hostname;DatabaseName=DbName;SelectMethod=Cursor
    -# The SelectMethod setting is required to do more than one thing on a JDBC
    -# session (I guess Microsoft thought nobody would really use Java for 
    -# anything other than a "hello world" program).
    -# This is for Microsoft's SQL Server 2000 driver (requires mssqlserver.jar
    -# and msutil.jar).
    -#driver com.microsoft.jdbc.sqlserver.SQLServerDriver
    +# with port:
    +#url jdbc:sqlserver://hostname:1433;instanceName=instname;databaseName=dbname
     #username myuser
    -#password hiddenpwd
    +#password asecret
     
     # Template for Microsoft SQL Server database using the JTDS Driver
    -# http://jtds.sourceforge.net  Jar file has name like "jtds-1.2.5.jar".
    +# Looks like this project is no longer maintained, so you may be better off
    +# using the Microsoft driver above.
    +# http://jtds.sourceforge.net  Jar file has name like "jtds-1.3.1.jar".
     # Port defaults to 1433.
     # MSDN implies instances are port-specific, so can specify port or instname.
     #urlid nlyte
     #username myuser
    -#password hiddenpwd
    +#password asecret
     #url jdbc:jtds:sqlserver://myhost/nlyte;instance=MSSQLSERVER
     # Where database is 'nlyte' and instance is 'MSSQLSERVER'.
     # N.b. this is diff. from MS tools and JDBC driver where (depending on which
     # document you read), instance or database X are specified like  HOSTNAME\X.
    -#driver net.sourceforge.jtds.jdbc.Driver
     
     # Template for a Sybase database
     #urlid sybase
     #url jdbc:sybase:Tds:hostname:4100/dbname
     #username blaine
    -#password hiddenpwd
    +#password asecret
     # This is for the jConnect driver (requires jconn3.jar).
    -#driver com.sybase.jdbc3.jdbc.SybDriver
     
    -# Template for Embedded Derby / Java DB.
    -#urlid derby1
    -#url jdbc:derby:path/to/derby/directory;create=true
    +# Derby / Java DB.
    +# Please see the Derby JDBC docs, because they have changed the organization
    +# of their driver jar files in recent years.  Combining that with the different
    +# database types supported and jar file classpath chaining, and it's not
    +# feasible to document it adequately here.
    +# I'll just give one example using network service, which works with 10.15.2.0.
    +# Put files derbytools*.jar, derbyclient*.jar, derbyshared*.jar into a
    +# directory and include the path to the derbytools.jar in your classpath.
    +# Port defaults to 1527.
    +#url jdbc:derby://server:<port>/databaseName
     #username ${user.name}
     #password any_noauthbydefault
    -#driver org.apache.derby.jdbc.EmbeddedDriver
    -# The embedded Derby driver requires derby.jar.
    -# There'a also the org.apache.derby.jdbc.ClientDriver driver with URL
    -# like jdbc:derby://<server>[:<port>]/databaseName, which requires
    -# derbyclient.jar.
    +# If you get the right classes into classpath, local file URLs are like:
    +#url jdbc:derby:path/to/derby/directory
     # You can use \= to commit, since the Derby team decided (why???)
     # not to implement the SQL standard statement "commit"!!
     # Note that SqlTool can not shut down an embedded Derby database properly,
    @@ -33955,6 +34632,16 @@
     # However, I've never lost data by shutting it down improperly.
     # Other than not supporting this quirk of Derby, SqlTool is miles ahead of
     # Derby's ij.
    +
    +# Maria DB
    +# With current versions, the MySQL driver does not work to access a Maria
    +# database (though the inverse works).
    +# Driver jar files are of format like "mariadb-java-client*.jar"
    +# Port defaults to 3306
    +#urlid maria
    +#url jdbc:mariadb://hostname/db2
    +#username blaine
    +#password asecret
     

    We will be using the "localhost-sa" sample urlid definition from the config file. The JDBC URL for this urlid is @@ -34083,7 +34770,7 @@

    - +

    You can, of course, run HSQLDB through inittab on System V UNIXes, but usually an init script is more convenient and manageable. This section explains how to set up and use our UNIX init script. Our init @@ -34206,7 +34893,7 @@ catalog. You must supply for this catalog, a hsql: JDBC URL, an administrative user name, and the password.

    - +

    Example 16.1. example sqltool.rc stanza

    @@ -34222,13 +34909,13 @@
  • Look at the comment towards the top of the init script which lists recommended locations for the configuration file for - various UNIX platforms. Copy the sample config file sample/hsqldb.cfg to one of + various UNIX platforms. Copy the sample config file sample/hsqldb.conf to one of the listed locations (your choice). Edit the config file according to the instructions in it. For our example, you will set the value of URLIDS to localhostdb1, since that is the urlid name that we used in the sqltool.rc file.

    -
    # $Id: hsqldb.cfg 3583 2010-05-16 01:49:52Z unsaved $
    +
    # $Id: hsqldb.conf 6310 2021-02-28 15:25:00Z unsaved $
     
     # Sample configuration file for HyperSQL Server Listener.
     # See the "HyperSQL on UNIX" chapter of the HyperSQL User Guide.
    @@ -34530,7 +35217,7 @@
         /sample/hsqldb.init over top of of your init script
         (wherever it runs from). Then update your old config file according to the
         instructions in the new config file template at
    -    sample/hsqldb.cfg. You will have to change very few
    +    sample/hsqldb.conf. You will have to change very few
         settings. If you are upgrading from a pre-2.0 installation to a post-2.0
         installation, you will need to (1) add the setting
         URLIDS, as described above and in the inline comments,
    @@ -34569,7 +35256,7 @@
     

    $Revision: 5999 $

  • -

    2021-10-21

    +

    2022-07-26

    @@ -35038,7 +35725,7 @@

    See the above section for descriptions and usage details. This section just contains a list of the available settings.

    - +

    Table 17.1. Settings List

    @@ -35175,7 +35862,7 @@

    $Revision: 847 $

    -

    2021-10-21

    +

    2022-07-26

    @@ -35216,7 +35903,7 @@

    All keywords can be used with double quotes as identifiers. For example

      CREATE TABLE "ALL" ("AND" INT, "WHEN" INT)
    -  SELECT "AND" FROM "ALL" WHERE "WHEN" = 2021
    +  SELECT "AND" FROM "ALL" WHERE "WHEN" = 2022
     

    ABS • ALL • ALLOCATE • ALTER • AND • ANY • ARE • ARRAY • AS • ASENSITIVE • ASYMMETRIC • AT • ATOMIC • AUTHORIZATION • AVG

    @@ -35350,7 +36037,7 @@

    $Revision: 5925 $

    -

    2021-10-21

    +

    2022-07-26

    @@ -35610,7 +36297,7 @@
    - +

    Procedure B.1. Clean HyperSQL database shutdown

    @@ -35672,7 +36359,7 @@
    - +

    Procedure B.2. Opening the Database

    @@ -35726,7 +36413,7 @@

    The current test.data file is not necessarily consistent. The database engine takes these steps:

    - +

    Procedure B.3. Restore a Database

    @@ -35798,7 +36485,7 @@

    $Revision: 6366 $

    -

    2021-10-21

    +

    2022-07-26

    @@ -35873,7 +36560,7 @@ - +

    Unlike most software build systems, you do not need to have the Gradle system installed on your computer to use it. You don't need to understand the details to use it, but this is the purpose of the @@ -35983,7 +36670,7 @@ - +

    You should use version 1.9 or 1.10 of Ant (Another Neat Tool) to do Ant builds with HyperSQL.

    @@ -36155,7 +36842,7 @@

    The command displays a list of different options for building different sizes of the HSQLDB Jar. The default is built using:

    - +

    Example C.1. Buiding the standard HSQLDB jar file with Ant

    @@ -36208,7 +36895,7 @@ particular version of the file. This operation is done for all files of a defined directory, and all subdirectories.

    - +

    Example C.2. Example source code before CodeSwitcher is run

    @@ -36236,7 +36923,7 @@

    The next step is to run CodeSwitcher.

    - +

    Example C.3. CodeSwitcher command line invocation

    @@ -36250,7 +36937,7 @@ subdirectories are processed recursively). -JAVA8 means the code labelled with JAVA8 must be switched off.

    - +

    Example C.4. Source code after CodeSwitcher processing

    @@ -36410,10 +37097,10 @@
    -

    $Revision: 6281 $

    +

    $Revision: 6491 $

    -

    2021-10-21

    +

    2022-07-26

    @@ -36462,7 +37149,7 @@ database schema and application, even if the database is intended for your own application, rather than OpenOffice.

    HyperSQ version 1.8.0 is included in OOo, ApacheOpenOffice and - LibreOffice. You can simply replace the jar with a HyperSQL version 2.6 + LibreOffice. You can simply replace the jar with a HyperSQL version 2.7 jar to use the latest capabilities with external databases. It is not yet possible to create and use embedded databases with this version.

    HyperSQL version 2.x jar will hopefully be included in the future @@ -36491,8 +37178,8 @@

    The only current limitation is that OpenOffice only works with the PUBLIC schema. This limitation will hopefully disappear in the future versions of OOo.

    -

    There will hopefully be a HyperSQLDB 2.x jar in the future - versions of OpenOffice.

    +

    There will hopefully be a HyperSQL 2.x jar in future versions of + OpenOffice.

    @@ -36520,22 +37207,20 @@
    -

    In 2021, two new OOo and LO extensions are developed and +

    Since 2021, two new OOo and LO extensions are developed and maintained on GitHub by the developer prrvchr. These extensions make it easy to use the latest version of HSQLDB 2.x with the latest versions of the Base program. One extension simply adds and loads the HSQLDB 2.x jar, ready for use. It also allows updating the jar to the latest version. The second extension extracts the database from the .odb file in the same directory and connects to the extracted database files.

    -

    The simple driver: https://prrvchr.github.io/HsqlDBDriverOOo/ - +

    The simple driver: https://prrvchr.github.io/jdbcDriverOOo/

    The driver that extracts the files: https://prrvchr.github.io/HsqlDBembeddedOOo/ -

    The extensions are easy to use, with clear visual instructions on how to add the extensions to the Office suite and how to create and open - databases.

    + databases.

    @@ -36583,12 +37268,12 @@

    Local: - ../apidocs/org/hsqldb/jdbc/JDBCConnection.html + ../apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCConnection.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/jdbc/JDBCConnection.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCConnection.html

    @@ -36596,12 +37281,12 @@

    Local: - ../apidocs/org/hsqldb/jdbc/JDBCDriver.html + ../apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCDriver.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/jdbc/JDBCDriver.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCDriver.html

    @@ -36609,12 +37294,12 @@

    Local: - ../apidocs/org/hsqldb/jdbc/JDBCDatabaseMetaData.html + ../apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCDatabaseMetaData.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/jdbc/JDBCDatabaseMetaData.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCDatabaseMetaData.html

    @@ -36622,12 +37307,12 @@

    Local: - ../apidocs/org/hsqldb/jdbc/JDBCResultSet.html + ../apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCResultSet.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/jdbc/JDBCResultSet.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCResultSet.html

    @@ -36635,12 +37320,12 @@

    Local: - ../apidocs/org/hsqldb/jdbc/JDBCStatement.html + ../apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCStatement.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/jdbc/JDBCStatement.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCStatement.html

    @@ -36648,12 +37333,12 @@

    Local: - ../apidocs/org/hsqldb/jdbc/JDBCPreparedStatement.html + ../apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCPreparedStatement.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/jdbc/JDBCPreparedStatement.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/jdbc/JDBCPreparedStatement.html

    @@ -36661,12 +37346,12 @@

    Local: - ../apidocs/org/hsqldb/util/MainInvoker.html + ../apidocs/org.hsqldb/org/hsqldb/util/MainInvoker.html

    -http://hsqldb.org/doc/2.0/apidocs/org/hsqldb/util/MainInvoker.html +http://hsqldb.org/doc/2.0/apidocs/org.hsqldb/org/hsqldb/util/MainInvoker.html

    @@ -36775,15 +37460,15 @@

  • - +

    Local: - ../verbatim/sample/hsqldb.cfg + ../verbatim/sample/hsqldb.conf

    -http://hsqldb.org/doc/2.0/verbatim/sample/hsqldb.cfg +http://hsqldb.org/doc/2.0/verbatim/sample/hsqldb.conf

  • @@ -36855,7 +37540,7 @@

    Symbols

    -
    _SYSTEM ROLE, Built-In Roles and Users +
    _SYSTEM Role, Built-In Roles and Users
    @@ -36864,6 +37549,8 @@
    ABS function, Numeric Functions
    +
    Access Rights, Access Rights +
    ACOS function, Numeric Functions
    ACTION_ID function, System Functions @@ -36884,6 +37571,8 @@
    ADMINISTRABLE_ROLE_AUTHORIZATIONS, SQL Standard Views
    +
    Admin USER, Built-In Roles and Users +
    aggregate function, Aggregate Functions
    ALL and ANY predicates, Predicates @@ -36935,6 +37624,8 @@
    ATAN function, Numeric Functions
    +
    Authorisation and Access Control, Authorizations and Access Control +
    AUTHORIZATION IDENTIFIER, Authorizations and Access Control
    AUTHORIZATIONS, SQL Standard Views @@ -36974,6 +37665,8 @@
    boolean value expression, Value Expression
    +
    Built-in Roles and Users, Built-In Roles and Users +
    @@ -37077,7 +37770,7 @@
    COT function, Numeric Functions
    -
    CREATE_SCHEMA ROLE, Built-In Roles and Users +
    CREATE_SCHEMA Role, Built-In Roles and Users
    CREATE AGGREGATE FUNCTION, Definition of Aggregate Functions
    @@ -37190,7 +37883,7 @@
    DAYS function datetime, Functions to Extract an Element of a Datetime
    -
    DBA ROLE, Built-In Roles and Users +
    DBA Role, Built-In Roles and Users
    DECLARE CURSOR, Cursor Declaration
    @@ -37314,6 +38007,8 @@
    FROM_BASE64 function, String and Binary String Functions
    +
    FROM_TZ function, Functions to Convert or Format a Datetime +
    @@ -37443,6 +38144,8 @@
    LIKE predicate, Predicates
    +
    Listing Users and Roles, Listing Users and Roles +
    LN function, Numeric Functions
    LOAD_FILE function, General Functions @@ -37561,8 +38264,12 @@
    PERFORM CHECK INDEX, Data Management Statements
    +
    PERFORM EXPORT DSV, Data Management Statements +
    PERFORM EXPORT SCRIPT, Data Management Statements
    +
    PERFORM IMPORT DSV file, Data Management Statements +
    PERFORM IMPORT SCRIPT, Data Management Statements
    PERIODS, SQL Standard Views @@ -37579,7 +38286,7 @@
    PRIMARY KEY constraint, Table Creation
    -
    PUBLIC ROLE, Built-In Roles and Users +
    PUBLIC Role, Built-In Roles and Users
    @@ -37637,7 +38344,7 @@
    REVERSE function, String and Binary String Functions
    -
    REVOKE, Statements for +
    REVOKE privileges, Statements for Authorization and Access Control
    REVOKE ROLE, Statements for @@ -37710,7 +38417,7 @@
    SCRIPT, System Operations
    -
    SCRIPT_OPS, Built-In Roles and Users +
    SCRIPT_OPS Role, Built-In Roles and Users
    search condition, Other Syntax Elements
    @@ -37809,6 +38516,8 @@
    SET DATABASE SQL TRANSLATE TTI TYPES, SQL Conformance Settings
    +
    SET DATABASE SQL TRUNCATE TRAILING, SQL Conformance Settings +
    SET DATABASE SQL TYPES, SQL Conformance Settings
    SET DATABASE SQL UNIQUE NULLS, SQL Conformance Settings @@ -37907,6 +38616,8 @@
    SIGN function, Numeric Functions
    +
    Simple Data Access Control, Simple Access Control +
    SIN function, Numeric Functions
    SINH function, Numeric Functions @@ -38015,8 +38726,6 @@
    SYSTIMESTAMP function, Functions to Report the Current Datetime
    -
    SYS USER, Built-In Roles and Users -
    @@ -38199,7 +38908,7 @@

    Symbols

    -
    _SYSTEM ROLE, Built-In Roles and Users +
    _SYSTEM Role, Built-In Roles and Users
    @@ -38208,6 +38917,8 @@
    ABS function, Numeric Functions
    +
    Access Rights, Access Rights +
    ACL, Network Access Control
    ACOS function, Numeric Functions @@ -38230,6 +38941,8 @@
    ADMINISTRABLE_ROLE_AUTHORIZATIONS, SQL Standard Views
    +
    Admin USER, Built-In Roles and Users +
    aggregate function, Aggregate Functions
    ALL and ANY predicates, Predicates @@ -38283,6 +38996,8 @@
    ATAN function, Numeric Functions
    +
    Authorisation and Access Control, Authorizations and Access Control +
    AUTHORIZATION IDENTIFIER, Authorizations and Access Control
    AUTHORIZATIONS, SQL Standard Views @@ -38324,6 +39039,8 @@
    boolean value expression, Value Expression
    +
    Built-in Roles and Users, Built-In Roles and Users +
    @@ -38429,7 +39146,7 @@
    COT function, Numeric Functions
    -
    CREATE_SCHEMA ROLE, Built-In Roles and Users +
    CREATE_SCHEMA Role, Built-In Roles and Users
    CREATE AGGREGATE FUNCTION, Definition of Aggregate Functions
    @@ -38542,7 +39259,7 @@
    DAYS function datetime, Functions to Extract an Element of a Datetime
    -
    DBA ROLE, Built-In Roles and Users +
    DBA Role, Built-In Roles and Users
    DECLARE CURSOR, Cursor Declaration
    @@ -38666,6 +39383,8 @@
    FROM_BASE64 function, String and Binary String Functions
    +
    FROM_TZ function, Functions to Convert or Format a Datetime +
    @@ -38799,6 +39524,8 @@
    LIKE predicate, Predicates
    +
    Listing Users and Roles, Listing Users and Roles +
    LN function, Numeric Functions
    LOAD_FILE function, General Functions @@ -38919,8 +39646,12 @@
    PERFORM CHECK INDEX, Data Management Statements
    +
    PERFORM EXPORT DSV, Data Management Statements +
    PERFORM EXPORT SCRIPT, Data Management Statements
    +
    PERFORM IMPORT DSV file, Data Management Statements +
    PERFORM IMPORT SCRIPT, Data Management Statements
    PERIODS, SQL Standard Views @@ -38937,7 +39668,7 @@
    PRIMARY KEY constraint, Table Creation
    -
    PUBLIC ROLE, Built-In Roles and Users +
    PUBLIC Role, Built-In Roles and Users
    @@ -38995,7 +39726,7 @@
    REVERSE function, String and Binary String Functions
    -
    REVOKE, Statements for +
    REVOKE privileges, Statements for Authorization and Access Control
    REVOKE ROLE, Statements for @@ -39068,7 +39799,7 @@
    SCRIPT, System Operations
    -
    SCRIPT_OPS, Built-In Roles and Users +
    SCRIPT_OPS Role, Built-In Roles and Users
    search condition, Other Syntax Elements
    @@ -39169,6 +39900,8 @@
    SET DATABASE SQL TRANSLATE TTI TYPES, SQL Conformance Settings
    +
    SET DATABASE SQL TRUNCATE TRAILING, SQL Conformance Settings +
    SET DATABASE SQL TYPES, SQL Conformance Settings
    SET DATABASE SQL UNIQUE NULLS, SQL Conformance Settings @@ -39267,6 +40000,8 @@
    SIGN function, Numeric Functions
    +
    Simple Data Access Control, Simple Access Control +
    SIN function, Numeric Functions
    SINH function, Numeric Functions @@ -39375,8 +40110,6 @@
    SYSTIMESTAMP function, Functions to Report the Current Datetime
    -
    SYS USER, Built-In Roles and Users -
    @@ -39550,6 +40283,6 @@

    -

    $Revision: 6369 $

    +

    $Revision: 6474 $

    Binary files /tmp/tmp_0bpm_7m/9POo46eOkt/hsqldb-2.6.1/hsqldb/doc/guide/guide.pdf and /tmp/tmp_0bpm_7m/lrkf8so7nm/hsqldb-2.7.0/hsqldb/doc/guide/guide.pdf differ diff -Nru hsqldb-2.6.1/hsqldb/doc/guide/index.html hsqldb-2.7.0/hsqldb/doc/guide/index.html --- hsqldb-2.6.1/hsqldb/doc/guide/index.html 2021-10-20 09:33:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/doc/guide/index.html 2022-07-26 20:21:48.000000000 +0000 @@ -28,7 +28,7 @@ HyperSQL User Guide
    -

    HyperSQL Database Engine 2.6.1

    +

    HyperSQL Database Engine 2.7.0

    @@ -66,7 +66,7 @@
    -

    Copyright 2002-2021 Blaine Simpson, Fred Toussi and The HSQL +

    Copyright 2002-2022 Blaine Simpson, Fred Toussi and The HSQL Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. You are not allowed to distribute or display this document on the web in an @@ -74,7 +74,7 @@

    -

    2021-10-21

    +

    2022-07-26

    @@ -201,7 +201,7 @@
    -Case Sensitivity +Case Sensitivity
    Persistent Tables @@ -426,6 +426,9 @@ String and Binary String Functions
    +JSON Functions +
    +
    Numeric Functions
    @@ -752,6 +755,9 @@ Access Rights
    +Simple Access Control +
    +
    Fine-Grained Data Access Control
    @@ -1257,7 +1263,7 @@ Variables in Connection URL
    -Connection Properties +Connection Properties
    Properties for Individual Connections @@ -1534,174 +1540,182 @@
    1. Available formats of this document
    -
    2.1. List of SQL types +
    2.1. List of SQL types
    -
    4.1. TO_CHAR, TO_DATE and TO_TIMESTAMP format elements +
    4.1. TO_CHAR, TO_DATE and TO_TIMESTAMP format elements
    -
    14.1. Memory Database URL +
    14.1. Memory Database URL
    -
    14.2. File Database URL +
    14.2. File Database URL
    -
    14.3. Resource Database URL +
    14.3. Resource Database URL
    -
    14.4. Server Database URL +
    14.4. Server Database URL
    -
    14.5. User and Password +
    14.5. User and Password
    -
    14.6. Creating New Database +
    14.6. Closing old ResultSet when Statement is reused
    -
    14.7. Closing old ResultSet when Statement is reused +
    14.7. Column Names in JDBC ResultSet
    -
    14.8. Column Names in JDBC ResultSet +
    14.8. In-memory LOBs from JDBC ResultSet
    -
    14.9. In-memory LOBs from JDBC ResultSet +
    14.9. Empty batch in JDBC PreparedStatement
    -
    14.10. Empty batch in JDBC PreparedStatement +
    14.10. Automatic Shutdown
    -
    14.11. Automatic Shutdown +
    14.11. OpenOffice and Libre Office usage
    -
    14.12. Validity Check Property +
    14.12. Validity Check Property
    -
    14.13. Execution of Multiple SQL Statements etc. +
    14.13. Creating New Database Check Property
    -
    14.14. SQL Keyword Use as Identifier +
    14.14. Execution of Multiple SQL Statements etc.
    -
    14.15. SQL Keyword Starting with the Underscore or Containing Dollar +
    14.15. SQL Keyword Use as Identifier +
    +
    14.16. SQL Keyword Starting with the Underscore or Containing Dollar Characters
    -
    14.16. Reference to Columns Names +
    14.17. Reference to Columns Names +
    +
    14.18. String Size Declaration +
    +
    14.19. Truncation of trailing spaces from string +
    +
    14.20. Type Enforcement in Comparison and Assignment
    -
    14.17. String Size Declaration +
    14.21. Foreign Key Triggered Data Change
    -
    14.18. Type Enforcement in Comparison and Assignment +
    14.22. Use of LOB for LONGVAR Types
    -
    14.19. Foreign Key Triggered Data Change +
    14.23. Type of string literals in CASE WHEN
    -
    14.20. Use of LOB for LONGVAR Types +
    14.24. Concatenation with NULL
    -
    14.21. Type of string literals in CASE WHEN +
    14.25. NULL in Multi-Column UNIQUE Constraints
    -
    14.22. Concatenation with NULL +
    14.26. Truncation or Rounding in Type Conversion
    -
    14.23. NULL in Multi-Column UNIQUE Constraints +
    14.27. Decimal Scale of Division and AVG Values
    -
    14.24. Truncation or Rounding in Type Conversion +
    14.28. Support for NaN values
    -
    14.25. Decimal Scale of Division and AVG Values +
    14.29. Sort order of NULL values
    -
    14.26. Support for NaN values +
    14.30. Sort order of NULL values with DESC
    -
    14.27. Sort order of NULL values +
    14.31. String Comparison with Padding
    -
    14.28. Sort order of NULL values with DESC +
    14.32. Default Locale Language Collation
    -
    14.29. String Comparison with Padding +
    14.33. Case-Insensitive Varchar columns
    -
    14.30. Default Locale Language Collation +
    14.34. Lowercase column identifiers in ResultSet
    -
    14.31. Case-Insensitive Varchar columns +
    14.35. Storage of Live Java Objects
    -
    14.32. Lowercase column identifiers in ResultSet +
    14.36. Names of System Indexes Used for Constraints
    -
    14.33. Storage of Live Java Objects +
    14.37. DB2 Style Syntax
    -
    14.34. Names of System Indexes Used for Constraints +
    14.38. MSSQL Style Syntax
    -
    14.35. DB2 Style Syntax +
    14.39. MySQL Style Syntax
    -
    14.36. MSSQL Style Syntax +
    14.40. Oracle Style Syntax
    -
    14.37. MySQL Style Syntax +
    14.41. PostgreSQL Style Syntax
    -
    14.38. Oracle Style Syntax +
    14.42. Maximum Iterations of Recursive Queries
    -
    14.39. PostgreSQL Style Syntax +
    14.43. Default Table Type
    -
    14.40. Default Table Type +
    14.44. Transaction Control Mode
    -
    14.41. Transaction Control Mode +
    14.45. Default Isolation Level for Sessions
    -
    14.42. Default Isolation Level for Sessions +
    14.46. Transaction Rollback in Deadlock
    -
    14.43. Transaction Rollback in Deadlock +
    14.47. Transaction Rollback on Interrupt
    -
    14.44. Transaction Rollback on Interrupt +
    14.48. Time Zone and Interval Types
    -
    14.45. Time Zone and Interval Types +
    14.49. Temporary Result Rows in Memory
    -
    14.46. Opening Database as Read Only +
    14.50. Opening Database as Read Only
    -
    14.47. Opening Database Without Modifying the Files +
    14.51. Opening Database Without Modifying the Files
    -
    14.48. Huge database files and tables +
    14.52. Event Logging
    -
    14.49. Event Logging +
    14.53. SQL Logging
    -
    14.50. SQL Logging +
    14.54. Table Spaces for Cached Tables
    -
    14.51. Temporary Result Rows in Memory +
    14.55. Huge database files and tables
    -
    14.52. Unused Space Recovery +
    14.56. Use of NIO for Disk Table Storage
    -
    14.53. Rows Cached In Memory +
    14.57. Use of NIO for Disk Table Storage
    -
    14.54. Size of Rows Cached in Memory +
    14.58. Internal Backup of the .data File
    -
    14.55. Size Scale of Disk Table Storage +
    14.59. Unused Space Recovery
    -
    14.56. Size Scale of LOB Storage +
    14.60. Rows Cached In Memory
    -
    14.57. Compression of BLOB and CLOB data +
    14.61. Size of Rows Cached in Memory
    -
    14.58. Internal Backup of Database Files +
    14.62. Size Scale of Disk Table Storage
    -
    14.59. Use of Lock File +
    14.63. Size Scale of LOB Storage
    -
    14.60. Logging Data Change Statements +
    14.64. Compression of BLOB and CLOB data
    -
    14.61. Automatic Checkpoint Frequency +
    14.65. Use of Lock File
    -
    14.62. Automatic Defrag at Checkpoint +
    14.66. Logging Data Change Statements
    -
    14.63. Compression of the .script file +
    14.67. Automatic Checkpoint Frequency
    -
    14.64. Logging Data Change Statements Frequency +
    14.68. Automatic Defrag at Checkpoint
    -
    14.65. Logging Data Change Statements Frequency +
    14.69. Compression of the .script file
    -
    14.66. Use of NIO for Disk Table Storage +
    14.70. Logging Data Change Statements Frequency
    -
    14.67. Use of NIO for Disk Table Storage +
    14.71. Logging Data Change Statements Frequency
    -
    14.68. Recovery Log Processing +
    14.72. Recovery Log Processing
    -
    14.69. Default Properties for TEXT Tables +
    14.73. Default Properties for TEXT Tables
    -
    14.70. Forcing Garbage Collection +
    14.74. Forcing Garbage Collection
    -
    14.71. Crypt Property For LOBs +
    14.75. Crypt Property For LOBs
    -
    14.72. Cipher Key for Encrypted Database +
    14.76. Cipher Key for Encrypted Database
    -
    14.73. Cipher Initialization Vector for Encrypted Database +
    14.77. Cipher Initialization Vector for Encrypted Database
    -
    14.74. Crypt Provider Encrypted Database +
    14.78. Crypt Provider Encrypted Database
    -
    14.75. Cipher Specification for Encrypted Database +
    14.79. Cipher Specification for Encrypted Database
    -
    14.76. Logging Framework +
    14.80. Logging Framework
    -
    14.77. Text Tables +
    14.81. Text Tables
    -
    14.78. Java Functions +
    14.82. Java Functions
    -
    15.1. common server and webserver properties +
    15.1. common server and webserver properties
    -
    15.2. server properties +
    15.2. server properties
    -
    15.3. webserver properties +
    15.3. webserver properties
    -
    17.1. Settings List +
    17.1. Settings List
    @@ -1710,100 +1724,100 @@ List of Examples

    -
    1.1. Java code to connect to the local hsql Server +
    1.1. Java code to connect to the local hsql Server
    -
    1.2. Java code to connect to the local http Server +
    1.2. Java code to connect to the local http Server
    -
    1.3. Java code to connect to the local secure SSL hsqls: and +
    1.3. Java code to connect to the local secure SSL hsqls: and https: Servers
    -
    1.4. specifying a connection property to shutdown the database when +
    1.4. specifying a connection property to shutdown the database when the last connection is closed
    -
    1.5. specifying a connection property to disallow creating a new +
    1.5. specifying a connection property to disallow creating a new database
    -
    3.1. inserting the next sequence value into a table row +
    3.1. inserting the next sequence value into a table row
    -
    3.2. numbering returned rows of a SELECT in sequential order +
    3.2. numbering returned rows of a SELECT in sequential order
    -
    3.3. using the last value of a sequence +
    3.3. using the last value of a sequence
    -
    3.4. Column values which satisfy a 2-column UNIQUE +
    3.4. Column values which satisfy a 2-column UNIQUE constraint
    -
    6.1. User-defined Session Variables +
    6.1. User-defined Session Variables
    -
    6.2. User-defined Temporary Session Tables +
    6.2. User-defined Temporary Session Tables
    -
    6.3. Setting Transaction Characteristics +
    6.3. Setting Transaction Characteristics
    -
    6.4. Locking Tables +
    6.4. Locking Tables
    -
    6.5. Rollback +
    6.5. Rollback
    -
    6.6. Setting Session Characteristics +
    6.6. Setting Session Characteristics
    -
    6.7. Setting Session Authorization +
    6.7. Setting Session Authorization
    -
    6.8. Setting Session Time Zone +
    6.8. Setting Session Time Zone
    -
    11.1. Using CACHED tables for the LOB schema +
    11.1. Using CACHED tables for the LOB schema
    -
    11.2. Creating a system-versioned table +
    11.2. Creating a system-versioned table
    -
    11.3. Displaying DbBackup Syntax +
    11.3. Displaying DbBackup Syntax
    -
    11.4. Offline Backup Example +
    11.4. Offline Backup Example
    -
    11.5. Listing a Backup with DbBackup +
    11.5. Listing a Backup with DbBackup
    -
    11.6. Restoring a Backup with DbBackup +
    11.6. Restoring a Backup with DbBackup
    -
    11.7. SQL Log Example +
    11.7. SQL Log Example
    -
    11.8. Finding foreign key rows with no parents after a bulk +
    11.8. Finding foreign key rows with no parents after a bulk import
    -
    12.1. Using CACHED tables for the LOB schema +
    12.1. Using CACHED tables for the LOB schema
    -
    12.2. MainInvoker Example +
    12.2. MainInvoker Example
    -
    12.3. Sample Range Ivy Dependency +
    12.3. Sample Range Ivy Dependency
    -
    12.4. Sample Range Maven Dependency +
    12.4. Sample Range Maven Dependency
    -
    12.5. Sample Range Gradle Dependency +
    12.5. Sample Range Gradle Dependency
    -
    12.6. Sample Range ivy.xml loaded by Ivyxml plugin +
    12.6. Sample Range ivy.xml loaded by Ivyxml plugin
    -
    12.7. Sample Range Groovy Dependency, using Grape +
    12.7. Sample Range Groovy Dependency, using Grape
    -
    15.1. Exporting certificate from the server's keystore +
    15.1. Exporting certificate from the server's keystore
    -
    15.2. Adding a certificate to the client keystore +
    15.2. Adding a certificate to the client keystore
    -
    15.3. Specifying your own trust store to a JDBC client +
    15.3. Specifying your own trust store to a JDBC client
    -
    15.4. Getting a pem-style private key into a JKS keystore +
    15.4. Getting a pem-style private key into a JKS keystore
    -
    15.5. Validating and Testing an ACL file +
    15.5. Validating and Testing an ACL file
    -
    16.1. example sqltool.rc stanza +
    16.1. example sqltool.rc stanza
    -
    C.1. Buiding the standard HSQLDB jar file with Ant +
    C.1. Buiding the standard HSQLDB jar file with Ant
    -
    C.2. Example source code before CodeSwitcher is run +
    C.2. Example source code before CodeSwitcher is run
    -
    C.3. CodeSwitcher command line invocation +
    C.3. CodeSwitcher command line invocation
    -
    C.4. Source code after CodeSwitcher processing +
    C.4. Source code after CodeSwitcher processing

    -

    $Revision: 6369 $

    +

    $Revision: 6474 $

    * - *
  • The values of IS_GRANTABLE have the following meanings:

    + *

  • The values of IS_GRANTABLE have the following meanings:
    * - * - * - * - * - * - * - * - * - * - *
    YESThe privilege being described was granted - * WITH GRANT OPTION and is thus grantable.
    NOThe privilege being described was not granted - * WITH GRANT OPTION and is thus not grantable.

    - *

      + * YES : The privilege being described was granted + * WITH GRANT OPTION and is thus grantable.
      + * NO : The privilege being described was not granted + * WITH GRANT OPTION and is thus not grantable. + *
    * * @return Table */ @@ -8956,7 +8891,7 @@ * The USER_DEFINED_TYPES view has one row for each user defined type. * Only DICTINCT TYPE user defined types are currently supported.

    * - * Definition:

    + * Definition: * *

          *      VIEW_CATALOG    VARCHAR NULL,
    @@ -8968,19 +8903,19 @@
          *      COLUMN_NAME     VARCHAR NOT NULL,
          * 
    * - * Description:

    + * Description: * *

      *
    1. The values of VIEW_CATALOG, VIEW_SCHEMA, and VIEW_NAME are the * catalog name, schema name, and identifier, - * respectively, of the view being described.

      + * respectively, of the view being described. * *

    2. The values of TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, and * COLUMN_NAME are the catalog name, schema name, * table name, and column name, respectively, of a column * of a table that is explicitly or implicitly referenced in the * <query expression> of the view being described. - * <1i> Referenced routines are reported only if the user or one of its roles is + *
    3. Referenced routines are reported only if the user or one of its roles is * the authorization (owner) of the referenced ROUTINE *
    * @@ -9166,7 +9101,7 @@ * table that is explicitly or implicitly referenced in the * <query expression> of the view being described.

    * - * Definition:

    + * Definition: * *

          *      VIEW_CATALOG    VARCHAR NULL,
    @@ -9178,19 +9113,19 @@
          *      COLUMN_NAME     VARCHAR NOT NULL,
          * 
    * - * Description:

    + * Description: * *

      *
    1. The values of VIEW_CATALOG, VIEW_SCHEMA, and VIEW_NAME are the * catalog name, schema name, and identifier, - * respectively, of the view being described.

      + * respectively, of the view being described. * *

    2. The values of TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, and * COLUMN_NAME are the catalog name, schema name, * table name, and column name, respectively, of a column * of a table that is explicitly or implicitly referenced in the * <query expression> of the view being described. - * <1i> Referenced routines are reported only if the user or one of its roles is + *
    3. Referenced routines are reported only if the user or one of its roles is * the authorization (owner) of the referenced ROUTINE *
    * @@ -9300,7 +9235,7 @@ * The VIEW_PERIOD_USAGE view has one row for each period contained in the * <query expression> of a view.

    * - * Definition

    + * Definition * *

          *      VIEW_CATALOG    VARCHAR NOT NULL,
    @@ -9312,18 +9247,18 @@
          *      PERIOD_NAME     VARCHAR NOT NULL,
          * 
    * - * Description:

    + * Description: * *

      *
    1. The values of VIEW_CATALOG, VIEW_SCHEMA, and VIEW_NAME are the * catalog name, schema name, and identifier, - * respectively, of the view being described.

      + * respectively, of the view being described. * *

    2. The values of TABLE_CATALOG, TABLE_SCHEMA, and TABLE_NAME are the * catalog name, schema name, and identifier, * respectively, of a table containing the period that is referenced in * the <query expression> of the view being described. - * <1i> Referenced periods are reported only if the user or one of its roles is + *
    3. Referenced periods are reported only if the user or one of its roles is * the authorization (owner) of the containing TABLE *
    * @@ -9423,7 +9358,7 @@ * or a <static method invocation> contained in a <view * definition>.

    * - * Definition

    + * Definition * *

          *      TABLE_CATALOG       VARCHAR NULL,
    @@ -9434,7 +9369,7 @@
          *      SPECIFIC_NAME       VARCHAR NOT NULL,
          * 
    * - * Description

    + * Description * *

      *
    1. The values of TABLE_CATALOG, TABLE_SCHEMA, and TABLE_NAME are the @@ -9444,7 +9379,7 @@ *
    2. The values of SPECIFIC_CATALOG, SPECIFIC_SCHEMA, and SPECIFIC_NAME are * the catalog name, schema name, and identifier, * respectively, of the specific name of R. - * <1i> Referenced routines are reported only if the user or one of its roles is + *
    3. Referenced routines are reported only if the user or one of its roles is * the authorization (owner) of the referenced ROUTINE. *
    * @@ -9537,7 +9472,7 @@ * by a <table name> simply contained in a <table reference> * that is contained in the <query expression> of a view.

    * - * Definition

    + * Definition * *

          *      VIEW_CATALOG    VARCHAR NULL,
    @@ -9548,19 +9483,19 @@
          *      TABLE_NAME      VARCHAR NULL,
          * 
    * - * Description:

    + * Description: * *

      *
    1. The values of VIEW_CATALOG, VIEW_SCHEMA, and VIEW_NAME are the * catalog name, schema name, and identifier, - * respectively, of the view being described.

      + * respectively, of the view being described. * *

    2. The values of TABLE_CATALOG, TABLE_SCHEMA, and TABLE_NAME are the * catalog name, schema name, and identifier, * respectively, of a table identified by a <table name> * simply contained in a <table reference> that is contained in * the <query expression> of the view being described. - * <1i> Referenced tables are reported only if the user or one of its roles is + *
    3. Referenced tables are reported only if the user or one of its roles is * the authorization (owner) of the referenced TABLE *
    * @@ -9803,36 +9738,28 @@ * IS_GRANTABLE VARCHAR the character representation of the * * - * Description

    + * Description * *

      *
    1. The value of ROLE_NAME is the <role name> of some * <role granted> by the <grant role statement> or - * the <role name> of a <role definition>.

      + * the <role name> of a <role definition>. * *

    2. The value of GRANTEE is an <authorization identifier>, * possibly PUBLIC, or <role name> specified as a * <grantee> contained in a <grant role statement>, * or the <authorization identifier> of the current - * SQLsession when the <role definition> is executed.

      + * SQLsession when the <role definition> is executed. * *

    3. The value of GRANTOR is the <authorization identifier> * of the user or role who granted the role identified by * ROLE_NAME to the user or role identified by the value of - * GRANTEE.

      + * GRANTEE. * - *

    4. The values of IS_GRANTABLE have the following meanings:

      + *

    5. The values of IS_GRANTABLE have the following meanings:
      * - * - * - * - * - * - * - * - * - * - *
      YESThe described role is grantable.
      NOThe described role is not grantable.

      + * YES : The described role is grantable.
      + * NO : The described role is not grantable. *

    * * @return Table diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformation.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformation.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformation.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformation.java 2022-06-08 08:04:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,7 +54,7 @@ * DatabaseInformation implementations.

    * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.7.2 */ public class DatabaseInformation { @@ -71,103 +71,104 @@ static final int SYSTEM_TABLES = 8; static final int SYSTEM_TABLETYPES = 9; static final int SYSTEM_TYPEINFO = 10; - static final int SYSTEM_UDTS = 11; - static final int SYSTEM_USERS = 12; //-- ref in SqlFile only - static final int SYSTEM_VERSIONCOLUMNS = 13; //-- returns autogenerated columns - static final int SYSTEM_SEQUENCES = 14; //-- same as SEQUENCES + static final int SYSTEM_UDTATTRIBUTES = 11; + static final int SYSTEM_UDTS = 12; + static final int SYSTEM_USERS = 13; //-- ref in SqlFile only + static final int SYSTEM_VERSIONCOLUMNS = 14; //-- returns autogenerated columns + static final int SYSTEM_SEQUENCES = 15; //-- same as SEQUENCES // HSQLDB-specific - static final int SYSTEM_CACHEINFO = 15; - static final int SYSTEM_COLUMN_SEQUENCE_USAGE = 16; - static final int SYSTEM_COMMENTS = 17; - static final int SYSTEM_CONNECTION_PROPERTIES = 18; - static final int SYSTEM_INDEXSTATS = 19; - static final int SYSTEM_KEY_INDEX_USAGE = 20; - static final int SYSTEM_PROPERTIES = 21; - static final int SYSTEM_SESSIONINFO = 22; - static final int SYSTEM_SESSIONS = 23; - static final int SYSTEM_TABLESTATS = 24; - static final int SYSTEM_TEXTTABLES = 25; - static final int SYSTEM_SYNONYMS = 26; + static final int SYSTEM_CACHEINFO = 16; + static final int SYSTEM_COLUMN_SEQUENCE_USAGE = 17; + static final int SYSTEM_COMMENTS = 18; + static final int SYSTEM_CONNECTION_PROPERTIES = 19; + static final int SYSTEM_INDEXSTATS = 20; + static final int SYSTEM_KEY_INDEX_USAGE = 21; + static final int SYSTEM_PROPERTIES = 22; + static final int SYSTEM_SESSIONINFO = 23; + static final int SYSTEM_SESSIONS = 24; + static final int SYSTEM_TABLESTATS = 25; + static final int SYSTEM_TEXTTABLES = 26; + static final int SYSTEM_SYNONYMS = 27; // SQL 200n tables - static final int ADMINISTRABLE_ROLE_AUTHORIZATIONS = 27; - static final int APPLICABLE_ROLES = 28; - static final int ASSERTIONS = 29; - static final int AUTHORIZATIONS = 30; - static final int CHARACTER_SETS = 31; - static final int CHECK_CONSTRAINT_ROUTINE_USAGE = 32; - static final int CHECK_CONSTRAINTS = 33; - static final int COLLATIONS = 34; - static final int COLUMN_COLUMN_USAGE = 35; - static final int COLUMN_DOMAIN_USAGE = 36; - static final int COLUMN_PRIVILEGES = 37; - static final int COLUMN_UDT_USAGE = 38; - static final int COLUMNS = 39; - static final int CONSTRAINT_COLUMN_USAGE = 40; - static final int CONSTRAINT_PERIOD_USAGE = 41; - static final int CONSTRAINT_TABLE_USAGE = 42; - static final int DATA_TYPE_PRIVILEGES = 43; - static final int DOMAIN_CONSTRAINTS = 44; - static final int DOMAINS = 45; - static final int ELEMENT_TYPES = 46; - static final int ENABLED_ROLES = 47; - static final int INFORMATION_SCHEMA_CATALOG_NAME = 48; - static final int JAR_JAR_USAGE = 49; - static final int JARS = 50; - static final int KEY_COLUMN_USAGE = 51; - static final int KEY_PERIOD_USAGE = 52; - static final int METHOD_SPECIFICATIONS = 53; - static final int MODULE_COLUMN_USAGE = 54; - static final int MODULE_PRIVILEGES = 55; - static final int MODULE_TABLE_USAGE = 56; - static final int MODULES = 57; - static final int PARAMETERS = 58; - static final int PERIODS = 59; - static final int REFERENTIAL_CONSTRAINTS = 60; - static final int ROLE_AUTHORIZATION_DESCRIPTORS = 61; - static final int ROLE_COLUMN_GRANTS = 62; - static final int ROLE_MODULE_GRANTS = 63; - static final int ROLE_ROUTINE_GRANTS = 64; - static final int ROLE_TABLE_GRANTS = 65; - static final int ROLE_UDT_GRANTS = 66; - static final int ROLE_USAGE_GRANTS = 67; - static final int ROUTINE_COLUMN_USAGE = 68; - static final int ROUTINE_JAR_USAGE = 69; - static final int ROUTINE_PERIOD_USAGE = 70; - static final int ROUTINE_PRIVILEGES = 71; - static final int ROUTINE_ROUTINE_USAGE = 72; - static final int ROUTINE_SEQUENCE_USAGE = 73; - static final int ROUTINE_TABLE_USAGE = 74; - static final int ROUTINES = 75; - static final int SCHEMATA = 76; - static final int SEQUENCES = 77; - static final int SQL_FEATURES = 78; - static final int SQL_IMPLEMENTATION_INFO = 79; - static final int SQL_PACKAGES = 80; - static final int SQL_PARTS = 81; - static final int SQL_SIZING = 82; - static final int SQL_SIZING_PROFILES = 83; - static final int TABLE_CONSTRAINTS = 84; - static final int TABLE_PRIVILEGES = 85; - static final int TABLES = 86; - static final int TRANSLATIONS = 87; - static final int TRIGGER_COLUMN_USAGE = 88; - static final int TRIGGER_PERIOD_USAGE = 89; - static final int TRIGGER_ROUTINE_USAGE = 90; - static final int TRIGGER_SEQUENCE_USAGE = 91; - static final int TRIGGER_TABLE_USAGE = 92; - static final int TRIGGERED_UPDATE_COLUMNS = 93; - static final int TRIGGERS = 94; - static final int TYPE_JAR_USAGE = 95; - static final int UDT_PRIVILEGES = 96; - static final int USAGE_PRIVILEGES = 97; - static final int USER_DEFINED_TYPES = 98; - static final int VIEW_COLUMN_USAGE = 99; - static final int VIEW_PERIOD_USAGE = 100; - static final int VIEW_ROUTINE_USAGE = 101; - static final int VIEW_TABLE_USAGE = 102; - static final int VIEWS = 103; + static final int ADMINISTRABLE_ROLE_AUTHORIZATIONS = 28; + static final int APPLICABLE_ROLES = 29; + static final int ASSERTIONS = 30; + static final int AUTHORIZATIONS = 31; + static final int CHARACTER_SETS = 32; + static final int CHECK_CONSTRAINT_ROUTINE_USAGE = 33; + static final int CHECK_CONSTRAINTS = 34; + static final int COLLATIONS = 35; + static final int COLUMN_COLUMN_USAGE = 36; + static final int COLUMN_DOMAIN_USAGE = 37; + static final int COLUMN_PRIVILEGES = 38; + static final int COLUMN_UDT_USAGE = 39; + static final int COLUMNS = 40; + static final int CONSTRAINT_COLUMN_USAGE = 41; + static final int CONSTRAINT_PERIOD_USAGE = 42; + static final int CONSTRAINT_TABLE_USAGE = 43; + static final int DATA_TYPE_PRIVILEGES = 44; + static final int DOMAIN_CONSTRAINTS = 45; + static final int DOMAINS = 46; + static final int ELEMENT_TYPES = 47; + static final int ENABLED_ROLES = 48; + static final int INFORMATION_SCHEMA_CATALOG_NAME = 49; + static final int JAR_JAR_USAGE = 50; + static final int JARS = 51; + static final int KEY_COLUMN_USAGE = 52; + static final int KEY_PERIOD_USAGE = 53; + static final int METHOD_SPECIFICATIONS = 54; + static final int MODULE_COLUMN_USAGE = 55; + static final int MODULE_PRIVILEGES = 56; + static final int MODULE_TABLE_USAGE = 57; + static final int MODULES = 58; + static final int PARAMETERS = 59; + static final int PERIODS = 60; + static final int REFERENTIAL_CONSTRAINTS = 61; + static final int ROLE_AUTHORIZATION_DESCRIPTORS = 62; + static final int ROLE_COLUMN_GRANTS = 63; + static final int ROLE_MODULE_GRANTS = 64; + static final int ROLE_ROUTINE_GRANTS = 65; + static final int ROLE_TABLE_GRANTS = 66; + static final int ROLE_UDT_GRANTS = 67; + static final int ROLE_USAGE_GRANTS = 68; + static final int ROUTINE_COLUMN_USAGE = 69; + static final int ROUTINE_JAR_USAGE = 70; + static final int ROUTINE_PERIOD_USAGE = 71; + static final int ROUTINE_PRIVILEGES = 72; + static final int ROUTINE_ROUTINE_USAGE = 73; + static final int ROUTINE_SEQUENCE_USAGE = 74; + static final int ROUTINE_TABLE_USAGE = 75; + static final int ROUTINES = 76; + static final int SCHEMATA = 77; + static final int SEQUENCES = 78; + static final int SQL_FEATURES = 79; + static final int SQL_IMPLEMENTATION_INFO = 80; + static final int SQL_PACKAGES = 81; + static final int SQL_PARTS = 82; + static final int SQL_SIZING = 83; + static final int SQL_SIZING_PROFILES = 84; + static final int TABLE_CONSTRAINTS = 85; + static final int TABLE_PRIVILEGES = 86; + static final int TABLES = 87; + static final int TRANSLATIONS = 88; + static final int TRIGGER_COLUMN_USAGE = 89; + static final int TRIGGER_PERIOD_USAGE = 90; + static final int TRIGGER_ROUTINE_USAGE = 91; + static final int TRIGGER_SEQUENCE_USAGE = 92; + static final int TRIGGER_TABLE_USAGE = 93; + static final int TRIGGERED_UPDATE_COLUMNS = 94; + static final int TRIGGERS = 95; + static final int TYPE_JAR_USAGE = 96; + static final int UDT_PRIVILEGES = 97; + static final int USAGE_PRIVILEGES = 98; + static final int USER_DEFINED_TYPES = 99; + static final int VIEW_COLUMN_USAGE = 100; + static final int VIEW_PERIOD_USAGE = 101; + static final int VIEW_ROUTINE_USAGE = 102; + static final int VIEW_TABLE_USAGE = 103; + static final int VIEWS = 104; /** system table names strictly in order of their ids */ static final String[] sysTableNames = { @@ -182,6 +183,7 @@ "SYSTEM_TABLES", // "SYSTEM_TABLETYPES", // "SYSTEM_TYPEINFO", // + "SYSTEM_UDTATTRIBUTES", // "SYSTEM_UDTS", // "SYSTEM_USERS", // "SYSTEM_VERSIONCOLUMNS", // @@ -281,7 +283,7 @@ "VIEWS", // }; - /** Map: table name => table id */ + /** Map: table name : table id */ static final IntValueHashMap sysTableNamesMap; static { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformationMain.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformationMain.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformationMain.java 2021-02-19 15:04:08.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformationMain.java 2022-06-08 09:17:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,6 +56,7 @@ import org.hsqldb.map.ValuePool; import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.persist.HsqlProperties; +import org.hsqldb.persist.HsqlProperties.PropertyMeta; import org.hsqldb.persist.PersistentStore; import org.hsqldb.rights.GrantConstants; import org.hsqldb.rights.Grantee; @@ -69,8 +70,6 @@ import org.hsqldb.types.Type; import org.hsqldb.types.Types; -/* $Id: DatabaseInformationMain.java 6303 2021-02-19 16:04:03Z fredt $ */ - // fredt@users - 1.7.2 - structural modifications to allow inheritance // campbell-burnet@users - 1.7.2 - 20020225 // - factored out all reusable code into DIXXX support classes @@ -143,7 +142,7 @@ * (fredt@users)

    * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.2 */ class DatabaseInformationMain extends DatabaseInformation { @@ -341,6 +340,9 @@ case SYSTEM_USERS : return SYSTEM_USERS(session, store); + case SYSTEM_UDTATTRIBUTES : + return SYSTEM_UDTATTRIBUTES(session, store); + case SYSTEM_UDTS : return SYSTEM_UDTS(session, store); @@ -366,7 +368,7 @@ /** * One time initialisation of instance attributes - * at construction time.

    + * at construction time. * */ protected final void init(Session session) { @@ -413,7 +415,7 @@ * @return true if the table is accessible, else false * @param object the schmea object for which to check accessibility */ - private final boolean isAccessible(Session session, SchemaObject object) { + private boolean isAccessible(Session session, SchemaObject object) { return session.getGrantee().isAccessible(object); } @@ -425,9 +427,7 @@ */ protected final Table createBlankTable(HsqlName name) { - Table table = new Table(database, name, TableBase.INFO_SCHEMA_TABLE); - - return table; + return new Table(database, name, TableBase.INFO_SCHEMA_TABLE); } /** @@ -498,7 +498,7 @@ * * Each row describes a single column of the best row identifier column * set for a particular table. Each row has the following - * columns:

    + * columns: * *

          * SCOPE          SMALLINT  scope of applicability
    @@ -540,7 +540,7 @@
          *
          * DEFINTIONS:  

    * - * Alternate key

    + * Alternate key * *

      *
    • An attribute of a table that, by virtue of its having a set of @@ -550,7 +550,7 @@ * primary key on those same columns. *

    * - * Column set performance ranking

    + * Column set performance ranking * *

      *
    • The ranking of the expected average performance w.r.t a subset of @@ -567,7 +567,7 @@ * Rules:

      * * Given the above definitions, the rules currently in effect for reporting - * best row identifier are as follows, in order of precedence:

      + * best row identifier are as follows, in order of precedence: * *

        *
      1. if the table under consideration has a primary key constraint, then @@ -591,14 +591,14 @@ * candidate column sets. If there exists a tie for lowest non-zero * count of columns having a not null constraint, then the columns * of the first such encountered candidate set are reported. Each - * row has its IN_KEY column set to FALSE.

        + * row has its IN_KEY column set to FALSE. * *

      2. Finally, if the set of candidate column sets in 3.) is the empty, * then no column set is reported for the table under consideration. *

      * * The scope reported for a best row identifier column set is determined - * thus:

      + * thus: * *

        *
      1. if the database containing the table under consideration is in @@ -771,7 +771,7 @@ * visible columns of all accessible tables defined * within this database.

        * - * Each row is a column description with the following columns:

        + * Each row is a column description with the following columns: * *

              * TABLE_CAT         VARCHAR   table catalog
        @@ -804,7 +804,7 @@
              *
              * @return a Table object describing the
              *        visible columns of all accessible
        -     *        tables defined within this database.

        + * tables defined within this database. */ final Table SYSTEM_COLUMNS(Session session, PersistentStore store) { @@ -1025,7 +1025,7 @@ * the columns of the referenced tables.

        * * Each row is a foreign key column description with the following - * columns:

        + * columns: * *

              * PKTABLE_CAT   VARCHAR   referenced table catalog
        @@ -1227,7 +1227,7 @@
              * within this database.

        * * Each row is an index column description with the following - * columns:

        + * columns: * *

              * TABLE_CAT        VARCHAR   table's catalog
        @@ -1418,7 +1418,7 @@
              * this database. 

        * * Each row is a PRIMARY KEY column description with the following - * columns:

        + * columns: * *

              * TABLE_CAT   VARCHAR   table catalog
        @@ -1528,7 +1528,7 @@
              * routines defined within this database.

        * * Each row is a procedure column description with the following - * columns:

        + * columns: * *

              * PROCEDURE_CAT   VARCHAR   routine catalog
        @@ -1777,7 +1777,7 @@
              * routines (both functions and procedures) defined within this database.

        * * Each row is a procedure description with the following - * columns:

        + * columns: * *

              * PROCEDURE_CAT     VARCHAR   catalog in which routine is defined
        @@ -1888,13 +1888,14 @@
              * getClientInfoProperties
              *
              * @return Result
        -     *
        -     * 
      2. NAME String=> The name of the client info property
        - *
      3. MAX_LEN int=> The maximum length of the value for the property
        - *
      4. DEFAULT_VALUE String=> The default value of the property
        - *
      5. DESCRIPTION String=> A description of the property. This will typically + *
          + *
        • NAME String : The name of the client info property
          + *
        • MAX_LEN int : The maximum length of the value for the property
          + *
        • DEFAULT_VALUE String : The default value of the property
          + *
        • DESCRIPTION String : A description of the property. This will typically * contain information as to where this property is * stored in the database. + *
        */ final Table SYSTEM_CONNECTION_PROPERTIES(Session session, PersistentStore store) { @@ -1926,30 +1927,17 @@ final int imax_len = 1; final int idefault_value = 2; final int idescription = 3; - Iterator it = HsqlDatabaseProperties.getPropertiesMetaIterator(); + Iterator it = HsqlDatabaseProperties.getUrlUserConnectionProperties(); while (it.hasNext()) { - Object[] meta = (Object[]) it.next(); - int propType = - ((Integer) meta[HsqlProperties.indexType]).intValue(); - - if (propType == HsqlDatabaseProperties.FILE_PROPERTY) { - if (HsqlDatabaseProperties.hsqldb_readonly.equals( - meta[HsqlProperties.indexName]) || HsqlDatabaseProperties - .hsqldb_files_readonly.equals( - meta[HsqlProperties.indexName])) {} - else { - continue; - } - } else if (propType != HsqlDatabaseProperties.SQL_PROPERTY) { - continue; - } + PropertyMeta meta = (PropertyMeta) it.next(); + int propType = meta.propType; row = t.getEmptyRowData(); - Object def = meta[HsqlProperties.indexDefaultValue]; + Object def = meta.propDefaultValue; - row[iname] = meta[HsqlProperties.indexName]; + row[iname] = meta.propName; row[imax_len] = ValuePool.getInt(8); row[idefault_value] = def == null ? null : def.toString(); @@ -2180,7 +2168,7 @@ * defined within this database.

        * * Each row is a schema description with the following - * columns:

        + * columns: * *

              * TABLE_SCHEM      VARCHAR   simple schema name
        @@ -2244,7 +2232,7 @@
              * Retrieves a Table object describing the accessible
              * tables defined within this database. 

        * - * Each row is a table description with the following columns:

        + * Each row is a table description with the following columns: * *

              * TABLE_CAT                 VARCHAR   table catalog
        @@ -2384,29 +2372,26 @@
              * available in this database. 

        * * In general, the range of values that may be commonly encountered across - * most DBMS implementations is:

        + * most DBMS implementations is: * *

          - *
        • "TABLE" - *
        • "VIEW" - *
        • "SYSTEM TABLE" - *
        • "GLOBAL TEMPORARY" - *
        • "LOCAL TEMPORARY" - *
        • "ALIAS" - *
        • "SYNONYM" + *
        • "TABLE" + *
        • "VIEW" + *
        • "SYSTEM TABLE" + *
        • "GLOBAL TEMPORARY" + *
        • "LOCAL TEMPORARY" + *
        • "ALIAS" + *
        • "SYNONYM" *

        * - * As of HSQLDB 1.7.2, the engine supports and thus this method reports - * only a subset of the range above:

        + * This method reports the following from the range above: * *

          - *
        • "TABLE" - * (HSQLDB MEMORY, CACHED and TEXT tables) - *
        • "VIEW" (Views) - *
        • "SYSTEM TABLE" - * (The tables generated by this object) - *
        • "GLOBAL TEMPORARY" - * (HSQLDB TEMP and TEMP TEXT tables) + *
        • "TABLE" (HSQLDB MEMORY, CACHED and TEXT tables) + *
        • "VIEW" (Views) + *
        • "SYSTEM TABLE" (INFORMATION_SCHEMA views) + *
        • "GLOBAL TEMPORAR" (GLOBAL TEMORARY and TEMP TEXT tables) + *
        • "LOCAL TEMPORARY" (the session-declared LOCAL TEMPORARY tables) *

        * * @return a Table object describing the table types @@ -2453,9 +2438,9 @@ * TYPE_NAME VARCHAR the canonical name for DDL statements. * DATA_TYPE SMALLINT data type code from DITypes. * PRECISION INTEGER max column size. - * number => max precision. - * character => max characters. - * datetime => max chars incl. frac. component. + * number : max precision. + * character : max characters. + * datetime : max chars incl. frac. component. * LITERAL_PREFIX VARCHAR char(s) prefixing literal of this type. * LITERAL_SUFFIX VARCHAR char(s) terminating literal of this type. * CREATE_PARAMS VARCHAR Localized syntax-order list of domain @@ -2594,8 +2579,8 @@ if (type.isBinaryType() || type.isCharacterType() || type.isDateTimeType() || type.isIntervalType()) { - row[iliteral_prefix] = "\'"; - row[iliteral_suffix] = "\'"; + row[iliteral_prefix] = "'"; + row[iliteral_suffix] = "'"; } if (type.acceptsPrecision() && type.acceptsScale()) { @@ -2653,23 +2638,108 @@ /** * Retrieves a Table object describing the accessible + * attributes of the accessible user-defined type (UDT) objects + * defined within this database.

        + * + * This description does not contain inherited attributes.

        + * + * Each row is a user-defined type attributes description with the + * following columns: + * + *

        +     * TYPE_CAT          VARCHAR   type catalog
        +     * TYPE_SCHEM        VARCHAR   type schema
        +     * TYPE_NAME         VARCHAR   type name
        +     * ATTR_NAME         VARCHAR   attribute name
        +     * DATA_TYPE         SMALLINT  attribute's SQL type from DITypes
        +     * ATTR_TYPE_NAME    VARCHAR   UDT: fully qualified type name
        +     *                            REF: fully qualified type name of target type of
        +     *                            the reference type.
        +     * ATTR_SIZE         INTEGER   column size.
        +     *                            char or date types  : maximum number of characters;
        +     *                            numeric or decimal types  : precision.
        +     * DECIMAL_DIGITS    INTEGER   # of fractional digits (scale) of number type
        +     * NUM_PREC_RADIX    INTEGER   Radix of number type
        +     * NULLABLE          INTEGER   whether NULL is allowed
        +     * REMARKS           VARCHAR   comment describing attribute
        +     * ATTR_DEF          VARCHAR   default attribute value
        +     * SQL_DATA_TYPE     INTEGER   expected value of SQL CLI SQL_DESC_TYPE in the SQLDA
        +     * SQL_DATETIME_SUB  INTEGER   DATETIME/INTERVAL  : datetime/interval subcode
        +     * CHAR_OCTET_LENGTH INTEGER   for char types:  max bytes in column
        +     * ORDINAL_POSITION  INTEGER   index of column in table (starting at 1)
        +     * IS_NULLABLE       VARCHAR   "NO"  : strictly no NULL values;
        +     *                             "YES"  : maybe NULL values;
        +     *                             ""  : unknown.
        +     * SCOPE_CATALOG     VARCHAR   catalog of REF attribute scope table or NULL
        +     * SCOPE_SCHEMA      VARCHAR   schema of REF attribute scope table or NULL
        +     * SCOPE_TABLE       VARCHAR   name of REF attribute scope table or NULL
        +     * SOURCE_DATA_TYPE  SMALLINT  For DISTINCT or user-generated REF DATA_TYPE:
        +     *                            source SQL type from DITypes
        +     *                            For other DATA_TYPE values:  NULL
        +     * 
        + * + * Note: Currently, neither the HSQLDB engine or the JDBC driver + * support UDTs, so an empty table is returned.

        + * @return a Table object describing the accessible + * attrubutes of the accessible user-defined type + * (UDT) objects defined within this database + * @throws HsqlException if an error occurs while producing the table + */ + Table SYSTEM_UDTATTRIBUTES(Session session, PersistentStore store) { + + Table t = sysTables[SYSTEM_UDTATTRIBUTES]; + + if (t == null) { + t = createBlankTable(sysTableHsqlNames[SYSTEM_UDTATTRIBUTES]); + + addColumn(t, "TYPE_CAT", SQL_IDENTIFIER); + addColumn(t, "TYPE_SCHEM", SQL_IDENTIFIER); + addColumn(t, "TYPE_NAME", SQL_IDENTIFIER); // not null + addColumn(t, "ATTR_NAME", SQL_IDENTIFIER); // not null + addColumn(t, "DATA_TYPE", Type.SQL_SMALLINT); // not null + addColumn(t, "ATTR_TYPE_NAME", SQL_IDENTIFIER); // not null + addColumn(t, "ATTR_SIZE", Type.SQL_INTEGER); + addColumn(t, "DECIMAL_DIGITS", Type.SQL_INTEGER); + addColumn(t, "NUM_PREC_RADIX", Type.SQL_INTEGER); + addColumn(t, "NULLABLE", Type.SQL_INTEGER); + addColumn(t, "REMARKS", CHARACTER_DATA); + addColumn(t, "ATTR_DEF", CHARACTER_DATA); + addColumn(t, "SQL_DATA_TYPE", Type.SQL_INTEGER); + addColumn(t, "SQL_DATETIME_SUB", Type.SQL_INTEGER); + addColumn(t, "CHAR_OCTET_LENGTH", Type.SQL_INTEGER); + addColumn(t, "ORDINAL_POSITION", Type.SQL_INTEGER); // not null + addColumn(t, "IS_NULLABLE", YES_OR_NO); // not null + addColumn(t, "SCOPE_CATALOG", SQL_IDENTIFIER); + addColumn(t, "SCOPE_SCHEMA", SQL_IDENTIFIER); + addColumn(t, "SCOPE_TABLE", SQL_IDENTIFIER); + addColumn(t, "SOURCE_DATA_TYPE", Type.SQL_SMALLINT); + t.createPrimaryKey(); + + return t; + } + + return t; + } + + /** + * Retrieves a Table object describing the accessible * user-defined types defined in this database.

        * * Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT. * *

        Each row is a UDT description with the following columns: *

          - *
        1. TYPE_CAT VARCHAR => the type's catalog - *
        2. TYPE_SCHEM VARCHAR => type's schema - *
        3. TYPE_NAME VARCHAR => type name - *
        4. CLASS_NAME VARCHAR => Java class name - *
        5. DATA_TYPE VARCHAR => + *
        6. TYPE_CAT VARCHAR : the type's catalog + *
        7. TYPE_SCHEM VARCHAR : type's schema + *
        8. TYPE_NAME VARCHAR : type name + *
        9. CLASS_NAME VARCHAR : Java class name + *
        10. DATA_TYPE VARCHAR : * type value defined in DITypes; * one of JAVA_OBJECT, STRUCT, or * DISTINCT - *
        11. REMARKS VARCHAR => + *
        12. REMARKS VARCHAR : * explanatory comment on the type - *
        13. BASE_TYPESMALLINT => + *
        14. BASE_TYPESMALLINT : * type code of the source type of a DISTINCT type or the * type that implements the user-generated reference type of the * SELF_REFERENCING_COLUMN of a structured type as defined in @@ -2752,22 +2822,22 @@ /** * Retrieves a Table object describing the accessible * columns that are automatically updated when any value in a row - * is updated.

          + * is updated.

          * - * Each row is a version column description with the following columns:

          + * Each row is a version column description with the following columns: * *

            - *
          1. SCOPE SMALLINT => is not used - *
          2. COLUMN_NAME VARCHAR => column name - *
          3. DATA_TYPE SMALLINT => + *
          4. SCOPE SMALLINT : is not used + *
          5. COLUMN_NAME VARCHAR : column name + *
          6. DATA_TYPE SMALLINT : * SQL data type from java.sql.Types - *
          7. TYPE_NAME SMALLINT => + *
          8. TYPE_NAME SMALLINT : * Data source dependent type name - *
          9. COLUMN_SIZE INTEGER => precision - *
          10. BUFFER_LENGTH INTEGER => + *
          11. COLUMN_SIZE INTEGER : precision + *
          12. BUFFER_LENGTH INTEGER : * length of column value in bytes - *
          13. DECIMAL_DIGITS SMALLINT => scale - *
          14. PSEUDO_COLUMN SMALLINT => + *
          15. DECIMAL_DIGITS SMALLINT : scale + *
          16. PSEUDO_COLUMN SMALLINT : * is this a pseudo column like an Oracle ROWID:
            * (as defined in java.sql.DatabaseMetadata) *
              @@ -2961,7 +3031,7 @@ * tables defined within this database.

              * * Each row is a column privilege description with the following - * columns:

              + * columns: * *

                    * TABLE_CAT    VARCHAR   table catalog
              @@ -3062,13 +3132,14 @@
                                   Right right          = (Right) rights.get(j);
                                   Right grantableRight = right.getGrantableRights();
               
              -                    for (int k = 0; k < Right.privilegeTypes.length; k++) {
              +                    for (int k = 0; k < Right.tablePrivilegeTypes.length;
              +                            k++) {
                                       OrderedHashSet columnList =
                                           right.getColumnsForPrivilege(
              -                                table, Right.privilegeTypes[k]);
              +                                table, Right.tablePrivilegeTypes[k]);
                                       OrderedHashSet grantableList =
                                           grantableRight.getColumnsForPrivilege(table,
              -                                Right.privilegeTypes[k]);
              +                                Right.tablePrivilegeTypes[k]);
               
                                       for (int l = 0; l < columnList.size(); l++) {
                                           HsqlName fullName = ((HsqlName) columnList.get(l));
              @@ -3080,7 +3151,7 @@
                                           row[table_schema]   = tableSchema;
                                           row[table_name]     = tableName;
                                           row[column_name]    = fullName.name;
              -                            row[privilege_type] = Right.privilegeNames[k];
              +                            row[privilege_type] = Right.tablePrivilegeNames[k];
                                           row[is_grantable] =
                                               right.getGrantee() == table.getOwner()
                                               || grantableList.contains(fullName) ? "YES"
              @@ -3102,7 +3173,7 @@
                    * The SEQUENCES view has one row for each external sequence
                    * generator. 

              * - * Definition:

              + * Definition: * *

                    *
              @@ -3126,43 +3197,34 @@
                    *
                    * 
              * - * DESCRIPTION:

              + * DESCRIPTION: * *

                *
              1. The values of SEQUENCE_CATALOG, SEQUENCE_SCHEMA, and * SEQUENCE_NAME are the catalog name, unqualified schema name, * and qualified identifier, respectively, of the sequence generator - * being described.

                + * being described. * *

              2. The values of SEQUENCE_CATALOG, SEQUENCE_SCHEMA, SEQUENCE_NAME, and * DTD_IDENTIFIER are the values of OBJECT_CATALOG, OBJECT_SCHEMA, * OBJECT_NAME, and DTD_IDENTIFIER, respectively, of the row in * DATA_TYPE_DESCRIPTOR (not yet implemented) that describes the data - * type of the sequence generator.

                + * type of the sequence generator. * *

              3. The values of MAXIMUM_VALUE, MINIMUM_VALUE, and INCREMENT are the * character representations of maximum value, minimum value, * and increment, respectively, of the sequence generator being - * described.

                + * described. * - *

              4. The values of CYCLE_OPTION have the following meanings:

                + *

              5. The values of CYCLE_OPTION have the following meanings:
                * - * - * - * - * - * - * - * - * - *
                YESThe cycle option of the sequence generator - * is CYCLE.
                NOThe cycle option of the sequence generator is - * NO CYCLE.

                + * YES : The cycle option of the sequence generator + * is CYCLE.
                + * NO : The cycle option of the sequence generator is + * NO CYCLE. * *

              6. The value of START_WITH is HSQLDB-specific (not in the SQL 200n - * spec).

                - * - * It is the character representation of the START WITH value.

                + * spec). It is the character representation of the START WITH value. * *

              7. The value of NEXT_VALUE is HSQLDB-specific (not in the SQL 200n)

                * This is the character representation of the value that @@ -3394,7 +3456,7 @@ * The TABLE_PRIVILEGES view has one row for each visible access * right for each accessible table defined within this database.

                * - * Each row is a table privilege description with the following columns:

                + * Each row is a table privilege description with the following columns: * *

                      * GRANTOR      VARCHAR   grantor of access
                @@ -3489,12 +3551,13 @@
                                     Right right          = (Right) rights.get(j);
                                     Right grantableRight = right.getGrantableRights();
                 
                -                    for (int k = 0; k < Right.privilegeTypes.length; k++) {
                -                        if (!right.canAccessFully(Right.privilegeTypes[k])) {
                +                    for (int k = 0; k < Right.tablePrivilegeTypes.length;
                +                            k++) {
                +                        if (!right.canAccess(Right.tablePrivilegeTypes[k])) {
                                             continue;
                                         }
                 
                -                        privilege           = Right.privilegeNames[k];
                +                        privilege           = Right.tablePrivilegeNames[k];
                                         row                 = t.getEmptyRowData();
                                         row[grantor] = right.getGrantor().getName().name;
                                         row[grantee] = right.getGrantee().getName().name;
                @@ -3504,9 +3567,9 @@
                                         row[privilege_type] = privilege;
                                         row[is_grantable] =
                                             right.getGrantee() == table.getOwner()
                -                            || grantableRight.canAccessFully(
                -                                Right.privilegeTypes[k]) ? "YES"
                -                                                         : "NO";
                +                            || grantableRight.canAccess(
                +                                Right.tablePrivilegeTypes[k]) ? "YES"
                +                                                              : "NO";
                                         row[with_hierarchy] = "NO";
                 
                                         try {
                @@ -3637,7 +3700,7 @@
                      * Retrieves a Table object naming the accessible catalogs
                      * defined within this database. 

                * - * Each row is a catalog name description with the following column:

                + * Each row is a catalog name description with the following column: * *

                      * TABLE_CAT   VARCHAR   catalog name
                diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/dbinfo/DITableInfo.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/dbinfo/DITableInfo.java
                --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/dbinfo/DITableInfo.java	2021-01-25 15:08:24.000000000 +0000
                +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/dbinfo/DITableInfo.java	2022-05-22 18:09:56.000000000 +0000
                @@ -1,4 +1,4 @@
                -/* Copyright (c) 2001-2021, The HSQL Development Group
                +/* Copyright (c) 2001-2022, The HSQL Development Group
                  * All rights reserved.
                  *
                  * Redistribution and use in source and binary forms, with or without
                @@ -83,7 +83,7 @@
                     }
                 
                     /**
                -     * Sets the Locale for table and column remarks. 

                + * Sets the Locale for table and column remarks. */ void setupBundles() { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/error/Error.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/error/Error.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/error/Error.java 2020-11-30 19:14:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/error/Error.java 2022-06-08 08:14:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * * @author Loic Lefevre * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.2.7 + * @version 2.7.0 * @since 1.9.0 */ public final class Error { @@ -122,7 +122,7 @@ * the add parameters. * * @param code main error code - * @param subCode sub error code (if 0 => no subMessage!) + * @param subCode sub error code (if 0 then no subMessage!) * @param add optional parameters * * @return an HsqlException @@ -265,7 +265,7 @@ String message = getResourceString(code); if (subCode != 0) { - message += getResourceString(subCode); + message += ' ' + getResourceString(subCode); } if (add != null) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionArithmetic.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionArithmetic.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionArithmetic.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionArithmetic.java 2022-05-28 16:35:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.0 + * @version 2.7.0 * @since 1.9.0 */ public class ExpressionArithmetic extends Expression { @@ -231,8 +231,10 @@ } public List resolveColumnReferences(Session session, - RangeGroup rangeGroup, int rangeCount, RangeGroup[] rangeGroups, - List unresolvedSet, boolean acceptsSequences) { + RangeGroup rangeGroup, int rangeCount, + RangeGroup[] rangeGroups, + List unresolvedSet, + boolean acceptsSequences) { if (opType == OpTypes.VALUE) { return unresolvedSet; @@ -282,6 +284,11 @@ break; case OpTypes.ADD : + if (session.database.sqlSyntaxOra) { + resolveTypesForArithmetic(session, parent); + + break; + } // special case for concat using + if ((nodes[LEFT].dataType != null && nodes[LEFT].dataType @@ -503,6 +510,14 @@ } } } else { + if (session.database.sqlSyntaxOra) { + if (nodes[LEFT].dataType.isNumberType() + && nodes[RIGHT].dataType.isCharacterType()) { + nodes[RIGHT] = new ExpressionOp(nodes[RIGHT], + nodes[LEFT].dataType); + } + } + dataType = nodes[LEFT].dataType.getCombinedType(session, nodes[RIGHT].dataType, opType); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionArrayAggregate.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionArrayAggregate.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionArrayAggregate.java 2021-03-04 20:48:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionArrayAggregate.java 2022-06-18 18:39:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ * Implementation of array aggregate operations * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 2.0.1 */ public class ExpressionArrayAggregate extends Expression { @@ -55,7 +55,8 @@ SortAndSlice distinctSort; String separator = ","; ArrayType arrayDataType; - Type exprType; + Type exprDataType; + int exprOpType; // original opType, may change during resolution Expression condition = Expression.EXPR_TRUE; ExpressionArrayAggregate(int type, boolean distinct, Expression e, @@ -65,17 +66,12 @@ this.isDistinctAggregate = distinct; this.sort = sort; + this.exprOpType = e.opType; if (separator != null) { this.separator = separator; } - if (type == OpTypes.MEDIAN) { - nodes = new Expression[]{ e }; - - return; - } - if (sort == null) { nodes = new Expression[]{ e }; } else { @@ -169,8 +165,10 @@ } public List resolveColumnReferences(Session session, - RangeGroup rangeGroup, int rangeCount, RangeGroup[] rangeGroups, - List unresolvedSet, boolean acceptsSequences) { + RangeGroup rangeGroup, int rangeCount, + RangeGroup[] rangeGroups, + List unresolvedSet, + boolean acceptsSequences) { List conditionSet = condition.resolveColumnReferences(session, rangeGroup, rangeCount, rangeGroups, null, false); @@ -213,13 +211,13 @@ } } - exprType = nodes[nodes.length - 1].dataType; + exprDataType = nodes[nodes.length - 1].dataType; - if (exprType.isLobType()) { + if (exprDataType.isLobType()) { throw Error.error(ErrorCode.X_42534); } - if (exprType.isArrayType()) { + if (exprDataType.isArrayType()) { throw Error.error(ErrorCode.X_42534); } @@ -231,7 +229,7 @@ arrayDataType = new ArrayType(rowDataType, ArrayType.defaultLargeArrayCardinality); - dataType = new ArrayType(exprType, + dataType = new ArrayType(exprDataType, ArrayType.defaultArrayCardinality); break; @@ -248,7 +246,7 @@ ArrayType.defaultLargeArrayCardinality); dataType = ExpressionAggregate.getType(session, OpTypes.MEDIAN, - exprType); + exprDataType); break; } @@ -381,7 +379,7 @@ Object value = row[row.length - 1]; String string = (String) Type.SQL_VARCHAR.convertToType(session, - value, exprType); + value, exprDataType); sb.append(string); } @@ -412,10 +410,10 @@ } if (dataType.isDateTimeTypeWithZone()) { - value = DateTimeType.changeZoneToUTC(value); + value = ((DateTimeType)dataType).changeZoneToUTC(value); } - return dataType.convertToType(session, value, exprType); + return dataType.convertToType(session, value, exprDataType); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionColumn.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionColumn.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionColumn.java 2021-05-30 14:45:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionColumn.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -401,8 +401,10 @@ } public List resolveColumnReferences(Session session, - RangeGroup rangeGroup, int rangeCount, RangeGroup[] rangeGroups, - List unresolvedSet, boolean acceptsSequences) { + RangeGroup rangeGroup, int rangeCount, + RangeGroup[] rangeGroups, + List unresolvedSet, + boolean acceptsSequences) { switch (opType) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/Expression.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/Expression.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/Expression.java 2021-05-22 09:08:42.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/Expression.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,7 +62,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class Expression implements Cloneable { @@ -106,6 +106,9 @@ // for query and value lists, etc boolean isCorrelated; + // for CHECK and GENERATED expressions + boolean noOptimisation; + // for COLUMN int columnIndex = -1; @@ -1289,15 +1292,19 @@ } for (int i = 0; i < nodes.length; i++) { - if (nodes[i].nodes[j].isUnresolvedParam()) { - nodes[i].nodes[j].dataType = nodeDataTypes[j]; + Expression node = nodes[i]; + + if (node.nodes[j].isUnresolvedParam()) { + node.nodes[j].dataType = nodeDataTypes[j]; + node.nodeDataTypes[j] = node.nodes[j].dataType; continue; } - if (nodes[i].nodes[j].opType == OpTypes.VALUE) { - if (nodes[i].nodes[j].valueData == null) { - nodes[i].nodes[j].dataType = nodeDataTypes[j]; + if (node.nodes[j].opType == OpTypes.VALUE) { + if (node.nodes[j].valueData == null) { + node.nodes[j].dataType = nodeDataTypes[j]; + node.nodeDataTypes[j] = node.nodes[j].dataType; } } } @@ -1928,6 +1935,17 @@ return set; } + public void setNoOptimisation() { + + noOptimisation = true; + + for (int i = 0; i < nodes.length; i++) { + if (nodes[i] != null) { + nodes[i].setNoOptimisation(); + } + } + } + public OrderedHashSet getSubqueries() { return collectAllSubqueries(null); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionJSON.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionJSON.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionJSON.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionJSON.java 2022-05-23 11:22:16.000000000 +0000 @@ -0,0 +1,455 @@ +/* Copyright (c) 2001-2022, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb; + +import org.hsqldb.error.Error; +import org.hsqldb.error.ErrorCode; +import org.hsqldb.lib.HsqlArrayList; +import org.hsqldb.lib.OrderedHashMap; +import org.hsqldb.lib.OrderedHashSet; +import org.hsqldb.lib.StringConverter; +import org.hsqldb.types.ArrayType; +import org.hsqldb.types.Type; + +/** + * JSON functions + * + * @author Fred Toussi (fredt@users dot sourceforge.net) + * @version 2.7.0 + * @since 2.7.0 + */ +public interface ExpressionJSON { + + class ExpressionJSONWrapper extends Expression { + + public ExpressionJSONWrapper(Expression expr) { + + super(OpTypes.JSON_FUNCTION); + + nodes = new Expression[]{ expr }; + } + + public void resolveTypes(Session session, Expression parent) { + + nodes[LEFT].resolveTypes(session, this); + + dataType = nodes[LEFT].dataType; + } + + public Object getValue(Session session) { + return nodes[LEFT].getValue(session); + } + + public String getSQL() { + return nodes[LEFT].getSQL(); + } + + public String describe(Session session, int blanks) { + return nodes[LEFT].getSQL(); + } + } + + class ExpressionJSONArrayFromQuery extends Expression { + + final Expression exprQuery; + final boolean nullOnNull; + + public ExpressionJSONArrayFromQuery(Expression expressionQuery, + boolean nullOnNull, + Type dataType) { + + super(OpTypes.JSON_FUNCTION); + + this.exprQuery = expressionQuery; + this.nullOnNull = nullOnNull; + this.dataType = dataType == null ? Type.SQL_VARCHAR_LONG + : dataType; + nodes = new Expression[]{ expressionQuery }; + } + + public void resolveTypes(Session session, Expression parent) { + nodes[LEFT].resolveTypes(session, this); + } + + public Object getValue(Session session) { + + StringBuilder sb = new StringBuilder(); + Object values = nodes[LEFT].getValue(session); + + nodes[LEFT].dataType.convertToJSON(values, sb); + + if (sb.length() > dataType.precision) { + throw Error.error(ErrorCode.X_22001); + } + + return sb.toString(); + } + + public String getSQL() { + return Tokens.T_JSON_ARRAY + "()"; + } + + public String describe(Session session, int blanks) { + return Tokens.T_JSON_ARRAY + "()"; + } + } + + class ExpressionJSONArrayFromValues extends Expression { + + final HsqlArrayList exprList; + final boolean nullOnNull; + + public ExpressionJSONArrayFromValues(HsqlArrayList expressionList, + boolean nullOnNull, + Type dataType) { + + super(OpTypes.JSON_FUNCTION); + + this.exprList = expressionList; + this.nullOnNull = nullOnNull; + this.dataType = dataType == null ? Type.SQL_VARCHAR_LONG + : dataType; + nodes = new Expression[expressionList.size()]; + + expressionList.toArray(nodes); + } + + public void resolveTypes(Session session, Expression parent) { + + for (int i = 0; i < nodes.length; i++) { + if (nodes[i] != null) { + nodes[i].resolveTypes(session, this); + } + } + } + + public Object getValue(Session session) { + + StringBuilder sb = new StringBuilder(); + int count = 0; + + sb.append('['); + + for (int i = 0; i < nodes.length; i++) { + if (count > 0) { + sb.append(','); + } + + Object value = nodes[i].getValue(session); + + if (nodes[i].opType == OpTypes.JSON_FUNCTION) { + sb.append((String) value); + } else { + nodes[i].dataType.convertToJSON(value, sb); + } + + count++; + } + + sb.append(']'); + + if (sb.length() > dataType.precision) { + throw Error.error(ErrorCode.X_22001); + } + + return sb.toString(); + } + + public String getSQL() { + return Tokens.T_JSON_ARRAY + "()"; + } + + public String describe(Session session, int blanks) { + return Tokens.T_JSON_ARRAY + "()"; + } + } + + class ExpressionJSONArrayAgg extends Expression { + + final boolean isValueJSON; + final boolean nullOnNull; + + public ExpressionJSONArrayAgg(ExpressionArrayAggregate valuesAgg, + boolean nullOnNull, Type dataType) { + + super(OpTypes.JSON_FUNCTION); + + this.nullOnNull = nullOnNull; + this.dataType = dataType == null ? Type.SQL_VARCHAR_LONG + : dataType; + this.isValueJSON = valuesAgg.exprOpType == OpTypes.JSON_FUNCTION; + nodes = new Expression[]{ valuesAgg }; + } + + public void resolveTypes(Session session, Expression parent) { + nodes[LEFT].resolveTypes(session, this); + } + + public Object getValue(Session session) { + + StringBuilder sb = new StringBuilder(); + Object values = nodes[LEFT].getValue(session); + ArrayType valuesType = (ArrayType) nodes[LEFT].dataType; + + if (isValueJSON) { + valuesType.convertToJSONsimple(values, sb); + } else { + valuesType.convertToJSON(values, sb); + } + + if (sb.length() > dataType.precision) { + throw Error.error(ErrorCode.X_22001); + } + + return sb.toString(); + } + + public String getSQL() { + return Tokens.T_JSON_ARRAYAGG + "()"; + } + + public String describe(Session session, int blanks) { + return Tokens.T_JSON_ARRAYAGG + "()"; + } + } + + class ExpressionJSONObject extends Expression { + + final OrderedHashMap exprMap; + final boolean nullOnNull; + final boolean uniqueKeys; + + public ExpressionJSONObject(OrderedHashMap exprMap, + boolean nullOnNull, boolean uniqueKeys, + Type dataType) { + + super(OpTypes.JSON_FUNCTION); + + this.exprMap = exprMap; + this.nullOnNull = nullOnNull; + this.uniqueKeys = uniqueKeys; + this.dataType = dataType == null ? Type.SQL_VARCHAR_LONG + : dataType; + nodes = new Expression[exprMap.size() * 2]; + + for (int i = 0; i < exprMap.size(); i++) { + nodes[i * 2] = (Expression) exprMap.getKeyAt(i); + nodes[i * 2 + 1] = (Expression) exprMap.get(i); + } + } + + public void resolveTypes(Session session, Expression parent) { + + for (int i = 0; i < nodes.length; i++) { + if (nodes[i] != null) { + nodes[i].resolveTypes(session, this); + } + } + } + + public Object getValue(Session session) { + + StringBuilder sb = new StringBuilder(); + int count = 0; + OrderedHashSet keySet = new OrderedHashSet(); + + sb.append('{'); + + for (int i = 0; i < exprMap.size(); i++) { + int j = i * 2; + + if (count > 0) { + sb.append(','); + } + + Object name = nodes[j].getValue(session); + + if (uniqueKeys) { + String s = nodes[j].dataType.convertToString(name); + + if (!keySet.add(s)) { + throw Error.error(ErrorCode.X_23505); + } + } + + if (nodes[j].dataType.isCharacterType()) { + nodes[j].dataType.convertToJSON(name, sb); + } else { + String s = nodes[j].dataType.convertToString(name); + + s = StringConverter.toQuotedString(s, '"', false); + + sb.append(s); + } + + sb.append(':'); + + Object value = nodes[j + 1].getValue(session); + + if (nodes[j + 1].opType == OpTypes.JSON_FUNCTION) { + sb.append((String) value); + } else { + nodes[j + 1].dataType.convertToJSON(value, sb); + } + + count++; + } + + sb.append('}'); + + if (sb.length() > dataType.precision) { + throw Error.error(ErrorCode.X_22001); + } + + return sb.toString(); + } + + public String getSQL() { + return Tokens.T_JSON_OBJECT + "()"; + } + + public String describe(Session session, int blanks) { + return Tokens.T_JSON_OBJECT + "()"; + } + } + + class ExpressionJSONObjectAgg extends Expression { + + final ExpressionArrayAggregate namesAgg; + final ExpressionArrayAggregate valuesAgg; + final boolean nullOnNull; + final boolean uniqueKeys; + boolean isValueJSON; + + public ExpressionJSONObjectAgg(ExpressionArrayAggregate namesAgg, + ExpressionArrayAggregate valuesAgg, + boolean nullOnNull, boolean uniqueKeys, + Type dataType) { + + super(OpTypes.JSON_FUNCTION); + + this.namesAgg = namesAgg; + this.valuesAgg = valuesAgg; + this.nullOnNull = nullOnNull; + this.uniqueKeys = uniqueKeys; + this.dataType = dataType == null ? Type.SQL_VARCHAR_LONG + : dataType; + this.isValueJSON = valuesAgg.exprOpType == OpTypes.JSON_FUNCTION; + nodes = new Expression[] { + namesAgg, valuesAgg + }; + } + + public void resolveTypes(Session session, Expression parent) { + + for (int i = 0; i < nodes.length; i++) { + if (nodes[i] != null) { + nodes[i].resolveTypes(session, this); + } + } + } + + public Object getValue(Session session) { + + StringBuilder sb = new StringBuilder(); + int count = 0; + Object[] names = (Object[]) nodes[LEFT].getValue(session); + Object[] values = (Object[]) nodes[RIGHT].getValue(session); + Type nameType = nodes[LEFT].dataType.collectionBaseType(); + Type valueType = nodes[RIGHT].dataType.collectionBaseType(); + OrderedHashSet keySet = new OrderedHashSet(); + + sb.append('{'); + + for (int i = 0; i < names.length; i++) { + String name = (String) names[i]; + String value = (String) values[i]; + + if (name == null) { + continue; + } + + if (!nullOnNull && value == null) { + continue; + } + + if (count > 0) { + sb.append(','); + } + + if (uniqueKeys) { + String s = nameType.convertToString(name); + + if (!keySet.add(s)) { + throw Error.error(ErrorCode.X_23505); + } + } + + if (nameType.isCharacterType()) { + nameType.convertToJSON(name, sb); + } else { + String s = nameType.convertToString(name); + + s = StringConverter.toQuotedString(s, '"', false); + + sb.append(s); + } + + sb.append(':'); + + if (isValueJSON) { + sb.append((String) value); + } else { + valueType.convertToJSON(value, sb); + } + + count++; + } + + sb.append('}'); + + if (sb.length() > dataType.precision) { + throw Error.error(ErrorCode.X_22001); + } + + return sb.toString(); + } + + public String getSQL() { + return Tokens.T_JSON_OBJECTAGG + "()"; + } + + public String describe(Session session, int blanks) { + return Tokens.T_JSON_OBJECTAGG + "()"; + } + } +} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionLike.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionLike.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionLike.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionLike.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,8 +54,7 @@ /** * Creates a LIKE expression */ - ExpressionLike(Expression left, Expression right, Expression escape, - boolean noOptimisation) { + ExpressionLike(Expression left, Expression right, Expression escape) { super(OpTypes.LIKE); @@ -64,7 +63,6 @@ nodes[RIGHT] = right; nodes[ESCAPE] = escape; likeObject = new Like(); - this.noOptimisation = noOptimisation; } private ExpressionLike(ExpressionLike other) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionLogical.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionLogical.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionLogical.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionLogical.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,12 +47,11 @@ /** * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public class ExpressionLogical extends Expression { - boolean noOptimisation; boolean isQuantified; boolean isTerminal; @@ -710,15 +709,23 @@ } else { Object value = nodes[LEFT].getValue(session); - if (value == null || Boolean.FALSE.equals(value)) { + if (Boolean.FALSE.equals(value)) { setAsConstantValue(Boolean.FALSE, parent); + } else if (Boolean.TRUE.equals(value)) { + if (parent != null) { + parent.replaceNode(this, nodes[RIGHT]); + } } } } else if (nodes[RIGHT].opType == OpTypes.VALUE) { Object value = nodes[RIGHT].getValue(session); - if (value == null || Boolean.FALSE.equals(value)) { + if (Boolean.FALSE.equals(value)) { setAsConstantValue(Boolean.FALSE, parent); + } else if (Boolean.TRUE.equals(value)) { + if (parent != null) { + parent.replaceNode(this, nodes[LEFT]); + } } } @@ -735,6 +742,10 @@ if (Boolean.TRUE.equals(value)) { setAsConstantValue(Boolean.TRUE, parent); + } else if (Boolean.FALSE.equals(value)) { + if (parent != null) { + parent.replaceNode(this, nodes[RIGHT]); + } } } } else if (nodes[RIGHT].opType == OpTypes.VALUE) { @@ -742,6 +753,10 @@ if (Boolean.TRUE.equals(value)) { setAsConstantValue(Boolean.TRUE, parent); + } else if (Boolean.FALSE.equals(value)) { + if (parent != null) { + parent.replaceNode(this, nodes[LEFT]); + } } } @@ -797,6 +812,10 @@ nodes[LEFT] = node; opType = OpTypes.NOT; + if (noOptimisation) { + nodes[LEFT].setNoOptimisation(); + } + resolveTypes(session, parent); break; @@ -843,7 +862,7 @@ break; case OpTypes.IN : - resolveTypesForIn(session); + resolveTypesForAllAny(session); break; case OpTypes.MATCH_SIMPLE : @@ -1245,10 +1264,6 @@ } } - void resolveTypesForIn(Session session) { - resolveTypesForAllAny(session); - } - public Object getValue(Session session) { switch (opType) { @@ -2454,4 +2469,17 @@ return cost; } + + public void setNoOptimisation() { + + super.setNoOptimisation(); + + if (opType == OpTypes.EQUAL) { + if (exprSubType == OpTypes.ANY_QUANTIFIED) { + exprSubType = 0; + opType = OpTypes.IN; + isQuantified = false; + } + } + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionOp.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionOp.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ExpressionOp.java 2021-05-22 09:08:36.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ExpressionOp.java 2022-05-30 12:36:44.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class ExpressionOp extends Expression { @@ -140,40 +140,30 @@ */ ExpressionOp(Expression e) { - super(e.dataType.isDateTimeTypeWithZone() ? OpTypes.CAST - : OpTypes.ZONE_MODIFIER); + super(OpTypes.CAST); + + nodes = new Expression[UNARY]; + nodes[LEFT] = e; switch (e.dataType.typeCode) { case Types.SQL_TIME_WITH_TIME_ZONE : - nodes = new Expression[UNARY]; - nodes[LEFT] = new ExpressionOp(OpTypes.ZONE_MODIFIER, e, null); - nodes[LEFT].dataType = e.dataType; dataType = DateTimeType.getDateTimeType(Types.SQL_TIME, e.dataType.scale); break; case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : - nodes = new Expression[UNARY]; - nodes[LEFT] = new ExpressionOp(OpTypes.ZONE_MODIFIER, e, null); - nodes[LEFT].dataType = e.dataType; dataType = DateTimeType.getDateTimeType(Types.SQL_TIMESTAMP, e.dataType.scale); break; case Types.SQL_TIME : - nodes = new Expression[BINARY]; - nodes[LEFT] = e; - nodes[LEFT].dataType = e.dataType; dataType = DateTimeType.getDateTimeType(Types.SQL_TIME_WITH_TIME_ZONE, e.dataType.scale); break; case Types.SQL_TIMESTAMP : - nodes = new Expression[BINARY]; - nodes[LEFT] = e; - nodes[LEFT].dataType = e.dataType; dataType = DateTimeType.getDateTimeType( Types.SQL_TIMESTAMP_WITH_TIME_ZONE, e.dataType.scale); break; @@ -471,23 +461,15 @@ } if (nodes[RIGHT] != null) { - if (nodes[RIGHT].dataType == null) { + Type rightDataType = nodes[RIGHT].dataType; + + if (rightDataType == null) { nodes[RIGHT].dataType = Type.SQL_INTERVAL_HOUR_TO_MINUTE; - } - - if (nodes[RIGHT].dataType.typeCode - != Types.SQL_INTERVAL_HOUR_TO_MINUTE) { - if (nodes[RIGHT].opType == OpTypes.VALUE) { - nodes[RIGHT].valueData = - Type.SQL_INTERVAL_HOUR_TO_MINUTE.castToType( - session, nodes[RIGHT].valueData, - nodes[RIGHT].dataType); - nodes[RIGHT].dataType = - Type.SQL_INTERVAL_HOUR_TO_MINUTE; - } else { - throw Error.error(ErrorCode.X_42563); - } + } else if (!rightDataType.isCharacterType() + && rightDataType.typeCode + != Types.SQL_INTERVAL_HOUR_TO_MINUTE) { + throw Error.error(ErrorCode.X_42563); } } @@ -969,18 +951,36 @@ return null; } - if (nodes[RIGHT] != null && rightValue == null) { + boolean atLocal = nodes[RIGHT] == null; + + if (atLocal) { + return ((DateTimeType) dataType).changeZone(session, + leftValue, nodes[LEFT].dataType, 0, atLocal); + } + + if (rightValue == null) { return null; } - long zoneSeconds = nodes[RIGHT] == null - ? session.getZoneSeconds() - : ((IntervalType) nodes[RIGHT].dataType) - .getSeconds(rightValue); + if (nodes[RIGHT].dataType.isCharacterType()) { + if (DateTimeType.zoneIDs.contains(rightValue)) { + return ((DateTimeType) dataType).changeZone(session, + leftValue, nodes[LEFT].dataType, + (String) rightValue); + } else { + rightValue = + Type.SQL_INTERVAL_HOUR_TO_MINUTE + .convertToDefaultType(session, rightValue); + } + } + + long zoneSeconds = + ((IntervalType) nodes[RIGHT].dataType).getSeconds( + rightValue); return ((DateTimeType) dataType).changeZone(session, leftValue, nodes[LEFT].dataType, (int) zoneSeconds, - session.getZoneSeconds()); + false); } case OpTypes.LIMIT : diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/FunctionCustom.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/FunctionCustom.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/FunctionCustom.java 2021-05-30 14:47:20.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/FunctionCustom.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -77,7 +77,7 @@ * Some functions are translated into equivalent SQL Standard functions. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class FunctionCustom extends FunctionSQL { @@ -322,7 +322,6 @@ customRegularFuncMap.put(Tokens.MONTHS_BETWEEN, FUNC_MONTHS_BETWEEN); customRegularFuncMap.put(Tokens.NANVL, FUNC_NANVL); customRegularFuncMap.put(Tokens.NEWID, FUNC_UUID); - customRegularFuncMap.put(Tokens.NEW_TIME, FUNC_NEW_TIME); customRegularFuncMap.put(Tokens.NEXT_DAY, FUNC_NEXT_DAY); customRegularFuncMap.put(Tokens.NUMTODSINTERVAL, FUNC_NUMTODSINTERVAL); customRegularFuncMap.put(Tokens.NUMTOYMINTERVAL, FUNC_NUMTOYMINTERVAL); @@ -448,6 +447,7 @@ FunctionSQL function = new FunctionSQL(id); function.parseList = tripleParamList; + function.name = Tokens.T_SUBSTR; return function; } @@ -695,7 +695,6 @@ parseList = doubleParamList; break; - case FUNC_NEW_TIME : case FUNC_SEQUENCE_ARRAY : case FUNC_TRANSLATE : parseList = tripleParamList; @@ -955,12 +954,11 @@ return new IntervalSecondData(session.getZoneSeconds(), 0); case FUNC_SESSION_TIMEZONE : - return new IntervalSecondData(session.sessionTimeZoneSeconds, - 0); + return new IntervalSecondData(session.getZoneSeconds(), 0); case FUNC_DBTIMEZONE : { - TimestampData timestamp = Session.getSystemTimestamp(true, - false); + TimestampData timestamp = + DateTimeType.newSystemTimestampWithZone(); IntervalSecondData zone = new IntervalSecondData(timestamp.getZone(), 0); @@ -978,10 +976,10 @@ return Long.valueOf(session.getId()); } case FUNC_ACTION_ID : { - return Long.valueOf(session.actionTimestamp); + return Long.valueOf(session.actionSCN); } case FUNC_TRANSACTION_ID : { - return Long.valueOf(session.transactionTimestamp); + return Long.valueOf(session.transactionSCN); } case FUNC_TRANSACTION_SIZE : { return Long.valueOf(session.getTransactionSize()); @@ -1488,8 +1486,14 @@ if (unary) { if (nodes[0].dataType.isNumberType()) { - return new TimestampData( - ((Number) data[0]).longValue()); + Calendar calendar = session.getCalendar(); + long seconds = ((Number) data[0]).longValue(); + + calendar.setTimeInMillis(seconds * 1000); + + int zone = HsqlDateTime.getZoneSeconds(calendar); + + return new TimestampData(seconds + zone); } try { @@ -1576,7 +1580,7 @@ ((BinaryData) data[0]).getBytes()); } } catch (NumberFormatException e) { - throw Error.error(ErrorCode.X_22026); + throw Error.error(ErrorCode.X_22026, e); } } } @@ -1584,7 +1588,7 @@ TimestampData ts; if (nodes[0] == null) { - ts = session.getCurrentTimestamp(true); + ts = session.getCurrentTimestamp(); } else { if (data[0] == null) { return null; @@ -1601,7 +1605,7 @@ TimestampData ts; if (nodes[0] == null) { - ts = session.getCurrentTimestamp(true); + ts = session.getCurrentTimestamp(); } else { if (data[0] == null) { return null; @@ -2092,10 +2096,20 @@ } } - int count = ((Number) data[1]).intValue(); + int start = 0; + int count = ((Number) data[1]).intValue(); + boolean hasLength = true; + boolean trailing = false; + + if (funcType == FUNC_RIGHT) { + start = count; + count = 0; + hasLength = false; + trailing = true; + } return ((CharacterType) dataType).substring(session, data[0], - 0, count, true, funcType == FUNC_RIGHT); + start, count, hasLength, trailing); } case FUNC_SPACE : { if (data[0] == null) { @@ -2404,13 +2418,20 @@ } TimestampData timestamp = (TimestampData) data[0]; - IntervalSecondData zone = - (IntervalSecondData) Type.SQL_INTERVAL_HOUR_TO_MINUTE - .convertToDefaultType(session, data[1]); - return new TimestampData( - timestamp.getSeconds() - zone.getSeconds(), - timestamp.getNanos(), (int) zone.getSeconds()); + if (DateTimeType.zoneIDs.contains(data[1])) { + return ((DateTimeType) dataType).changeZone(session, + timestamp, (String) data[1]); + } else { + IntervalSecondData zone = + (IntervalSecondData) Type.SQL_INTERVAL_HOUR_TO_MINUTE + .convertToDefaultType(session, data[1]); + + return new TimestampData( + timestamp.getSeconds() + timestamp.getZone() + - zone.getSeconds(), timestamp.getNanos(), + (int) zone.getSeconds()); + } } case FUNC_LAST_DAY : { if (data[0] == null) { @@ -2442,25 +2463,6 @@ return data[0]; - case FUNC_NEW_TIME : { - if (data[0] == null || data[1] == null || data[2] == null) { - return null; - } - - IntervalSecondData zone1 = - (IntervalSecondData) Type.SQL_INTERVAL_HOUR_TO_MINUTE - .convertToDefaultType(session, data[1]); - IntervalSecondData zone2 = - (IntervalSecondData) Type.SQL_INTERVAL_HOUR_TO_MINUTE - .convertToDefaultType(session, data[1]); - Object val = - Type.SQL_TIMESTAMP_WITH_TIME_ZONE.changeZone(session, - data[0], Type.SQL_TIMESTAMP, (int) zone2.getSeconds(), - (int) zone1.getSeconds()); - - return Type.SQL_TIMESTAMP.convertToType(session, val, - Type.SQL_TIMESTAMP_WITH_TIME_ZONE); - } case FUNC_NEXT_DAY : { if (data[0] == null || data[1] == null) { return null; @@ -2533,7 +2535,7 @@ } case FUNC_SESSIONTIMEZONE : { IntervalSecondData zone = - new IntervalSecondData(session.sessionTimeZoneSeconds, 0); + new IntervalSecondData(session.getZoneSeconds(), 0); return Type.SQL_INTERVAL_HOUR_TO_MINUTE.convertToString(zone); } @@ -2543,17 +2545,16 @@ } return Type.SQL_TIMESTAMP_WITH_TIME_ZONE.changeZone(session, - data[0], Type.SQL_TIMESTAMP_WITH_TIME_ZONE, 0, 0); + data[0], Type.SQL_TIMESTAMP_WITH_TIME_ZONE, 0, false); } case FUNC_SYSDATE : { - TimestampData timestamp = Session.getSystemTimestamp(false, - false); + TimestampData timestamp = DateTimeType.newSysDateTimestamp(); return Type.SQL_TIMESTAMP_NO_FRACTION.convertToType(session, timestamp, Type.SQL_TIMESTAMP); } case FUNC_SYSTIMESTAMP : { - return Session.getSystemTimestamp(true, false); + return DateTimeType.newSystemTimestampWithZone(); } case FUNC_TO_DSINTERVAL : { if (data[0] == null) { @@ -3900,6 +3901,14 @@ nodes[1].dataType = Type.SQL_VARCHAR; } + if (!nodes[0].dataType.isTimestampType()) { + throw Error.error(ErrorCode.X_42563); + } + + if (!nodes[1].dataType.isCharacterType()) { + throw Error.error(ErrorCode.X_42563); + } + dataType = Type.SQL_TIMESTAMP_WITH_TIME_ZONE; break; @@ -3953,22 +3962,6 @@ dataType = nodes[0].dataType; break; - case FUNC_NEW_TIME : - if (nodes[0].dataType == null) { - nodes[0].dataType = Type.SQL_TIMESTAMP_NO_FRACTION; - } - - if (nodes[1].dataType == null) { - nodes[1].dataType = Type.SQL_VARCHAR; - } - - if (nodes[2].dataType == null) { - nodes[2].dataType = Type.SQL_VARCHAR; - } - - dataType = Type.SQL_TIMESTAMP_NO_FRACTION; - break; - case FUNC_NEXT_DAY : if (nodes[0].dataType == null) { nodes[0].dataType = Type.SQL_TIMESTAMP_NO_FRACTION; @@ -4314,7 +4307,6 @@ case FUNC_MONTHS_BETWEEN : case FUNC_NEXT_DAY : case FUNC_NANVL : - case FUNC_NEW_TIME : case FUNC_NUMTODSINTERVAL : case FUNC_NUMTOYMINTERVAL : case FUNC_SESSIONTIMEZONE : diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/FunctionSQL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/FunctionSQL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/FunctionSQL.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/FunctionSQL.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,7 +52,7 @@ * Implementation of SQL standard function calls * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class FunctionSQL extends Expression { @@ -545,7 +545,7 @@ } /** - * Evaluates and returns this Function in the context of the session.

                + * Evaluates and returns this Function in the context of the session. */ public Object getValue(Session session) { @@ -905,23 +905,27 @@ Type.SQL_INTEGER); } case FUNC_SUBSTRING_CHAR : { + long length = 0; + boolean hasLength = false; + boolean trailing = false; + if (data[0] == null || data[1] == null) { return null; } + if (nodes[2] != null && data[2] == null) { + return null; + } + Object value; value = Type.SQL_BIGINT.convertToType(session, data[1], nodes[1].dataType); - long offset = ((Number) value).longValue() - 1; - long length = 0; + long offset = ((Number) value).longValue(); if (nodes[2] != null) { - if (data[2] == null) { - return null; - } - + hasLength = true; value = Type.SQL_BIGINT.convertToType(session, data[2], nodes[2].dataType); length = ((Number) value).longValue(); @@ -934,8 +938,21 @@ // not clear what the rules on USING OCTECTS are with UTF } + if (session.database.sqlSyntaxOra) { + if (name == Tokens.T_SUBSTR) { + if (offset == 0) { + offset = 1; + } else if (offset < 0) { + offset = -offset + 1; + trailing = true; + } + } + } + + offset--; + return ((CharacterType) dataType).substring(session, data[0], - offset, length, nodes[2] != null, false); + offset, length, hasLength, trailing); } /* case FUNCTION_SUBSTRING_REG_EXPR : @@ -1027,7 +1044,7 @@ length = ((Number) value).longValue(); } - return ((CharacterType) dataType).overlay(null, data[0], + return ((CharacterType) dataType).overlay(session, data[0], data[1], offset, length, nodes[3] != null); } /* @@ -1166,26 +1183,26 @@ case FUNC_CURRENT_DATE : if (session.database.sqlSyntaxOra) { return dataType.convertToTypeLimits( - session, session.getCurrentTimestamp(false)); + session, session.getLocalTimestamp()); } return session.getCurrentDate(); case FUNC_CURRENT_TIME : return dataType.convertToTypeLimits( - session, session.getCurrentTime(true)); + session, session.getCurrentTime()); case FUNC_CURRENT_TIMESTAMP : return dataType.convertToTypeLimits( - session, session.getCurrentTimestamp(true)); + session, session.getCurrentTimestamp()); case FUNC_LOCALTIME : return dataType.convertToTypeLimits( - session, session.getCurrentTime(false)); + session, session.getLocalTime()); case FUNC_LOCALTIMESTAMP : return dataType.convertToTypeLimits( - session, session.getCurrentTimestamp(false)); + session, session.getLocalTimestamp()); default : throw Error.runtimeError(ErrorCode.U_S0500, "FunctionSQL"); @@ -2137,7 +2154,7 @@ } /** - * Returns a String representation of this object.

                + * Returns a String representation of this object. */ public String describe(Session session, int blanks) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/HsqlDateTime.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/HsqlDateTime.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/HsqlDateTime.java 2021-02-11 11:24:42.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/HsqlDateTime.java 2022-06-28 16:10:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,7 +59,7 @@ * timezone. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.0 */ public class HsqlDateTime { @@ -105,7 +105,7 @@ return d.getTime() / 1000; } } catch (Exception e) { - throw Error.error(ErrorCode.X_22007); + throw Error.error(ErrorCode.X_22007, e); } } @@ -127,15 +127,16 @@ return d.getTime() / 1000; } } catch (Exception e) { - throw Error.error(ErrorCode.X_22007); + throw Error.error(ErrorCode.X_22007, e); } } - public static String getTimestampString(long seconds, - int nanos, int scale) { + public static String getTimestampString(long seconds, int nanos, + int scale) { synchronized (sdfts) { sysDate.setTime(seconds * 1000); + String ts = sdfts.format(sysDate); if (scale > 0) { @@ -190,26 +191,40 @@ } } - public static long convertMillisFromCalendar(Calendar calendar, - long millis) { - return convertMillisFromCalendar(tempCalGMT, calendar, millis); - } + public static long convertMillisFromCalendar(Calendar sourceCalendar, + Calendar targetClendar, long millis) { - public static long convertMillisFromCalendar(Calendar clendarGMT, - Calendar calendar, long millis) { + synchronized (targetClendar) { + synchronized (sourceCalendar) { + targetClendar.clear(); + sourceCalendar.setTimeInMillis(millis); + targetClendar.set(sourceCalendar.get(Calendar.YEAR), + sourceCalendar.get(Calendar.MONTH), + sourceCalendar.get(Calendar.DAY_OF_MONTH), + sourceCalendar.get(Calendar.HOUR_OF_DAY), + sourceCalendar.get(Calendar.MINUTE), + sourceCalendar.get(Calendar.SECOND)); + + return targetClendar.getTimeInMillis(); + } + } + } - synchronized (clendarGMT) { - synchronized (calendar) { - clendarGMT.clear(); - calendar.setTimeInMillis(millis); - clendarGMT.set(calendar.get(Calendar.YEAR), - calendar.get(Calendar.MONTH), - calendar.get(Calendar.DAY_OF_MONTH), - calendar.get(Calendar.HOUR_OF_DAY), - calendar.get(Calendar.MINUTE), - calendar.get(Calendar.SECOND)); + public static long convertSecondsFromCalendar(Calendar sourceCalendar, + Calendar targetClendar, long seconds) { + + synchronized (targetClendar) { + synchronized (sourceCalendar) { + targetClendar.clear(); + sourceCalendar.setTimeInMillis(seconds * 1000); + targetClendar.set(sourceCalendar.get(Calendar.YEAR), + sourceCalendar.get(Calendar.MONTH), + sourceCalendar.get(Calendar.DAY_OF_MONTH), + sourceCalendar.get(Calendar.HOUR_OF_DAY), + sourceCalendar.get(Calendar.MINUTE), + sourceCalendar.get(Calendar.SECOND)); - return clendarGMT.getTimeInMillis(); + return targetClendar.getTimeInMillis() / 1000; } } } @@ -283,21 +298,6 @@ } /** - * Returns the indicated part of the given millisecond date object. - * @param m the millisecond time value from which to extract the indicated part - * @param part an integer code corresponding to the desired date part - * @return the indicated part of the given java.util.Date object - */ - public static int getDateTimePart(Calendar calendar, long m, int part) { - - synchronized (calendar) { - calendar.setTimeInMillis(m); - - return calendar.get(part); - } - } - - /** * truncates millisecond date object */ public static long getTruncatedPart(Calendar calendar, long m, int part) { @@ -313,6 +313,7 @@ if (dayWeek == 1) { dayWeek = 8; } + calendar.add(Calendar.DAY_OF_YEAR, 2 - dayWeek); resetToDate(calendar); @@ -420,7 +421,7 @@ } } - static void zeroFromPart(Calendar cal, int part) { + public static void zeroFromPart(Calendar cal, int part) { switch (part) { @@ -533,7 +534,7 @@ millis = format.parse(string).getTime(); } catch (Exception e) { - throw Error.error(ErrorCode.X_22007, e.toString()); + throw Error.error(e, ErrorCode.X_22007, e.toString()); } if (matchIndex >= 0 && fraction) { @@ -555,7 +556,7 @@ nanos *= (1000000 / factor); } catch (Exception e) { - throw Error.error(ErrorCode.X_22007, e.toString()); + throw Error.error(e, ErrorCode.X_22007, e.toString()); } } @@ -570,7 +571,7 @@ try { format.applyPattern(javaPattern); } catch (Exception e) { - throw Error.error(ErrorCode.X_22511); + throw Error.error(ErrorCode.X_22511, e); } String result = format.format(date); @@ -702,7 +703,7 @@ String s = javaDateTokens[index]; // consecutive quoted tokens - if (s.startsWith("\'") && s.endsWith("\'")) { + if (s.startsWith("'") && s.endsWith("'")) { if (limitQuotedToken == sb.length()) { sb.setLength(sb.length() - 1); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/HsqlNameManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/HsqlNameManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/HsqlNameManager.java 2021-01-06 12:25:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/HsqlNameManager.java 2022-05-23 11:24:00.000000000 +0000 @@ -211,9 +211,7 @@ public HsqlName newAutoName(String prefix, HsqlName schema, HsqlName parent, int type) { - HsqlName name = newAutoName(prefix, null, schema, parent, type); - - return name; + return newAutoName(prefix, null, schema, parent, type); } public HsqlName newConstraintIndexName(HsqlName tableName, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/index/IndexAVLCheck.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/index/IndexAVLCheck.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/index/IndexAVLCheck.java 2020-11-30 18:01:36.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/index/IndexAVLCheck.java 2022-06-08 10:06:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,6 @@ package org.hsqldb.index; -import org.hsqldb.Table; -import org.hsqldb.persist.RowStoreAVL; -import org.hsqldb.result.Result; -import org.hsqldb.lib.HsqlArrayList; -import org.hsqldb.Session; import org.hsqldb.HsqlException; import org.hsqldb.Row; import org.hsqldb.Session; @@ -47,10 +42,12 @@ import org.hsqldb.map.BitMap; import org.hsqldb.persist.DataFileCache; import org.hsqldb.persist.PersistentStore; +import org.hsqldb.persist.RowStoreAVL; +import org.hsqldb.result.Result; import org.hsqldb.rowio.RowInputBinary; /** - * Checks indexex for insonsistencies + * Checks indexes for inconsistencies * * @author Fred Toussi (fredt@users dot sourceforge.net) * @version 2.5.1 diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/index/NodeAVLDisk.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/index/NodeAVLDisk.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/index/NodeAVLDisk.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/index/NodeAVLDisk.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,8 +70,6 @@ package org.hsqldb.index; -import java.io.IOException; - import org.hsqldb.RowAVL; import org.hsqldb.RowAVLDisk; import org.hsqldb.Table; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/index/NodeAVLDiskLarge.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/index/NodeAVLDiskLarge.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/index/NodeAVLDiskLarge.java 2020-07-10 16:58:46.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/index/NodeAVLDiskLarge.java 2022-05-22 17:54:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,6 @@ package org.hsqldb.index; -import java.io.IOException; - import org.hsqldb.RowAVL; import org.hsqldb.RowAVLDisk; import org.hsqldb.Table; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCBlobFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCBlobFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCBlobFile.java 2021-02-07 01:45:22.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCBlobFile.java 2022-04-19 16:49:40.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -291,7 +291,7 @@ * value will be increased to accommodate the extra bytes. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -341,7 +341,7 @@ * value will be increased to accommodate the extra bytes. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -407,7 +407,7 @@ * value will be increased to accommodate the extra bytes. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -483,7 +483,7 @@ * object represents to be len bytes in length. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCBlob.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCBlob.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCBlob.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCBlob.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,7 +68,7 @@ * Blob object contains a logical pointer to the * SQL BLOB data rather than the data itself. * A Blob object is valid for the duration of the - * transaction in which is was created. + * transaction in which it was created. * *

                Methods in the interfaces {@link java.sql.ResultSet}, * {@link java.sql.CallableStatement}, and {@link java.sql.PreparedStatement}, such as @@ -321,7 +321,7 @@ * value will be increased to accommodate the extra bytes. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -389,7 +389,7 @@ * value will be increased to accommodate the extra bytes. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -500,7 +500,7 @@ * value will be increased to accommodate the extra bytes. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -602,7 +602,7 @@ * object represents to be len bytes in length. *

                * Note: If the value specified for pos - * is greater then the length+1 of the BLOB value then the + * is greater than the length+1 of the BLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCCallableStatement.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCCallableStatement.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCCallableStatement.java 2021-01-03 20:59:20.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCCallableStatement.java 2022-06-29 13:20:18.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,7 +57,6 @@ import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.SchemaObject; -import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.lib.IntValueHashMap; import org.hsqldb.result.ResultConstants; @@ -80,15 +79,12 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; -import java.time.OffsetDateTime; -import java.time.OffsetTime; import java.time.Period; -import java.time.ZoneOffset; //#endif JAVA8 -/* $Id: JDBCCallableStatement.java 6261 2021-01-03 21:59:13Z fredt $ */ +/* $Id: JDBCCallableStatement.java 6565 2022-06-29 14:20:12Z fredt $ */ /* @todo fredt 1.9.0 - continuous review wrt multiple result sets, named parameters etc. */ @@ -111,7 +107,7 @@ // campbell-burnet@users 2004-04-xx - doc 1.7.2 - javadocs added/updated // campbell-burnet@users 2005-12-07 - patch 1.8.0.x - initial JDBC 4.0 support work // campbell-burnet@users 2006-05-22 - doc 1.9.0 - full synch up to Mustang Build 84 -// Revision 1.14 2006/07/12 11:58:49 boucherb +// Revision 1.14 2006/07/12 11:58:49 campbell-burnet // - full synch up to Mustang b90 /** @@ -214,7 +210,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 * @see JDBCConnection#prepareCall * @see JDBCResultSet @@ -1291,13 +1287,7 @@ return null; } - long millis = t.getSeconds() * 1000; - - if (cal != null) { - millis = HsqlDateTime.convertMillisToCalendar(cal, millis); - } - - return new Date(millis); + return (Date) Type.SQL_DATE.convertSQLToJava(session, t, cal); } /** @@ -1338,24 +1328,13 @@ public synchronized Time getTime(int parameterIndex, Calendar cal) throws SQLException { - TimeData t = (TimeData) getColumnInType(parameterIndex, Type.SQL_TIME); + Object t = getColumnValue(parameterIndex); if (t == null) { return null; } - long millis = DateTimeType.normaliseTime(t.getSeconds()) * 1000L; - - if (!parameterMetaData.columnTypes[--parameterIndex] - .isDateTimeTypeWithZone()) { - Calendar calendar = cal == null ? session.getCalendar() - : cal; - - millis = HsqlDateTime.convertMillisToCalendar(calendar, millis); - millis = HsqlDateTime.getNormalisedTime(millis); - } - - return new Time(millis); + return (Time) Type.SQL_TIME.convertSQLToJava(session, t, cal); } /** @@ -1396,31 +1375,14 @@ public synchronized Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException { - TimestampData t = (TimestampData) getColumnInType(parameterIndex, - Type.SQL_TIMESTAMP); + + Object t = getColumnValue(parameterIndex); if (t == null) { return null; } - long millis = t.getSeconds() * 1000; - - if (!parameterMetaData.columnTypes[--parameterIndex] - .isDateTimeTypeWithZone()) { - Calendar calendar = cal == null ? session.getCalendar() - : cal; - - if (cal != null) { - millis = HsqlDateTime.convertMillisToCalendar(calendar, - millis); - } - } - - Timestamp ts = new Timestamp(millis); - - ts.setNanos(t.getNanos()); - - return ts; + return (Timestamp) Type.SQL_TIMESTAMP.convertSQLToJava(session, t, cal); } /** @@ -3612,7 +3574,7 @@ * because it informs the driver that the parameter value should be sent to * the server as a CLOB. When the setCharacterStream method is used, the * driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGVARCHAR or a CLOB + * data should be sent to the server as a LONGVARCHAR or a CLOB * @param parameterName the name of the parameter to be set * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. @@ -3670,7 +3632,7 @@ * because it informs the driver that the parameter value should be sent to * the server as a NCLOB. When the setCharacterStream method is used, the * driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGNVARCHAR or a NCLOB + * data should be sent to the server as a LONGNVARCHAR or a NCLOB * * @param parameterName the name of the parameter to be set * @param reader An object that contains the data to set the parameter value to. @@ -4357,7 +4319,7 @@ * because it informs the driver that the parameter value should be sent to * the server as a CLOB. When the setCharacterStream method is used, the * driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGVARCHAR or a CLOB + * data should be sent to the server as a LONGVARCHAR or a CLOB * *

                Note: Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of @@ -4383,7 +4345,7 @@ * method because it informs the driver that the parameter value should be * sent to the server as a BLOB. When the setBinaryStream method is used, * the driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGVARBINARY or a BLOB + * data should be sent to the server as a LONGVARBINARY or a BLOB * *

                Note: Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of @@ -4411,7 +4373,7 @@ * because it informs the driver that the parameter value should be sent to * the server as a NCLOB. When the setCharacterStream method is used, the * driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGNVARCHAR or a NCLOB + * data should be sent to the server as a LONGNVARCHAR or a NCLOB *

                Note: Consult your JDBC driver documentation to determine if * it might be more efficient to use a version of * setNClob which takes a length parameter. @@ -4466,13 +4428,7 @@ throw JDBCUtil.nullArgument(); } - Type hsqlType = Types.getParameterSQLType(type); - - if(hsqlType == null) { - throw JDBCUtil.sqlException(ErrorCode.X_42561); - } - - Object source; + final Object source = getColumnValue(parameterIndex); if (wasNullValue) { return null; @@ -4538,42 +4494,70 @@ o = getTimestamp(parameterIndex); break; } - case "java.util.UUID": - source = getColumnInType(parameterIndex, hsqlType); - o = Type.SQL_GUID.convertSQLToJava(session, source); + case "java.util.UUID": { + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isUUIDType()) { + o = Type.SQL_GUID.convertSQLToJava(session, source); + } else { + Object value = Type.SQL_GUID.convertToTypeJDBC(session, + source, columnType); + o = Type.SQL_GUID.convertSQLToJava(session, value); + } + break; + } + case "java.time.Instant": { + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toInstant(session, v); + } break; + } case "java.time.LocalDate": { - source = getColumnInType(parameterIndex, hsqlType); - TimestampData v = (TimestampData) source; - long millis = v.getMillis(); - Calendar cal = session.getCalendarGMT(); - cal.setTimeInMillis(millis); - o = LocalDate.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH)); + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toLocalDate(session, v); + } break; } case "java.time.LocalTime": { - source = getColumnInType(parameterIndex, hsqlType); - TimeData v = (TimeData) source; - o = LocalTime.ofNanoOfDay(v.getSeconds() * 1_000_000_000L + v.getNanos()); + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isTimeType()) { + TimeData v = (TimeData) source; + o = ((DateTimeType) columnType).toLocalTime(session, v); + } else if (columnType.isTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toLocalTime(session, v); + } break; } case "java.time.LocalDateTime": { - source = getColumnInType(parameterIndex, hsqlType); - TimestampData v = (TimestampData) source; - - long millis = v.getMillis(); - int nanos = v.getNanos(); - Calendar cal = session.getCalendarGMT(); - cal.setTimeInMillis(millis); - o = LocalDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND ), nanos); + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toLocalDateTime(session, v); + } break; } case "java.time.OffsetTime": { - o = getTimeWithZone(parameterIndex); + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isTimeType()) { + TimeData v = (TimeData) source; + o = ((DateTimeType) columnType).toOffsetTime(session, v); + } else if (columnType.isTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toOffsetTime(session, v); + } + break; } case "java.time.OffsetDateTime": { - o = getTimestampWithZone(parameterIndex); + Type columnType = parameterTypes[parameterIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toOffsetDateTime(session, v); + } break; } case "java.time.Duration": { @@ -4582,7 +4566,6 @@ if (!sourceType.isIntervalDaySecondType()) { break; } - source = getColumnInType(parameterIndex, hsqlType); IntervalSecondData v = (IntervalSecondData) source; o = Duration.ofSeconds(v.getSeconds(), v.getNanos()); break; @@ -4593,7 +4576,6 @@ if (!sourceType.isIntervalYearMonthType()) { break; } - source = getColumnInType(parameterIndex, hsqlType); IntervalMonthData v = (IntervalMonthData) source; int months = v.getMonths(); @@ -4884,7 +4866,7 @@ * If the JDBC type expected to be returned to this output parameter * is specific to this particular database, {@code sqlType} * should be {@code JDBCType.OTHER} or a {@code SQLType} that is supported - * by the JDBC driver.. The method + * by the JDBC driver. The method * {@link #getObject} retrieves the value. *

                * The default implementation will throw {@code SQLFeatureNotSupportedException} @@ -5005,7 +4987,7 @@ // --------------------------- Internal Implementation ------------------------- - /** parameter name => parameter index */ + /** parameter name maps to parameter index */ private IntValueHashMap parameterNameMap; private boolean wasNullValue; @@ -5103,7 +5085,7 @@ /** * Does the specialized work required to free this object's resources and - * that of it's parent classes.

                + * that of its parent classes.

                * * @throws SQLException if a database access error occurs */ @@ -5146,6 +5128,20 @@ */ /** + * Internal get value. + */ + protected Object getColumnValue(int columnIndex) throws SQLException { + + checkGetParameterIndex(columnIndex); + + Object value = parameterValues[columnIndex - 1]; + + trackNull(value); + + return value; + } + + /** * Internal value converter. Similar to its counterpart in JDBCResultSet

                * * All trivially successful getXXX methods eventually go through this @@ -5198,53 +5194,26 @@ return value; } -//#ifdef JAVA8 private Object getTimestampWithZone(int columnIndex) throws SQLException { - TimestampData v = (TimestampData) getColumnInType(columnIndex, Type.SQL_TIMESTAMP_WITH_TIME_ZONE); + TimestampData v = (TimestampData) getColumnInType(columnIndex, + Type.SQL_TIMESTAMP_WITH_TIME_ZONE); if (v == null) { return null; } - - ZoneOffset z = ZoneOffset.ofTotalSeconds(v.getZone()); - LocalDateTime ldt = LocalDateTime.ofEpochSecond(v.getSeconds(), v.getNanos(), z); - return OffsetDateTime.of(ldt, z); + return Type.SQL_TIMESTAMP_WITH_TIME_ZONE.convertSQLToJava(session, v); } private Object getTimeWithZone(int columnIndex) throws SQLException { - TimeData v = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME_WITH_TIME_ZONE); + TimeData v = (TimeData) getColumnInType(columnIndex, + Type.SQL_TIME_WITH_TIME_ZONE); if (v == null) { return null; } - - ZoneOffset z = ZoneOffset.ofTotalSeconds(v.getZone()); - LocalTime lt = LocalTime.ofNanoOfDay((v.getSeconds() + v.getZone()) * 1_000_000_000L + v.getNanos()); - return OffsetTime.of(lt, z); + return Type.SQL_TIME_WITH_TIME_ZONE.convertSQLToJava(session, v); } -//#else -/* - private Object getTimestampWithZone(int columnIndex) throws SQLException { - TimestampData v = (TimestampData) getColumnInType(columnIndex, Type.SQL_TIMESTAMP_WITH_TIME_ZONE); - - if (v == null) { - return null; - } - return Type.SQL_TIMESTAMP.convertSQLToJava(session, v); - } - - private Object getTimeWithZone(int columnIndex) throws SQLException { - TimeData v = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME_WITH_TIME_ZONE); - - if (v == null) { - return null; - } - return Type.SQL_TIME.convertSQLToJava(session, v); - } -*/ -//#endif JAVA8 - private boolean trackNull(Object o) { return (wasNullValue = (o == null)); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCClobClient.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCClobClient.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCClobClient.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCClobClient.java 2022-07-26 18:24:12.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,16 +35,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; -import java.io.UnsupportedEncodingException; import java.io.Writer; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.charset.Charset; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.CharsetEncoder; -import java.nio.charset.CoderResult; -import java.nio.charset.CodingErrorAction; -import java.nio.charset.IllegalCharsetNameException; import java.sql.Clob; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; @@ -61,8 +52,8 @@ * Instances of this class are returned by calls to ResultSet methods. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.0 - * @since JDK 1.2, HSQLDB 1.9.0 + * @version 2.7.0 + * @since HSQLDB 1.9.0 */ public class JDBCClobClient implements Clob { @@ -70,6 +61,10 @@ * Retrieves the CLOB value designated by this * Clob object as an ascii stream. * + * The ascii stream consists of the low ordre bytes of UTF-16 characters + * in the clob. The question mark character is returnd for UTF-16 characters + * beyond the range of 8-bit ASCII. + * * @return a java.io.InputStream object containing the * CLOB data * @throws SQLException if there is an error accessing the @@ -81,154 +76,56 @@ return new InputStream() { - private final byte[] oneChar = new byte[1]; - private boolean m_closed; - - // better size than 8192 for network connections. - private CharBuffer m_charBuffer = - (CharBuffer) CharBuffer.allocate(64 * 1024).flip(); - private ByteBuffer m_byteBuffer = ByteBuffer.allocate(1024); - private Charset m_charset = charsetForName("US-ASCII"); - private CharsetEncoder m_encoder = - m_charset.newEncoder().onMalformedInput( - CodingErrorAction.REPLACE).onUnmappableCharacter( - CodingErrorAction.REPLACE); - private Reader m_reader = clob.getCharacterStream(session); + private Reader reader = clob.getCharacterStream(session); public int read() throws IOException { - if (isEOF()) { + int c = reader.read(); + + if (c < 0) { return -1; } - synchronized (oneChar) { - int charsRead = read(oneChar, 0, 1); - - return charsRead == 1 ? oneChar[0] - : -1; - } + return c < 256 ? c & 0xff + : '?'; } public int read(byte[] b, int off, int len) throws IOException { - checkClosed(); - - if (isEOF()) { - return -1; - } - - final CharBuffer cb = m_charBuffer; - - // - int charsRead; - int bytesRead; - - if (cb.remaining() == 0) { - cb.clear(); - - charsRead = m_reader.read(cb); - - cb.flip(); - - if (charsRead < 0) { - setEOF(); - - return -1; - } else if (charsRead == 0) { - return 0; - } + if (b == null) { + throw new NullPointerException(); } - final ByteBuffer bb = (m_byteBuffer.capacity() < len) - ? ByteBuffer.allocate(len) - : m_byteBuffer; - - // Since ASCII is single-byte, restrict encoder character consumption - // to at most 'len' characters' to produce at most len ASCII - // characters - int cbLimit = cb.limit(); - int cbPosition = cb.position(); - - cb.limit(cbPosition + len); - bb.clear(); - - int bbPosition = bb.position(); - CoderResult result = m_encoder.encode(cb, bb, false); - - if (bbPosition == bb.position() && result.isUnderflow()) { - - // surrogate character time - cb.limit(cb.limit() + 1); - m_encoder.encode(cb, bb, false); + if (off < 0 || len < 0 || len > b.length - off) { + throw new IndexOutOfBoundsException(); } - // Restore the old limit so the buffer gets topped up - // when required. - cb.limit(cbLimit); - bb.flip(); - - bytesRead = bb.limit(); - - if (bytesRead == 0) { - setEOF(); - - return -1; + if (len == 0) { + return 0; } - m_byteBuffer = bb; + int bytesRead = 0; - bb.get(b, off, bytesRead); + for (int i = 0; i < len; i++) { + int c = reader.read(); - return bytesRead; - } - - public void close() throws IOException { - - boolean isClosed = m_closed; - - if (!isClosed) { - m_closed = true; - m_charBuffer = null; - m_charset = null; - m_encoder = null; - - try { - m_reader.close(); - } catch (Exception ex) {} - } - } - - private boolean isEOF() { - - final Reader reader = m_reader; - - return (reader == null); - } - - private void setEOF() { + if (c < 0) { + break; + } - final Reader reader = m_reader; + b[off + i] = (byte) c; - if (reader != null) { - try { - reader.close(); - } catch (IOException iOException) {} + bytesRead++; } - m_reader = null; + return bytesRead == 0 ? -1 : bytesRead; } - private void checkClosed() throws IOException { - - if (JDBCClobClient.this.isClosed()) { - try { - this.close(); - } catch (Exception ex) {} - } + public void close() throws IOException { - if (m_closed) { - throw new IOException("The stream is closed."); - } + try { + reader.close(); + } catch (Exception ex) {} } }; } @@ -358,6 +255,10 @@ } } + if (!isInLimits(Integer.MAX_VALUE, 0, searchstr.length())) { + throw JDBCUtil.outOfRangeArgument(); + } + return position(searchstr.getSubString(1, (int) searchstr.length()), start); } @@ -367,6 +268,9 @@ * CLOB value that this Clob object represents, * starting at position pos. * + * The bytes written to the OutputStream are stored verbatim in the clob as + * the low order bytes of UTF-16 characters. + * * @param pos the position at which to start writing to this * CLOB object * @return the stream to which ASCII encoded characters can be written @@ -376,117 +280,39 @@ public synchronized OutputStream setAsciiStream(final long pos) throws SQLException { - checkClosed(); - - if (pos < 1) { - throw JDBCUtil.outOfRangeArgument("pos: " + pos); - } - - if (!isWritable) { - throw JDBCUtil.notUpdatableColumn(); - } - - startUpdate(); - return new OutputStream() { - private long m_position = pos - 1; - private Charset m_charset = charsetForName("US-ASCII"); - private CharsetDecoder m_decoder = - m_charset.newDecoder().onMalformedInput( - CodingErrorAction.REPLACE).onUnmappableCharacter( - CodingErrorAction.REPLACE); - private CharBuffer m_charBuffer = CharBuffer.allocate(64 * 1024); - private ByteBuffer m_byteBuffer = ByteBuffer.allocate(1024); - private final byte[] oneByte = new byte[1]; - private boolean m_closed; + Writer writer = setCharacterStream(pos); public void write(int b) throws IOException { - - synchronized (oneByte) { - oneByte[0] = (byte) b; - - this.write(oneByte, 0, 1); - } + writer.write(b & 0xff); } public void write(byte[] b, int off, int len) throws IOException { - checkClosed(); - - final ByteBuffer bb = (m_byteBuffer.capacity() < len) - ? ByteBuffer.allocate(len) - : m_byteBuffer; - - if (m_charBuffer.remaining() < len) { - flush0(); + if (b == null) { + throw new NullPointerException(); } - final CharBuffer cb = m_charBuffer.capacity() < len - ? CharBuffer.allocate(len) - : m_charBuffer; - - bb.clear(); - bb.put(b, off, len); - bb.flip(); - m_decoder.decode(bb, cb, false); - - if (cb.remaining() == 0) { - flush(); + if (off < 0 || len < 0 || len > b.length - off) { + throw new IndexOutOfBoundsException(); } - } - - public void flush() throws IOException { - checkClosed(); - flush0(); - } - - public void close() throws IOException { - if (!m_closed) { - try { - flush0(); - } finally { - m_closed = true; - m_byteBuffer = null; - m_charBuffer = null; - m_charset = null; - m_decoder = null; - } + if (len == 0) { + return; } - } - private void checkClosed() throws IOException { + char[] charArray = new char[len]; - if (JDBCClobClient.this.isClosed()) { - try { - close(); - } catch (Exception ex) {} + for (int i = 0; i < len; i++) { + charArray[i] = (char) b[off + i]; } - if (m_closed) { - throw new IOException("The stream is closed."); - } + writer.write(charArray, 0, len); } - private void flush0() throws IOException { - - final CharBuffer cb = m_charBuffer; - - cb.flip(); - - final char[] chars = new char[cb.length()]; - - cb.get(chars); - cb.clear(); - - try { - clob.setChars(session, m_position, chars, 0, chars.length); - } catch (Exception e) { - throw new IOException(e.toString()); - } - - m_position += chars.length; + public void close() throws IOException { + writer.close(); } }; } @@ -642,7 +468,7 @@ //------------------------- JDBC 4.0 ----------------------------------- /** - * This method frees the Clob object and releases the resources the resources + * This method frees the Clob object and releases the resources * that it holds. The object is invalid once the free method * is called. *

                @@ -765,22 +591,4 @@ return fullLength >= 0 && pos >= 0 && len >= 0 && pos <= fullLength - len; } - - protected static Charset charsetForName(final String charsetName) - throws SQLException { - - String csn = charsetName; - - if (csn == null) { - csn = Charset.defaultCharset().name(); - } - - try { - if (Charset.isSupported(csn)) { - return Charset.forName(csn); - } - } catch (IllegalCharsetNameException x) {} - - throw JDBCUtil.sqlException(new UnsupportedEncodingException(csn)); - } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCClobFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCClobFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCClobFile.java 2021-02-09 04:51:18.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCClobFile.java 2022-04-19 16:49:40.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -470,7 +470,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -504,7 +504,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -609,7 +609,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -682,7 +682,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -755,7 +755,7 @@ * characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -801,7 +801,7 @@ } /** - * This method frees the Clob object and releases the resources the resources + * This method frees the Clob object and releases the resources * that it holds. The object is invalid once the free method * is called. *

                @@ -969,7 +969,7 @@ } /** - * Constructs a new JDBCClobFile instance backed by an File object + * Constructs a new JDBCClobFile instance backed by a File object * created by File.createTempFile(TEMP_FILE_PREFIX, TEMP_FILE_SUFFIX), * using the given encoding to read and write file content. * diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCClob.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCClob.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCClob.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCClob.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,7 +42,7 @@ import org.hsqldb.lib.FrameworkLogger; import org.hsqldb.lib.java.JavaSystem; -/* $Id: JDBCClob.java 6266 2021-01-25 16:08:06Z fredt $ */ +/* $Id: JDBCClob.java 6572 2022-07-07 17:32:55Z fredt $ */ // campbell-burnet@users 2004-03/04-xx - doc 1.7.2 - javadocs updated; methods put in // correct (historical, interface @@ -124,9 +124,6 @@ */ public class JDBCClob implements Clob { - private static final FrameworkLogger LOG = - FrameworkLogger.getLog(JDBCClob.class); - /** * Retrieves the number of characters * in the CLOB value @@ -364,7 +361,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -435,7 +432,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -685,7 +682,7 @@ * value will be increased to accommodate the extra characters. *

                * Note: If the value specified for pos - * is greater then the length+1 of the CLOB value then the + * is greater than the length+1 of the CLOB value then the * behavior is undefined. Some JDBC drivers may throw a * SQLException while other drivers may support this * operation. @@ -844,7 +841,7 @@ //------------------------- JDBC 4.0 ----------------------------------- /** - * This method frees the Clob object and releases the resources the resources + * This method frees the Clob object and releases the resources * that it holds. The object is invalid once the free method * is called. *

                diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCCommonDataSource.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCCommonDataSource.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCCommonDataSource.java 2019-01-25 21:04:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCCommonDataSource.java 2022-04-02 11:54:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCConnection.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCConnection.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCConnection.java 2021-02-07 17:08:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCConnection.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,7 @@ import java.sql.PreparedStatement; import java.sql.SQLClientInfoException; import java.sql.SQLFeatureNotSupportedException; + //import java.sql.SQLData; //import java.sql.SQLOutput; //import java.sql.SQLInput; @@ -50,17 +51,17 @@ import java.sql.Savepoint; import java.sql.Statement; import java.sql.Struct; -import java.util.Calendar; +import java.util.HashMap; import java.util.Map; import java.util.Properties; +import java.util.TimeZone; + // import java.util.logging.Level; // import java.util.logging.Logger; - import org.hsqldb.ClientConnection; import org.hsqldb.ClientConnectionHTTP; import org.hsqldb.DatabaseManager; import org.hsqldb.DatabaseURL; -import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.SessionInterface; import org.hsqldb.error.ErrorCode; @@ -73,8 +74,7 @@ import org.hsqldb.types.ArrayType; import org.hsqldb.types.Type; - -/* $Id: JDBCConnection.java 6294 2021-02-07 18:08:27Z fredt $ */ +/* $Id: JDBCConnection.java 6524 2022-05-22 19:09:49Z fredt $ */ // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // @@ -121,7 +121,7 @@ * should use the appropriate Connection method such as * setAutoCommit or setTransactionIsolation. * Applications should not invoke SQL commands directly to change the connection's - * configuration when there is a JDBC method available. By default a Connection object is in + * configuration when there is a JDBC method available. By default, a Connection object is in * auto-commit mode, which means that it automatically commits changes * after executing each statement. If auto-commit mode has been * disabled, the method commit must be called explicitly in @@ -220,7 +220,7 @@ * For more information on server configuration regarding mounting multiple * databases and assigning them <alias> values, please read the * Java API documentation for {@link org.hsqldb.server.Server Server} and related - * chapters in the general documentation, especially the Advanced Users + * chapters in the general documentation, especially the HyperSQL User * Guide. * *


                @@ -361,13 +361,10 @@ * Please read your OS file system documentation. *

              * - * Note: Versions of HSQLDB previous to 1.7.0 did not support creating + * Note:HSQLDB creates * directories along the file path specified in the persistent, in-process mode * database connection <url> form, in the case that they did - * not already exist. Starting with HSQLDB 1.7.0, directories will - * be created if they do not already exist., but only if HSQLDB is built under - * a version of the compiler greater than JDK 1.1.x. - * + * not already exist. *


              * * res: protocol Connections:

              @@ -435,7 +432,7 @@ * * For more information about HSQLDB file structure, various database modes * and other attributes such as those controlled through the HSQLDB properties - * files, please read the general documentation, especially the Advanced Users + * files, please read the general documentation, especially the HyperSQL User * Guide.

              * * JDBC 4.0 Notes:

              @@ -443,7 +440,7 @@ * Starting with JDBC 4.0 (JDK 1.6), the DriverManager methods * getConnection and getDrivers have been * enhanced to support the Java Standard Edition Service Provider mechanism. - * When built under a Java runtime that supports JDBC 4.0, HSQLDB distribution + * HSQLDB distribution * jars containing the Driver implementation also include the file * META-INF/services/java.sql.Driver. This file contains the fully * qualified class name ('org.hsqldb.jdbc.JDBCDriver') of the HSQLDB implementation @@ -462,7 +459,7 @@ *

  • * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since HSQLDB 1.9.0 * @see JDBCDriver * @see JDBCStatement @@ -524,7 +521,8 @@ int props = ResultProperties.getValueForJDBC(JDBCResultSet.TYPE_FORWARD_ONLY, - JDBCResultSet.CONCUR_READ_ONLY, rsHoldability); + JDBCResultSet.CONCUR_READ_ONLY, + rsHoldability); Statement stmt = new JDBCStatement(this, props); return stmt; @@ -582,16 +580,16 @@ * or this method is called on a closed connection * @see #prepareStatement(String,int,int) */ - public synchronized PreparedStatement prepareStatement( - String sql) throws SQLException { + public synchronized PreparedStatement prepareStatement(String sql) + throws SQLException { checkClosed(); try { - return new JDBCPreparedStatement(this, sql, - JDBCResultSet.TYPE_FORWARD_ONLY, - JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, - ResultConstants.RETURN_NO_GENERATED_KEYS, null, null); + return new JDBCPreparedStatement( + this, sql, JDBCResultSet.TYPE_FORWARD_ONLY, + JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, + ResultConstants.RETURN_NO_GENERATED_KEYS, null, null); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -642,8 +640,8 @@ * or this method is called on a closed connection * @see #prepareCall(String,int,int) */ - public synchronized CallableStatement prepareCall( - String sql) throws SQLException { + public synchronized CallableStatement prepareCall(String sql) + throws SQLException { CallableStatement stmt; @@ -651,8 +649,9 @@ try { stmt = new JDBCCallableStatement(this, sql, - JDBCResultSet.TYPE_FORWARD_ONLY, - JDBCResultSet.CONCUR_READ_ONLY, rsHoldability); + JDBCResultSet.TYPE_FORWARD_ONLY, + JDBCResultSet.CONCUR_READ_ONLY, + rsHoldability); return stmt; } catch (HsqlException e) { @@ -736,8 +735,8 @@ * (JDBC4 clarification:) * or this method is called on a closed connection */ - public synchronized String nativeSQL( - final String sql) throws SQLException { + public synchronized String nativeSQL(final String sql) + throws SQLException { checkClosed(); @@ -785,6 +784,7 @@ if (sb == null) { sb = new StringBuilder(sql.length()); } + sb.append(sql, tail, i); i = onStartEscapeSequence(sql, sb, i); @@ -795,22 +795,22 @@ state = inside_escape; } - break; + case outside_escape_inside_single_quotes : // inside ' ' only case inside_escape_inside_single_quotes : // inside { } and ' ' if (c == '\'') { state -= 1; } - break; + case outside_escape_inside_double_quotes : // inside " " only case inside_escape_inside_double_quotes : // inside { } and " " if (c == '"') { state -= 2; } - break; + case inside_escape : // inside { } if (c == '\'') { state = inside_escape_inside_single_quotes; @@ -828,7 +828,7 @@ nest--; state = (nest == 0) ? outside_all - : inside_escape; + : inside_escape; } else if (c == '{') { sb.append(sql, tail, i); @@ -841,13 +841,15 @@ state = inside_escape; } break; - default: + + default : } } if (!changed) { return sql; } + sb.append(sql.substring(tail)); return sb.toString(); @@ -917,8 +919,8 @@ * or this method is called on a closed connection * @see #getAutoCommit */ - public synchronized void setAutoCommit( - boolean autoCommit) throws SQLException { + public synchronized void setAutoCommit(boolean autoCommit) + throws SQLException { checkClosed(); @@ -1053,7 +1055,7 @@ * *
    * - * @exception SQLException SQLException if a database access error occurs + * @exception SQLException if a database access error occurs */ public synchronized void close() throws SQLException { @@ -1064,6 +1066,7 @@ if (isInternal || isClosed) { return; } + isClosed = true; rootWarning = null; connProperties = null; @@ -1191,8 +1194,8 @@ * method is called on a closed connection or this * method is called during a transaction */ - public synchronized void setReadOnly( - boolean readOnly) throws SQLException { + public synchronized void setReadOnly(boolean readOnly) + throws SQLException { checkClosed(); @@ -1209,7 +1212,7 @@ * * @return true if this Connection object * is read-only; false otherwise - * @exception SQLException SQLException if a database access error occurs + * @exception SQLException if a database access error occurs * (JDBC4 Clarification:) * or this method is called on a closed connection */ @@ -1344,8 +1347,8 @@ * @see JDBCDatabaseMetaData#supportsTransactionIsolationLevel * @see #getTransactionIsolation */ - public synchronized void setTransactionIsolation( - int level) throws SQLException { + public synchronized void setTransactionIsolation(int level) + throws SQLException { checkClosed(); @@ -1356,6 +1359,7 @@ case TRANSACTION_REPEATABLE_READ : case TRANSACTION_SERIALIZABLE : break; + default : throw JDBCUtil.invalidArgument(); } @@ -1471,7 +1475,7 @@ * *
    * - * @exception SQLException SQLException if a database access error occurs + * @exception SQLException if a database access error occurs * (JDBC4 Clarification:) * or this method is called on a closed connection */ @@ -1609,9 +1613,9 @@ checkClosed(); try { - return new JDBCPreparedStatement(this, sql, resultSetType, - resultSetConcurrency, rsHoldability, - ResultConstants.RETURN_NO_GENERATED_KEYS, null, null); + return new JDBCPreparedStatement( + this, sql, resultSetType, resultSetConcurrency, rsHoldability, + ResultConstants.RETURN_NO_GENERATED_KEYS, null, null); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -1679,7 +1683,8 @@ try { return new JDBCCallableStatement(this, sql, resultSetType, - resultSetConcurrency, rsHoldability); + resultSetConcurrency, + rsHoldability); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -1721,13 +1726,12 @@ * @since JDK 1.2 * @see #setTypeMap */ - public synchronized java.util - .Map> getTypeMap() throws SQLException { + public synchronized Map> getTypeMap() + throws SQLException { checkClosed(); - return new java.util.HashMap>(); + return new HashMap>(); } /** @@ -1737,7 +1741,7 @@ * this Connection object. The type map will be used for the * custom mapping of SQL structured types and distinct types. * JDBC4.1[

    - * You must set the the values for the TypeMap prior to + * You must set the values for the TypeMap prior to * calling setMap as a JDBC driver may create an internal copy * of the TypeMap: * @@ -1771,8 +1775,8 @@ * @since JDK 1.2 * @see #getTypeMap */ - public synchronized void setTypeMap(Map> map) throws SQLException { + public synchronized void setTypeMap(Map> map) + throws SQLException { checkClosed(); @@ -1788,7 +1792,7 @@ * Changes the default holdability of ResultSet objects * created using this Connection object to the given * holdability. The default holdability of ResultSet objects - * can be be determined by invoking + * can be determined by invoking * {@link DatabaseMetaData#getResultSetHoldability}. * * @@ -1813,8 +1817,8 @@ * @see JDBCResultSet * @since JDK 1.4, HSQLDB 1.7.2 */ - public synchronized void setHoldability( - int holdability) throws SQLException { + public synchronized void setHoldability(int holdability) + throws SQLException { checkClosed(); @@ -1823,9 +1827,11 @@ case JDBCResultSet.HOLD_CURSORS_OVER_COMMIT : case JDBCResultSet.CLOSE_CURSORS_AT_COMMIT : break; + default : throw JDBCUtil.invalidArgument(); } + rsHoldability = holdability; } @@ -1953,8 +1959,8 @@ * @see java.sql.Savepoint * @since JDK 1.4, HSQLDB 1.7.2 */ - public synchronized Savepoint setSavepoint( - String name) throws SQLException { + public synchronized Savepoint setSavepoint(String name) + throws SQLException { checkClosed(); @@ -2019,8 +2025,8 @@ * @see #rollback * @since JDK 1.4, HSQLDB 1.7.2 */ - public synchronized void rollback( - Savepoint savepoint) throws SQLException { + public synchronized void rollback(Savepoint savepoint) + throws SQLException { JDBCSavepoint sp; @@ -2033,6 +2039,7 @@ if (!(savepoint instanceof JDBCSavepoint)) { throw JDBCUtil.invalidArgument(ErrorCode.X_3B001); } + sp = (JDBCSavepoint) savepoint; if (JDBCDatabaseMetaData.JDBC_MAJOR >= 4 && sp.name == null) { @@ -2098,8 +2105,8 @@ * @see java.sql.Savepoint * @since JDK 1.4, HSQLDB 1.7.2 */ - public synchronized void releaseSavepoint( - Savepoint savepoint) throws SQLException { + public synchronized void releaseSavepoint(Savepoint savepoint) + throws SQLException { JDBCSavepoint sp; Result req; @@ -2113,6 +2120,7 @@ if (!(savepoint instanceof JDBCSavepoint)) { throw JDBCUtil.invalidArgument(ErrorCode.X_3B001); } + sp = (JDBCSavepoint) savepoint; if (JDBCDatabaseMetaData.JDBC_MAJOR >= 4 && sp.name == null) { @@ -2285,9 +2293,10 @@ checkClosed(); try { - return new JDBCPreparedStatement(this, sql, resultSetType, - resultSetConcurrency, resultSetHoldability, - ResultConstants.RETURN_NO_GENERATED_KEYS, null, null); + return new JDBCPreparedStatement( + this, sql, resultSetType, resultSetConcurrency, + resultSetHoldability, + ResultConstants.RETURN_NO_GENERATED_KEYS, null, null); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -2361,7 +2370,8 @@ try { return new JDBCCallableStatement(this, sql, resultSetType, - resultSetConcurrency, resultSetHoldability); + resultSetConcurrency, + resultSetHoldability); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -2437,15 +2447,17 @@ try { if (autoGeneratedKeys != Statement.RETURN_GENERATED_KEYS - && autoGeneratedKeys != Statement.NO_GENERATED_KEYS - && autoGeneratedKeys != JDBCStatement.RETURN_PRIMARY_KEYS) { + && autoGeneratedKeys != Statement.NO_GENERATED_KEYS + && autoGeneratedKeys + != JDBCStatement.RETURN_PRIMARY_KEYS) { throw JDBCUtil.invalidArgument("autoGeneratedKeys"); } return new JDBCPreparedStatement(this, sql, - JDBCResultSet.TYPE_FORWARD_ONLY, - JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, - autoGeneratedKeys, null, null); + JDBCResultSet.TYPE_FORWARD_ONLY, + JDBCResultSet.CONCUR_READ_ONLY, + rsHoldability, autoGeneratedKeys, + null, null); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -2515,11 +2527,11 @@ checkClosed(); try { - return new JDBCPreparedStatement(this, sql, - JDBCResultSet.TYPE_FORWARD_ONLY, - JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, - ResultConstants.RETURN_GENERATED_KEYS_COL_INDEXES, - columnIndexes, null); + return new JDBCPreparedStatement( + this, sql, JDBCResultSet.TYPE_FORWARD_ONLY, + JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, + ResultConstants.RETURN_GENERATED_KEYS_COL_INDEXES, + columnIndexes, null); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -2591,11 +2603,11 @@ checkClosed(); try { - return new JDBCPreparedStatement(this, sql, - JDBCResultSet.TYPE_FORWARD_ONLY, - JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, - ResultConstants.RETURN_GENERATED_KEYS_COL_NAMES, null, - columnNames); + return new JDBCPreparedStatement( + this, sql, JDBCResultSet.TYPE_FORWARD_ONLY, + JDBCResultSet.CONCUR_READ_ONLY, rsHoldability, + ResultConstants.RETURN_GENERATED_KEYS_COL_NAMES, null, + columnNames); } catch (HsqlException e) { throw JDBCUtil.sqlException(e); } @@ -2659,7 +2671,6 @@ * * @since JDK 1.6, HSQLDB 2.0 */ - public NClob createNClob() throws SQLException { checkClosed(); @@ -2719,7 +2730,7 @@ * * @return true if the connection is valid, false otherwise * @exception SQLException if the value supplied for timeout - * is less then 0 + * is less than 0 * @since JDK 1.6, HSQLDB 2.0 * * @see JDBCDatabaseMetaData#getClientInfoProperties @@ -2738,7 +2749,7 @@ return false; } - final boolean[] flag = new boolean[] { true }; + final boolean[] flag = new boolean[]{ true }; Thread t = new Thread() { public void run() { @@ -2767,8 +2778,7 @@ try { t.setContextClassLoader(null); - } catch (Throwable th) { - } + } catch (Throwable th) {} if (timeout == 0) { return flag[0]; @@ -2796,7 +2806,7 @@ * value in the database until the next time a statement is executed or * prepared. Other than storing the client information in the appropriate * place in the database, these methods shall not alter the behavior of - * the connection in anyway. The values supplied to these methods are + * the connection in any way. The values supplied to these methods are * used for accounting, diagnostics and debugging purposes only. *

    * The driver shall generate a warning if the client info name specified @@ -2886,8 +2896,8 @@ * is called on a closed connection * */ - public void setClientInfo( - Properties properties) throws SQLClientInfoException { + public void setClientInfo(Properties properties) + throws SQLClientInfoException { if (!this.isClosed && (properties == null || properties.isEmpty())) { return; @@ -2995,6 +3005,7 @@ if (typeName == null) { throw JDBCUtil.nullArgument(); } + typeName = typeName.toUpperCase(); int typeNumber = Type.getTypeNr(typeName); @@ -3055,7 +3066,7 @@ * If the receiver implements the interface then the result is the receiver * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the - * wrapped object or a proxy for the wrapped object. Otherwise return the + * wrapped object or a proxy for the wrapped object. Otherwise return * the result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. @@ -3067,7 +3078,7 @@ * @since JDK 1.6, HSQLDB 2.0 */ @SuppressWarnings("unchecked") - public T unwrap(java.lang.Class iface) throws java.sql.SQLException { + public T unwrap(Class iface) throws java.sql.SQLException { checkClosed(); @@ -3093,8 +3104,7 @@ * for an object with the given interface. * @since JDK 1.6, HSQLDB 2.0 */ - public boolean isWrapperFor( - java.lang.Class iface) throws java.sql.SQLException { + public boolean isWrapperFor(Class iface) throws SQLException { checkClosed(); @@ -3188,12 +3198,13 @@ * @see java.util.concurrent.Executor * @since JDK 1.7, HSQLDB 2.0.1 */ - public void abort( - java.util.concurrent.Executor executor) throws SQLException { + public void abort(java.util.concurrent.Executor executor) + throws SQLException { if (executor == null) { throw JDBCUtil.nullArgument("executor"); } + close(); } @@ -3219,7 +3230,7 @@ * JDBC connection is accessible to the administrator thread. * The setNetworkTimeout method will cover cases where * there is no administrator thread, or it has no access to the - * connection. This method is severe in it's effects, and should be + * connection. This method is severe in its effects, and should be * given a high enough value so it is never triggered before any more * normal timeouts, such as transaction timeouts. *

    @@ -3270,7 +3281,7 @@ * JDBC driver will round the value up to the nearest second. If the * timeout period expires before the operation * completes, a SQLException will be thrown. - * A value of 0 indicates that there is not timeout for database operations. + * A value of 0 indicates that there is no timeout for database operations. * @throws java.sql.SQLException if a database access error occurs, this * method is called on a closed connection, * the {@code executor} is {@code null}, @@ -3316,6 +3327,8 @@ //---------------------- internal implementation --------------------------- // -------------------------- Common Attributes ------------------------------ + /** Shared, reused local TimeZone which should not be modified*/ + TimeZone timeZone = TimeZone.getDefault(); /** Initial holdability */ int rsHoldability = JDBCResultSet.HOLD_CURSORS_OVER_COMMIT; @@ -3355,10 +3368,10 @@ private int savepointIDSequence; /** reuse count in ConnectionPool */ - int incarnation; + int incarnation; /** used by a JDBCPool or other custom ConnectionPool instance */ - boolean isPooled; + boolean isPooled; /** used by a JDBCPool or other custom ConnectionPool instance */ JDBCConnectionEventListener poolEventListener; @@ -3366,6 +3379,12 @@ /** connection URL property close_result indicates to close old result when Statement is reused */ boolean isCloseResultSet; + /** connection URL property defult_schema for use with OpenOffic indicates to use PUBLIC schema by default */ + boolean isDefaultSchema; + + /** connection URL property memory_lobs indicates to load lobs fully into memory in ResultSet */ + boolean isMemoryLobs; + /** connection URL property use_column_name indicates to return column name in ResultMetadata */ boolean isUseColumnName = true; @@ -3373,7 +3392,7 @@ boolean isTranslateTTIType = true; /** connection URL property allow_empty_batch indicates to accept executeBatch() when the batch is empty */ - boolean isEmptyBatchAllowed = false; + boolean isAllowEmptyBatch = false; /** database URL property hsqldb.live_object indicates to store non-serialized object in OTHER columns */ boolean isStoreLiveObject = false; @@ -3414,7 +3433,9 @@ String database = props.getProperty("database"); boolean isTLS = (DatabaseURL.S_HSQLS.equals(connType) || DatabaseURL.S_HTTPS.equals(connType)); - boolean isTLSWrapper = props.isPropertyTrue(HsqlDatabaseProperties.url_tls_wrapper, false); + boolean isTLSWrapper = + props.isPropertyTrue(HsqlDatabaseProperties.url_tls_wrapper, + false); isTLSWrapper &= isTLS; @@ -3426,32 +3447,31 @@ password = ""; } - Calendar cal = Calendar.getInstance(); - int zoneSeconds = HsqlDateTime.getZoneSeconds(cal); - try { if (DatabaseURL.isInProcessDatabaseType(connType)) { - /* * @todo - fredt - this should be the only static reference to * a core class (apart form references to the Type package) * from the jdbc package - we might make it dynamic */ sessionProxy = DatabaseManager.newSession(connType, database, - user, password, props, null, zoneSeconds); + user, password, props, timeZone); } else if (DatabaseURL.S_HSQL.equals(connType) || DatabaseURL.S_HSQLS.equals(connType)) { sessionProxy = new ClientConnection(host, port, path, - database, isTLS, isTLSWrapper, user, password, zoneSeconds); + database, isTLS, + isTLSWrapper, user, + password, timeZone); isNetConn = true; } else if (DatabaseURL.S_HTTP.equals(connType) || DatabaseURL.S_HTTPS.equals(connType)) { sessionProxy = new ClientConnectionHTTP(host, port, path, - database, isTLS, isTLSWrapper, user, password, zoneSeconds); + database, isTLS, isTLSWrapper, user, password, timeZone); isNetConn = true; } else { // alias: type not yet implemented throw JDBCUtil.invalidArgument(connType); } + sessionProxy.setJDBCConnection(this); connProperties = props; @@ -3531,27 +3551,32 @@ } private void setLocalVariables() { + if (connProperties == null) { return; } + isMemoryLobs = connProperties.isPropertyTrue( + HsqlDatabaseProperties.url_memory_lobs, false); isCloseResultSet = connProperties.isPropertyTrue( HsqlDatabaseProperties.url_close_result, false); + isDefaultSchema = connProperties.isPropertyTrue( + HsqlDatabaseProperties.url_default_schema, false); + isAllowEmptyBatch = connProperties.isPropertyTrue( + HsqlDatabaseProperties.url_allow_empty_batch, false); isUseColumnName = connProperties.isPropertyTrue( HsqlDatabaseProperties.url_get_column_name, true); - isEmptyBatchAllowed = connProperties.isPropertyTrue( - HsqlDatabaseProperties.url_allow_empty_batch, false); isTranslateTTIType = clientProperties.isPropertyTrue( HsqlDatabaseProperties.jdbc_translate_tti_types, true); isStoreLiveObject = clientProperties.isPropertyTrue( HsqlDatabaseProperties.sql_live_object, false); - - if (isStoreLiveObject) { + if (isStoreLiveObject) { String connType = connProperties.getProperty("connection_type"); - if(!DatabaseURL.S_MEM.equals(connType)) - isStoreLiveObject = false; - } + if (!DatabaseURL.S_MEM.equals(connType)) { + isStoreLiveObject = false; + } + } } synchronized int getSavepointID() { @@ -3566,7 +3591,7 @@ * constructed * @throws SQLException if this connection is closed */ - synchronized String getURL() throws SQLException { + synchronized public String getURL() throws SQLException { checkClosed(); @@ -3714,4 +3739,21 @@ return i; } + + public boolean isInternal() { + return isInternal; + } + + public boolean isNetwork() { + return isNetConn; + } + + public HsqlProperties getConnProperties() { + + HsqlProperties props = new HsqlProperties(); + + props.addProperties(connProperties); + + return props; + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java 2021-02-28 17:46:22.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java 2022-06-08 10:09:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,9 +40,10 @@ import org.hsqldb.lib.StringConverter; import org.hsqldb.lib.StringUtil; import org.hsqldb.persist.HsqlDatabaseProperties; +import org.hsqldb.types.BlobType; import org.hsqldb.types.Type; -/* $Id: JDBCDatabaseMetaData.java 6311 2021-02-28 18:46:14Z fredt $ */ +/* $Id: JDBCDatabaseMetaData.java 6550 2022-06-08 11:09:08Z fredt $ */ // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments @@ -173,20 +174,11 @@ * standard-defined full-name INFORMATION_SCHEMA views.

    * * However, just as CATALOG semantics and handling are still considered to be - * implementation defined by the most recent SQL standard (SQL:2008), so is the + * implementation defined by the most recent SQL standard (SQL:2011), so is the * HSQLDB CATALOG concept still in the process of being defined and refined in * HSQLDB 2.x. and beyond.

    * - * Previous to HSQLDB 2.x, there were, at various points in time, experimental - * features provided to turn on pseudo catalog (and before that, pseudo-schema) - * reporting in the system tables, using the database properties - * 'hsqldb.catalogs' and 'hsqldb.schemas', respectively.

    - * - * However, once the engine fully supported the SQL SCHEMA concept, the - * experimental 'hsqldb.schemas' * database property was retired.

    - * - * Similarly, starting with HSQLDB 2.x, the 'hsqldb.catalogs' database property - * has been retired and replaced with the convention that, from the perspective + * Similarly, starting with HSQLDB 2.x, from the perspective * of SQL identification, an HSQLDB JDBC URL connects to a single HSQLDB * database instance which consists of a single, default CATALOG * named PUBLIC in which each SCHEMA instance of the database resides. The name of @@ -224,7 +216,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since HSQLDB 1.9.0 * @see org.hsqldb.dbinfo.DatabaseInformation */ @@ -897,7 +889,7 @@ *

    *

    HSQLDB-Specific Information:

    * - * From 1.7.0, HSQLDB supports this type of + * HSQLDB supports this type of * ALTER TABLE statement; this method always * returns true. *

    @@ -917,7 +909,7 @@ *
    *

    HSQLDB-Specific Information:

    * - * From 1.7.0, HSQLDB supports this type of + * HSQLDB supports this type of * ALTER TABLE statement; this method always * returns true. *

    @@ -2971,12 +2963,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is the - * org.hsqldb.dbinfo.DatabaseInformationFull class. + * (including case) as they are stored in the database. * * * @@ -3507,12 +3494,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * (including case) as they are stored in the database. * * * @@ -3609,12 +3591,7 @@ * If the name of a column is defined in the database without double * quotes, an all-uppercase name must be specified when calling this * method. Otherwise, the name must be specified in the exact case of - * the column definition in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * the column definition in the database. * * * @@ -3785,12 +3762,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * (including case) as they are stored in the database. * * * @@ -3900,12 +3872,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * (including case) as they are stored in the database. * * * @@ -4015,12 +3982,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * (including case) as they are stored in the database. * * * @@ -4135,12 +4097,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * (including case) as they are stored in the database. * * * @@ -4261,10 +4218,7 @@ *

    *

    HSQLDB-Specific Information:

    * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * This feature is supported. *

    * * @@ -4329,12 +4283,7 @@ * case-sensitive comparison between name (pattern) arguments and the * corresponding identifier values as they are stored in the database. * Therefore, care must be taken to specify name arguments precisely - * (including case) as they are stored in the database.

    - * - * Since 1.7.2, this feature is supported by default. If the jar is - * compiled without org.hsqldb.dbinfo.DatabaseInformationMain, the feature is - * not supported. The default implementation is - * the org.hsqldb.dbinfo.DatabaseInformationMain class. + * (including case) as they are stored in the database. * * * @@ -4780,8 +4729,7 @@ *

    *

    HSQLDB-Specific Information:

    * - * Beginning with 1.7.2, this SQL feature is supported - * through JDBC as well as SQL.

    + * This SQL feature is supported through JDBC as well as SQL. * *

    * @@ -4802,8 +4750,8 @@ *
    *

    HSQLDB-Specific Information:

    * - * Starting with 1.7.2, HSQLDB supports JDBC named parameters to - * callable statements; this method returns true.

    + * HSQLDB supports JDBC named parameters to + * callable statements; this method returns true. * *

    * @@ -5103,18 +5051,17 @@ String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { - StringBuilder select = toQueryPrefixNoSelect( - "SELECT TABLE_NAME AS TYPE_CAT, TABLE_NAME AS TYPE_SCHME, TABLE_NAME AS TYPE_NAME, " - + "TABLE_NAME AS ATTR_NAME, CAST(0 AS INTEGER) AS DATA_TYPE, TABLE_NAME AS ATTR_TYPE_NAME, " - + "CAST(0 AS INTEGER) AS ATTR_SIZE, CAST(0 AS INTEGER) AS DECIMAL_DIGITS, " - + "CAST(0 AS INTEGER) AS NUM_PREC_RADIX, CAST(0 AS INTEGER) AS NULLABLE, " - + "'' AS REMARK, '' AS ATTR_DEF, CAST(0 AS INTEGER) AS SQL_DATA_TYPE, " - + "CAST(0 AS INTEGER) AS SQL_DATETIME_SUB, CAST(0 AS INTEGER) AS CHAR_OCTECT_LENGTH, " - + "CAST(0 AS INTEGER) AS ORDINAL_POSITION, '' AS NULLABLE, " - + "'' AS SCOPE_CATALOG, '' AS SCOPE_SCHEMA, '' AS SCOPE_TABLE, " - + "CAST(0 AS SMALLINT) AS SCOPE_DATA_TYPE " - + "FROM INFORMATION_SCHEMA.TABLES ").append( - and("TABLE_NAME", "=", "")); + if (wantsIsNull(typeNamePattern) + || wantsIsNull(attributeNamePattern)) { + return executeSelect("SYSTEM_UDTATTRIBUTES", "0=1"); + } + schemaPattern = translateSchema(schemaPattern); + + StringBuilder select = toQueryPrefix("SYSTEM_UDTATTRIBUTES").append( + and("TYPE_CAT", "=", catalog)).append( + and("TYPE_SCHEM", "LIKE", schemaPattern)).append( + and("TYPE_NAME", "LIKE", typeNamePattern)).append( + and("ATTR_NAME", "LIKE", attributeNamePattern)); return execute(select.toString()); } @@ -5462,7 +5409,7 @@ * FUNCTION_NAME and * SPECIFIC_ NAME. * - *

    Each function description has the the following columns: + *

    Each function description has the following columns: *

      *
    1. FUNCTION_CAT String {@code =>} function catalog (may be null) *
    2. FUNCTION_SCHEM String {@code =>} function schema (may be null) @@ -5815,7 +5762,7 @@ */ //#ifdef JAVA8 public long getMaxLogicalLobSize() throws SQLException { - return Type.SQL_BLOB.maxBlobPrecision; + return BlobType.maxBlobPrecision; } //#endif JAVA8 @@ -5866,7 +5813,6 @@ * A CSV list representing the SQL IN list to use when generating * queries for getBestRowIdentifier when the * scope argument is bestRowSession. - * @since HSQLDB 1.7.2 */ private static final String BRI_SESSION_SCOPE_IN_LIST = "(" + bestRowSession + ")"; @@ -5875,7 +5821,6 @@ * A CSV list representing the SQL IN list to use when generating * queries for getBestRowIdentifier when the * scope argument is bestRowTemporary. - * @since HSQLDB 1.7.2 */ private static final String BRI_TEMPORARY_SCOPE_IN_LIST = "(" + bestRowTemporary + "," + bestRowTransaction + "," + bestRowSession @@ -5885,7 +5830,6 @@ * A CSV list representing the SQL IN list to use when generating * queries for getBestRowIdentifier when the * scope argument is bestRowTransaction. - * @since HSQLDB 1.7.2 */ private static final String BRI_TRANSACTION_SCOPE_IN_LIST = "(" + bestRowTransaction + "," + bestRowSession + ")"; @@ -5894,9 +5838,7 @@ * "SELECT * FROM ".

      * * This attribute is in support of methods that use SQL SELECT statements to - * generate returned ResultSet objects.

      - * - * @since HSQLDB 1.7.2 + * generate returned ResultSet objects. */ private static final String selstar = "SELECT * FROM INFORMATION_SCHEMA."; @@ -5906,12 +5848,11 @@ * This attribute is in support of methods that use SQL SELECT statements to * generate returned ResultSet objects.

      * - * A good optimizer will simply drop this when parsing a condition + * The optimizer will simply drop this when parsing a condition * expression. And it makes our code much easier to write, since we don't * have to check our "WHERE" clause productions as strictly for proper * conjunction: we just stick additional conjunctive predicates on the - * end of this and Presto! Everything works :-)

      - * @since HSQLDB 1.7.2 + * end of this and Presto! Everything works :-) */ private static final String whereTrue = " WHERE TRUE"; @@ -5943,9 +5884,7 @@ // PRE: is non-null and not closed connection = c; useSchemaDefault = c.isInternal ? false - : c.connProperties - .isPropertyTrue(HsqlDatabaseProperties - .url_default_schema); + : c.isDefaultSchema; } /** @@ -5966,14 +5905,14 @@ * * @param val an object representing the value to use in some conditional * operation, op, between the column identified by the id argument - * and this argument.

      + * and this argument. * *

        - *
      • null causes the empty string to be returned.

        + *

      • null causes the empty string to be returned. * *
      • toString().length() == 0 causes the returned expression * to be built so that the IS NULL operation will occur - * against the specified column.

        + * against the specified column. * *

      • instanceof String causes the returned expression to be * built so that the specified operation will occur between @@ -5982,7 +5921,7 @@ * escaped by doubling). If op is "LIKE" and * val does not contain any "%" or "_" wild * card characters, then op is silently - * converted to "=".

        + * converted to "=". * *

      • !instanceof String causes an expression to built so that * the specified operation will occur between the specified @@ -6148,7 +6087,7 @@ /** * Retrieves whether the JDBC DatabaseMetaData contract - * specifies that the argument scode> is filter parameter + * specifies that the argument s is filter parameter * value that requires a corresponding IS NULL predicate.

        * * @param s the filter parameter to test @@ -6183,6 +6122,29 @@ rs.close(); } + + /** + * Returns the name of the default collation for database. + * @return name of collation + */ + public String getDatabaseDefaultCollation() { + + String value = null; + try { + ResultSet rs = executeSelect("SYSTEM_PROPERTIES", + "PROPERTY_NAME = 'sql.default_collation'"); + + if (rs.next()) { + value = rs.getString(4); + } + + rs.close(); + } catch (Exception e) { + } + + return value; + } + /** * Returns the name of the default schema for database. */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCDataSource.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCDataSource.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCDataSource.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCDataSource.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -182,7 +182,7 @@ * If the receiver implements the interface then the result is the receiver * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the - * wrapped object or a proxy for the wrapped object. Otherwise return the + * wrapped object or a proxy for the wrapped object. Otherwise return * the result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCDriver.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCDriver.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCDriver.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCDriver.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -107,7 +107,7 @@ *


        * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.0 + * @version 2.7.0 * @since HSQLDB 1.9.0 * * @@ -115,6 +115,11 @@ */ public class JDBCDriver implements Driver { + + /** + * name of loginTimeout property, can not change + */ + static final String conn_loginTimeout = "loginTimeout"; /** * Default constructor */ @@ -218,10 +223,6 @@ DatabaseURL.S_URL_INTERNAL.length())) { JDBCConnection conn = threadConnection.get(); - if (conn == null) { - return null; - } - return conn; } @@ -259,7 +260,7 @@ long timeout = 0; if (info != null) { - timeout = HsqlProperties.getIntegerProperty(info, "loginTimeout", 0); + timeout = HsqlProperties.getIntegerProperty(info, conn_loginTimeout, 0); } props.addProperties(info); @@ -508,8 +509,7 @@ /** * As a separate instance of this class is registered with DriverManager * for each class loader, the threadConnection is not declared as static. - * The registered instance is kept to allow access to the its - * threadConnection. + * The registered instance is kept to allow access to its threadConnection. * */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCNClob.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCNClob.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCNClob.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCNClob.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ * that stores a Character Large Object using the National Character Set * as a column value in a row of a database table. *

        The NClob interface extends the Clob interface - * which provides provides methods for getting the + * which provides methods for getting the * length of an SQL NCLOB value, * for materializing a NCLOB value on the client, and for * searching for a substring or NCLOB object within a diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCParameterMetaData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCParameterMetaData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCParameterMetaData.java 2021-01-29 13:39:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCParameterMetaData.java 2022-05-17 12:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ import org.hsqldb.types.IntervalType; import org.hsqldb.types.Type; -/* $Id: JDBCParameterMetaData.java 6271 2021-01-29 14:39:07Z fredt $ */ +/* $Id: JDBCParameterMetaData.java 6509 2022-05-17 13:18:08Z fredt $ */ /* @todo 1.9.0 - implement internal support for INOUT, OUT return parameter */ @@ -65,7 +65,7 @@ * object. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since JDK 1.4, HSQLDB 1.7.2 */ public class JDBCParameterMetaData implements ParameterMetaData, @@ -258,7 +258,7 @@ * If the receiver implements the interface then the result is the receiver * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the - * wrapped object or a proxy for the wrapped object. Otherwise return the + * wrapped object or a proxy for the wrapped object. Otherwise return * the result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. @@ -311,10 +311,9 @@ * Creates a new instance of JDBCParameterMetaData.

        * * @param metaData A ResultMetaData object describing the statement parameters - * @throws SQLException never - reserved for future use */ JDBCParameterMetaData(JDBCConnection conn, - ResultMetaData metaData) throws SQLException { + ResultMetaData metaData) { rmd = metaData; parameterCount = rmd.getColumnCount(); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCPool.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCPool.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCPool.java 2021-02-07 01:10:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCPool.java 2022-04-19 16:49:40.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -177,7 +177,7 @@ * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the * wrapped object or a proxy for the wrapped object. Otherwise return the - * the result of calling unwrap recursively on the wrapped object + * result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. * diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCPreparedStatement.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCPreparedStatement.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCPreparedStatement.java 2021-01-29 13:39:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCPreparedStatement.java 2022-06-29 13:20:18.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -101,8 +101,7 @@ //#endif JAVA8 - -/* $Id: JDBCPreparedStatement.java 6271 2021-01-29 14:39:07Z fredt $ */ +/* $Id: JDBCPreparedStatement.java 6565 2022-06-29 14:20:12Z fredt $ */ // changes by fredt // SimpleDateFormat objects moved out of methods to improve performance @@ -229,13 +228,13 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 * @see JDBCConnection#prepareStatement * @see JDBCResultSet */ -public class JDBCPreparedStatement extends JDBCStatementBase implements - PreparedStatement { +public class JDBCPreparedStatement extends JDBCStatementBase +implements PreparedStatement { /** * @@ -254,6 +253,7 @@ if (statementRetType != StatementTypes.RETURN_RESULT) { checkStatementType(StatementTypes.RETURN_RESULT); } + fetchResult(); return getResultSet(); @@ -280,6 +280,7 @@ if (statementRetType != StatementTypes.RETURN_COUNT) { checkStatementType(StatementTypes.RETURN_COUNT); } + fetchResult(); return resultIn.getUpdateCount(); @@ -505,7 +506,7 @@ * this method is called on a closed PreparedStatement */ public synchronized void setBigDecimal(int parameterIndex, - BigDecimal x) throws SQLException { + BigDecimal x) throws SQLException { setParameter(parameterIndex, x); } @@ -617,7 +618,7 @@ */ public synchronized void setTime(int parameterIndex, Time x) throws SQLException { - setTime(parameterIndex, x, null); + setParameter(parameterIndex, x); } /** @@ -646,8 +647,8 @@ * this method is called on a closed PreparedStatement */ public synchronized void setTimestamp(int parameterIndex, - Timestamp x) throws SQLException { - setTimestamp(parameterIndex, x, null); + Timestamp x) throws SQLException { + setParameter(parameterIndex, x); } /* @todo 1.9.0 - implement streaming */ @@ -719,16 +720,9 @@ *

        *

        HSQLDB-Specific Information:

        * - * From 1.7.0 to 1.8.0.x, this method complies with behavior as defined by - * the JDBC3 specification (the stream is treated as though it has UTF16 - * encoding).

        - * * Starting with 2.0, this method behaves according to the JDBC4 - * specification (the stream is treated as though it has UTF-8 - * encoding, as defined in the Java Virtual Machine Specification) when - * built under JDK 1.6+; otherwise, it behaves as defined by the JDBC3 - * specification. Regardless, this method is deprecated: please use - * setCharacterStream(...) instead. + * specification (the stream is treated as though it has UTF-8 encoding. + * This method is deprecated: please use setCharacterStream(...) instead. *

        * * @@ -776,8 +770,9 @@ } } catch (IOException ex) { throw JDBCUtil.sqlException(ErrorCode.SERVER_TRANSFER_CORRUPTED, - ex.toString(), ex); + ex.toString(), ex); } + setParameter(parameterIndex, writer.toString()); } @@ -834,6 +829,7 @@ if (isClosed || connection.isClosed) { checkClosed(); } + Arrays.fill(parameterValues, null); Arrays.fill(parameterSet, false); Arrays.fill(streamLengths, 0, streamLengths.length, 0); @@ -1066,6 +1062,7 @@ if (isClosed || connection.isClosed) { checkClosed(); } + checkParametersSet(); if (!isBatch) { @@ -1203,10 +1200,11 @@ setBlobForBinaryParameter(parameterIndex, x); return; + case Types.SQL_BLOB : setBlobParameter(parameterIndex, x); - break; + default : throw JDBCUtil.invalidArgument(); } @@ -1216,7 +1214,7 @@ * Converts a blob to binary data for non-blob binary parameters. */ private void setBlobForBinaryParameter(int parameterIndex, - Blob x) throws SQLException { + Blob x) throws SQLException { if (x instanceof JDBCBlob) { setParameter(parameterIndex, ((JDBCBlob) x).data()); @@ -1245,7 +1243,7 @@ out.close(); } catch (Throwable e) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR, - e.toString(), e); + e.toString(), e); } } @@ -1297,17 +1295,19 @@ setClobForStringParameter(parameterIndex, x); return; + case Types.SQL_CLOB : setClobParameter(parameterIndex, x); return; + default : throw JDBCUtil.invalidArgument(); } } private void setClobForStringParameter(int parameterIndex, - Clob x) throws SQLException { + Clob x) throws SQLException { if (x instanceof JDBCClob) { setParameter(parameterIndex, ((JDBCClob) x).getData()); @@ -1334,7 +1334,7 @@ setParameter(parameterIndex, writer.toString()); } catch (Throwable e) { throw JDBCUtil.sqlException(ErrorCode.SERVER_TRANSFER_CORRUPTED, - e.toString(), e); + e.toString(), e); } } @@ -1383,10 +1383,9 @@ Object[] data = null; if (x instanceof JDBCArray) { - Type baseType = type.collectionBaseType(); - Object[] array = ((JDBCArray) x).getArrayInternal(); - - Type otherType = ((JDBCArray) x).arrayType; + Type baseType = type.collectionBaseType(); + Object[] array = ((JDBCArray) x).getArrayInternal(); + Type otherType = ((JDBCArray) x).arrayType; data = (Object[]) type.convertToType(session, array, otherType); } else { @@ -1407,6 +1406,7 @@ throw JDBCUtil.notSupported(); } } + parameterValues[index] = data; parameterSet[index] = true; } @@ -1471,6 +1471,7 @@ } } } + resultSetMetaData = new JDBCResultSetMetaData(resultMetaData, isUpdatable, isInsertable, connection); } @@ -1503,43 +1504,31 @@ checkSetParameterIndex(parameterIndex); - int i = parameterIndex - 1; + int index = parameterIndex - 1; if (x == null) { - parameterValues[i] = null; - parameterSet[i] = true; + parameterValues[index] = null; + parameterSet[index] = true; return; } - Type outType = parameterTypes[i]; - Calendar calendar = cal == null ? session.getCalendar() - : cal; - - long millis = HsqlDateTime.convertMillisFromCalendar( - session.getCalendarGMT(), calendar, x.getTime()); - - millis = HsqlDateTime.getNormalisedDate(session.getCalendarGMT(), - millis); + Type outType = parameterTypes[index]; switch (outType.typeCode) { case Types.SQL_DATE : case Types.SQL_TIMESTAMP : - parameterValues[i] = new TimestampData(millis / 1000); - - break; case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : - int zoneOffset = HsqlDateTime.getZoneMillis(calendar, millis); - - parameterValues[i] = new TimestampData(millis / 1000, 0, - zoneOffset / 1000); - break; default : throw JDBCUtil.sqlException(ErrorCode.X_42561); } - parameterSet[i] = true; + + Object value = ((DateTimeType)outType).convertJavaToSQL(session, x, cal); + + parameterValues[index] = value; + parameterSet[index] = true; } /** @@ -1586,30 +1575,20 @@ return; } - Type outType = parameterTypes[index]; - long millis = x.getTime(); - int zoneOffset = 0; - Calendar calendar = cal == null ? session.getCalendar() - : cal; - - millis = HsqlDateTime.convertMillisFromCalendar( - session.getCalendarGMT(), calendar, millis); - millis = HsqlDateTime.convertToNormalisedTime(session.getCalendarGMT(), - millis); + Type outType = parameterTypes[index]; switch (outType.typeCode) { case Types.SQL_TIME : - break; case Types.SQL_TIME_WITH_TIME_ZONE : - zoneOffset = HsqlDateTime.getZoneMillis(calendar, millis); - break; default : throw JDBCUtil.sqlException(ErrorCode.X_42561); } - parameterValues[index] = new TimeData((int) (millis / 1000), 0, - zoneOffset / 1000); + + Object value = ((DateTimeType)outType).convertJavaToSQL(session, x, cal); + + parameterValues[index] = value; parameterSet[index] = true; } @@ -1649,7 +1628,7 @@ * @since JDK 1.2 */ public synchronized void setTimestamp(int parameterIndex, Timestamp x, - Calendar cal) throws SQLException { + Calendar cal) throws SQLException { checkSetParameterIndex(parameterIndex); @@ -1662,62 +1641,22 @@ return; } - Type outType = parameterTypes[index]; - long millis = x.getTime(); - long seconds; - int zoneOffset = 0; - Calendar calendar = cal == null ? session.getCalendar() - : cal; + Type outType = parameterTypes[index]; - millis = HsqlDateTime.convertMillisFromCalendar( - session.getCalendarGMT(),calendar, millis); switch (outType.typeCode) { - case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : - zoneOffset = HsqlDateTime.getZoneMillis(calendar, millis); - - // fall through case Types.SQL_TIMESTAMP : - seconds = millis / 1000; - if (seconds < DateTimeType.epochSeconds - || seconds > DateTimeType.epochLimitSeconds) { - throw JDBCUtil.sqlException(ErrorCode.X_22008); - } - parameterValues[index] = new TimestampData(seconds, - x.getNanos(), zoneOffset / 1000); - - break; case Types.SQL_TIME : - millis = HsqlDateTime.getNormalisedTime( - session.getCalendarGMT(), millis); - parameterValues[index] = new TimeData((int) (millis / 1000), - x.getNanos(), 0); - - break; case Types.SQL_TIME_WITH_TIME_ZONE : - millis = HsqlDateTime.getNormalisedTime( - session.getCalendarGMT(), millis); - zoneOffset = HsqlDateTime.getZoneMillis(calendar, millis); - parameterValues[index] = new TimeData((int) (millis / 1000), - x.getNanos(), zoneOffset / 1000); - - break; case Types.SQL_DATE : - millis = HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), millis); - seconds = millis / 1000; - - if (seconds < DateTimeType.epochSeconds - || seconds > DateTimeType.epochLimitSeconds) { - throw JDBCUtil.sqlException(ErrorCode.X_22008); - } - - parameterValues[index] = new TimestampData(seconds); - break; default : throw JDBCUtil.sqlException(ErrorCode.X_42561); } + + Object value = ((DateTimeType)outType).convertJavaToSQL(session, x, cal); + + parameterValues[index] = value; parameterSet[index] = true; } @@ -1846,15 +1785,17 @@ if (isClosed || connection.isClosed) { checkClosed(); } + checkStatementType(StatementTypes.RETURN_COUNT); if (!isBatch) { - if (connection.isEmptyBatchAllowed) { + if (connection.isAllowEmptyBatch) { return new int[]{}; } throw JDBCUtil.sqlExceptionSQL(ErrorCode.X_07506); } + generatedResult = null; int batchCount = resultOut.getNavigator().getSize(); @@ -1890,8 +1831,9 @@ throw new BatchUpdateException(updateCounts); } else { throw new BatchUpdateException(errorResult.getMainString(), - errorResult.getSubString(), - errorResult.getErrorCode(), updateCounts); + errorResult.getSubString(), + errorResult.getErrorCode(), + updateCounts); } } @@ -1938,8 +1880,8 @@ * @throws SQLException always * @return nothing */ - public synchronized ResultSet executeQuery( - String sql) throws SQLException { + public synchronized ResultSet executeQuery(String sql) + throws SQLException { throw JDBCUtil.notSupported(); } @@ -1969,7 +1911,7 @@ /** * Does the specialized work required to free this object's resources and - * that of it's parent class.

        + * that of its parent class.

        * * @throws SQLException if a database access error occurs */ @@ -1978,6 +1920,7 @@ if (isClosed()) { return; } + closeResultData(); HsqlException he = null; @@ -1993,6 +1936,7 @@ } catch (HsqlException e) { he = e; } + parameterValues = null; parameterSet = null; parameterTypes = null; @@ -2041,6 +1985,7 @@ return sb.toString(); } + sb.append("[sql=[").append(sql).append("]"); if (pv.length > 0) { @@ -2051,9 +1996,11 @@ sb.append(pv[i]); sb.append("], "); } + sb.setLength(sb.length() - 2); sb.append(']'); } + sb.append(']'); return sb.toString(); @@ -2111,8 +2058,8 @@ * @see java.sql.ParameterMetaData * @since JDK 1.4, HSQL 1.7.0 */ - public synchronized ParameterMetaData getParameterMetaData() throws - SQLException { + public synchronized ParameterMetaData getParameterMetaData() + throws SQLException { checkClosed(); @@ -2201,8 +2148,8 @@ * @since JDK 1.4, HSQLDB 1.7 * @see #execute */ - public synchronized boolean getMoreResults( - int current) throws SQLException { + public synchronized boolean getMoreResults(int current) + throws SQLException { return super.getMoreResults(current); } @@ -2301,7 +2248,6 @@ * * @since JDK 1.6, HSQLDB 2.0 */ - public void setRowId(int parameterIndex, RowId x) throws SQLException { throw JDBCUtil.notSupported(); } @@ -2360,7 +2306,6 @@ * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since JDK 1.6, HSQLDB 2.0 */ - public synchronized void setNClob(int parameterIndex, NClob value) throws SQLException { setClob(parameterIndex, value); @@ -2376,7 +2321,7 @@ * because it informs the driver that the parameter value should be sent to * the server as a CLOB. When the setCharacterStream method is used, the * driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGVARCHAR or a CLOB + * data should be sent to the server as a LONGVARCHAR or a CLOB * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. @@ -2402,7 +2347,7 @@ * method because it informs the driver that the parameter value should be * sent to the server as a BLOB. When the setBinaryStream method is used, * the driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGVARBINARY or a BLOB + * data should be sent to the server as a LONGVARBINARY or a BLOB * *

        *

        HSQLDB-Specific Information:

        @@ -2442,7 +2387,7 @@ * because it informs the driver that the parameter value should be sent to * the server as a NCLOB. When the setCharacterStream method is used, the * driver may have to do extra work to determine whether the parameter - * data should be send to the server as a LONGNVARCHAR or a NCLOB + * data should be sent to the server as a LONGNVARCHAR or a NCLOB * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. @@ -2478,11 +2423,11 @@ * * @since JDK 1.6, HSQLDB 2.0 */ - public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { throw JDBCUtil.notSupported(); } + // --------------------------- Added: Mustang Build 86 ------------------------- /* @todo 1.9.0 - implement streaming and remove length limits */ @@ -2526,8 +2471,9 @@ if (length < 0) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INVALID_ARGUMENT, - "length: " + length); + "length: " + length); } + setAscStream(parameterIndex, x, length); } @@ -2548,9 +2494,11 @@ if (length >= 0 && s.length() > length) { s = s.substring(0, (int) length); } + setParameter(parameterIndex, s); } catch (IOException e) { - throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR, null, e); + throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR, + null, e); } } @@ -2592,12 +2540,12 @@ if (length < 0) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INVALID_ARGUMENT, - "length: " + length); + "length: " + length); } if (length > parameterTypes[parameterIndex - 1].precision) { throw JDBCUtil.sqlException(ErrorCode.X_22001, - "length: " + length); + "length: " + length); } // ignore length as client/server cannot handle incorrect data length entered by user @@ -2631,10 +2579,11 @@ } else { output = new HsqlByteArrayOutputStream(x, (int) length); } + setParameter(parameterIndex, output.toByteArray()); } catch (Throwable e) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR, - e.toString(), e); + e.toString(), e); } } @@ -2676,12 +2625,12 @@ if (length < 0) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INVALID_ARGUMENT, - "length: " + length); + "length: " + length); } - if (length > parameterTypes[parameterIndex -1].precision) { + if (length > parameterTypes[parameterIndex - 1].precision) { throw JDBCUtil.sqlException(ErrorCode.X_22001, - "length: " + length); + "length: " + length); } // ignore length as client/server cannot handle incorrect data length entered by user @@ -2713,10 +2662,11 @@ } else { writer = new CharArrayWriter(reader, (int) length); } + setParameter(parameterIndex, writer.toString()); } catch (Throwable e) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR, - e.toString(), e); + e.toString(), e); } } @@ -2756,7 +2706,7 @@ * @since 1.6 */ public synchronized void setAsciiStream(int parameterIndex, - java.io.InputStream x) throws SQLException { + java.io.InputStream x) throws SQLException { setAscStream(parameterIndex, x, -1); } @@ -2842,7 +2792,7 @@ * @since 1.6 */ public synchronized void setCharacterStream(int parameterIndex, - java.io.Reader reader) throws SQLException { + java.io.Reader reader) throws SQLException { setCharStream(parameterIndex, reader, -1); } @@ -2872,7 +2822,7 @@ * @since 1.6 */ public synchronized void setNCharacterStream(int parameterIndex, - Reader value) throws SQLException { + Reader value) throws SQLException { setCharStream(parameterIndex, value, -1); } @@ -2901,7 +2851,7 @@ * @since 1.6 */ public synchronized void setClob(int parameterIndex, - Reader reader) throws SQLException { + Reader reader) throws SQLException { setCharStream(parameterIndex, reader, -1); } @@ -2933,7 +2883,8 @@ * @since 1.6 */ public synchronized void setBlob(int parameterIndex, - InputStream inputStream) throws SQLException { + InputStream inputStream) + throws SQLException { setBinStream(parameterIndex, inputStream, -1); } @@ -2963,7 +2914,7 @@ * @since 1.6 */ public synchronized void setNClob(int parameterIndex, - Reader reader) throws SQLException { + Reader reader) throws SQLException { setCharStream(parameterIndex, reader, -1); } @@ -3102,6 +3053,7 @@ if (max < 0) { throw JDBCUtil.outOfRangeArgument(); } + maxRows = max; } @@ -3177,6 +3129,7 @@ if (seconds > Short.MAX_VALUE) { seconds = Short.MAX_VALUE; } + queryTimeout = seconds; } @@ -3203,10 +3156,12 @@ * this method */ public synchronized void cancel() throws SQLException { + checkClosed(); - String sql = resultOut.getMainString(); - int randomId = connection.sessionProxy.getRandomId(); - Result request = Result.newCancelRequest(randomId, -1, sql); + + String sql = resultOut.getMainString(); + int randomId = connection.sessionProxy.getRandomId(); + Result request = Result.newCancelRequest(randomId, -1, sql); try { Result response = connection.sessionProxy.cancel(request); @@ -3279,6 +3234,7 @@ if (isClosed || connection.isClosed) { checkClosed(); } + rootWarning = null; } @@ -3292,7 +3248,7 @@ * used in SQL positioned update or delete statements to identify the * current row in the ResultSet object generated by this * statement. If the database does not support positioned update/delete, - * this method is a noop. To insure that a cursor has the proper isolation + * this method is a noop. To ensure that a cursor has the proper isolation * level to support updates, the cursor's SELECT statement * should have the form SELECT FOR UPDATE. If * FOR UPDATE is not present, positioned updates may fail. @@ -3428,8 +3384,8 @@ * @since JDK 1.2 * @see #getFetchDirection */ - public synchronized void setFetchDirection( - int direction) throws SQLException { + public synchronized void setFetchDirection(int direction) + throws SQLException { if (isClosed || connection.isClosed) { checkClosed(); @@ -3440,6 +3396,7 @@ && direction != ResultSet.FETCH_UNKNOWN) { throw JDBCUtil.notSupported(); } + fetchDirection = direction; } @@ -3518,6 +3475,7 @@ if (rows < 0) { throw JDBCUtil.outOfRangeArgument(); } + fetchSize = rows; } @@ -3673,7 +3631,6 @@ } //----------------------------- JDBC 4.0 ----------------------------------- - boolean poolable = true; /** @@ -3698,12 +3655,13 @@ *

        * @since JDK 1.6, HSQLDB 2.0 */ - public synchronized void setPoolable( - boolean poolable) throws SQLException { + public synchronized void setPoolable(boolean poolable) + throws SQLException { if (isClosed || connection.isClosed) { checkClosed(); } + this.poolable = poolable; } @@ -3739,7 +3697,7 @@ * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the * wrapped object or a proxy for the wrapped object. Otherwise return the - * the result of calling unwrap recursively on the wrapped object + * result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. * @@ -3787,7 +3745,7 @@ *

        * This method should be used when the returned row count may exceed * {@link Integer#MAX_VALUE}. - *

        + *

        * The public implementation will throw {@code UnsupportedOperationException} * * @return the current result as an update count; -1 if the current result @@ -3813,7 +3771,7 @@ *

        * This method should be used when the row limit may exceed * {@link Integer#MAX_VALUE}. - *

        + *

        * The default implementation will throw {@code UnsupportedOperationException} * * @param max the new max rows limit; zero means there is no limit @@ -3841,7 +3799,7 @@ *

        * This method should be used when the returned row limit may exceed * {@link Integer#MAX_VALUE}. - *

        + *

        * The default implementation will return {@code 0} * * @return the current maximum number of rows for a ResultSet @@ -3894,7 +3852,7 @@ *

        * This method should be used when the returned row count may exceed * {@link Integer#MAX_VALUE}. - *

        + *

        * The default implementation will throw {@code UnsupportedOperationException} * * @return an array of update counts containing one element for each @@ -3954,7 +3912,7 @@ * *

        Note that this method may be used to pass database-specific * abstract data types. - *

        + *

        * The default implementation will throw {@code SQLFeatureNotSupportedException} * * @param parameterIndex the first parameter is 1, the second is 2, ... @@ -3995,7 +3953,7 @@ * This method is similar to {@link #setObject(int parameterIndex, * Object x, SQLType targetSqlType, int scaleOrLength)}, * except that it assumes a scale of zero. - *

        + *

        * The default implementation will throw {@code SQLFeatureNotSupportedException} * * @param parameterIndex the first parameter is 1, the second is 2, ... @@ -4016,6 +3974,7 @@ int typeNo = targetSqlType.getVendorTypeNumber().intValue(); setObject(parameterIndex, x, typeNo); } + //#endif JAVA8 /** @@ -4067,16 +4026,15 @@ JDBCPreparedStatement(JDBCConnection c, String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int generatedKeys, int[] generatedIndexes, - String[] generatedNames) throws HsqlException, - SQLException { + String[] generatedNames) + throws HsqlException, SQLException { isResult = false; connection = c; connectionIncarnation = connection.incarnation; session = c.sessionProxy; sql = c.nativeSQL(sql); - - resultOut = Result.newPrepareStatementRequest(); + resultOut = Result.newPrepareStatementRequest(); int props = ResultProperties.getValueForJDBC(resultSetType, resultSetConcurrency, resultSetHoldability); @@ -4089,6 +4047,7 @@ if (in.mode == ResultConstants.ERROR) { throw JDBCUtil.sqlException(in); } + rootWarning = null; Result current = in; @@ -4106,6 +4065,7 @@ } } } + connection.setWarnings(rootWarning); statementID = in.getStatementID(); @@ -4213,8 +4173,8 @@ * @param parameterIndex The parameter index to check * @throws SQLException if the specified parameter index is invalid */ - protected void checkSetParameterIndex(int parameterIndex) throws - SQLException { + protected void checkSetParameterIndex(int parameterIndex) + throws SQLException { if (isClosed || connection.isClosed) { checkClosed(); @@ -4226,10 +4186,10 @@ throw JDBCUtil.outOfRangeArgument(msg); } - if (parameterModes[parameterIndex - 1] == - SchemaObject.ParameterModes.PARAM_OUT) { - String msg = "Not IN or INOUT mode for parameter: " + - parameterIndex; + if (parameterModes[parameterIndex - 1] + == SchemaObject.ParameterModes.PARAM_OUT) { + String msg = "Not IN or INOUT mode for parameter: " + + parameterIndex; throw JDBCUtil.invalidArgument(msg); } @@ -4242,8 +4202,8 @@ * @param parameterIndex The parameter index to check * @throws SQLException if the specified parameter index is invalid */ - protected void checkGetParameterIndex(int parameterIndex) throws - SQLException { + protected void checkGetParameterIndex(int parameterIndex) + throws SQLException { if (isClosed || connection.isClosed) { checkClosed(); @@ -4263,10 +4223,11 @@ case SchemaObject.ParameterModes.PARAM_OUT : case SchemaObject.ParameterModes.PARAM_INOUT : break; + case SchemaObject.ParameterModes.PARAM_IN : - default: - String msg = "Not OUT or INOUT mode for parameter: " + - parameterIndex; + default : + String msg = "Not OUT or INOUT mode for parameter: " + + parameterIndex; throw JDBCUtil.invalidArgument(msg); } @@ -4290,8 +4251,8 @@ for (int i = 0; i < parameterSet.length; i++) { if (parameterModes[i] != SchemaObject.ParameterModes.PARAM_OUT) { if (!parameterSet[i]) { - throw JDBCUtil.sqlException(ErrorCode. - JDBC_PARAMETER_NOT_SET); + throw JDBCUtil.sqlException( + ErrorCode.JDBC_PARAMETER_NOT_SET); } } } @@ -4340,7 +4301,6 @@ } throw JDBCUtil.sqlException(ErrorCode.X_42563); - case Types.SQL_BIT : case Types.SQL_BIT_VARYING : try { @@ -4378,7 +4338,6 @@ } throw JDBCUtil.sqlException(ErrorCode.X_42563); - case Types.SQL_BINARY : case Types.SQL_VARBINARY : case Types.SQL_GUID : @@ -4390,6 +4349,7 @@ if (o instanceof UUID) { o = BinaryUUIDType.getBinary((UUID) o); + break; } @@ -4404,7 +4364,6 @@ } throw JDBCUtil.sqlException(ErrorCode.X_42563); - case Types.SQL_ARRAY : if (o instanceof Array) { setArray(parameterIndex, (Array) o); @@ -4424,21 +4383,23 @@ for (int j = 0; j < data.length; j++) { data[j] = baseType.convertJavaToSQL(session, array[j]); } + o = data; break; } throw JDBCUtil.sqlException(ErrorCode.X_42563); - case Types.SQL_BLOB : setBlobParameter(parameterIndex, o); return; + case Types.SQL_CLOB : setClobParameter(parameterIndex, o); return; + case Types.SQL_DATE : case Types.SQL_TIME_WITH_TIME_ZONE : case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : @@ -4447,10 +4408,11 @@ try { if (o instanceof String) { o = outType.convertToType(session, o, - Type.SQL_VARCHAR); + Type.SQL_VARCHAR); break; } + o = outType.convertJavaToSQL(session, o); break; @@ -4470,7 +4432,7 @@ try { if (o instanceof String) { o = outType.convertToType(session, o, - Type.SQL_VARCHAR); + Type.SQL_VARCHAR); break; } else if (o instanceof Boolean) { @@ -4479,6 +4441,7 @@ o = value ? Integer.valueOf(1) : Integer.valueOf(0); } + o = outType.convertToDefaultType(session, o); break; @@ -4488,21 +4451,24 @@ case Types.SQL_VARCHAR : { if (o instanceof String) { break; - } else { - try { - o = outType.convertToDefaultType(session, o); + } - break; - } catch (HsqlException e) { - throw JDBCUtil.sqlException(e); - } + try { + o = outType.convertToDefaultType(session, o); + + break; + } catch (HsqlException e) { + throw JDBCUtil.sqlException(e); } } case Types.SQL_CHAR : { + if (o instanceof String) { + break; + } + if (outType.precision == 1) { if (o instanceof Character) { - o = new String(new char[] { - ((Character) o).charValue() }); + o = String.valueOf(((Character) o).charValue()); break; } else if (o instanceof Boolean) { @@ -4523,6 +4489,11 @@ } default : try { + if (outType.isIntervalType()) { + o = outType.convertJavaToSQL(session, o); + break; + } + o = outType.convertToDefaultType(session, o); break; @@ -4530,6 +4501,7 @@ throw JDBCUtil.sqlException(e); } } + parameterValues[index] = o; parameterSet[index] = true; } @@ -4556,6 +4528,7 @@ return; } + parameterValues[i - 1] = o; parameterSet[i - 1] = Boolean.TRUE; @@ -4571,8 +4544,9 @@ if (is.session.getDatabaseUniqueName().equals( session.getDatabaseUniqueName())) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INVALID_ARGUMENT, - "invalid Reader"); + "invalid Reader"); } + parameterValues[i - 1] = o; streamLengths[i - 1] = streamLength; parameterSet[i - 1] = true; @@ -4641,7 +4615,7 @@ if (is.session.getDatabaseUniqueName().equals( session.getDatabaseUniqueName())) { throw JDBCUtil.sqlException(ErrorCode.JDBC_INVALID_ARGUMENT, - "invalid Reader"); + "invalid Reader"); } // in the same database ? see if it blocks in @@ -4721,8 +4695,8 @@ void setLongParameter(int parameterIndex, long value) throws SQLException { checkSetParameterIndex(parameterIndex); - int index = parameterIndex - 1; + int index = parameterIndex - 1; int outType = parameterTypes[index].typeCode; switch (outType) { @@ -4732,8 +4706,8 @@ parameterValues[index] = o; parameterSet[index] = true; - break; + case Types.SQL_BINARY : case Types.SQL_VARBINARY : case Types.OTHER : @@ -4774,14 +4748,14 @@ InputStream stream = ((Blob) value).getBinaryStream(); ResultLob resultLob = ResultLob.newLobCreateBlobRequest(session.getId(), id, - stream, length); + stream, length); session.allocateResultLob(resultLob); resultOut.addLobResult(resultLob); } else if (value instanceof InputStream) { - long length = streamLengths[i]; - - long createLength = length > 0 ? length : 0; + long length = streamLengths[i]; + long createLength = length > 0 ? length + : 0; blob = session.createBlob(createLength); id = blob.getId(); @@ -4789,13 +4763,14 @@ InputStream stream = (InputStream) value; ResultLob resultLob = ResultLob.newLobCreateBlobRequest(session.getId(), id, - stream, length); + stream, length); session.allocateResultLob(resultLob); resultOut.addLobResult(resultLob); } else if (value instanceof BlobDataID) { blob = (BlobDataID) value; } + parameterValues[i] = blob; } else if (parameterTypes[i].typeCode == Types.SQL_CLOB) { long id; @@ -4815,14 +4790,14 @@ ResultLob resultLob = ResultLob.newLobCreateClobRequest(session.getId(), id, - reader, length); + reader, length); session.allocateResultLob(resultLob); resultOut.addLobResult(resultLob); } else if (value instanceof Reader) { - long length = streamLengths[i]; - - long createLength = length > 0 ? length : 0; + long length = streamLengths[i]; + long createLength = length > 0 ? length + : 0; clob = session.createClob(createLength); id = clob.getId(); @@ -4830,13 +4805,14 @@ Reader reader = (Reader) value; ResultLob resultLob = ResultLob.newLobCreateClobRequest(session.getId(), id, - reader, length); + reader, length); session.allocateResultLob(resultLob); resultOut.addLobResult(resultLob); } else if (value instanceof ClobDataID) { clob = (ClobDataID) value; } + parameterValues[i] = clob; } } @@ -4853,6 +4829,7 @@ if (isClosed || connection.isClosed) { checkClosed(); } + closeResultData(); checkParametersSet(); @@ -4865,7 +4842,8 @@ resultOut.setPreparedResultUpdateProperties(parameterValues); } else { resultOut.setPreparedExecuteProperties(parameterValues, maxRows, - fetchSize, rsProperties, queryTimeout); + fetchSize, rsProperties, + queryTimeout); } try { @@ -4884,7 +4862,7 @@ if (resultIn.isData()) { currentResultSet = new JDBCResultSet(connection, this, resultIn, - resultIn.metaData); + resultIn.metaData); } else if (statementRetType == StatementTypes.RETURN_RESULT) { getMoreResults(); } @@ -4944,4 +4922,24 @@ /** The session attribute of the connection */ protected SessionInterface session; + + public String getSQL() { + return sql; + } + + public long getStatementID() { + return statementID; + } + + public boolean isRowCount() { + return statementRetType == StatementTypes.RETURN_COUNT; + } + + public JDBCResultSetMetaData getResultSetMetaData() { + return resultSetMetaData; + } + + public ResultMetaData getParameterMetaDataDirect() { + return parameterMetaData; + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCResultSet.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCResultSet.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCResultSet.java 2021-06-10 09:54:40.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCResultSet.java 2022-07-05 15:52:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,6 @@ import org.hsqldb.lib.StringInputStream; import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.navigator.RowSetNavigator; -import org.hsqldb.persist.HsqlDatabaseProperties; import org.hsqldb.result.Result; import org.hsqldb.result.ResultConstants; import org.hsqldb.result.ResultMetaData; @@ -92,14 +91,11 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; -import java.time.OffsetDateTime; -import java.time.OffsetTime; import java.time.Period; -import java.time.ZoneOffset; //#endif JAVA8 -/* $Id: JDBCResultSet.java 6349 2021-06-10 10:54:35Z fredt $ */ +/* $Id: JDBCResultSet.java 6571 2022-07-05 16:50:27Z fredt $ */ //campbell-burnet@users 20051207 - patch 1.9.0 - initial JDBC 4.0 support work //fredt@users 20060431 - patch 1.9.0 rewrite with RowSetNavigator @@ -246,11 +242,14 @@ * String ninthRowValue = rs.getString(1); * * - * Note: An HSQLDB ResultSet object persists, even after its + * Note: An HSQLDB ResultSet object stays open if it is not + * explicitly closed, even after its * connection is closed. This is regardless of the operational mode of * the {@link org.hsqldb.Database Database} from which it came. That is, they * persist whether originating from a Server, - * WebServer or in-process mode Database. + * WebServer or in-process mode Database. A connection + * opened with the property setting close_result=true closes + * any remaining open results when the connection is closed. *

        * * From HSQLDB 2.0, there is full support for updatable result sets. @@ -294,7 +293,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class JDBCResultSet implements ResultSet { @@ -909,12 +908,22 @@ public java.io.InputStream getAsciiStream( int columnIndex) throws SQLException { - String s = getString(columnIndex); + Object o = getColumnValue(columnIndex); - if (s == null) { + if (o == null) { return null; } + if (o instanceof ClobDataID) { + JDBCClobClient clob = new JDBCClobClient(session, (ClobDataID) o); + + return clob.getAsciiStream(); + } else if (o instanceof Clob) { + return ((Clob) o).getAsciiStream(); + } + + String s = getString(columnIndex); + try { return new ByteArrayInputStream(s.getBytes(JavaSystem.CS_US_ASCII)); } catch (Throwable e) { @@ -925,7 +934,7 @@ /** * * Retrieves the value of the designated column in the current row - * of this ResultSet object as + * of this ResultSet object * as a stream of two-byte Unicode characters. The first byte is * the high byte; the second byte is the low byte. * @@ -1016,10 +1025,7 @@ public java.io.InputStream getBinaryStream( int columnIndex) throws SQLException { - checkColumn(columnIndex); - - Type sourceType = resultMetaData.columnTypes[columnIndex - 1]; - Object o = getColumnInType(columnIndex, sourceType); + Object o = getColumnValue(columnIndex); if (o == null) { return null; @@ -1477,7 +1483,7 @@ *

        In SQL, a result table is retrieved through a cursor that is * named. The current row of a result set can be updated or deleted * using a positioned update/delete statement that references the - * cursor name. To insure that the cursor has the proper isolation + * cursor name. To ensure that the cursor has the proper isolation * level to support update, the cursor's SELECT statement * should be of the form SELECT FOR UPDATE. If * FOR UPDATE is omitted, the positioned updates may fail. @@ -2354,7 +2360,7 @@ * * Moves the cursor a relative number of rows, either positive or negative. * Attempting to move beyond the first/last row in the - * result set positions the cursor before/after the + * result set positions the cursor before/after * the first/last row. Calling relative(0) is valid, but does * not change the cursor position. * @@ -4166,7 +4172,7 @@ * * Only the updater, getter, * and insertRow methods may be - * called when the cursor is on the insert row. All of the columns in + * called when the cursor is on the insert row. All of the columns in * a result set must be given a value each time this method is * called before calling insertRow. * An updater method must be called before a @@ -4353,9 +4359,8 @@ byte[] bytes = ((BlobDataID) o).getBytes(session, 0, (int) length); - JDBCBlob b = new JDBCBlob(bytes); - return b; + return new JDBCBlob(bytes); } JDBCBlobClient blob = new JDBCBlobClient(session, (BlobDataID) o); @@ -4429,9 +4434,8 @@ String s = ((ClobDataID) o).getSubString(session, 0, (int) length); - JDBCClob c = new JDBCClob(s); - return c; + return new JDBCClob(s); } JDBCClobClient clob = new JDBCClobClient(session, (ClobDataID) o); @@ -4683,13 +4687,7 @@ return null; } - long millis = t.getSeconds() * 1000; - - if (cal != null) { - millis = HsqlDateTime.convertMillisToCalendar(cal, millis); - } - - return new Date(millis); + return (Date) Type.SQL_DATE.convertSQLToJava(session, t, cal); } /** @@ -4739,8 +4737,8 @@ * of the returned java.sql.Time object is the UTC of the SQL value without * modification. In other words, the Calendar object is not used.

      • *
      • If the SQL type of the column is WITHOUT TIME ZONE, then the UTC - * value of the returned java.sql.Time is correct for the given Calendar - * object.
      • + * value of the returned java.sql.Time is correct for the given Calendar's + * time zone. *
      • If the cal argument is null, it it ignored and the method returns * the same Object as the method without the Calendar parameter.
      • *
    @@ -4764,18 +4762,7 @@ return null; } - long millis = DateTimeType.normaliseTime(t.getSeconds()) * 1000L; - - if (!resultMetaData.columnTypes[--columnIndex] - .isDateTimeTypeWithZone()) { - Calendar calendar = cal == null ? session.getCalendar() - : cal; - - millis = HsqlDateTime.convertMillisToCalendar(calendar, millis); - millis = HsqlDateTime.getNormalisedTime(millis); - } - - return new Time(millis); + return (Time) Type.SQL_TIME.convertSQLToJava(session, t, cal); } /** @@ -4798,9 +4785,10 @@ *
  • If the SQL type of the column is WITH TIME ZONE, then the UTC value * of the returned java.sql.Time object is the UTC of the SQL value without * modification. In other words, the Calendar object is not used.
  • - *
  • If the SQL type of the column is WITHOUT TIME ZONE, then the UTC - * value of the returned java.sql.Time is correct for the given Calendar - * object.
  • + *
  • If the SQL type of the column is WITHOUT TIME ZONE, then the + * UTC value of the returned java.sql.Time will represent the correct + * time for the time zone (including daylight saving time) of the given + * Calendar.
  • *
  • If the cal argument is null, it it ignored and the method returns * the same Object as the method without the Calendar parameter.
  • * @@ -4865,11 +4853,6 @@ */ public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException { - - if (cal == null) { - return getTimestamp(columnIndex); - } - TimestampData t = (TimestampData) getColumnInType(columnIndex, Type.SQL_TIMESTAMP); @@ -4877,19 +4860,7 @@ return null; } - long millis = t.getSeconds() * 1000; - - if (!resultMetaData.columnTypes[columnIndex - 1] - .isDateTimeTypeWithZone()) { - millis = HsqlDateTime.convertMillisToCalendar(cal, - millis); - } - - Timestamp ts = new Timestamp(millis); - - ts.setNanos(t.getNanos()); - - return ts; + return (Timestamp) Type.SQL_TIMESTAMP.convertSQLToJava(session, t, cal); } /** @@ -6002,7 +5973,7 @@ /** * Updates the designated column with an ascii stream value, which will have - * the specified number of bytes.. + * the specified number of bytes. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the updateRow or @@ -6860,13 +6831,7 @@ throw JDBCUtil.nullArgument(); } - Type hsqlType = Types.getParameterSQLType(type); - - if(hsqlType == null) { - throw JDBCUtil.sqlException(ErrorCode.X_42561); - } - - Object source = getColumnValue(columnIndex); + final Object source = getColumnValue(columnIndex); if (wasNullValue) { return null; @@ -6933,42 +6898,69 @@ break; } case "java.util.UUID": { - source = getColumnInType(columnIndex, hsqlType); - o = Type.SQL_GUID.convertSQLToJava(session, source); + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isUUIDType()) { + o = Type.SQL_GUID.convertSQLToJava(session, source); + } else { + Object value = Type.SQL_GUID.convertToTypeJDBC(session, + source, columnType); + o = Type.SQL_GUID.convertSQLToJava(session, value); + } + break; + } + case "java.time.Instant": { + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toInstant(session, v); + } break; } case "java.time.LocalDate": { - source = getColumnInType(columnIndex, hsqlType); - TimestampData v = (TimestampData) source; - long millis = v.getMillis(); - Calendar cal = session.getCalendarGMT(); - cal.setTimeInMillis(millis); - o = LocalDate.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH)); + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toLocalDate(session, v); + } break; } case "java.time.LocalTime": { - source = getColumnInType(columnIndex, hsqlType); - TimeData v = (TimeData) source; - o = LocalTime.ofNanoOfDay(v.getSeconds() * 1000000000L + v.getNanos()); + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isTimeType()) { + TimeData v = (TimeData) source; + o = ((DateTimeType) columnType).toLocalTime(session, v); + } else if (columnType.isTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toLocalTime(session, v); + } break; } case "java.time.LocalDateTime": { - source = getColumnInType(columnIndex, hsqlType); - TimestampData v = (TimestampData) source; - - long millis = v.getMillis(); - int nanos = v.getNanos(); - Calendar cal = session.getCalendarGMT(); - cal.setTimeInMillis(millis); - o = LocalDateTime.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND ), nanos); + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toLocalDateTime(session, v); + } break; } case "java.time.OffsetTime": { - o = getTimeWithZone(columnIndex); + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isTimeType()) { + TimeData v = (TimeData) source; + o = ((DateTimeType) columnType).toOffsetTime(session, v); + } else if (columnType.isTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toOffsetTime(session, v); + } + break; } case "java.time.OffsetDateTime": { - o = getTimestampWithZone(columnIndex); + Type columnType = resultMetaData.columnTypes[columnIndex - 1]; + if (columnType.isDateOrTimestampType()) { + TimestampData v = (TimestampData) source; + o = ((DateTimeType) columnType).toOffsetDateTime(session, v); + } break; } case "java.time.Duration": { @@ -7206,61 +7198,26 @@ //#endif JAVA8 - -//#ifdef JAVA8 private Object getTimestampWithZone(int columnIndex) throws SQLException { - TimestampData v = (TimestampData) getColumnInType(columnIndex, Type.SQL_TIMESTAMP_WITH_TIME_ZONE); + TimestampData v = (TimestampData) getColumnInType(columnIndex, + Type.SQL_TIMESTAMP_WITH_TIME_ZONE); if (v == null) { return null; } - - ZoneOffset z = ZoneOffset.ofTotalSeconds(v.getZone()); - LocalDateTime ldt = LocalDateTime.ofEpochSecond(v.getSeconds(), v.getNanos(), z); - - return OffsetDateTime.of(ldt, z); + return Type.SQL_TIMESTAMP_WITH_TIME_ZONE.convertSQLToJava(session, v); } private Object getTimeWithZone(int columnIndex) throws SQLException { - TimeData v = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME_WITH_TIME_ZONE); + DateTimeType columnType = (DateTimeType) resultMetaData.columnTypes[columnIndex - 1]; + TimeData v = (TimeData) getColumnValue(columnIndex); if (v == null) { return null; } - - int s = v.getSeconds() + v.getZone(); - - s = DateTimeType.normaliseTime(s); - - ZoneOffset z = ZoneOffset.ofTotalSeconds(v.getZone()); - LocalTime lt = LocalTime.ofNanoOfDay(s * 1000000000L + v.getNanos()); - - return OffsetTime.of(lt, z); + return columnType.convertSQLToJava(session, v); } -//#else -/* - private Object getTimestampWithZone(int columnIndex) throws SQLException { - TimestampData v = (TimestampData) getColumnInType(columnIndex, Type.SQL_TIMESTAMP_WITH_TIME_ZONE); - - if (v == null) { - return null; - } - return Type.SQL_TIMESTAMP.convertSQLToJava(session, v); - } - - private Object getTimeWithZone(int columnIndex) throws SQLException { - TimeData v = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME_WITH_TIME_ZONE); - - if (v == null) { - return null; - } - return Type.SQL_TIME.convertSQLToJava(session, v); - } -*/ -//#endif JAVA8 - - //------------------------ Internal Implementation ----------------------------- /** The internal representation. */ @@ -7283,7 +7240,7 @@ /** The ResultSetMetaData object for this ResultSet */ private ResultSetMetaData resultSetMetaData; - /** Accelerates findColumn; Map */ + /** Accelerates fineColumn {@code Map} */ private IntValueHashMap columnMap; /** The first warning in the chain. Null if there are no warnings. */ @@ -7296,7 +7253,7 @@ /** * The Statement that generated this result. Null if the result is - * from DatabaseMetaData

    + * from DatabaseMetaData */ JDBCStatementBase statement; @@ -7441,19 +7398,16 @@ Type targetType) throws SQLException { Object value = getColumnValue(columnIndex); - Type sourceType; + Type sourceType = resultMetaData.columnTypes[columnIndex - 1]; if (value == null) { return null; } - sourceType = resultMetaData.columnTypes[columnIndex - 1]; - if (translateTTIType && targetType.isIntervalType()) { targetType = ((IntervalType) targetType).getCharacterType(); } - if (sourceType.typeCode != targetType.typeCode) { try { value = targetType.convertToTypeJDBC(session, value, @@ -7492,7 +7446,7 @@ * row number after any updateXXX() * -1 after updateRow(), clearUpdate() or moveToCurrentRow(); */ - int currentUpdateRowNumber; + int currentUpdateRowNumber = -1; private void checkUpdatable() throws SQLException { @@ -7525,10 +7479,12 @@ checkUpdatable(columnIndex); - if (currentUpdateRowNumber != navigator.getRowNumber()) { - preparedStatement.clearParameters(); + if (!isOnInsertRow) { + if (currentUpdateRowNumber != navigator.getRowNumber()) { + preparedStatement.clearParameters(); + } + currentUpdateRowNumber = navigator.getRowNumber(); } - currentUpdateRowNumber = navigator.getRowNumber(); isRowUpdated = true; } @@ -7536,7 +7492,7 @@ checkUpdatable(); preparedStatement.clearParameters(); - + currentUpdateRowNumber = -1; isRowUpdated = false; } @@ -7545,6 +7501,7 @@ checkUpdatable(); // check insertable + currentUpdateRowNumber = -2; isOnInsertRow = true; } @@ -7553,6 +7510,7 @@ checkUpdatable(); preparedStatement.clearParameters(); + currentUpdateRowNumber = -1; isOnInsertRow = false; } @@ -7588,7 +7546,9 @@ boolean set = preparedStatement.parameterSet[i]; if (!set) { - throw JDBCUtil.sqlException(ErrorCode.X_24515); + if(!resultMetaData.columns[i].isIdentity()) { + throw JDBCUtil.sqlException(ErrorCode.X_24515); + } } preparedStatement.resultOut.metaData.columnTypes[i] = preparedStatement.parameterTypes[i]; @@ -7601,12 +7561,18 @@ rootWarning = preparedStatement.getWarnings(); preparedStatement.clearWarnings(); + + isRowUpdated = false; } private void performDelete() throws SQLException { checkUpdatable(); + if (isOnInsertRow) { + throw JDBCUtil.sqlExceptionSQL(ErrorCode.X_24504); + } + preparedStatement.parameterValues[columnCount] = getCurrent()[columnCount]; preparedStatement.resultOut.metaData.columnTypes[columnCount] = @@ -7682,11 +7648,7 @@ if (conn != null) { translateTTIType = conn.isTranslateTTIType; - - if (conn.connProperties != null) { - memoryLobs = conn.connProperties.isPropertyTrue( - HsqlDatabaseProperties.url_memory_lobs, false); - } + memoryLobs = conn.isMemoryLobs; } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCResultSetMetaData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCResultSetMetaData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCResultSetMetaData.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCResultSetMetaData.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ import org.hsqldb.types.Type; import org.hsqldb.types.Types; -/* $Id: JDBCResultSetMetaData.java 6266 2021-01-25 16:08:06Z fredt $ */ +/* $Id: JDBCResultSetMetaData.java 6492 2022-04-21 07:30:40Z fredt $ */ // fredt@users - 20040412 - removed DITypeInfo dependencies // campbell-burnet@users - 200404xx - removed unused imports;refinement for better @@ -823,7 +823,7 @@ * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the * wrapped object or a proxy for the wrapped object. Otherwise return the - * the result of calling unwrap recursively on the wrapped object + * result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. * diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCRowId.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCRowId.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCRowId.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCRowId.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,7 @@ import java.sql.SQLException; import java.util.Arrays; -/* $Id: JDBCRowId.java 6266 2021-01-25 16:08:06Z fredt $ */ +/* $Id: JDBCRowId.java 6492 2022-04-21 07:30:40Z fredt $ */ //campbell-burnet@users 20060522 - doc 1.8.1 full synch up to Mustang Build 84 @@ -108,7 +108,7 @@ } /** - * Constructs a new JDBCRowId instance whose internal octet sequence is + * Constructs a new JDBCRowId instance whose internal octet sequence * is a copy of the octet sequence of the given RowId object.

    * * @param id the octet sequence representing the Rowid value @@ -119,7 +119,7 @@ } /** - * Constructs a new JDBCRowId instance whose internal octet sequence is + * Constructs a new JDBCRowId instance whose internal octet sequence * is that represented by the given hexadecimal character sequence.

    * @param hex the hexadecimal character sequence from which to derive * the internal octet sequence diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCSQLXML.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCSQLXML.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCSQLXML.java 2021-02-09 16:10:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCSQLXML.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -102,7 +102,7 @@ import org.xml.sax.Locator; import org.xml.sax.SAXException; -/* $Id: JDBCSQLXML.java 6299 2021-02-09 17:10:48Z fredt $ */ +/* $Id: JDBCSQLXML.java 6492 2022-04-21 07:30:40Z fredt $ */ /** * @@ -641,7 +641,7 @@ /** * This method closes this object and releases the resources that it held. - * The SQL XML object becomes invalid and neither readable or writable + * The SQL XML object becomes invalid and neither readable nor writable * when this method is called.

    * * After free has been called, any attempt to invoke a diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCStatementBase.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCStatementBase.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCStatementBase.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCStatementBase.java 2022-04-21 06:31:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,7 +61,7 @@ * * ResultSets may be held over commits and span several transactions. * - * There is no real relation between the current state fo an Statement instance + * There is no real relation between the current state of a Statement instance * and the various ResultSets that it may have returned for different queries. */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCStatement.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCStatement.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/JDBCStatement.java 2021-02-07 17:08:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/JDBCStatement.java 2022-04-19 17:00:36.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +48,7 @@ import org.hsqldb.result.ResultConstants; import org.hsqldb.result.ResultProperties; -/* $Id: JDBCStatement.java 6294 2021-02-07 18:08:27Z fredt $ */ +/* $Id: JDBCStatement.java 6489 2022-04-19 18:00:13Z fredt $ */ // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping // @@ -103,7 +103,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since HSQLDB 1.9.0 * @see JDBCConnection#createStatement * @see JDBCResultSet @@ -547,7 +547,7 @@ * used in SQL positioned update or delete statements to identify the * current row in the ResultSet object generated by this * statement. If the database does not support positioned update/delete, - * this method is a noop. To insure that a cursor has the proper isolation + * this method is a noop. To ensure that a cursor has the proper isolation * level to support updates, the cursor's SELECT statement * should have the form SELECT FOR UPDATE. If * FOR UPDATE is not present, positioned updates may fail. @@ -1586,10 +1586,9 @@ * Retrieves whether this Statement object has been closed. A Statement is closed if the * method close has been called on it, or if it is automatically closed. * @return true if this Statement object is closed; false if it is still open - * @throws SQLException if a database access error occurs * @since JDK 1.6, HSQLDB 2.0 */ - public synchronized boolean isClosed() throws SQLException { + public synchronized boolean isClosed() { return isClosed; } @@ -1657,7 +1656,7 @@ * or a proxy for the receiver. If the receiver is a wrapper * and the wrapped object implements the interface then the result is the * wrapped object or a proxy for the wrapped object. Otherwise return the - * the result of calling unwrap recursively on the wrapped object + * result of calling unwrap recursively on the wrapped object * or a proxy for that result. If the receiver is not a * wrapper and does not implement the interface, then an SQLException is thrown. * @@ -2083,4 +2082,9 @@ getMoreResults(); } } + + public int getResultSetScrollability() { + return ResultProperties.getJDBCScrollability(rsProperties); + } + } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/pool/JDBCXID.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/pool/JDBCXID.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/jdbc/pool/JDBCXID.java 2020-11-22 09:56:16.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/jdbc/pool/JDBCXID.java 2022-02-21 14:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2020, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/CharArrayWriter.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/CharArrayWriter.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/CharArrayWriter.java 2021-02-06 23:35:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/CharArrayWriter.java 2022-05-23 11:24:38.000000000 +0000 @@ -63,13 +63,8 @@ int read = reader.read(buffer, count, left); if (read == -1) { - if (left > 0) { - reader.close(); - - throw new EOFException(); - } - - break; + reader.close(); + throw new EOFException(); } left -= read; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/ClosableCharArrayWriter.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/ClosableCharArrayWriter.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/ClosableCharArrayWriter.java 2021-02-09 04:48:08.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/ClosableCharArrayWriter.java 2022-05-17 12:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -280,6 +280,8 @@ * characters, then it may be resized to become more space efficient. * Calling this method may, but is not required to, affect the value * returned by a subsequent call to the {@link #capacity()} method. + * + * @throws IOException if buffer is freed */ public synchronized void trimToSize() throws IOException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/CountUpDownLatch.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/CountUpDownLatch.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/CountUpDownLatch.java 2021-02-09 04:54:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/CountUpDownLatch.java 2022-06-08 08:17:16.000000000 +0000 @@ -463,7 +463,7 @@ * cause a silent numeric overflow, * resulting in a negative * {@code count}. - * @throws IllegalArgumentException if {@code amount is less than one) + * @throws IllegalArgumentException if {@code amount is less than one} * */ boolean countUp(int amount) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/DoubleIntIndex.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/DoubleIntIndex.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/DoubleIntIndex.java 2021-02-07 17:08:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/DoubleIntIndex.java 2022-06-08 08:17:32.000000000 +0000 @@ -752,7 +752,7 @@ } /** - * Returns the index of the lowest element >= the given search target, or + * Returns the index of the lowest element {@code >=} the given search target, or * count. * * @return the index or count. @@ -780,7 +780,7 @@ } /** - * Returns the index of the lowest element > the given search target + * Returns the index of the lowest element {@code >} the given search target * or count or -1 if target is found * @return the index */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/DoubleLongIndex.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/DoubleLongIndex.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/DoubleLongIndex.java 2021-02-07 01:45:22.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/DoubleLongIndex.java 2022-06-08 08:17:40.000000000 +0000 @@ -321,7 +321,7 @@ } /** - * Returns the index of the lowest element >= the given search target, or + * Returns the index of the lowest element {@code >=} the given search target, or * count * * @return the index or count diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/EventLogInterface.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/EventLogInterface.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/EventLogInterface.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/EventLogInterface.java 2022-07-07 15:28:30.000000000 +0000 @@ -0,0 +1,48 @@ +/* Copyright (c) 2001-2022, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.lib; + +/** + * @author Fred Toussi (fredt@users dot sourceforge.net) + * @version 2.7.0 + * @since 1.9.0 + */ +public interface EventLogInterface { + + void logSevereEvent(String message, Throwable t); + + void logWarningEvent(String message, Throwable t); + + void logInfoEvent(String message); + + void logDetailEvent(String message); +} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FileAccess.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FileAccess.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FileAccess.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FileAccess.java 2022-07-08 18:59:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,7 @@ * Interface for abstraction of file access. * * @author Ocke Janssen oj@openoffice.org - * @version 2.5.1 + * @version 2.7.0 * @since 1.8.0 */ public interface FileAccess { @@ -65,7 +65,8 @@ boolean renameElement(String oldName, String newName); - boolean renameElementOrCopy(String oldName, String newName); + boolean renameElementOrCopy(String oldName, String newName, + EventLogInterface logger); interface FileSync { void sync() throws IOException; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FileAccessRes.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FileAccessRes.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FileAccessRes.java 2020-03-19 19:07:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FileAccessRes.java 2022-07-08 18:39:36.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,8 +37,11 @@ import java.io.OutputStream; import java.net.URL; -import org.hsqldb.lib.FileAccess.FileSync; - +/** +* @author Fred Toussi (fredt@users dot sourceforge.net) +* @version 2.7.0 +* @since 1.8.0 +*/ public class FileAccessRes implements FileAccess { public boolean isStreamElement(String fileName) { @@ -102,15 +105,18 @@ return false; } - public boolean renameElementOrCopy(String oldName, String newName) { + public boolean renameElementOrCopy(String oldName, String newName, + EventLogInterface logger) { return false; } - public OutputStream openOutputStreamElement(String streamName) throws IOException { + public OutputStream openOutputStreamElement(String streamName) + throws IOException { throw new IOException(); } - public OutputStream openOutputStreamElementAppend(String streamName) throws IOException { + public OutputStream openOutputStreamElementAppend(String streamName) + throws IOException { throw new IOException(); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FileUtil.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FileUtil.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FileUtil.java 2021-02-09 04:54:46.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FileUtil.java 2022-07-08 18:59:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,13 +50,11 @@ * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) * @author Ocke Janssen oj@openoffice.org - * @version 2.5.1 + * @version 2.7.0 * @since 1.7.2 */ public class FileUtil implements FileAccess { - private static final FrameworkLogger LOG = - FrameworkLogger.getLog(FileUtil.class); private static FileUtil fileUtil = new FileUtil(); private static FileAccessRes fileAccessRes = new FileAccessRes(); @@ -103,7 +101,8 @@ return renameWithOverwrite(oldName, newName); } - public boolean renameElementOrCopy(String oldName, String newName) { + public boolean renameElementOrCopy(String oldName, String newName, + EventLogInterface logger) { if (renameWithOverwrite(oldName, newName)) { return true; @@ -123,7 +122,7 @@ "Platform does not allow renaming files and failed to copy file contents from %s to %s", oldName, newName); - LOG.error(message, e); + logger.logSevereEvent(message, e); return false; } finally { @@ -132,7 +131,7 @@ inputStream.close(); } } catch (IOException e) { - LOG.finest("Failed to dispose streams", e); + logger.logWarningEvent("Failed to dispose streams", e); } try { @@ -140,19 +139,20 @@ outputStream.close(); } } catch (IOException e) { - LOG.finest("Failed to dispose streams", e); + logger.logDetailEvent("Failed to dispose streams"); } } if (!delete(oldName)) { - LOG.warning("Failed to delete renamed file " + oldName); + logger.logWarningEvent("Failed to delete renamed file " + oldName, + null); } String message = String.format( "Platform does not allow renaming files. Copied file from %s to %s instead", oldName, newName); - LOG.finer(message); + logger.logDetailEvent(message); return true; } @@ -494,10 +494,10 @@ static class DatabaseFilenameFilter implements FilenameFilter { - String[] suffixes = new String[] { + String[] suffixes = new String[] { ".backup", ".properties", ".script", ".data", ".log", ".lobs" }; - String[] extraSuffixes = new String[] { + String[] extraSuffixes = new String[] { ".lck", ".sql.log", ".app.log" }; private String dbName; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FrameworkLogger.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FrameworkLogger.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/FrameworkLogger.java 2021-02-08 20:12:02.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/FrameworkLogger.java 2022-07-07 13:56:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -84,7 +84,7 @@ * configuration takes place. * * @author Blaine Simpson (blaine dot simpson at admc dot com) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class FrameworkLogger { @@ -334,7 +334,10 @@ String propVal = System.getProperty("hsqldb.reconfig_logging"); - if (propVal != null && propVal.equalsIgnoreCase("false")) { + // from 2.7.0 the system property must be set to true for any reconfig + // the new hsqldb.extlog=level property specifies the level above which + // messages are logged to JUL OR Log4J + if (propVal == null || !propVal.equalsIgnoreCase("true")) { return; } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HashSet.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HashSet.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HashSet.java 2021-02-07 17:08:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HashSet.java 2022-05-30 12:51:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ * This class does not store null keys. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.2 */ public class HashSet extends BaseHashMap implements Set { @@ -60,6 +60,14 @@ this.comparator = comparator; } + public HashSet(Object[] valueList) { + this(valueList.length); + + for (int i = 0; i < valueList.length; i++) { + add((E) valueList[i]); + } + } + public boolean contains(Object key) { return super.containsKey(key); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HsqlByteArrayOutputStream.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HsqlByteArrayOutputStream.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HsqlByteArrayOutputStream.java 2021-02-09 04:48:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HsqlByteArrayOutputStream.java 2022-05-17 12:18:14.000000000 +0000 @@ -73,8 +73,12 @@ /** * Constructor from an InputStream limits size to the length argument. - * Throws if the actual length of the InputStream is smaller than - * length value. + * Throws if the actual length of the InputStream is smaller than length + * value. + * + * @param input InputStream + * @param length int + * @throws IOException if an error occurs */ public HsqlByteArrayOutputStream(InputStream input, int length) throws IOException { @@ -411,6 +415,8 @@ /** * size must fit in buffer + * + * @param size int */ public void setSize(int size) { count = size; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HsqlConsoleHandler.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HsqlConsoleHandler.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HsqlConsoleHandler.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HsqlConsoleHandler.java 2022-04-02 16:02:58.000000000 +0000 @@ -0,0 +1,36 @@ +/* Copyright (c) 2001-2022, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.lib; + +import java.util.logging.ConsoleHandler; + +public class HsqlConsoleHandler extends ConsoleHandler {} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HsqlTimer.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HsqlTimer.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/HsqlTimer.java 2021-02-06 23:35:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/HsqlTimer.java 2022-06-08 08:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,23 +56,23 @@ public final class HsqlTimer implements Comparator, ThreadFactory { /** The priority queue for the scheduled tasks. */ - protected final TaskQueue taskQueue = new TaskQueue(16, this); + final TaskQueue taskQueue = new TaskQueue(16, this); /** The inner runnable that executes tasks in the background thread. */ - protected final TaskRunner taskRunner = new TaskRunner(); + final TaskRunner taskRunner = new TaskRunner(); /** The background thread. */ - protected Thread taskRunnerThread; + Thread taskRunnerThread; /** The factory that produces the background threads. */ - protected final ThreadFactory threadFactory; + final ThreadFactory threadFactory; /** * Whether this timer should disallow all further processing. * * Once set true, stays true forever. */ - protected volatile boolean isShutdown; + volatile boolean isShutdown; /** * Constructs a new HsqlTimer using the default thread factory @@ -459,7 +459,7 @@ * @param relative if true, use fixed rate else use fixed delay scheduling * @return an opaque reference to the internal task */ - protected Task addTask(final long first, final Runnable runnable, + Task addTask(final long first, final Runnable runnable, final long period, boolean relative) { if (this.isShutdown) { @@ -478,7 +478,7 @@ } /** Sets the background thread to null. */ - protected synchronized void clearThread() { + synchronized void clearThread() { try { taskRunnerThread.setContextClassLoader(null); @@ -493,7 +493,7 @@ * * @return the next task to execute, or null */ - protected Task nextTask() { + Task nextTask() { try { while (!this.isShutdown || Thread.interrupted()) { @@ -868,7 +868,7 @@ * {@link #unpark() unpark} or the specified amount of time has * elapsed. * - * Implements the sync & wait(n) half of this queue's availability + * Implements the sync and wait(n) half of this queue's availability * condition.

    * * @param timeout the maximum time to wait in milliseconds. @@ -947,7 +947,7 @@ * Wakes up a single thread (if any) that is waiting on this queue's * {@link #park(long) park} method. * - * Implements the sync & notify half of this queue's availability + * Implements the sync and notify half of this queue's availability * condition. */ synchronized void unpark() { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/InOutUtil.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/InOutUtil.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/InOutUtil.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/InOutUtil.java 2022-05-17 12:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,8 +54,13 @@ /** * Implementation only supports unix line-end format and is suitable for - * processing HTTP and other network protocol communications. Reads and writes - * a line of data. Returns the number of bytes read/written. + * processing HTTP and other network protocol communications. Reads and + * writes a line of data. Returns the number of bytes read/written. + * + * @param in InputStream + * @param out OutputStream + * @throws IOException on failure + * @return int */ public static int readLine(InputStream in, OutputStream out) throws IOException { @@ -82,11 +87,12 @@ } /** - * Retrieves the serialized form of the specified Object - * as an array of bytes. + * Retrieves the serialized form of the specified Object as an + * array of bytes. * * @param s the Object to serialize - * @return a static byte array representing the passed Object + * @return a static byte array representing the passed Object + * @throws IOException on failure */ public static byte[] serialize(Serializable s) throws IOException { @@ -104,6 +110,8 @@ * * @return the Object resulting from deserializing the specified array of bytes * @param ba the byte array to deserialize to an Object + * @throws IOException on failure + * @throws ClassNotFoundException if not found */ public static Serializable deserialize(byte[] ba) throws IOException, ClassNotFoundException { @@ -118,7 +126,12 @@ public static final long DEFAULT_COPY_AMOUNT = Long.MAX_VALUE; /** + * * @see #copy(java.io.InputStream, java.io.OutputStream, long, int) + * @param inputStream InputStream + * @param outputStream OutputStream + * @throws IOException on failure + * @return long */ public static long copy(final InputStream inputStream, final OutputStream outputStream) @@ -128,7 +141,13 @@ } /** + * * @see #copy(java.io.InputStream, java.io.OutputStream, long, int) + * @param inputStream InputStream + * @param outputStream OutputStream + * @param amount long + * @throws IOException on failure + * @return long */ public static long copy(final InputStream inputStream, final OutputStream outputStream, @@ -190,7 +209,12 @@ } /** + * * @see #copy(java.io.Reader, java.io.Writer, long, int) + * @param reader Reader + * @param writer Writer + * @throws IOException on failure + * @return long */ public static long copy(final Reader reader, final Writer writer) throws IOException { @@ -199,7 +223,13 @@ } /** + * * @see #copy(java.io.Reader, java.io.Writer, long, int) + * @param reader Reader + * @param writer Writer + * @param amount long + * @throws IOException on failure + * @return long */ public static long copy(final Reader reader, final Writer writer, final long amount) throws IOException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/IntIndex.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/IntIndex.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/IntIndex.java 2021-02-06 12:50:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/IntIndex.java 2022-06-08 08:18:54.000000000 +0000 @@ -393,7 +393,7 @@ } /** - * Returns the index of the lowest element >= the given search target, + * Returns the index of the lowest element {@code >=} the given search target, * or count * @return the index */ @@ -419,7 +419,7 @@ } /** - * Returns the index of the lowest element > the given search target + * Returns the index of the lowest element {@code >} the given search target * or count or -1 if target is found * @return the index */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/java/JavaSystem.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/java/JavaSystem.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/java/JavaSystem.java 2021-07-15 17:15:28.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/java/JavaSystem.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,6 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.math.BigDecimal; import java.nio.MappedByteBuffer; import java.nio.charset.Charset; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/java/package-info.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/java/package-info.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/java/package-info.java 2021-03-23 08:35:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/java/package-info.java 2022-06-08 10:06:58.000000000 +0000 @@ -30,7 +30,7 @@ /** - * * Contains a single static class which handles invariants, runtime and + * Contains a single static class which handles invariants, runtime and * methods in different JDK versions */ package org.hsqldb.lib.java; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/LineGroupReader.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/LineGroupReader.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/LineGroupReader.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/LineGroupReader.java 2022-05-17 12:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,6 +72,8 @@ * Default constructor for TestUtil usage. * Sections start at lines beginning with any non-space character. * SQL comment lines are ignored. + * + * @param reader LineNumberReader */ public LineGroupReader(LineNumberReader reader) { @@ -87,6 +89,9 @@ /** * Constructor for sections starting with specified strings. + * + * @param reader LineNumberReader + * @param sectionStarts String[] */ public LineGroupReader(LineNumberReader reader, String[] sectionStarts) { @@ -152,9 +157,12 @@ HsqlArrayList list = getNextSection(); return convertToString(list, 0); } + /** - * Returns a map/list which contains the first line of each line group - * as key and the rest of the lines as a String value. + * Returns a map/list which contains the first line of each line group as + * key and the rest of the lines as a String value. + * + * @return OrderedHashMap */ public OrderedHashMap getAsMap() { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/OrderedHashSet.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/OrderedHashSet.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/OrderedHashSet.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/OrderedHashSet.java 2022-05-30 12:38:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,9 +31,6 @@ package org.hsqldb.lib; -import java.util.ListIterator; - - /** * A list which is also a Set which maintains the inserted order of elements and * allows access by index. Iterators return the elements in the index order.

    @@ -41,7 +38,7 @@ * This class does not store null elements. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class OrderedHashSet extends HashSet implements List, Set { @@ -64,6 +61,14 @@ this.isList = true; } + public OrderedHashSet(Object[] valueList) { + this(valueList.length); + + for (int i = 0; i < valueList.length; i++) { + add((E) valueList[i]); + } + } + public boolean remove(Object key) { if (key == null) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/RefCapablePropertyResourceBundle.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/RefCapablePropertyResourceBundle.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/RefCapablePropertyResourceBundle.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/RefCapablePropertyResourceBundle.java 2022-05-18 07:29:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,8 +34,6 @@ import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.Enumeration; import java.util.HashMap; import java.util.Locale; @@ -46,7 +44,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -/* $Id: RefCapablePropertyResourceBundle.java 6266 2021-01-25 16:08:06Z fredt $ */ +/* $Id: RefCapablePropertyResourceBundle.java 6513 2022-05-18 03:25:20Z unsaved $ */ /** * Just like PropertyResourceBundle, except keys mapped to nothing in the @@ -192,8 +190,12 @@ } /** - * Same as getString(), but expands System Variables specified in - * property values like ${sysvarname}. + * Same as getString(), but expands System Variables specified in property + * values like ${sysvarname}. + * + * @param key String + * @param behavior int + * @return String */ public String getExpandedString(String key, int behavior) { String s = getString(key); @@ -239,8 +241,13 @@ /** * Replaces positional substitution patterns of the form %{\d} with - * corresponding element of the given subs array. - * Note that %{\d} numbers are 1-based, so we lok for subs[x-1]. + * corresponding element of the given subs array. Note that %{\d} numbers + * are 1-based, so we lok for subs[x-1]. + * + * @param s String + * @param subs String[] + * @param behavior int + * @return String */ public String posSubst(String s, String[] subs, int behavior) { Matcher matcher = posPattern.matcher(s); @@ -296,6 +303,8 @@ /** * Just identifies this RefCapablePropertyResourceBundle instance. + * + * @return String */ public String toString() { return baseName + " for " + language + " / " + country + " / " @@ -304,11 +313,13 @@ /** * Returns value defined in this RefCapablePropertyResourceBundle's - * .properties file, unless that value is empty. - * If the value in the .properties file is empty, then this returns - * the entire contents of the referenced text file. + * .properties file, unless that value is empty. If the value in the + * .properties file is empty, then this returns the entire contents of the + * referenced text file. * * @see ResourceBundle#getString(String) + * @param key String + * @return String */ public String getString(String key) { String value = wrappedBundle.getString(key); @@ -344,16 +355,27 @@ * Java). * * @see ResourceBundle#getBundle(String) + * @param baseName String + * @param loader ClassLoader + * @param loaderClass Class + * @return RefCapablePropertyResourceBundle */ public static RefCapablePropertyResourceBundle getBundle(String baseName, ClassLoader loader, Class> loaderClass) { return getRef(baseName, ResourceBundle.getBundle(baseName, Locale.getDefault(), loader), loaderClass); } + /** - * Use exactly like java.util.ResourceBundle.get(String, Locale, ClassLoader). + * Use exactly like java.util.ResourceBundle.get(String, Locale, + * ClassLoader). * * @see ResourceBundle#getBundle(String, Locale, ClassLoader) + * @param baseName String + * @param locale Locale + * @param loader ClassLoader + * @param loaderClass Class + * @return RefCapablePropertyResourceBundle */ public static RefCapablePropertyResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader, @@ -363,8 +385,13 @@ } /** - * Return a ref to a new or existing RefCapablePropertyResourceBundle, - * or throw a MissingResourceException. + * Return a ref to a new or existing RefCapablePropertyResourceBundle, or + * throw a MissingResourceException. + * + * @param baseName String + * @param rb ResourceBundle + * @param loaderClass Class + * @return RefCapablePropertyResourceBundle */ static private RefCapablePropertyResourceBundle getRef(String baseName, ResourceBundle rb, Class> loaderClass) { @@ -399,13 +426,7 @@ + ((v == null) ? "" : ("_" + v)) + ".text"; //System.err.println("Seeking " + filePath + " FOR " + baseName); - InputStream is = (InputStream) AccessController.doPrivileged( - new PrivilegedAction() { - - public InputStream run() { - return loaderClass.getResourceAsStream(filePath); - } - }); + InputStream is = loaderClass.getResourceAsStream(filePath); // N.b. If were using Class.getRes... instead of ClassLoader.getRes... // we would need to prefix the path with "/". return (is == null && l != null) diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/SimpleLog.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/SimpleLog.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/SimpleLog.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/SimpleLog.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,14 +53,15 @@ public static final int LOG_NONE = 0; public static final int LOG_ERROR = 1; - public static final int LOG_NORMAL = 2; - public static final int LOG_DETAIL = 3; + public static final int LOG_WARNING = 2; + public static final int LOG_NORMAL = 3; + public static final int LOG_DETAIL = 4; public static final int LOG_RESULT = 4; // public static final String logTypeNameEngine = "ENGINE"; static final String[] appLogTypeNames = { - "", "ERROR ", "NORMAL", "DETAIL" + "", "ERROR ", "WARNING", "NORMAL", "DETAIL" }; static final String[] sqlLogTypeNames = { "", "BASIC ", "NORMAL", "DETAIL", "RESULT" diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/StringConverter.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/StringConverter.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/StringConverter.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/StringConverter.java 2022-03-04 20:50:54.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -84,7 +84,7 @@ * * @author Thomas Mueller (Hypersonic SQL Group) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.0 + * @version 2.7.0 * @since 1.7.2 */ public class StringConverter { @@ -954,4 +954,42 @@ return b.toString(); } + + public static void toJSONString(String s, StringBuilder sb) { + + int firstQuote; + int length = s.length(); + + sb.append('"'); + + firstQuote = s.indexOf('"'); + + if (firstQuote == -1) { + if (s.indexOf('\\') == -1) { + sb.append(s); + sb.append('"'); + + return; + } + } + + sb.append(s.substring(0, firstQuote)); + + for (int i = firstQuote; i < length; i++) { + char c = s.charAt(i); + + if (c < 32) { + sb.append('\\'); + appendHex(sb, c); + } else { + if (c == '"' || c == '\\') { + sb.append('\\'); + } + + sb.append(c); + } + } + + sb.append('"'); + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/RB.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/RB.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/RB.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/RB.java 2022-05-23 11:29:54.000000000 +0000 @@ -34,7 +34,7 @@ import org.hsqldb.lib.ValidatingResourceBundle; import org.hsqldb.lib.RefCapableRBInterface; -/* $Id: RB.java 6266 2021-01-25 16:08:06Z fredt $ */ +/* $Id: RB.java 6527 2022-05-23 12:29:48Z fredt $ */ /** * Resource Bundle for Tar classes @@ -117,7 +117,7 @@ listing_format, ; - private static ValidatingResourceBundle vrb = + private static final ValidatingResourceBundle vrb = new ValidatingResourceBundle( RB.class.getPackage().getName() + ".rb", RB.class); static { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarFileInputStream.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarFileInputStream.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarFileInputStream.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarFileInputStream.java 2022-05-17 12:42:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,6 +90,8 @@ * Convenience wrapper to use default readBufferBlocks and compressionType. * * @see #TarFileInputStream(File, int, int) + * @param sourceFile File + * @throws IOException on failure */ public TarFileInputStream(File sourceFile) throws IOException { this(sourceFile, TarFileOutputStream.Compression.DEFAULT_COMPRESSION); @@ -99,6 +101,9 @@ * Convenience wrapper to use default readBufferBlocks. * * @see #TarFileInputStream(File, int, int) + * @param sourceFile File + * @param compressionType int + * @throws IOException on failure */ public TarFileInputStream(File sourceFile, int compressionType) throws IOException { @@ -123,6 +128,10 @@ * * @see #close() * @see #readNextHeaderBlock() + * @param sourceFile File + * @param compressionType int + * @param readBufferBlocks int + * @throws IOException on failure */ public TarFileInputStream(File sourceFile, int compressionType, int readBufferBlocks) throws IOException { @@ -242,6 +251,8 @@ *

    * * @see #readNextHeaderBlock + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public void readBlock() throws IOException, TarMalformatException { readBlocks(1); @@ -250,16 +261,17 @@ /** * readBlock() and readNextHeaderBlock are the methods that USERS of this * class should use to read header blocks from the tar file. - *

    - * readNextHeaderBlock continues working through the Tar File from the - * current point until it finds a block with a non-0 first byte. - *

    + * + *

    readNextHeaderBlock continues working through the Tar File from the + * current point until it finds a block with a non-0 first byte.

    * * @return True if a header block was read and place at beginning of the * readBuffer array. False if EOF was encountered without finding * any blocks with first byte != 0. If false is returned, we have * automatically closed the this TarFileInputStream too. * @see #readBlock + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public boolean readNextHeaderBlock() throws IOException, TarMalformatException { @@ -293,6 +305,7 @@ * Implements java.io.Closeable. * * @see java.io.Closeable + * @throws IOException on failure */ public void close() throws IOException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarFileOutputStream.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarFileOutputStream.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarFileOutputStream.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarFileOutputStream.java 2022-05-17 12:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -103,6 +103,8 @@ * Convenience wrapper to use default blocksPerRecord and compressionType. * * @see #TarFileOutputStream(File, int, int) + * @param targetFile File + * @throws IOException on failure */ public TarFileOutputStream(File targetFile) throws IOException { this(targetFile, Compression.DEFAULT_COMPRESSION); @@ -112,6 +114,9 @@ * Convenience wrapper to use default blocksPerRecord. * * @see #TarFileOutputStream(File, int, int) + * @param targetFile File + * @param compressionType int + * @throws IOException on failure */ public TarFileOutputStream(File targetFile, int compressionType) throws IOException { @@ -125,6 +130,11 @@ * "tar.gz" (and that they match the specified compression type). * * It also overwrites files without warning (just like FileOutputStream). + * + * @param targetFile File + * @param compressionType int + * @param blocksPerRecord int + * @throws IOException on failure */ public TarFileOutputStream(File targetFile, int compressionType, int blocksPerRecord) throws IOException { @@ -189,8 +199,12 @@ /** * This class and subclasses should write to the underlying writeStream - * ONLY WITH THIS METHOD. - * That way we can be confident that bytesWritten will always be accurate. + * ONLY WITH THIS METHOD. That way we can be confident that + * bytesWritten will always be accurate. + * + * @param byteArray byte[] + * @param byteCount int + * @throws IOException on failure */ public void write(byte[] byteArray, int byteCount) throws IOException { @@ -202,16 +216,21 @@ /** * The normal way to write file data (as opposed to header data or padding) * using this class. + * + * @param byteCount int + * @throws IOException on failure */ public void write(int byteCount) throws IOException { write(writeBuffer, byteCount); } /** - * Write a user-specified 512-byte block. - * For efficiency, write(int) should be used when writing file body content. + * Write a user-specified 512-byte block. For efficiency, write(int) should + * be used when writing file body content. * * @see #write(int) + * @param block byte[] + * @throws IOException on failure */ public void writeBlock(byte[] block) throws IOException { @@ -225,6 +244,9 @@ /** * Writes the specified quantity of zero'd blocks. + * + * @param blockCount int + * @throws IOException on failure */ public void writePadBlocks(int blockCount) throws IOException { @@ -235,6 +257,8 @@ /** * Writes a single zero'd block. + * + * @throws IOException on failure */ public void writePadBlock() throws IOException { writePadBlocks(1); @@ -264,8 +288,10 @@ } /** - * Rounds out the current block to the next block boundary. - * If we are currently at a block boundary, nothing is done. + * Rounds out the current block to the next block boundary. If we are + * currently at a block boundary, nothing is done. + * + * @throws IOException on failure */ public void padCurrentBlock() throws IOException { @@ -285,6 +311,7 @@ * Implements java.io.Flushable. * * @see java.io.Flushable + * @throws IOException on failure */ public void flush() throws IOException { writeStream.flush(); @@ -297,6 +324,7 @@ * closing it! * * @see java.io.Closeable + * @throws IOException on failure */ public void close() throws IOException { @@ -331,6 +359,7 @@ * finish()). * * @see #close + * @throws IOException on failure */ public void finish() throws IOException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarGenerator.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarGenerator.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarGenerator.java 2021-02-09 04:47:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarGenerator.java 2022-05-17 11:19:34.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,13 +73,17 @@ * At this time, PAX is only implemented for entries added as Files, * not entries added as Stream. *

    + * + * @param paxThreshold long */ public void setPaxThreshold(long paxThreshold) { this.paxThreshold = paxThreshold; } /** + * * @see #setPaxThreshold(long) + * @return long */ public long getPaxThreshold() { return paxThreshold; @@ -95,6 +99,7 @@ * method. * @param overWrite True to replace an existing file of same path. * @param blocksPerRecord Null will use default tar value. + * @throws IOException on access failure */ public TarGenerator(File inFile, boolean overWrite, Integer blocksPerRecord) throws IOException { @@ -178,6 +183,12 @@ *

    * This limitation may or may not be eliminated in the future. *

    + + * @param entryPath String + * @param inStream InputStream + * @param maxBytes int + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public void queueEntry(String entryPath, InputStream inStream, int maxBytes) throws IOException, TarMalformatException { @@ -187,6 +198,9 @@ /** * This method does release all of the streams, even if there is a failure. + * + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public void write() throws IOException, TarMalformatException { if (TarFileOutputStream.debug) { @@ -386,6 +400,10 @@ /** * This creates a 'x' entry for a 0/\0 entry. + * + * @throws IOException on access failure + * @throws TarMalformatException if malformed + * @return TarEntrySupplicant */ public TarEntrySupplicant makeXentry() throws IOException, TarMalformatException { @@ -408,6 +426,13 @@ * After instantiating a TarEntrySupplicant, the user must either invoke * write() or close(), to release system resources on the input * File/Stream. + * + * @param path String + * @param file File + * @param tarStream TarFileOutputStream + * @param paxThreshold long + * @throws FileNotFoundException if not found + * @throws TarMalformatException if malformed */ public TarEntrySupplicant(String path, File file, TarFileOutputStream tarStream, @@ -472,10 +497,16 @@ * RAM before anything is written to disk. *

    * + * @param path String + * @param origStream InputStream * @param maxBytes This method will fail if more than maxBytes bytes * are supplied on the specified InputStream. * As the type of this parameter enforces, the max * size you can request is 2GB. + * @param typeFlag char + * @param tarStream TarFileOutputStream + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public TarEntrySupplicant(String path, InputStream origStream, int maxBytes, char typeFlag, @@ -590,6 +621,9 @@ * Writes entire entry to this object's tarStream. * * This method is guaranteed to close the supplicant's input stream. + * + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public void write() throws IOException, TarMalformatException { int i; @@ -665,6 +699,9 @@ * privileges for "other" (last nibble in file Mode), but no ability * to detect the same. *

    + * + * @param file File + * @return String */ static protected String getLameMode(File file) { int umod = 0; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarGeneratorMain.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarGeneratorMain.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarGeneratorMain.java 2014-01-24 17:19:38.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarGeneratorMain.java 2022-05-17 11:10:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,9 +37,12 @@ public class TarGeneratorMain { /** - * Creates specified tar file to contain specified files, or stdin, - * using default blocks-per-record and replacing tar file if it already - * exists. + * Creates specified tar file to contain specified files, or stdin, using + * default blocks-per-record and replacing tar file if it already exists. + * + * @param sa arguments + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public static void main(String[] sa) throws IOException, TarMalformatException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarHeaderField.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarHeaderField.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarHeaderField.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarHeaderField.java 2022-05-23 11:22:00.000000000 +0000 @@ -108,7 +108,8 @@ this.start = start; this.stop = stop; } - private int start, stop; + private final int start; + private final int stop; // The getters below throw RuntimExceptions instead of // TarMalformatExceptions because these errors indicate a dev problem, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarReader.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarReader.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarReader.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarReader.java 2022-06-08 08:19:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,6 +98,7 @@ * @param inDir Directory that RELATIVE entries will be extracted * relative to. Defaults to current directory (user.dir). * Only used for extract modes and relative file entries. + * @throws IOException on access failure * @throws IllegalArgumentException if any given pattern is an invalid * regular expression. Don't have to worry about this if * you call with null 'patterns' param. @@ -486,6 +487,8 @@ /** * @param rawHeader May be longer than 512 bytes, but the first 512 * bytes MUST COMPRISE a raw tar entry header. + * + * @throws TarMalformatException if malformed */ public TarEntryHeader(byte[] rawHeader) throws TarMalformatException { @@ -591,6 +594,8 @@ /** * Setter is needed in order to override header size setting for Pax. + * + * @param dataSize long */ public void setDataSize(long dataSize) { this.dataSize = dataSize; @@ -612,7 +617,10 @@ * Choosing not to report fields that we don't write (e.g. "gname"), * but which would certainly be useful for a general Java tar client * implementation. - * This design decision is subject to change. + * + *

    This design decision is subject to change. + * + * @return String */ public String toString() { @@ -640,6 +648,9 @@ /** * Is this any UStar variant + * + * @throws TarMalformatException + * @return boolean */ public boolean isUstar() throws TarMalformatException { @@ -649,7 +660,12 @@ } /** + * * @return index based at 0 == from + * @param ba byte[] + * @param val byte + * @param from int + * @param to int */ public static int indexOf(byte[] ba, byte val, int from, int to) { @@ -673,7 +689,10 @@ } /** - * @return null or String with length() > 0. + * + * @return null or String with {@code length() > 0}. + * @param field TarHeaderField + * @throws TarMalformatException */ protected String readString(TarHeaderField field) throws TarMalformatException { @@ -706,8 +725,12 @@ } /** - * Integer as in positive whole number, which does not imply Java - * types of int or Integer. + * Integer as in positive whole number, which does not imply Java types + * of int or Integer. + * + * @param field TarHeaderField + * @throws TarMalformatException if malformed + * @return Long */ protected Long readInteger(TarHeaderField field) throws TarMalformatException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarReaderMain.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarReaderMain.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/tar/TarReaderMain.java 2014-01-24 17:19:38.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/tar/TarReaderMain.java 2022-05-17 11:11:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,6 +40,10 @@ * Reads a specified tar file or stdin in order to either list or extract * the file tar entries, depending on the first argument being "t" or "x", * using default read buffer blocks. + * + * @param sa arguments + * @throws IOException on access failure + * @throws TarMalformatException if malformed */ public static void main(String[] sa) throws IOException, TarMalformatException { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/ValidatingResourceBundle.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/ValidatingResourceBundle.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/lib/ValidatingResourceBundle.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/lib/ValidatingResourceBundle.java 2022-05-17 13:15:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ import java.util.HashSet; import java.util.Set; -/* $Id: ValidatingResourceBundle.java 6266 2021-01-25 16:08:06Z fredt $ */ +/* $Id: ValidatingResourceBundle.java 6511 2022-05-17 14:14:54Z fredt $ */ /** * Purpose of this class is to wrap a RefCapablePropertyResourceBundle to @@ -83,7 +83,12 @@ // The following methods are a passthru wrappers for the wrapped RCPRB. - /** @see RefCapablePropertyResourceBundle#getString(String) */ + /** + * + * @see RefCapablePropertyResourceBundle#getString(String) + * @param key Enum + * @return String + */ public String getString(Enum key) { if (!enumType.isInstance(key)) throw new IllegalArgumentException( @@ -92,7 +97,13 @@ return wrappedRCPRB.getString(key.toString()); } - /** @see RefCapablePropertyResourceBundle#getString(String, String[], int) */ + /** + * + * @see RefCapablePropertyResourceBundle#getString(String, String[], int) + * @param key Enum + * @param strings String[] + * @return String + */ public String getString(Enum key, String... strings) { if (!enumType.isInstance(key)) throw new IllegalArgumentException( @@ -102,7 +113,12 @@ key.toString(), strings, missingPosValueBehavior); } - /** @see RefCapablePropertyResourceBundle#getExpandedString(String, int) */ + /** + * + * @see RefCapablePropertyResourceBundle#getExpandedString(String, int) + * @param key Enum + * @return String + */ public String getExpandedString(Enum key) { if (!enumType.isInstance(key)) throw new IllegalArgumentException( @@ -111,7 +127,14 @@ return wrappedRCPRB.getExpandedString(key.toString(), missingPropertyBehavior); } - /** @see RefCapablePropertyResourceBundle#getExpandedString(String, String[], int, int) */ + /** + * + * @see RefCapablePropertyResourceBundle#getExpandedString(String, + * String[], int, int) + * @param key Enum + * @param strings String[] + * @return String + */ public String getExpandedString(Enum key, String... strings) { if (!enumType.isInstance(key)) throw new IllegalArgumentException( @@ -125,28 +148,33 @@ private int missingPosValueBehavior = THROW_BEHAVIOR; /** - * Set behavior for get*String*() method when a referred-to - * System Property is not set. Set to one of + * Set behavior for get*String*() method when a referred-to System Property + * is not set. Set to one of *

      *
    • RefCapablePropertyResourceBundle.THROW_BEHAVIOR *
    • RefCapablePropertyResourceBundle.EMPTYSTRING_BEHAVIOR *
    • RefCapablePropertyResourceBundle.NOOP_BEHAVIOR *
    * The first value is the default. + * + * @param missingPropertyBehavior int */ public void setMissingPropertyBehavior(int missingPropertyBehavior) { this.missingPropertyBehavior = missingPropertyBehavior; } + /** - * Set behavior for get*String(String, String[]) method when a - * positional index (like %{4}) is used but no subs value was given for - * that index. Set to one of + * Set behavior for get*String(String, String[]) method when a positional + * index (like %{4}) is used but no subs value was given for that index. Set + * to one of *
      *
    • RefCapablePropertyResourceBundle.THROW_BEHAVIOR *
    • RefCapablePropertyResourceBundle.EMPTYSTRING_BEHAVIOR *
    • RefCapablePropertyResourceBundle.NOOP_BEHAVIOR *
    * The first value is the default. + * + * @param missingPosValueBehavior int */ public void setMissingPosValueBehavior(int missingPosValueBehavior) { this.missingPosValueBehavior = missingPosValueBehavior; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/map/BaseHashMap.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/map/BaseHashMap.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/map/BaseHashMap.java 2021-07-09 17:00:38.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/map/BaseHashMap.java 2022-06-08 08:19:24.000000000 +0000 @@ -851,7 +851,7 @@ } /** - * type specific method for Object sets or Object->Object maps + * type specific method for Object sets or Object to Object maps */ protected Object removeObject(Object objectKey, boolean removeRow) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/map/HashIndex.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/map/HashIndex.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/map/HashIndex.java 2021-01-31 14:29:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/map/HashIndex.java 2022-06-08 08:19:56.000000000 +0000 @@ -153,7 +153,7 @@ } /** - * This looks from a given node, so the parameter is always > -1. + * This looks from a given node, so the parameter is always {@code > -1}. * * @param lookup A valid node to look from * @return either -1 or the next node from this node diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChange.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChange.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChange.java 2020-06-24 09:02:18.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChange.java 2022-02-21 14:41:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2020, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChangeMemory.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChangeMemory.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChangeMemory.java 2021-02-09 04:48:50.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataChangeMemory.java 2022-05-22 17:54:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,6 @@ package org.hsqldb.navigator; -import java.io.IOException; - import org.hsqldb.Row; import org.hsqldb.Session; import org.hsqldb.error.Error; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataTable.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataTable.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataTable.java 2021-05-22 08:58:08.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/navigator/RowSetNavigatorDataTable.java 2022-03-26 22:14:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ * Implementation of RowSetNavigator using a table as the data store. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class RowSetNavigatorDataTable extends RowSetNavigatorData { @@ -162,6 +162,14 @@ public void add(Object[] data) { try { + if (table.getDataColumnCount() > data.length) { + Object[] d = table.getEmptyRowData(); + + ArrayUtil.copyArray(data, d, data.length); + + data = d; + } + Row row = (Row) store.getNewCachedObject((Session) session, data, false); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/OpTypes.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/OpTypes.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/OpTypes.java 2021-05-30 14:48:46.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/OpTypes.java 2022-03-17 17:35:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ * Enumerate expression operation types

    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public interface OpTypes { @@ -140,7 +140,9 @@ USER_AGGREGATE = 100, ARRAY_ACCESS = 101, ARRAY_SUBQUERY = 102, - GROUPING = 103; // grouping function + JSON_FUNCTION = 103, + JSON_SQL_FUNCTION = 104, + GROUPING = 105; // grouping function //J- int[] aggOpTypes = new int[] { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserBase.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserBase.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserBase.java 2021-10-19 21:06:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserBase.java 2022-06-01 17:39:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ /** * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class ParserBase { @@ -61,7 +61,6 @@ protected int partPosition; protected HsqlException lastError; protected HsqlName lastSynonym; - protected boolean isCheckOrTriggerCondition; protected boolean isSchemaDefinition; protected boolean isViewDefinition; protected boolean isRecording; @@ -106,13 +105,12 @@ scanner.reset(session, sql); // - partPosition = 0; - lastError = null; - lastSynonym = null; - isCheckOrTriggerCondition = false; - isSchemaDefinition = false; - isViewDefinition = false; - isRecording = false; + partPosition = 0; + lastError = null; + lastSynonym = null; + isSchemaDefinition = false; + isViewDefinition = false; + isRecording = false; recordedStatement.clear(); } @@ -401,19 +399,39 @@ } } + void checkIsIntegral() { + + if (!isIntegral()) { + throw unexpectedTokenRequire("an integer"); + } + } + void checkIsQuotedString() { - if (token.tokenType != Tokens.X_VALUE - || !token.dataType.isCharacterType()) { - throw unexpectedToken(); + if (!isQuotedString()) { + throw unexpectedTokenRequire("a quoted string"); } } + boolean isIntegral() { + return token.tokenType == Tokens.X_VALUE + && token.dataType.isIntegralType(); + } + + boolean isQuotedString() { + return token.tokenType == Tokens.X_VALUE + && token.dataType.isCharacterType(); + } + void checkIsThis(int type) { if (token.tokenType != type) { String required = Tokens.getKeyword(type); + if (required == null) { + required = ""; + } + throw unexpectedTokenRequire(required); } } @@ -450,11 +468,7 @@ String readQuotedString() { - checkIsValue(); - - if (!token.dataType.isCharacterType()) { - throw Error.error(ErrorCode.X_42563); - } + checkIsQuotedString(); String value = token.tokenString; @@ -505,6 +519,39 @@ return false; } + void readAny(int id1, int id2, int id3, int id4) { + read(); + checkIsAny(id1, id2, id3, id4); + } + + void checkIsAny(int id1, int id2, int id3, int id4) { + + if (token.tokenType == id1 || token.tokenType == id2 + || token.tokenType == id3 || token.tokenType == id4) { + return; + } + + String required = ""; + + if (id1 != 0) { + required += Tokens.getKeyword(id1); + + if (id2 != 0) { + required += " or " + Tokens.getKeyword(id2); + } + + if (id3 != 0) { + required += " or " + Tokens.getKeyword(id3); + } + + if (id4 != 0) { + required += " or " + Tokens.getKeyword(id4); + } + } + + throw unexpectedTokenRequire(required); + } + Integer readIntegerObject() { int value = readInteger(); @@ -522,7 +569,7 @@ read(); } - checkIsValue(); + checkIsIntegral(); if (minus && token.dataType.typeCode == Types.SQL_BIGINT && ((Number) token.tokenValue).longValue() diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserCommand.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserCommand.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserCommand.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserCommand.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,7 +54,7 @@ * Parser for session and management statements * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class ParserCommand extends ParserDDL { @@ -107,7 +107,7 @@ } cs.setCompileTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); list.add(cs); } @@ -297,17 +297,7 @@ break; case Tokens.EXPLAIN : { - int position = getPosition(); - - read(); - - if (token.tokenType == Tokens.PLAN) { - cs = compileExplainPlan(); - } else { - cs = compileExplainReferences(); - } - - cs.setSQL(getLastPart(position)); + cs = compileExplain(); break; } @@ -388,6 +378,7 @@ if (extended) { readThis(Tokens.FOR); + checkIsAny(Tokens.DATABASE, Tokens.TABLE, 0, 0); if (readIfThis(Tokens.DATABASE)) { switch (token.tokenType) { @@ -823,13 +814,7 @@ args); } case Tokens.AUTOCOMMIT : { - read(); - - Boolean mode = processTrueOrFalseObject(); - Object[] args = new Object[]{ mode }; - - return new StatementSession( - StatementTypes.SET_SESSION_AUTOCOMMIT, args); + return compileSetAutoCommit(); } // deprecated @@ -990,6 +975,44 @@ } } + StatementSession compileSetAutoCommit() { + + read(); + + boolean mode = false; + int rows = -1; + + switch (token.tokenType) { + + case Tokens.TRUE : + case Tokens.FALSE : + mode = processTrueOrFalse(); + break; + + case Tokens.AT : + read(); + + rows = readInteger(); + + if (rows < 0) { + throw Error.error(ErrorCode.X_22003); + } + + readThis(Tokens.ROWS); + break; + + default : + throw unexpectedToken(); + } + + Object[] args = new Object[] { + mode, rows + }; + + return new StatementSession(StatementTypes.SET_SESSION_AUTOCOMMIT, + args); + } + StatementCommand compileSetTable() { read(); @@ -1214,7 +1237,23 @@ Integer value = readIntegerObject(); Object[] args = new Object[] { - value, Boolean.valueOf(sqlLog) + value, Boolean.valueOf(sqlLog), Boolean.TRUE + }; + + return new StatementCommand( + StatementTypes.SET_DATABASE_FILES_EVENT_LOG, args, null, + null); + } + case Tokens.EXTERNAL : { + read(); + readThis(Tokens.EVENT); + readThis(Tokens.LOG); + + readThis(Tokens.LEVEL); + + Integer value = readIntegerObject(); + Object[] args = new Object[] { + value, Boolean.FALSE, Boolean.FALSE }; return new StatementCommand( @@ -1282,96 +1321,92 @@ switch (token.tokenType) { - case Tokens.RESTRICT : + case Tokens.AVG : read(); - readThis(Tokens.EXEC); + readThis(Tokens.SCALE); - property = HsqlDatabaseProperties.sql_restrict_exec; - flag = processTrueOrFalseObject(); + value = readIntegerObject(); + property = HsqlDatabaseProperties.sql_avg_scale; break; - case Tokens.LIVE : + case Tokens.CHARACTER : read(); - readThis(Tokens.OBJECT); + readThis(Tokens.LITERAL); - property = HsqlDatabaseProperties.sql_live_object; flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_char_literal; break; - case Tokens.NAMES : + case Tokens.CONCAT_WORD : read(); + readThis(Tokens.NULLS); - property = HsqlDatabaseProperties.sql_enforce_names; flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_concat_nulls; break; - case Tokens.REGULAR : + case Tokens.CONVERT : read(); - readThis(Tokens.NAMES); + readThis(Tokens.TRUNCATE); - property = HsqlDatabaseProperties.sql_regular_names; flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_convert_trunc; break; - case Tokens.REFERENCES : + case Tokens.DOUBLE : read(); + readThis(Tokens.NAN); flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_enforce_refs; + property = HsqlDatabaseProperties.sql_double_nan; break; - case Tokens.SIZE : + case Tokens.IGNORECASE : read(); flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_enforce_size; + property = HsqlDatabaseProperties.sql_ignore_case; break; - case Tokens.TYPES : + case Tokens.LIVE : read(); + readThis(Tokens.OBJECT); + property = HsqlDatabaseProperties.sql_live_object; flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_enforce_types; break; - case Tokens.TDC : + case Tokens.LONGVAR : read(); + readThis(Tokens.IS); + readThis(Tokens.LOB); - if (readIfThis(Tokens.DELETE)) { - property = HsqlDatabaseProperties.sql_enforce_tdcd; - } else { - readThis(Tokens.UPDATE); - - property = HsqlDatabaseProperties.sql_enforce_tdcu; - } - - flag = processTrueOrFalseObject(); + flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_longvar_is_lob; break; - case Tokens.TRANSLATE : + case Tokens.LOWER : read(); - readThis(Tokens.TTI); - readThis(Tokens.TYPES); + readThis(Tokens.CASE); + readThis(Tokens.IDENTIFIER); - flag = processTrueOrFalseObject(); - property = - HsqlDatabaseProperties.jdbc_translate_tti_types; + flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_lowercase_ident; break; - case Tokens.CHARACTER : + case Tokens.MAX : read(); - readThis(Tokens.LITERAL); + readThis(Tokens.RECURSIVE); - flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_char_literal; + value = readIntegerObject(); + property = HsqlDatabaseProperties.sql_max_recursive; break; - case Tokens.CONCAT_WORD : + case Tokens.NAMES : read(); - readThis(Tokens.NULLS); + property = HsqlDatabaseProperties.sql_enforce_names; flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_concat_nulls; break; case Tokens.NULLS : @@ -1388,61 +1423,34 @@ flag = processTrueOrFalseObject(); break; - case Tokens.UNIQUE : - read(); - readThis(Tokens.NULLS); - - flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_unique_nulls; - break; - - case Tokens.CONVERT : - read(); - readThis(Tokens.TRUNCATE); - - flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_convert_trunc; - break; - - case Tokens.AVG : - read(); - readThis(Tokens.SCALE); - - value = readIntegerObject(); - property = HsqlDatabaseProperties.sql_avg_scale; - break; - - case Tokens.DOUBLE : + case Tokens.REGULAR : read(); - readThis(Tokens.NAN); + readThis(Tokens.NAMES); + property = HsqlDatabaseProperties.sql_regular_names; flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_double_nan; break; - case Tokens.LONGVAR : + case Tokens.REFERENCES : read(); - readThis(Tokens.IS); - readThis(Tokens.LOB); flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_longvar_is_lob; + property = HsqlDatabaseProperties.sql_enforce_refs; break; - case Tokens.LOWER : + case Tokens.RESTRICT : read(); - readThis(Tokens.CASE); - readThis(Tokens.IDENTIFIER); + readThis(Tokens.EXEC); + property = HsqlDatabaseProperties.sql_restrict_exec; flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_lowercase_ident; break; - case Tokens.IGNORECASE : + case Tokens.SIZE : read(); flag = processTrueOrFalseObject(); - property = HsqlDatabaseProperties.sql_ignore_case; + property = HsqlDatabaseProperties.sql_enforce_size; break; case Tokens.SYNTAX : @@ -1475,16 +1483,62 @@ flag = processTrueOrFalseObject(); break; - case Tokens.SYS : { + case Tokens.SYS : read(); readThis(Tokens.INDEX); readThis(Tokens.NAMES); flag = processTrueOrFalseObject(); property = HsqlDatabaseProperties.sql_sys_index_names; + break; + + case Tokens.TDC : + read(); + + if (readIfThis(Tokens.DELETE)) { + property = HsqlDatabaseProperties.sql_enforce_tdcd; + } else { + readThis(Tokens.UPDATE); + property = HsqlDatabaseProperties.sql_enforce_tdcu; + } + + flag = processTrueOrFalseObject(); break; - } + + case Tokens.TRANSLATE : + read(); + readThis(Tokens.TTI); + readThis(Tokens.TYPES); + + flag = processTrueOrFalseObject(); + property = + HsqlDatabaseProperties.jdbc_translate_tti_types; + break; + + case Tokens.TRUNCATE : + read(); + readThis(Tokens.TRAILING); + + flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_trunc_trailing; + break; + + case Tokens.TYPES : + read(); + + flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_enforce_types; + break; + + case Tokens.UNIQUE : + read(); + readThis(Tokens.NULLS); + + flag = processTrueOrFalseObject(); + property = HsqlDatabaseProperties.sql_unique_nulls; + break; + default : throw unexpectedToken(); } @@ -1606,7 +1660,7 @@ int type = 0; Boolean flag = null; - Integer value = null; + Object value = null; Boolean mode = null; HsqlName[] names = database.schemaManager.getCatalogNameArray(); @@ -1751,7 +1805,7 @@ readThis(Tokens.PATH); type = StatementTypes.SET_DATABASE_FILES_TEMP_PATH; - value = readIntegerObject(); + value = readQuotedString(); break; } @@ -1826,6 +1880,8 @@ boolean readonly = false; Object[] args = new Object[2]; + checkIsAny(Tokens.READ, Tokens.ISOLATION, 0, 0); + outerloop: while (true) { switch (token.tokenType) { @@ -1858,6 +1914,8 @@ read(); readThis(Tokens.LEVEL); + checkIsAny(Tokens.SERIALIZABLE, Tokens.READ, + Tokens.REPEATABLE, 0); switch (token.tokenType) { @@ -1868,7 +1926,8 @@ break; case Tokens.READ : - read(); + readAny(Tokens.COMMITTED, Tokens.UNCOMMITTED, 0, + 0); if (token.tokenType == Tokens.COMMITTED) { read(); @@ -2123,6 +2182,9 @@ private Statement compileSessionSettings() { + checkIsAny(Tokens.CHARACTERISTICS, Tokens.AUTHORIZATION, + Tokens.RESULT, Tokens.FEATURE); + switch (token.tokenType) { case Tokens.CHARACTERISTICS : { @@ -2227,26 +2289,37 @@ readThis(Tokens.ZONE); - if (token.tokenType == Tokens.LOCAL) { - read(); - - e = new ExpressionValue(null, Type.SQL_INTERVAL_HOUR_TO_MINUTE); - } else { - e = XreadIntervalValueExpression(); + switch (token.tokenType) { - List unresolved = e.resolveColumnReferences(session, - RangeGroup.emptyGroup, RangeGroup.emptyArray, null); + case Tokens.LOCAL : { + read(); - ExpressionColumn.checkColumnsResolved(unresolved); - e.resolveTypes(session, null); + e = new ExpressionValue(null, + Type.SQL_INTERVAL_HOUR_TO_MINUTE); - if (e.dataType == null) { - throw Error.error(ErrorCode.X_42563); + break; } + case Tokens.INTERVAL : { + e = XreadIntervalValueExpression(); + + List unresolved = e.resolveColumnReferences(session, + RangeGroup.emptyGroup, RangeGroup.emptyArray, null); + + ExpressionColumn.checkColumnsResolved(unresolved); + e.resolveTypes(session, null); + + if (e.dataType == null) { + throw Error.error(ErrorCode.X_42563); + } + + if (e.dataType.typeCode != Types.SQL_INTERVAL_HOUR_TO_MINUTE) { + throw Error.error(ErrorCode.X_42563); + } - if (e.dataType.typeCode != Types.SQL_INTERVAL_HOUR_TO_MINUTE) { - throw Error.error(ErrorCode.X_42563); + break; } + default : + e = XreadValueExpression(); } return new StatementSession(session, compileContext, @@ -2432,80 +2505,106 @@ private Statement compilePerform() { - read(); + readAny(Tokens.CHECK, Tokens.EXPORT, Tokens.IMPORT, 0); switch (token.tokenType) { - /* - * PERFORM CHECK TABLE INDEX [AND FIX] - * PERFORM CHECK ALL TABLE INDEX [AND FIX] - */ - case Tokens.CHECK : { - read(); + case Tokens.CHECK : + return compileCheck(); - boolean isAll = false; - HsqlName tableName = null; - Integer type = Integer.valueOf(IndexStats.checkRows); - Integer number = Integer.valueOf(-1); + case Tokens.IMPORT : + readAny(Tokens.SCRIPT, Tokens.DATA, 0, 0); - switch (token.tokenType) { + if (token.tokenType == Tokens.SCRIPT) { + return compileImportScript(); + } else { + return compileImportData(); + } + case Tokens.EXPORT : + readAny(Tokens.SCRIPT, Tokens.DATA, 0, 0); - case Tokens.ALL : { - read(); + if (token.tokenType == Tokens.SCRIPT) { + return compileScript(true); + } else { + return compileExportData(); + } + default : + throw unexpectedToken(); + } + } - isAll = true; - } + /* + * PERFORM CHECK TABLE INDEX [AND FIX] + * PERFORM CHECK ALL TABLE INDEX [AND FIX] + */ + private Statement compileCheck() { - // fall through - case Tokens.TABLE : { - readThis(Tokens.TABLE); + readAny(Tokens.ALL, Tokens.TABLE, 0, 0); - if (isAll) { - readThis(Tokens.INDEX); - } else { - tableName = readTableName().getName(); + boolean isAll = false; + HsqlName tableName = null; + Integer type = Integer.valueOf(IndexStats.checkRows); + Integer number = Integer.valueOf(-1); - readThis(Tokens.INDEX); - } - } - } + switch (token.tokenType) { - if (readIfThis(Tokens.AND)) { - readThis("FIX"); + case Tokens.ALL : { + read(); - type = Integer.valueOf(IndexStats.fixAll); - } + isAll = true; + } - Object[] args = new Object[] { - tableName, type, number - }; - HsqlName[] names = - isAll - ? database.schemaManager.getCatalogAndBaseTableNames() - : database.schemaManager.getCatalogAndBaseTableNames( - tableName); + // fall through + case Tokens.TABLE : { + readThis(Tokens.TABLE); - return new StatementCommand(StatementTypes.CHECK_INDEX, args, - null, names); - } - case Tokens.IMPORT : { - read(); + if (isAll) { + readThis(Tokens.INDEX); + } else { + tableName = readTableName().getName(); - return compileImportScript(); - } - case Tokens.EXPORT : { - return compileExport(); + readThis(Tokens.INDEX); + } } - default : - throw unexpectedToken(); } + + if (readIfThis(Tokens.AND)) { + readThis("FIX"); + + type = Integer.valueOf(IndexStats.fixAll); + } + + Object[] args = new Object[] { + tableName, type, number + }; + HsqlName[] names = + isAll ? database.schemaManager.getCatalogAndBaseTableNames() + : database.schemaManager.getCatalogAndBaseTableNames( + tableName); + + return new StatementCommand(StatementTypes.CHECK_INDEX, args, null, + names); } - private Statement compileExport() { + private Statement compileExportData() { - read(); + readThis(Tokens.DATA); + readThis(Tokens.FROM); + readThis(Tokens.TABLE); + + HsqlName tableName = readTableName().getName(); + + readThis(Tokens.TO); + + String fileName = readQuotedString(); + HsqlName[] names = + database.schemaManager.getCatalogAndBaseTableNames(); + Object[] args = new Object[] { + tableName, fileName + }; - return compileScript(true); + return new StatementCommand(StatementTypes.UNLOAD_DATA, args, null, + names); } private Statement compileImportScript() { @@ -2515,6 +2614,7 @@ Boolean isVersioning = Boolean.FALSE; readThis(Tokens.SCRIPT); + checkIsAny(Tokens.VERSIONING, Tokens.DATA, 0, 0); if (token.tokenType == Tokens.VERSIONING) { readThis(Tokens.VERSIONING); @@ -2541,10 +2641,34 @@ names); } + private Statement compileImportData() { + + readThis(Tokens.DATA); + readThis(Tokens.INTO); + readThis(Tokens.TABLE); + + HsqlName tableName = readTableName().getName(); + + readThis(Tokens.FROM); + + String fileName = readQuotedString(); + int mode = readLoadMode(); + HsqlName[] names = + database.schemaManager.getCatalogAndBaseTableNames(); + Object[] args = new Object[] { + tableName, fileName, Integer.valueOf(mode) + }; + + return new StatementCommand(StatementTypes.LOAD_DATA, args, null, + names); + } + private int readLoadMode() { int mode = -1; + checkIsAny(Tokens.CONTINUE, Tokens.STOP, Tokens.CHECK, 0); + switch (token.tokenType) { case Tokens.CONTINUE : @@ -2612,7 +2736,7 @@ Statement cs = new StatementCommand(StatementTypes.DATABASE_CHECKPOINT, args, null, names); - cs.setCompileTimestamp(database.txManager.getGlobalChangeTimestamp()); + cs.setCompileTimestamp(database.txManager.getSystemChangeNumber()); cs.setSQL(Tokens.T_CHECKPOINT); return cs; @@ -2628,6 +2752,24 @@ return cs; } + private Statement compileExplain() { + + Statement cs; + int position = getPosition(); + + readAny(Tokens.PLAN, Tokens.REFERENCES, 0, 0); + + if (token.tokenType == Tokens.PLAN) { + cs = compileExplainPlan(); + } else { + cs = compileExplainReferences(); + } + + cs.setSQL(getLastPart(position)); + + return cs; + } + private Statement compileExplainPlan() { Statement cs; @@ -2648,7 +2790,7 @@ SchemaObject object; boolean referencesFrom = false; - readThis(Tokens.REFERENCES); + readAny(Tokens.TO, Tokens.FROM, 0, 0); if (!readIfThis(Tokens.TO)) { readThis(Tokens.FROM); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserDDL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserDDL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserDDL.java 2021-03-04 20:57:56.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserDDL.java 2022-04-13 18:18:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,7 @@ import org.hsqldb.lib.OrderedHashSet; import org.hsqldb.lib.OrderedIntHashSet; import org.hsqldb.map.ValuePool; +import org.hsqldb.rights.GrantConstants; import org.hsqldb.rights.Grantee; import org.hsqldb.rights.GranteeManager; import org.hsqldb.rights.Right; @@ -56,7 +57,7 @@ * Parser for DDL statements * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class ParserDDL extends ParserRoutine { @@ -1063,7 +1064,7 @@ boolean ifNot = readIfNotExists(); HsqlName name = readNewSchemaObjectName(SchemaObject.TABLE, false); - name.schema = SqlInvariants.SYSTEM_SCHEMA_HSQLNAME; + name.schema = SqlInvariants.SESSION_SCHEMA_HSQLNAME; Table table = new Table(database, name, tableType); StatementSchema cs; @@ -2337,12 +2338,20 @@ ColumnSchema column, int columnIndex) { //ALTER TABLE .. ALTER COLUMN .. SET DEFAULT - Type type = column.getDataType(); - Expression expr = readDefaultClause(type); - String sql = getLastPart(); - Object[] args = new Object[] { - StatementTypes.ALTER_COLUMN_DEFAULT, table, column, - Integer.valueOf(columnIndex), expr + Type type = column.getDataType(); + Expression expr = readDefaultClause(type); + String sql = getLastPart(); + int statementType = StatementTypes.ALTER_COLUMN_DEFAULT; + Object argObject = expr; + + if (expr.opType == OpTypes.SEQUENCE) { + statementType = StatementTypes.ALTER_COLUMN_SEQUENCE; + argObject = ((ExpressionColumn) expr).sequence; + } + + Object[] args = new Object[] { + statementType, table, column, Integer.valueOf(columnIndex), + argObject }; HsqlName[] writeLockNames = database.schemaManager.getCatalogAndBaseTableNames( @@ -2983,10 +2992,6 @@ // fall through case Tokens.DELETE : - if (right == null) { - right = new Right(); - } - right.set(rightType, columnSet); isTable = true; @@ -3007,10 +3012,6 @@ break; case Tokens.TRIGGER : - if (right == null) { - right = new Right(); - } - right.set(rightType, null); isTable = true; @@ -3162,6 +3163,39 @@ objectType = SchemaObject.CHARSET; break; + case Tokens.ALL : + read(); + + if (readIfThis("SEQUENCES")) { + if (!isUsage && !isAll) { + throw unexpectedToken("SEQUENCES"); + } + + right = new Right(); + + right.set(GrantConstants.USAGE, null); + } else if (readIfThis("ROUTINES")) { + if (!isExec && !isAll) { + throw unexpectedToken("ROUTINES"); + } + + right = new Right(); + + right.set(GrantConstants.EXECUTE, null); + } else { + if (!isTable && !isAll) { + throw unexpectedToken(); + } + + readThis("TABLES"); + } + + readThis(Tokens.IN); + readThis(Tokens.SCHEMA); + + objectType = SchemaObject.SCHEMA; + break; + case Tokens.TABLE : default : if (!isTable && !isAll) { @@ -3543,7 +3577,7 @@ * Retrieves boolean value corresponding to the next token. * * @return true if next token is "TRUE"; false if next token is "FALSE" - * @throws HsqlException if the next token is neither "TRUE" or "FALSE" + * @throws HsqlException if the next token is neither "TRUE" nor "FALSE" */ boolean processTrueOrFalse() { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserDQL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserDQL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserDQL.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserDQL.java 2022-06-08 07:23:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ * Parser for DQL statements * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class ParserDQL extends ParserBase { @@ -1912,14 +1912,22 @@ } else if (token.tokenType == Tokens.FETCH) { read(); + boolean first = false; + if (token.tokenType == Tokens.FIRST || token.tokenType == Tokens.NEXT) { + first = true; + read(); } e2 = XreadSimpleValueSpecificationOrNull(); if (e2 == null) { + if (!first) { + throw super.unexpectedTokenRequire(Tokens.T_FIRST); + } + e2 = new ExpressionValue(ValuePool.INTEGER_1, Type.SQL_INTEGER); } @@ -2160,7 +2168,7 @@ } /** - * Creates a RangeVariable from the parse context.

    + * Creates a RangeVariable from the parse context. */ protected RangeVariable readTableOrSubquery() { @@ -2622,7 +2630,7 @@ case Tokens.COLON : read(); - if (token.tokenType == Tokens.X_VALUE) { + if (isIntegral()) { int pos = readInteger(); ExpressionColumn p = new ExpressionColumn(OpTypes.DYNAMIC_PARAM, pos); @@ -2630,29 +2638,23 @@ compileContext.addParameter(p, getPosition()); return p; - } else if (token.tokenType == Tokens.X_DELIMITED_IDENTIFIER - || token.tokenType == Tokens.X_IDENTIFIER) { - if (token.namePrefix == null) { - int pos = compileContext.parameters.size(); - ExpressionColumn p = - new ExpressionColumn(OpTypes.DYNAMIC_PARAM, pos); - - compileContext.addParameter(p, getPosition()); - - Token newToken = new Token(); - - newToken.tokenType = Tokens.X_VALUE; - newToken.dataType = Type.SQL_INTEGER; - newToken.tokenString = - String.valueOf(p.parameterIndex); + } else if (isUndelimitedSimpleName()) { + int pos = compileContext.parameters.size(); + ExpressionColumn p = + new ExpressionColumn(OpTypes.DYNAMIC_PARAM, pos); - replaceToken(newToken, null); - read(); + compileContext.addParameter(p, getPosition()); - return p; - } else { - throw unexpectedToken(Tokens.T_COLON); - } + Token newToken = new Token(); + + newToken.tokenType = Tokens.X_VALUE; + newToken.dataType = Type.SQL_INTEGER; + newToken.tokenString = String.valueOf(p.parameterIndex); + + replaceToken(newToken, null); + read(); + + return p; } else { throw unexpectedToken(Tokens.T_COLON); } @@ -3236,6 +3238,26 @@ return new ExpressionColumn(groupingElements); } + case Tokens.JSON_ARRAY : { + read(); + + return readJSONArray(); + } + case Tokens.JSON_ARRAYAGG : { + read(); + + return readJSONArrayAgg(); + } + case Tokens.JSON_OBJECT : { + read(); + + return readJSONObject(); + } + case Tokens.JSON_OBJECTAGG : { + read(); + + return readJSONObjectAgg(); + } default : if (isCoreReservedKey()) { throw unexpectedToken(); @@ -3251,6 +3273,313 @@ return e; } + Expression readJSONArray() { + + HsqlArrayList list = new HsqlArrayList(); + Expression qe = null; + boolean nullOnNull = true; + Type dataType = Type.SQL_VARCHAR_LONG; + + readThis(Tokens.OPENBRACKET); + + int position = getPosition(); + + loop: + while (true) { + Expression value; + + switch (token.tokenType) { + + case Tokens.ABSENT : + case Tokens.NULL : + case Tokens.CLOSEBRACKET : + break loop; + + case Tokens.COMMA : + if (list.size() == 0) { + throw unexpectedToken(); + } + + read(); + } + + try { + value = XreadValueExpression(); + + list.add(value); + } catch (HsqlException e) { + if (list.size() > 0) { + throw e; + } + + rewind(position); + + break loop; + } + } + + if (list.size() == 0) { + if (token.tokenType != Tokens.CLOSEBRACKET) { + TableDerived td = + XreadSubqueryTableBody(OpTypes.TABLE_SUBQUERY); + + qe = new Expression(OpTypes.ARRAY_SUBQUERY, td); + } + } + + nullOnNull = readJSONNullClause(nullOnNull); + + if (readIfThis(Tokens.RETURNING)) { + dataType = readJSONReturningClause(); + } + + readThis(Tokens.CLOSEBRACKET); + + if (qe == null) { + return new ExpressionJSON.ExpressionJSONArrayFromValues(list, + nullOnNull, dataType); + } else { + return new ExpressionJSON.ExpressionJSONArrayFromQuery(qe, + nullOnNull, dataType); + } + } + + Expression readJSONArrayAgg() { + + boolean nullOnNull = false; + Type dataType = Type.SQL_VARCHAR_LONG; + Expression valueExpr; + ExpressionArrayAggregate arrayAgg; + SortAndSlice sort = null; + + readThis(Tokens.OPENBRACKET); + + valueExpr = XreadValueExpression(); + + if (token.tokenType == Tokens.ORDER) { + read(); + readThis(Tokens.BY); + + sort = XreadOrderBy(); + } + + arrayAgg = new ExpressionArrayAggregate(OpTypes.ARRAY_AGG, false, + valueExpr, sort, null); + nullOnNull = readJSONNullClause(nullOnNull); + + if (readIfThis(Tokens.RETURNING)) { + dataType = readJSONReturningClause(); + } + + readThis(Tokens.CLOSEBRACKET); + + return new ExpressionJSON.ExpressionJSONArrayAgg(arrayAgg, nullOnNull, + dataType); + } + + Expression readJSONObject() { + + OrderedHashMap map = new OrderedHashMap(); + boolean nullOnNull = true; + boolean uniqueKeys = false; + Type dataType = Type.SQL_VARCHAR_LONG; + boolean hasDuplicate = false; + + readThis(Tokens.OPENBRACKET); + + loop: + while (true) { + Expression nameExpr; + Expression valueExpr; + boolean isKey = false; + + switch (token.tokenType) { + + case Tokens.ABSENT : + case Tokens.NULL : + case Tokens.WITH : + case Tokens.WITHOUT : + case Tokens.CLOSEBRACKET : + break loop; + + case Tokens.COMMA : + if (map.size() == 0) { + throw unexpectedToken(); + } + + read(); + } + + if (readIfThis(Tokens.KEY)) { + isKey = true; + } + + int position = getPosition(); + + nameExpr = XreadCharacterValueExpression(); + + if (nameExpr.opType == OpTypes.JSON_FUNCTION) { + rewind(position); + + throw unexpectedToken(); + } + + if (!readIfThis(Tokens.VALUE)) { + if (isKey) { + throw unexpectedToken(); + } + + readThis(Tokens.COLON); + } + + valueExpr = XreadValueExpression(); + + if (readIfThis(Tokens.FORMAT)) { + readThis(Tokens.JSON); + + valueExpr = + new ExpressionJSON.ExpressionJSONWrapper(valueExpr); + } + + Object e = map.put(nameExpr, valueExpr); + + if (e != null) { + hasDuplicate = true; + } + } + + nullOnNull = readJSONNullClause(nullOnNull); + uniqueKeys = readJSONUniqueClause(uniqueKeys); + + if (uniqueKeys && hasDuplicate) { + throw Error.error(ErrorCode.X_23505); + } + + if (readIfThis(Tokens.RETURNING)) { + dataType = readJSONReturningClause(); + } + + readThis(Tokens.CLOSEBRACKET); + + return new ExpressionJSON.ExpressionJSONObject(map, nullOnNull, + uniqueKeys, dataType); + } + + Expression readJSONObjectAgg() { + + boolean nullOnNull = true; + boolean uniqueKeys = false; + Type dataType = Type.SQL_VARCHAR_LONG; + Expression nameExpr; + Expression valueExpr; + ExpressionArrayAggregate arrayAggName; + ExpressionArrayAggregate arrayAggValue; + + readThis(Tokens.OPENBRACKET); + + int position = getPosition(); + + nameExpr = XreadCharacterValueExpression(); + + if (nameExpr.opType == OpTypes.JSON_FUNCTION) { + rewind(position); + + throw unexpectedToken(); + } + + readThis(Tokens.COLON); + + valueExpr = XreadValueExpression(); + arrayAggName = new ExpressionArrayAggregate(OpTypes.ARRAY_AGG, false, + nameExpr, null, null); + arrayAggValue = new ExpressionArrayAggregate(OpTypes.ARRAY_AGG, false, + valueExpr, null, null); + nullOnNull = readJSONNullClause(nullOnNull); + uniqueKeys = readJSONUniqueClause(uniqueKeys); + + if (readIfThis(Tokens.RETURNING)) { + dataType = readJSONReturningClause(); + } + + readThis(Tokens.CLOSEBRACKET); + + return new ExpressionJSON.ExpressionJSONObjectAgg(arrayAggName, + arrayAggValue, nullOnNull, uniqueKeys, dataType); + } + + boolean readJSONNullClause(boolean defaultValue) { + + boolean nullOnNull = defaultValue; + + switch (token.tokenType) { + + case Tokens.ABSENT : { + read(); + readThis(Tokens.ON); + readThis(Tokens.NULL); + + nullOnNull = false; + + break; + } + case Tokens.NULL : { + read(); + readThis(Tokens.ON); + readThis(Tokens.NULL); + + nullOnNull = true; + + break; + } + } + + return nullOnNull; + } + + boolean readJSONUniqueClause(boolean defaultValue) { + + boolean uniqueKeys = defaultValue; + + switch (token.tokenType) { + + case Tokens.WITH : { + read(); + readThis(Tokens.UNIQUE); + readIfThis(Tokens.KEYS); + + uniqueKeys = true; + + break; + } + case Tokens.WITHOUT : { + read(); + readThis(Tokens.UNIQUE); + readIfThis(Tokens.KEYS); + + uniqueKeys = false; + + break; + } + } + + return uniqueKeys; + } + + Type readJSONReturningClause() { + + int position = getPosition(); + Type dataType = readTypeDefinition(false, true); + + if (dataType.typeCode == Types.SQL_VARCHAR + || dataType.typeCode == Types.SQL_CLOB) { + return dataType; + } + + rewind(position); + + throw super.unexpectedTokenRequire("VARCHAR or CLOB"); + } + Expression readNextvalFunction() { read(); @@ -3349,7 +3678,7 @@ if (token.tokenType == Tokens.LOCAL) { read(); } else if (token.tokenType == Tokens.TIME) { - readThis(Tokens.TIME); + read(); readThis(Tokens.ZONE); e1 = XreadValueExpressionPrimary(); @@ -3560,10 +3889,10 @@ } /** - * ::= - * - * | - * | + * value expression ::= + * common value expression + * | boolean value expression + * | row value expression * */ Expression XreadValueExpression() { @@ -4406,8 +4735,7 @@ return l; } case Tokens.LIKE : { - e = XreadLikePredicateRightPart(l); - e.noOptimisation = isCheckOrTriggerCondition; + e = XreadLikePredicateRightPart(l); break; } @@ -4417,8 +4745,7 @@ break; } case Tokens.IN : { - e = XreadInPredicateRightPart(l); - e.noOptimisation = isCheckOrTriggerCondition; + e = XreadInPredicateRightPart(l); break; } @@ -4683,13 +5010,9 @@ ExpressionLogical r; - if (isCheckOrTriggerCondition) { - r = new ExpressionLogical(OpTypes.IN, l, e); - } else { - r = new ExpressionLogical(OpTypes.EQUAL, l, e); + r = new ExpressionLogical(OpTypes.EQUAL, l, e); - r.setSubType(OpTypes.ANY_QUANTIFIED); - } + r.setSubType(OpTypes.ANY_QUANTIFIED); return r; } @@ -4761,7 +5084,7 @@ escape = XreadStringValueExpression(); } - return new ExpressionLike(a, b, escape, isCheckOrTriggerCondition); + return new ExpressionLike(a, b, escape); } private ExpressionLogical XreadMatchPredicateRightPart(Expression a) { @@ -7310,9 +7633,10 @@ queryExpression.setReturningResult(); - if (database.sqlLowerCaseIdentifier && !isRoutine ) { + if (database.sqlLowerCaseIdentifier && !isRoutine) { queryExpression.setLowerCaseResultIdentifer(); } + queryExpression.resolve(session, rangeGroups, null); StatementQuery cs = isRoutine @@ -7866,17 +8190,23 @@ HsqlName name = range.rangeTable.getName(); - if (name.schema != SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) { - set.add(name); + if (name.type == SchemaObject.TRANSITION) { set.addAll(range.getColumnNames()); - if (range.periodCondition != null) { - if (range.periodCondition.isSystemVersionCondition()) { - set.add(range.rangeTable.systemPeriod.getName()); - } + continue; + } + + if (name.schema == SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) { + continue; + } + + set.add(name); + set.addAll(range.getColumnNames()); + + if (range.periodCondition != null) { + if (range.periodCondition.isSystemVersionCondition()) { + set.add(range.rangeTable.systemPeriod.getName()); } - } else if (name.type == SchemaObject.TRANSITION) { - set.addAll(range.getColumnNames()); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserRoutine.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserRoutine.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserRoutine.java 2021-02-19 14:56:46.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserRoutine.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ * Parser for SQL stored procedures and functions - PSM * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class ParserRoutine extends ParserTable { @@ -2430,10 +2430,8 @@ int position = getPosition(); - isCheckOrTriggerCondition = true; - condition = XreadBooleanValueExpression(); - conditionSQL = getLastPart(position); - isCheckOrTriggerCondition = false; + condition = XreadBooleanValueExpression(); + conditionSQL = getLastPart(position); readThis(Tokens.CLOSEBRACKET); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserTable.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserTable.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ParserTable.java 2021-02-10 00:08:36.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ParserTable.java 2022-04-20 11:48:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ * Parser for SQL table definition * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class ParserTable extends ParserDML { @@ -1130,8 +1130,10 @@ colConstraint = new ExpressionLogical(OpTypes.IN, left, right); - colConstraint.noOptimisation = true; - c.check = colConstraint; + + colConstraint.setNoOptimisation(); + + c.check = colConstraint; } } } @@ -1830,12 +1832,9 @@ readThis(Tokens.OPENBRACKET); - isCheckOrTriggerCondition = true; - Expression condition = XreadBooleanValueExpression(); - isCheckOrTriggerCondition = false; - + condition.setNoOptimisation(); readThis(Tokens.CLOSEBRACKET); c.check = condition; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/BlockObjectStore.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/BlockObjectStore.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/BlockObjectStore.java 2020-05-18 10:21:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/BlockObjectStore.java 2022-02-21 14:41:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2020, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/Cache.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/Cache.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/Cache.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/Cache.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,7 +52,7 @@ * to DataFileCache.

    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.8.0 */ public class Cache extends BaseHashMap { @@ -445,7 +445,7 @@ // sb.append("tx-ts "); - sb.append(dataFileCache.database.txManager.getGlobalChangeTimestamp()); + sb.append(dataFileCache.database.txManager.getSystemChangeNumber()); // dataFileCache.logDetailEvent(sb.toString()); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DataFileCache.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DataFileCache.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DataFileCache.java 2021-03-19 12:02:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DataFileCache.java 2022-03-26 16:18:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -893,7 +893,8 @@ if (j > 0) { logInfoEvent(dataFileName - + " getFromFile out of mem, pos: " + pos); + + " getFromFile out of mem, pos: " + + pos); HsqlException ex = Error.error(ErrorCode.OUT_OF_MEMORY, t); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DataFileCacheSession.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DataFileCacheSession.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DataFileCacheSession.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DataFileCacheSession.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ * A file-based row store for temporary CACHED table persistence.

    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.3.4 + * @version 2.7.0 * @since 1.9.0 */ public class DataFileCacheSession extends DataFileCache { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DataFileDefrag.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DataFileDefrag.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DataFileDefrag.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DataFileDefrag.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,6 @@ package org.hsqldb.persist; -import java.util.Arrays; - import org.hsqldb.Database; import org.hsqldb.Session; import org.hsqldb.Table; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DoubleIntArrayCachedObject.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DoubleIntArrayCachedObject.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/DoubleIntArrayCachedObject.java 2020-05-20 08:42:42.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/DoubleIntArrayCachedObject.java 2022-02-21 14:41:50.000000000 +0000 @@ -31,10 +31,10 @@ package org.hsqldb.persist; +import org.hsqldb.lib.DoubleIntIndex; import org.hsqldb.lib.LongLookup; import org.hsqldb.rowio.RowInputInterface; import org.hsqldb.rowio.RowOutputInterface; -import org.hsqldb.lib.DoubleIntIndex; /** * @author Fred Toussi (fredt@users dot sourceforge.net) diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/EventLogInterface.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/EventLogInterface.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/EventLogInterface.java 2019-04-27 17:24:56.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/EventLogInterface.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the HSQL Development Group nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -package org.hsqldb.persist; - -/** - * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.3.0 - * @since 1.9.0 - */ -public interface EventLogInterface { - - void logSevereEvent(String message, Throwable t); - - void logWarningEvent(String message, Throwable t); - - void logInfoEvent(String message); - - void logDetailEvent(String message); -} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java 2022-07-08 18:55:34.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,43 +36,47 @@ import org.hsqldb.Database; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; +import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.HashMap; import org.hsqldb.lib.HashSet; import org.hsqldb.lib.Iterator; -import org.hsqldb.lib.Set; import org.hsqldb.lib.StringUtil; +import org.hsqldb.types.Collation; /** * Manages a .properties file for a database. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.7.0 */ public class HsqlDatabaseProperties extends HsqlProperties { - private static final String hsqldb_method_class_names = + public static final String hsqldb_method_class_names = "hsqldb.method_class_names"; public static final String textdb_allow_full_path = "textdb.allow_full_path"; + public static final String hsqldb_reconfig_logging = + "hsqldb.reconfig_logging"; + public static String methodClassNames; private static HashSet accessibleJavaMethodNames; private static boolean allowFullPath; static { try { - String prop = System.getProperty(hsqldb_method_class_names); + methodClassNames = System.getProperty(hsqldb_method_class_names); - if (prop != null) { + if (methodClassNames != null) { accessibleJavaMethodNames = new HashSet(); - String[] names = StringUtil.split(prop, ";"); + String[] names = StringUtil.split(methodClassNames, ";"); for (int i = 0; i < names.length; i++) { accessibleJavaMethodNames.add(names[i]); } } - prop = System.getProperty(textdb_allow_full_path); + String prop = System.getProperty(textdb_allow_full_path); if (prop != null) { if (Boolean.valueOf(prop)) { @@ -128,37 +132,42 @@ } // accessibility - public static final int SYSTEM_PROPERTY = 0; - public static final int FILE_PROPERTY = 1; - public static final int SQL_PROPERTY = 2; + public static final int SYSTEM_PROP = 0; + public static final int FILES_PROP = 1; + public static final int DB_PROP = 2; + public static final int SQL_PROP = 3; + public static final int URL_PROP = 4; // db files modified - public static final int FILES_NOT_MODIFIED = 0; - public static final int FILES_MODIFIED = 1; - public static final int FILES_MODIFIED_NEW = 2; - public static final int FILES_MODIFIED_NEW_DATA = 3; - public static final int FILES_NEW = 4; - private static final String MODIFIED_NO = "no"; - private static final String MODIFIED_YES = "yes"; - private static final String MODIFIED_YES_NEW = "yes-new-files"; - private static final String MODIFIED_YES_NEW_DATA = "yes-new-files-data"; - private static final String MODIFIED_NO_NEW = "no-new-files"; + public static final int FILES_NOT_MODIFIED = 0; + public static final int FILES_MODIFIED = 1; + public static final int FILES_MODIFIED_NEW = 2; + public static final int FILES_MODIFIED_NEW_DATA = 3; + public static final int FILES_NEW = 4; + + // + private static final String MODIFIED_NO = "no"; + private static final String MODIFIED_YES = "yes"; + private static final String MODIFIED_YES_NEW = "yes-new-files"; + private static final String MODIFIED_YES_NEW_DATA = "yes-new-files-data"; + private static final String MODIFIED_NO_NEW = "no-new-files"; // allowed property metadata - private static final HashMap dbMeta = new HashMap(67); - private static final HashMap textMeta = new HashMap(17); + private static final HashMap dbMeta = new HashMap(128); + private static final HashMap textMeta = new HashMap(16); + private static final HashSet excludedMeta = new HashSet(); + private static final HashMap urlUserConnMeta = new HashMap(); // versions public static final String VERSION_STRING_1_8_0 = "1.8.0"; public static final String PRODUCT_NAME = "HSQL Database Engine"; //#ifdef JAVA8 - - public static final String THIS_VERSION = "2.6.1"; - public static final String THIS_FULL_VERSION = "2.6.1"; - public static final int MAJOR = 2, - MINOR = 6, - REVISION = 1; + public static final String THIS_VERSION = "2.7.0"; + public static final String THIS_FULL_VERSION = "2.7.0"; + public static final int MAJOR = 2, + MINOR = 7, + REVISION = 0; //#else /* @@ -191,9 +200,6 @@ public static final String tx_timestamp = "tx_timestamp"; // - public static final String hsqldb_cache_version = "hsqldb.cache_version"; - - // public static final String runtime_gc_interval = "runtime.gc_interval"; // @@ -226,6 +232,7 @@ public static final String hsqldb_tx_interrupt_rollback = "hsqldb.tx_interrupt_rollback"; public static final String hsqldb_applog = "hsqldb.applog"; + public static final String hsqldb_extlog = "hsqldb.extlog"; public static final String hsqldb_sqllog = "hsqldb.sqllog"; public static final String hsqldb_lob_file_scale = "hsqldb.lob_file_scale"; public static final String hsqldb_lob_file_compressed = @@ -269,31 +276,34 @@ public static final String sql_enforce_size = "sql.enforce_size"; public static final String sql_enforce_strict_size = "sql.enforce_strict_size"; // synonym for sql_enforce_size - public static final String sql_enforce_refs = "sql.enforce_refs"; - public static final String sql_enforce_names = "sql.enforce_names"; - public static final String sql_regular_names = "sql.regular_names"; - public static final String sql_enforce_types = "sql.enforce_types"; - public static final String sql_enforce_tdcd = "sql.enforce_tdc_delete"; - public static final String sql_enforce_tdcu = "sql.enforce_tdc_update"; - public static final String sql_char_literal = "sql.char_literal"; - public static final String sql_concat_nulls = "sql.concat_nulls"; - public static final String sql_nulls_first = "sql.nulls_first"; - public static final String sql_nulls_order = "sql.nulls_order"; - public static final String sql_unique_nulls = "sql.unique_nulls"; - public static final String sql_convert_trunc = "sql.convert_trunc"; - public static final String sql_avg_scale = "sql.avg_scale"; - public static final String sql_double_nan = "sql.double_nan"; - public static final String sql_syntax_db2 = "sql.syntax_db2"; - public static final String sql_syntax_mss = "sql.syntax_mss"; - public static final String sql_syntax_mys = "sql.syntax_mys"; - public static final String sql_syntax_ora = "sql.syntax_ora"; - public static final String sql_syntax_pgs = "sql.syntax_pgs"; - public static final String sql_longvar_is_lob = "sql.longvar_is_lob"; - public static final String sql_pad_space = "sql.pad_space"; - public static final String sql_ignore_case = "sql.ignore_case"; - public static final String sql_live_object = "sql.live_object"; - public static final String sql_sys_index_names = "sql.sys_index_names"; - public static final String sql_lowercase_ident = "sql.lowercase_ident"; + public static final String sql_enforce_refs = "sql.enforce_refs"; + public static final String sql_enforce_names = "sql.enforce_names"; + public static final String sql_regular_names = "sql.regular_names"; + public static final String sql_enforce_types = "sql.enforce_types"; + public static final String sql_enforce_tdcd = "sql.enforce_tdc_delete"; + public static final String sql_enforce_tdcu = "sql.enforce_tdc_update"; + public static final String sql_char_literal = "sql.char_literal"; + public static final String sql_concat_nulls = "sql.concat_nulls"; + public static final String sql_nulls_first = "sql.nulls_first"; + public static final String sql_nulls_order = "sql.nulls_order"; + public static final String sql_unique_nulls = "sql.unique_nulls"; + public static final String sql_convert_trunc = "sql.convert_trunc"; + public static final String sql_trunc_trailing = "sql.truncate_trailing"; + public static final String sql_avg_scale = "sql.avg_scale"; + public static final String sql_max_recursive = "sql.max_recursive"; + public static final String sql_double_nan = "sql.double_nan"; + public static final String sql_syntax_db2 = "sql.syntax_db2"; + public static final String sql_syntax_mss = "sql.syntax_mss"; + public static final String sql_syntax_mys = "sql.syntax_mys"; + public static final String sql_syntax_ora = "sql.syntax_ora"; + public static final String sql_syntax_pgs = "sql.syntax_pgs"; + public static final String sql_longvar_is_lob = "sql.longvar_is_lob"; + public static final String sql_default_collation = "sql.default_collation"; + public static final String sql_pad_space = "sql.pad_space"; + public static final String sql_ignore_case = "sql.ignore_case"; + public static final String sql_live_object = "sql.live_object"; + public static final String sql_sys_index_names = "sql.sys_index_names"; + public static final String sql_lowercase_ident = "sql.lowercase_ident"; // public static final String textdb_cache_scale = "textdb.cache_scale"; @@ -311,282 +321,225 @@ public static final String textdb_qc = "textdb.qc"; public static final String textdb_null_def = "textdb.null_def"; - // obsolete property from version 2.5.1 - public static final String hsqldb_min_reuse = "hsqldb.min_reuse"; + // obsolete properties from version 2.5.1 + public static final String hsqldb_min_reuse = "hsqldb.min_reuse"; + public static final String hsqldb_cache_version = "hsqldb.cache_version"; static { + // properties that are not displayed to user, including obsolete props + excludedMeta.add(hsqldb_min_reuse); + excludedMeta.add(hsqldb_cache_version); + excludedMeta.add(runtime_gc_interval); + excludedMeta.add(hsqldb_inc_backup); + excludedMeta.add(tx_timestamp); + excludedMeta.add(hsqldb_version); + excludedMeta.add(hsqldb_modified); + excludedMeta.add(hsqldb_full_log_replay); + excludedMeta.add(sql_compare_in_locale); + + // url properties which apply to a new connection to an open database + urlUserConnMeta.put(url_default_schema, + newMeta(url_default_schema, URL_PROP, false)); + urlUserConnMeta.put(url_check_props, + newMeta(url_check_props, URL_PROP, false)); + urlUserConnMeta.put(url_get_column_name, + newMeta(url_get_column_name, URL_PROP, true)); + urlUserConnMeta.put(url_close_result, + newMeta(url_close_result, URL_PROP, false)); + urlUserConnMeta.put(url_allow_empty_batch, + newMeta(url_allow_empty_batch, URL_PROP, false)); + urlUserConnMeta.put(url_memory_lobs, + newMeta(url_memory_lobs, URL_PROP, false)); + // text table defaults textMeta.put(textdb_allow_full_path, - HsqlProperties.getMeta(textdb_allow_full_path, - SYSTEM_PROPERTY, allowFullPath)); - textMeta.put(textdb_quoted, - HsqlProperties.getMeta(textdb_quoted, SQL_PROPERTY, - true)); + newMeta(textdb_allow_full_path, SYSTEM_PROP, true)); + textMeta.put(textdb_quoted, newMeta(textdb_quoted, SQL_PROP, true)); textMeta.put(textdb_all_quoted, - HsqlProperties.getMeta(textdb_all_quoted, SQL_PROPERTY, - false)); + newMeta(textdb_all_quoted, SQL_PROP, false)); textMeta.put(textdb_ignore_first, - HsqlProperties.getMeta(textdb_ignore_first, SQL_PROPERTY, - false)); + newMeta(textdb_ignore_first, SQL_PROP, false)); textMeta.put(textdb_null_def, - HsqlProperties.getMeta(textdb_null_def, SQL_PROPERTY, - false)); - textMeta.put(textdb_fs, - HsqlProperties.getMeta(textdb_fs, SQL_PROPERTY, ",")); - textMeta.put(textdb_vs, - HsqlProperties.getMeta(textdb_vs, SQL_PROPERTY, null)); - textMeta.put(textdb_lvs, - HsqlProperties.getMeta(textdb_lvs, SQL_PROPERTY, null)); - textMeta.put(textdb_qc, - HsqlProperties.getMeta(textdb_qc, SQL_PROPERTY, "\"")); + newMeta(textdb_null_def, SQL_PROP, false)); + textMeta.put(textdb_fs, newMeta(textdb_fs, SQL_PROP, ",")); + textMeta.put(textdb_vs, newMeta(textdb_vs, SQL_PROP, null)); + textMeta.put(textdb_lvs, newMeta(textdb_lvs, SQL_PROP, null)); + textMeta.put(textdb_qc, newMeta(textdb_qc, SQL_PROP, "\"")); textMeta.put(textdb_encoding, - HsqlProperties.getMeta(textdb_encoding, SQL_PROPERTY, - "ISO-8859-1")); + newMeta(textdb_encoding, SQL_PROP, "ISO-8859-1")); textMeta.put(textdb_cache_scale, - HsqlProperties.getMeta(textdb_cache_scale, SQL_PROPERTY, - 10, 8, 16)); + newMeta(textdb_cache_scale, DB_PROP, 10, 8, 16)); textMeta.put(textdb_cache_size_scale, - HsqlProperties.getMeta(textdb_cache_size_scale, - SQL_PROPERTY, 10, 6, 20)); + newMeta(textdb_cache_size_scale, DB_PROP, 10, 6, 20)); textMeta.put(textdb_cache_rows, - HsqlProperties.getMeta(textdb_cache_rows, SQL_PROPERTY, - 1000, 100, 1000000)); + newMeta(textdb_cache_rows, DB_PROP, 1000, 100, 1000000)); textMeta.put(textdb_cache_size, - HsqlProperties.getMeta(textdb_cache_size, SQL_PROPERTY, - 100, 10, 1000000)); + newMeta(textdb_cache_size, DB_PROP, 100, 10, 1000000)); dbMeta.putAll(textMeta); + // system props + dbMeta.put(hsqldb_method_class_names, + newMeta(hsqldb_method_class_names, SYSTEM_PROP, "")); + dbMeta.put(hsqldb_reconfig_logging, + newMeta(hsqldb_reconfig_logging, SYSTEM_PROP, false)); + // string defaults for protected props - dbMeta.put(hsqldb_version, - HsqlProperties.getMeta(hsqldb_version, FILE_PROPERTY, - null)); + dbMeta.put(hsqldb_version, newMeta(hsqldb_version, FILES_PROP, null)); dbMeta.put(hsqldb_modified, - HsqlProperties.getMeta(hsqldb_modified, FILE_PROPERTY, - null)); + newMeta(hsqldb_modified, FILES_PROP, null)); dbMeta.put(hsqldb_cache_version, - HsqlProperties.getMeta(hsqldb_cache_version, FILE_PROPERTY, - null)); + newMeta(hsqldb_cache_version, FILES_PROP, null)); // boolean defaults for protected props dbMeta.put(hsqldb_readonly, - HsqlProperties.getMeta(hsqldb_readonly, FILE_PROPERTY, - false)); + newMeta(hsqldb_readonly, FILES_PROP, false)); dbMeta.put(hsqldb_files_readonly, - HsqlProperties.getMeta(hsqldb_files_readonly, - FILE_PROPERTY, false)); + newMeta(hsqldb_files_readonly, FILES_PROP, false)); // string defaults for user defined props - dbMeta.put(hsqldb_tx, - HsqlProperties.getMeta(hsqldb_tx, SQL_PROPERTY, "LOCKS")); + dbMeta.put(hsqldb_tx, newMeta(hsqldb_tx, SQL_PROP, "LOCKS")); dbMeta.put(hsqldb_tx_level, - HsqlProperties.getMeta(hsqldb_tx_level, SQL_PROPERTY, - "READ_COMMITTED")); + newMeta(hsqldb_tx_level, SQL_PROP, "READ_COMMITTED")); dbMeta.put(hsqldb_temp_directory, - HsqlProperties.getMeta(hsqldb_temp_directory, SQL_PROPERTY, - null)); + newMeta(hsqldb_temp_directory, DB_PROP, null)); dbMeta.put(hsqldb_default_table_type, - HsqlProperties.getMeta(hsqldb_default_table_type, - SQL_PROPERTY, "MEMORY")); - dbMeta.put(hsqldb_digest, - HsqlProperties.getMeta(hsqldb_digest, SQL_PROPERTY, "MD5")); - dbMeta.put(sql_live_object, - HsqlProperties.getMeta(sql_live_object, SQL_PROPERTY, - false)); - dbMeta.put(tx_timestamp, - HsqlProperties.getMeta(tx_timestamp, SYSTEM_PROPERTY)); + newMeta(hsqldb_default_table_type, SQL_PROP, "MEMORY")); + dbMeta.put(hsqldb_digest, newMeta(hsqldb_digest, DB_PROP, "MD5")); + dbMeta.put(sql_live_object, newMeta(sql_live_object, DB_PROP, false)); + dbMeta.put(tx_timestamp, newMeta(tx_timestamp, DB_PROP, 0)); // boolean defaults for user defined props dbMeta.put(hsqldb_tx_conflict_rollback, - HsqlProperties.getMeta(hsqldb_tx_conflict_rollback, - SQL_PROPERTY, true)); + newMeta(hsqldb_tx_conflict_rollback, SQL_PROP, true)); dbMeta.put(hsqldb_tx_interrupt_rollback, - HsqlProperties.getMeta(hsqldb_tx_interrupt_rollback, - SQL_PROPERTY, false)); + newMeta(hsqldb_tx_interrupt_rollback, SQL_PROP, false)); dbMeta.put(jdbc_translate_tti_types, - HsqlProperties.getMeta(jdbc_translate_tti_types, - SQL_PROPERTY, true)); + newMeta(jdbc_translate_tti_types, SQL_PROP, true)); dbMeta.put(hsqldb_inc_backup, - HsqlProperties.getMeta(hsqldb_inc_backup, SQL_PROPERTY, - true)); - dbMeta.put(hsqldb_lock_file, - HsqlProperties.getMeta(hsqldb_lock_file, SQL_PROPERTY, - true)); - dbMeta.put(hsqldb_log_data, - HsqlProperties.getMeta(hsqldb_log_data, SQL_PROPERTY, - true)); + newMeta(hsqldb_inc_backup, DB_PROP, true)); + dbMeta.put(hsqldb_lock_file, newMeta(hsqldb_lock_file, DB_PROP, true)); + dbMeta.put(hsqldb_log_data, newMeta(hsqldb_log_data, DB_PROP, true)); dbMeta.put(hsqldb_nio_data_file, - HsqlProperties.getMeta(hsqldb_nio_data_file, SQL_PROPERTY, - true)); + newMeta(hsqldb_nio_data_file, DB_PROP, true)); dbMeta.put(hsqldb_full_log_replay, - HsqlProperties.getMeta(hsqldb_full_log_replay, - SQL_PROPERTY, false)); + newMeta(hsqldb_full_log_replay, DB_PROP, false)); dbMeta.put(hsqldb_write_delay, - HsqlProperties.getMeta(hsqldb_write_delay, SQL_PROPERTY, - true)); + newMeta(hsqldb_write_delay, DB_PROP, true)); dbMeta.put(hsqldb_large_data, - HsqlProperties.getMeta(hsqldb_large_data, SQL_PROPERTY, - false)); + newMeta(hsqldb_large_data, DB_PROP, false)); dbMeta.put(sql_ref_integrity, - HsqlProperties.getMeta(sql_ref_integrity, SQL_PROPERTY, - true)); + newMeta(sql_ref_integrity, SQL_PROP, true)); dbMeta.put(sql_restrict_exec, - HsqlProperties.getMeta(sql_restrict_exec, SQL_PROPERTY, - false)); + newMeta(sql_restrict_exec, SQL_PROP, false)); // SQL reserved words not allowed as some identifiers dbMeta.put(sql_enforce_names, - HsqlProperties.getMeta(sql_enforce_names, SQL_PROPERTY, - false)); + newMeta(sql_enforce_names, SQL_PROP, false)); dbMeta.put(sql_regular_names, - HsqlProperties.getMeta(sql_regular_names, SQL_PROPERTY, - true)); + newMeta(sql_regular_names, SQL_PROP, true)); dbMeta.put(sql_enforce_refs, - HsqlProperties.getMeta(sql_enforce_refs, SQL_PROPERTY, - false)); + newMeta(sql_enforce_refs, SQL_PROP, false)); // char padding to size and exception if data is too long dbMeta.put(sql_enforce_size, - HsqlProperties.getMeta(sql_enforce_size, SQL_PROPERTY, - true)); + newMeta(sql_enforce_size, SQL_PROP, true)); dbMeta.put(sql_enforce_types, - HsqlProperties.getMeta(sql_enforce_types, SQL_PROPERTY, - false)); + newMeta(sql_enforce_types, SQL_PROP, false)); dbMeta.put(sql_enforce_tdcd, - HsqlProperties.getMeta(sql_enforce_tdcd, SQL_PROPERTY, - true)); + newMeta(sql_enforce_tdcd, SQL_PROP, true)); dbMeta.put(sql_enforce_tdcu, - HsqlProperties.getMeta(sql_enforce_tdcu, SQL_PROPERTY, - true)); + newMeta(sql_enforce_tdcu, SQL_PROP, true)); dbMeta.put(sql_char_literal, - HsqlProperties.getMeta(sql_char_literal, SQL_PROPERTY, - true)); + newMeta(sql_char_literal, SQL_PROP, true)); dbMeta.put(sql_concat_nulls, - HsqlProperties.getMeta(sql_concat_nulls, SQL_PROPERTY, - true)); - dbMeta.put(sql_nulls_first, - HsqlProperties.getMeta(sql_nulls_first, SQL_PROPERTY, - true)); - dbMeta.put(sql_nulls_order, - HsqlProperties.getMeta(sql_nulls_order, SQL_PROPERTY, - true)); + newMeta(sql_concat_nulls, SQL_PROP, true)); + dbMeta.put(sql_nulls_first, newMeta(sql_nulls_first, SQL_PROP, true)); + dbMeta.put(sql_nulls_order, newMeta(sql_nulls_order, SQL_PROP, true)); dbMeta.put(sql_unique_nulls, - HsqlProperties.getMeta(sql_unique_nulls, SQL_PROPERTY, - true)); + newMeta(sql_unique_nulls, SQL_PROP, true)); dbMeta.put(sql_convert_trunc, - HsqlProperties.getMeta(sql_convert_trunc, SQL_PROPERTY, - true)); - dbMeta.put(sql_avg_scale, - HsqlProperties.getMeta(sql_avg_scale, SQL_PROPERTY, 0, 0, - 10)); - dbMeta.put(sql_double_nan, - HsqlProperties.getMeta(sql_double_nan, SQL_PROPERTY, true)); - dbMeta.put(sql_syntax_db2, - HsqlProperties.getMeta(sql_syntax_db2, SQL_PROPERTY, - false)); - dbMeta.put(sql_syntax_mss, - HsqlProperties.getMeta(sql_syntax_mss, SQL_PROPERTY, - false)); - dbMeta.put(sql_syntax_mys, - HsqlProperties.getMeta(sql_syntax_mys, SQL_PROPERTY, - false)); - dbMeta.put(sql_syntax_ora, - HsqlProperties.getMeta(sql_syntax_ora, SQL_PROPERTY, - false)); - dbMeta.put(sql_syntax_pgs, - HsqlProperties.getMeta(sql_syntax_pgs, SQL_PROPERTY, - false)); + newMeta(sql_convert_trunc, SQL_PROP, true)); + dbMeta.put(sql_trunc_trailing, + newMeta(sql_trunc_trailing, SQL_PROP, true)); + dbMeta.put(sql_avg_scale, newMeta(sql_avg_scale, SQL_PROP, 0, 0, 10)); + dbMeta.put(sql_max_recursive, + newMeta(sql_max_recursive, SQL_PROP, 256, 16, + 1024 * 1024 * 1024)); + dbMeta.put(sql_double_nan, newMeta(sql_double_nan, SQL_PROP, true)); + dbMeta.put(sql_syntax_db2, newMeta(sql_syntax_db2, SQL_PROP, false)); + dbMeta.put(sql_syntax_mss, newMeta(sql_syntax_mss, SQL_PROP, false)); + dbMeta.put(sql_syntax_mys, newMeta(sql_syntax_mys, SQL_PROP, false)); + dbMeta.put(sql_syntax_ora, newMeta(sql_syntax_ora, SQL_PROP, false)); + dbMeta.put(sql_syntax_pgs, newMeta(sql_syntax_pgs, SQL_PROP, false)); dbMeta.put(sql_compare_in_locale, - HsqlProperties.getMeta(sql_compare_in_locale, SQL_PROPERTY, - false)); + newMeta(sql_compare_in_locale, SQL_PROP, false)); dbMeta.put(sql_longvar_is_lob, - HsqlProperties.getMeta(sql_longvar_is_lob, SQL_PROPERTY, - false)); - dbMeta.put(sql_pad_space, - HsqlProperties.getMeta(sql_pad_space, SQL_PROPERTY, true)); - dbMeta.put(sql_ignore_case, - HsqlProperties.getMeta(sql_ignore_case, SQL_PROPERTY, - false)); + newMeta(sql_longvar_is_lob, SQL_PROP, false)); + dbMeta.put(sql_default_collation, + newMeta(sql_default_collation, SQL_PROP, + Collation.defaultCollationName)); + dbMeta.put(sql_pad_space, newMeta(sql_pad_space, SQL_PROP, true)); + dbMeta.put(sql_ignore_case, newMeta(sql_ignore_case, SQL_PROP, false)); dbMeta.put(sql_sys_index_names, - HsqlProperties.getMeta(sql_sys_index_names, SQL_PROPERTY, - false)); + newMeta(sql_sys_index_names, SQL_PROP, true)); dbMeta.put(sql_lowercase_ident, - HsqlProperties.getMeta(sql_lowercase_ident, SQL_PROPERTY, - false)); + newMeta(sql_lowercase_ident, SQL_PROP, false)); dbMeta.put(hsqldb_files_space, - HsqlProperties.getMeta(hsqldb_files_space, SQL_PROPERTY, 0, - new int[] { - 0, 1, 2, 4, 8, 16, 32, 64 - })); + newMeta(hsqldb_files_space, DB_PROP, false)); // integral defaults for user-defined props - sets dbMeta.put(hsqldb_write_delay_millis, - HsqlProperties.getMeta(hsqldb_write_delay_millis, - SQL_PROPERTY, 500, 0, 10000)); - dbMeta.put(hsqldb_applog, - HsqlProperties.getMeta(hsqldb_applog, SQL_PROPERTY, 0, 0, - 3)); - dbMeta.put(hsqldb_sqllog, - HsqlProperties.getMeta(hsqldb_sqllog, SQL_PROPERTY, 0, 0, - 4)); + newMeta(hsqldb_write_delay_millis, DB_PROP, 500, 0, 10000)); + dbMeta.put(hsqldb_applog, newMeta(hsqldb_applog, DB_PROP, 0, 0, 4)); + dbMeta.put(hsqldb_extlog, newMeta(hsqldb_extlog, DB_PROP, 0, 0, 4)); + dbMeta.put(hsqldb_sqllog, newMeta(hsqldb_sqllog, DB_PROP, 0, 0, 4)); dbMeta.put(hsqldb_script_format, - HsqlProperties.getMeta(hsqldb_script_format, SQL_PROPERTY, - 0, new int[] { + newMeta(hsqldb_script_format, DB_PROP, 0, new int[] { 0, 1, 3 })); dbMeta.put(hsqldb_lob_file_scale, - HsqlProperties.getMeta(hsqldb_lob_file_scale, SQL_PROPERTY, - 32, new int[] { + newMeta(hsqldb_lob_file_scale, DB_PROP, 32, new int[] { 1, 2, 4, 8, 16, 32 })); dbMeta.put(hsqldb_lob_file_compressed, - HsqlProperties.getMeta(hsqldb_lob_file_compressed, - SQL_PROPERTY, false)); + newMeta(hsqldb_lob_file_compressed, DB_PROP, false)); // this property is normally 8 - or 1 for old databases from early versions dbMeta.put(hsqldb_cache_file_scale, - HsqlProperties.getMeta(hsqldb_cache_file_scale, - SQL_PROPERTY, 32, new int[] { + newMeta(hsqldb_cache_file_scale, DB_PROP, 32, new int[] { 1, 8, 16, 32, 64, 128, 256, 512, 1024 })); // integral defaults for user defined props - ranges dbMeta.put(hsqldb_log_size, - HsqlProperties.getMeta(hsqldb_log_size, SQL_PROPERTY, 50, - 0, 4 * 1024)); + newMeta(hsqldb_log_size, DB_PROP, 50, 0, 4 * 1024)); dbMeta.put(hsqldb_defrag_limit, - HsqlProperties.getMeta(hsqldb_defrag_limit, SQL_PROPERTY, - 0, 0, 100)); + newMeta(hsqldb_defrag_limit, DB_PROP, 0, 0, 100)); dbMeta.put(runtime_gc_interval, - HsqlProperties.getMeta(runtime_gc_interval, SQL_PROPERTY, - 0, 0, 1000000)); + newMeta(runtime_gc_interval, DB_PROP, 0, 0, 1000000)); dbMeta.put(hsqldb_cache_size, - HsqlProperties.getMeta(hsqldb_cache_size, SQL_PROPERTY, - 10000, 100, 4 * 1024 * 1024)); + newMeta(hsqldb_cache_size, DB_PROP, 10000, 100, + 4 * 1024 * 1024)); dbMeta.put(hsqldb_cache_rows, - HsqlProperties.getMeta(hsqldb_cache_rows, SQL_PROPERTY, - 50000, 100, 4 * 1024 * 1024)); + newMeta(hsqldb_cache_rows, DB_PROP, 50000, 100, + 4 * 1024 * 1024)); dbMeta.put(hsqldb_cache_free_count, - HsqlProperties.getMeta(hsqldb_cache_free_count, - SQL_PROPERTY, 512, 0, 4096)); + newMeta(hsqldb_cache_free_count, DB_PROP, 512, 0, 4096)); dbMeta.put(hsqldb_result_max_memory_rows, - HsqlProperties.getMeta(hsqldb_result_max_memory_rows, - SQL_PROPERTY, 0, 0, - 4 * 1024 * 1024)); + newMeta(hsqldb_result_max_memory_rows, DB_PROP, 0, 0, + 4 * 1024 * 1024)); dbMeta.put(hsqldb_nio_max_size, - HsqlProperties.getMeta(hsqldb_nio_max_size, SQL_PROPERTY, - 256, 64, 262144)); + newMeta(hsqldb_nio_max_size, DB_PROP, 256, 64, 262144)); dbMeta.put(hsqldb_min_reuse, - HsqlProperties.getMeta(hsqldb_min_reuse, SQL_PROPERTY, 0, - 0, 1024 * 1024)); + newMeta(hsqldb_min_reuse, DB_PROP, 0, 0, 1024 * 1024)); } private Database database; public HsqlDatabaseProperties(Database db) { - super(dbMeta, db.getPath(), db.logger.getFileAccess(), - db.isFilesInJar()); + super(db.getPath(), db.logger.getFileAccess(), db.isFilesInJar()); database = db; @@ -660,8 +613,8 @@ } try { - HsqlProperties props = new HsqlProperties(dbMeta, - database.getPath(), database.logger.getFileAccess(), false); + HsqlProperties props = new HsqlProperties(database.getPath(), + database.logger.getFileAccess(), false); if (getIntegerProperty(hsqldb_script_format) == 3) { props.setProperty(hsqldb_script_format, 3); @@ -674,7 +627,7 @@ props.setProperty(hsqldb_modified, getProperty(hsqldb_modified)); props.save(fileName + ".properties" + ".new"); fa.renameElementOrCopy(fileName + ".properties" + ".new", - fileName + ".properties"); + fileName + ".properties", database.logger); } catch (Throwable t) { database.logger.logSevereEvent("save failed", t); @@ -727,20 +680,19 @@ strict = p.isPropertyTrue(url_check_props, false); for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) { - String propertyName = (String) e.nextElement(); - String propertyValue = p.getProperty(propertyName); - boolean valid = false; - boolean validVal = false; - String error = null; - Object[] meta = (Object[]) dbMeta.get(propertyName); - - if (meta != null - && ((Integer) meta[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY) { - valid = true; - error = HsqlProperties.validateProperty(propertyName, - propertyValue, meta); - validVal = error == null; + String propertyName = (String) e.nextElement(); + String propertyValue = p.getProperty(propertyName); + boolean valid = false; + boolean validVal = false; + String error = null; + PropertyMeta meta = dbMeta.get(propertyName); + + if (meta != null) { + if (meta.propType == DB_PROP || meta.propType == SQL_PROP) { + valid = true; + error = validateProperty(propertyName, propertyValue, meta); + validVal = error == null; + } } if (propertyName.startsWith("sql.") @@ -757,74 +709,69 @@ } for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) { - String propertyName = (String) e.nextElement(); - Object[] meta = (Object[]) dbMeta.get(propertyName); + String propertyName = (String) e.nextElement(); + PropertyMeta meta = dbMeta.get(propertyName); - if (meta != null - && ((Integer) meta[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY) { - setDatabaseProperty(propertyName, p.getProperty(propertyName)); + if (meta != null) { + if (meta.propType == DB_PROP || meta.propType == SQL_PROP) { + setDatabaseProperty(propertyName, p.getProperty(propertyName)); + } } } } - public Set getUserDefinedPropertyData() { + public static Iterator getUserDefinedProperties() { - Set set = new HashSet(); - Iterator it = dbMeta.values().iterator(); + return new Iterator() { - while (it.hasNext()) { - Object[] row = (Object[]) it.next(); + Iterator it = dbMeta.values().iterator(); + PropertyMeta current; + boolean b = filterToNext(); - if (((Integer) row[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY) { - set.add(row); + public boolean hasNext() { + return current != null; } - } - return set; - } + public Object next() { - public boolean isUserDefinedProperty(String key) { + PropertyMeta value = current; - Object[] row = (Object[]) dbMeta.get(key); + filterToNext(); - return row != null - && ((Integer) row[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY; - } + return value; + } - public boolean isBoolean(String key) { + public int nextInt() { + return 0; + } - Object[] row = (Object[]) dbMeta.get(key); + public long nextLong() { + return 0L; + } - return row != null && row[HsqlProperties.indexClass].equals("Boolean") - && ((Integer) row[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY; - } + public void remove() {} - public boolean isIntegral(String key) { + private boolean filterToNext() { - Object[] row = (Object[]) dbMeta.get(key); + while (it.hasNext()) { + current = it.next(); - return row != null && row[HsqlProperties.indexClass].equals("Integer") - && ((Integer) row[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY; - } - - public boolean isString(String key) { + if (!excludedMeta.contains(current.propName)) { + return true; + } + } - Object[] row = (Object[]) dbMeta.get(key); + current = null; - return row != null && row[HsqlProperties.indexClass].equals("String") - && ((Integer) row[HsqlProperties.indexType]).intValue() - == SQL_PROPERTY; + return false; + } + }; } public boolean setDatabaseProperty(String key, String value) { - Object[] meta = (Object[]) dbMeta.get(key); - String error = HsqlProperties.validateProperty(key, value, meta); + PropertyMeta meta = dbMeta.get(key); + String error = validateProperty(key, value, meta); if (error != null) { return false; @@ -890,63 +837,28 @@ //----------------------- public String getProperty(String key) { - Object[] metaData = (Object[]) dbMeta.get(key); + PropertyMeta meta = dbMeta.get(key); - if (metaData == null) { + if (meta == null) { throw Error.error(ErrorCode.X_42555, key); } return stringProps.getProperty(key); } - /** for all types of property apart from system props */ - public String getPropertyString(String key) { - - Object[] metaData = (Object[]) dbMeta.get(key); - - if (metaData == null) { - throw Error.error(ErrorCode.X_42555, key); - } - - String prop = stringProps.getProperty(key); - boolean isSystem = - ((Integer) metaData[HsqlProperties.indexType]).intValue() - == SYSTEM_PROPERTY; - - if (prop == null && isSystem) { - try { - prop = System.getProperty(key); - } catch (SecurityException e) {} - } - - if (prop == null) { - Object value = metaData[HsqlProperties.indexDefaultValue]; - - if (value == null) { - return null; - } - - return String.valueOf(value); - } - - return prop; - } - public boolean isPropertyTrue(String key) { - Boolean value; - Object[] metaData = (Object[]) dbMeta.get(key); + Boolean value; + PropertyMeta meta = dbMeta.get(key); - if (metaData == null) { + if (meta == null) { throw Error.error(ErrorCode.X_42555, key); } - value = (Boolean) metaData[HsqlProperties.indexDefaultValue]; + value = (Boolean) meta.propDefaultValue; - String prop = null; - boolean isSystem = - ((Integer) metaData[HsqlProperties.indexType]).intValue() - == SYSTEM_PROPERTY; + String prop = null; + boolean isSystem = meta.propType == SYSTEM_PROP; if (isSystem) { try { @@ -963,27 +875,27 @@ return value.booleanValue(); } - public String getStringPropertyDefault(String key) { + public static String getStringPropertyDefault(String key) { - Object[] metaData = (Object[]) dbMeta.get(key); + PropertyMeta meta = dbMeta.get(key); - if (metaData == null) { + if (meta == null) { throw Error.error(ErrorCode.X_42555, key); } - return (String) metaData[HsqlProperties.indexDefaultValue]; + return (String) meta.propDefaultValue; } public String getStringProperty(String key) { - String value; - Object[] metaData = (Object[]) dbMeta.get(key); + String value; + PropertyMeta meta = dbMeta.get(key); - if (metaData == null) { + if (meta == null) { throw Error.error(ErrorCode.X_42555, key); } - value = (String) metaData[HsqlProperties.indexDefaultValue]; + value = (String) meta.propDefaultValue; String prop = stringProps.getProperty(key); @@ -996,15 +908,14 @@ public int getIntegerProperty(String key) { - int value; - Object[] metaData = (Object[]) dbMeta.get(key); + int value; + PropertyMeta meta = dbMeta.get(key); - if (metaData == null) { + if (meta == null) { throw Error.error(ErrorCode.X_42555, key); } - value = - ((Integer) metaData[HsqlProperties.indexDefaultValue]).intValue(); + value = ((Integer) meta.propDefaultValue).intValue(); String prop = stringProps.getProperty(key); @@ -1017,8 +928,90 @@ return value; } - public static Iterator getPropertiesMetaIterator() { - return dbMeta.values().iterator(); + public static PropertyMeta getMeta(String key) { + return dbMeta.get(key); + } + + public static int getIntegerPropertyDefault(String key) { + + int value; + PropertyMeta meta = dbMeta.get(key); + + if (meta == null) { + throw Error.error(ErrorCode.X_42555, key); + } + + value = ((Integer) meta.propDefaultValue).intValue(); + + return value; + } + + public static int getPropertyWithinRange(String name, int number) { + + PropertyMeta meta = dbMeta.get(name); + + if (meta == null) { + return number; + } + + if (meta.propClass.equals("Integer")) { + if (meta.propIsRange) { + int low = meta.propRangeLow; + int high = meta.propRangeHigh; + + if (number < low) { + return low; + } else if (high < number) { + return high; + } + } + + if (meta.propValues != null) { + int[] values = meta.propValues; + + if (ArrayUtil.find(values, number) == -1) { + return values[0]; + } + } + } + + return number; + } + + public static boolean validateProperty(String name, int number) { + + PropertyMeta meta = dbMeta.get(name); + + if (meta == null) { + return false; + } + + if (meta.propClass.equals("Integer")) { + if (meta.propIsRange) { + int low = meta.propRangeLow; + int high = meta.propRangeHigh; + + if (number < low || high < number) { + return false; + } + } + + if (meta.propValues != null) { + int[] values = meta.propValues; + + if (ArrayUtil.find(values, number) == -1) { + return false; + } + } + + return true; + } + + return false; + } + + public static Iterator getUrlUserConnectionProperties() { + return urlUserConnMeta.values().iterator(); } public String getClientPropertiesAsString() { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/HsqlProperties.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/HsqlProperties.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/HsqlProperties.java 2021-01-03 20:54:56.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/HsqlProperties.java 2022-03-31 20:44:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,7 +44,6 @@ import org.hsqldb.lib.ArrayUtil; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileUtil; -import org.hsqldb.lib.HashMap; import org.hsqldb.map.ValuePool; /** @@ -52,7 +51,7 @@ * allow saving and loading.

    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.7.0 */ public class HsqlProperties { @@ -66,7 +65,6 @@ protected int[] errorCodes = ValuePool.emptyIntArray; protected String[] errorKeys = ValuePool.emptyStringArray; protected FileAccess fa; - protected HashMap metaData; public HsqlProperties() { stringProps = new Properties(); @@ -85,14 +83,12 @@ fa = FileUtil.getFileUtil(); } - public HsqlProperties(HashMap meta, String fileName, FileAccess accessor, - boolean b) { + public HsqlProperties(String fileName, FileAccess accessor, boolean b) { stringProps = new Properties(); this.fileName = fileName; this.fileExtension = ".properties"; fa = accessor; - metaData = meta; } public HsqlProperties(Properties props) { @@ -263,7 +259,7 @@ fa.createParentDirs(fileString); fa.removeElement(fileString); - OutputStream fos = fa.openOutputStreamElement(fileString); + OutputStream fos = fa.openOutputStreamElement(fileString); FileAccess.FileSync outDescriptor = fa.getFileSync(fos); String name = HsqlDatabaseProperties.PRODUCT_NAME + " " + HsqlDatabaseProperties.THIS_FULL_VERSION; @@ -405,93 +401,84 @@ public void validate() {} - // column number mappings - public static final int indexName = 0; - public static final int indexType = 1; - public static final int indexClass = 2; - public static final int indexIsRange = 3; - public static final int indexDefaultValue = 4; - public static final int indexRangeLow = 5; - public static final int indexRangeHigh = 6; - public static final int indexValues = 7; - public static final int indexLimit = 9; + public static PropertyMeta newMeta(String name, int type, + long defaultVal) { - public static Object[] getMeta(String name, int type) { + PropertyMeta meta = new PropertyMeta(); - Object[] row = new Object[indexLimit]; + meta.propName = name; + meta.propType = type; + meta.propClass = "Long"; + meta.propDefaultValue = Long.valueOf(defaultVal); - row[indexName] = name; - row[indexType] = ValuePool.getInt(type); - row[indexClass] = "Long"; - row[indexDefaultValue] = Long.valueOf(0); - - return row; + return meta; } - public static Object[] getMeta(String name, int type, - String defaultValue) { + public static PropertyMeta newMeta(String name, int type, + String defaultValue) { - Object[] row = new Object[indexLimit]; + PropertyMeta meta = new PropertyMeta(); - row[indexName] = name; - row[indexType] = ValuePool.getInt(type); - row[indexClass] = "String"; - row[indexDefaultValue] = defaultValue; + meta.propName = name; + meta.propType = type; + meta.propClass = "String"; + meta.propDefaultValue = defaultValue; - return row; + return meta; } - public static Object[] getMeta(String name, int type, - boolean defaultValue) { + public static PropertyMeta newMeta(String name, int type, + boolean defaultValue) { - Object[] row = new Object[indexLimit]; + PropertyMeta meta = new PropertyMeta(); - row[indexName] = name; - row[indexType] = ValuePool.getInt(type); - row[indexClass] = "Boolean"; - row[indexDefaultValue] = defaultValue ? Boolean.TRUE - : Boolean.FALSE; + meta.propName = name; + meta.propType = type; + meta.propClass = "Boolean"; + meta.propDefaultValue = defaultValue ? Boolean.TRUE + : Boolean.FALSE; - return row; + return meta; } - public static Object[] getMeta(String name, int type, int defaultValue, - int[] values) { + public static PropertyMeta newMeta(String name, int type, + int defaultValue, int[] values) { - Object[] row = new Object[indexLimit]; + PropertyMeta meta = new PropertyMeta(); - row[indexName] = name; - row[indexType] = ValuePool.getInt(type); - row[indexClass] = "Integer"; - row[indexDefaultValue] = ValuePool.getInt(defaultValue); - row[indexValues] = values; + meta.propName = name; + meta.propType = type; + meta.propClass = "Integer"; + meta.propDefaultValue = ValuePool.getInt(defaultValue); + meta.propValues = values; - return row; + return meta; } - public static Object[] getMeta(String name, int type, int defaultValue, - int rangeLow, int rangeHigh) { + public static PropertyMeta newMeta(String name, int type, + int defaultValue, int rangeLow, + int rangeHigh) { - Object[] row = new Object[indexLimit]; + PropertyMeta meta = new PropertyMeta(); - row[indexName] = name; - row[indexType] = ValuePool.getInt(type); - row[indexClass] = "Integer"; - row[indexDefaultValue] = ValuePool.getInt(defaultValue); - row[indexIsRange] = Boolean.TRUE; - row[indexRangeLow] = ValuePool.getInt(rangeLow); - row[indexRangeHigh] = ValuePool.getInt(rangeHigh); + meta.propName = name; + meta.propType = type; + meta.propClass = "Integer"; + meta.propDefaultValue = ValuePool.getInt(defaultValue); + meta.propIsRange = true; + meta.propRangeLow = rangeLow; + meta.propRangeHigh = rangeHigh; - return row; + return meta; } /** * Performs any range checking for property and return an error message */ public static String validateProperty(String key, String value, - Object[] meta) { + PropertyMeta meta) { - if (meta[indexClass].equals("Boolean")) { + if (meta.propClass.equals("Boolean")) { value = value.toLowerCase(); if (value.equals("true") || value.equals("false")) { @@ -501,29 +488,29 @@ return "invalid boolean value for property: " + key; } - if (meta[indexClass].equals("String")) { + if (meta.propClass.equals("String")) { return null; } - if (meta[indexClass].equals("Long")) { + if (meta.propClass.equals("Long")) { return null; } - if (meta[indexClass].equals("Integer")) { + if (meta.propClass.equals("Integer")) { try { int number = Integer.parseInt(value); - if (Boolean.TRUE.equals(meta[indexIsRange])) { - int low = ((Integer) meta[indexRangeLow]).intValue(); - int high = ((Integer) meta[indexRangeHigh]).intValue(); + if (meta.propIsRange) { + int low = meta.propRangeLow; + int high = meta.propRangeHigh; if (number < low || high < number) { return "value outside range for property: " + key; } } - if (meta[indexValues] != null) { - int[] values = (int[]) meta[indexValues]; + if (meta.propValues != null) { + int[] values = meta.propValues; if (ArrayUtil.find(values, number) == -1) { return "value not supported for property: " + key; @@ -539,70 +526,6 @@ return null; } - public int getPropertyWithinRange(String name, int number) { - - Object[] meta = (Object[]) metaData.get(name); - - if (meta == null) { - return number; - } - - if (meta[indexClass].equals("Integer")) { - if (Boolean.TRUE.equals(meta[indexIsRange])) { - int low = ((Integer) meta[indexRangeLow]).intValue(); - int high = ((Integer) meta[indexRangeHigh]).intValue(); - - if (number < low) { - return low; - } else if (high < number) { - return high; - } - } - - if (meta[indexValues] != null) { - int[] values = (int[]) meta[indexValues]; - - if (ArrayUtil.find(values, number) == -1) { - return values[0]; - } - } - } - - return number; - } - - public boolean validateProperty(String name, int number) { - - Object[] meta = (Object[]) metaData.get(name); - - if (meta == null) { - return false; - } - - if (meta[indexClass].equals("Integer")) { - if (Boolean.TRUE.equals(meta[indexIsRange])) { - int low = ((Integer) meta[indexRangeLow]).intValue(); - int high = ((Integer) meta[indexRangeHigh]).intValue(); - - if (number < low || high < number) { - return false; - } - } - - if (meta[indexValues] != null) { - int[] values = (int[]) meta[indexValues]; - - if (ArrayUtil.find(values, number) == -1) { - return false; - } - } - - return true; - } - - return false; - } - public String toString() { StringBuilder sb = new StringBuilder(); @@ -634,4 +557,16 @@ return sb.toString(); } + + public static class PropertyMeta { + + public String propName; + public int propType; + public String propClass; + public boolean propIsRange; + public Object propDefaultValue; + public int propRangeLow; + public int propRangeHigh; + public int[] propValues; + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/LobManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/LobManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/LobManager.java 2021-03-19 12:06:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/LobManager.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,7 +42,6 @@ import java.util.zip.Inflater; import org.hsqldb.Database; -import org.hsqldb.DatabaseType; import org.hsqldb.HsqlException; import org.hsqldb.Session; import org.hsqldb.SessionInterface; @@ -68,7 +67,7 @@ /** * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class LobManager { @@ -451,9 +450,7 @@ return null; } - BlobData blob = new BlobDataID(lobID); - - return blob; + return new BlobDataID(lobID); } finally { writeLock.unlock(); } @@ -470,9 +467,7 @@ return null; } - ClobData clob = new ClobDataID(lobID); - - return clob; + return new ClobDataID(lobID); } finally { writeLock.unlock(); } @@ -564,9 +559,9 @@ return Result.updateZeroResult; } - long limitLobID = Long.MAX_VALUE; + long limitLobID = Long.MAX_VALUE; ResultMetaData meta = deleteUnusedLobs.getParametersMetaData(); - Object[] params = new Object[meta.getColumnCount()]; + Object[] params = new Object[meta.getColumnCount()]; int deleteCount = 0; params[0] = Long.valueOf(limitLobID); @@ -1200,8 +1195,7 @@ try { if (compressLobs || cryptLobs) { - result = getBytesCompressed(lobID, offset * 2, length * 2, - true); + result = getBytesCompressed(lobID, offset * 2, length * 2); } else { result = getBytesNormal(lobID, offset * 2, length * 2); } @@ -1225,7 +1219,7 @@ try { if (compressLobs || cryptLobs) { - return getBytesCompressed(lobID, offset, length, false); + return getBytesCompressed(lobID, offset, length); } else { return getBytesNormal(lobID, offset, length); } @@ -1330,7 +1324,7 @@ } private Result setBytesBA(long lobID, long offset, byte[] dataBytes, - int dataLength, boolean isClob) { + int dataLength) { if (dataLength == 0) { return ResultLob.newLobSetResponse(lobID, 0); @@ -1341,7 +1335,7 @@ try { if (compressLobs || cryptLobs) { return setBytesBACompressed(lobID, offset, dataBytes, - dataLength, isClob); + dataLength); } else { return setBytesBANormal(lobID, offset, dataBytes, dataLength); } @@ -1438,14 +1432,14 @@ } private Result setBytesIS(long lobID, InputStream inputStream, - long length, boolean isClob) { + long offset, long length) { if (length == 0) { return ResultLob.newLobSetResponse(lobID, 0); } if (compressLobs || cryptLobs) { - return setBytesISCompressed(lobID, inputStream, length, isClob); + return setBytesISCompressed(lobID, inputStream, offset, length); } else { return setBytesISNormal(lobID, inputStream, length); } @@ -1543,8 +1537,7 @@ return ResultLob.newLobSetResponse(lobID, length); } - Result result = setBytesBA(lobID, offset, dataBytes, dataLength, - false); + Result result = setBytesBA(lobID, offset, dataBytes, dataLength); if (result.isError()) { return result; @@ -1568,7 +1561,7 @@ /** * for new blob only * - * blob length is set to inputStream size (not given length) + * blob length is set to inputStream size (not given length which could be incorrect) */ public Result setBytesForNewBlob(long lobID, InputStream inputStream, long length) { @@ -1581,7 +1574,7 @@ writeLock.lock(); try { - Result result = setBytesIS(lobID, inputStream, length, false); + Result result = setBytesIS(lobID, inputStream, 0L, length); Result actionResult = Result.updateZeroResult; if (result.isError()) { @@ -1631,7 +1624,7 @@ byte[] bytes = ArrayUtil.charArrayToBytes(chars, dataLength); Result result = setBytesBA(lobID, offset * 2, bytes, - dataLength * 2, true); + dataLength * 2); if (result.isError()) { return result; @@ -1662,7 +1655,7 @@ writeLock.lock(); try { - Result result = setBytesIS(lobID, inputStream, length * 2, false); + Result result = setBytesIS(lobID, inputStream, 0L, length * 2); if (result.isError()) { return result; @@ -1712,7 +1705,7 @@ params[DELETE_BLOCKS.BLOCK_OFFSET] = Integer.valueOf(blockOffset); params[DELETE_BLOCKS.BLOCK_LIMIT] = ValuePool.INTEGER_MAX; params[DELETE_BLOCKS.TX_ID] = - ValuePool.getLong(sysLobSession.getTransactionTimestamp()); + ValuePool.getLong(sysLobSession.getTransactionSCN()); Result result = sysLobSession.executeCompiledStatement(deleteLobPartCall, @@ -1811,7 +1804,7 @@ params[DELETE_BLOCKS.BLOCK_OFFSET] = ValuePool.getInt(offset); params[DELETE_BLOCKS.BLOCK_LIMIT] = ValuePool.getInt(limit); params[DELETE_BLOCKS.TX_ID] = - ValuePool.getLong(sysLobSession.getTransactionTimestamp()); + ValuePool.getLong(sysLobSession.getTransactionSCN()); Result result = sysLobSession.executeCompiledStatement(deleteLobPartCall, params, @@ -1978,7 +1971,7 @@ return blocks; } - private void inflate(byte[] data, int length, boolean isClob) { + private void inflate(byte[] data, int length) { if (cryptLobs) { length = database.logger.getCrypto().decode(data, 0, length, data, @@ -2004,7 +1997,7 @@ } } - private int deflate(byte[] data, int offset, int length, boolean isClob) { + private int deflate(byte[] data, int offset, int length) { deflater.setInput(data, offset, length); deflater.finish(); @@ -2036,7 +2029,7 @@ for (int i = 0; i < aParts.length && i < bParts.length; i++) { int aPartLength = (int) aParts[i][ALLOC_PART.PART_LENGTH]; - getPartBytesCompressedInBuffer(aID, aParts[i], false); + getPartBytesCompressedInBuffer(aID, aParts[i]); byte[] aPartBytes = new byte[aPartLength]; @@ -2044,7 +2037,7 @@ int bPartLength = (int) bParts[i][ALLOC_PART.PART_LENGTH]; - getPartBytesCompressedInBuffer(aID, bParts[i], false); + getPartBytesCompressedInBuffer(aID, bParts[i]); int result = ArrayUtil.compare(aPartBytes, 0, aPartLength, byteBuffer, 0, bPartLength); @@ -2071,13 +2064,13 @@ for (int i = 0; i < aParts.length && i < bParts.length; i++) { int aPartLength = (int) aParts[i][ALLOC_PART.PART_LENGTH]; - getPartBytesCompressedInBuffer(aID, aParts[i], true); + getPartBytesCompressedInBuffer(aID, aParts[i]); String aString = new String(ArrayUtil.byteArrayToChars(dataBuffer, aPartLength)); int bPartLength = (int) bParts[i][ALLOC_PART.PART_LENGTH]; - getPartBytesCompressedInBuffer(bID, bParts[i], true); + getPartBytesCompressedInBuffer(bID, bParts[i]); String bString = new String(ArrayUtil.byteArrayToChars(dataBuffer, bPartLength)); @@ -2097,7 +2090,7 @@ } private Result setBytesISCompressed(long lobID, InputStream inputStream, - long length, boolean isClob) { + long baseOffset, long length) { long offset = 0; byte[] tempBuffer = new byte[largeLobBlockSize]; @@ -2131,14 +2124,15 @@ return Result.newErrorResult(e); } - Result result = setBytesBACompressedPart(lobID, offset, - tempBuffer, count, isClob); + Result result = setBytesBACompressedPart(lobID, baseOffset, + tempBuffer, count); if (result.isError()) { return result; } - offset += count; + offset += count; + baseOffset += count; if (offset == length) { break; @@ -2151,8 +2145,7 @@ } private Result setBytesBACompressed(long lobID, long offset, - byte[] dataBytes, int dataLength, - boolean isClob) { + byte[] dataBytes, int dataLength) { if (dataLength == 0) { return ResultLob.newLobSetResponse(lobID, 0); @@ -2160,20 +2153,20 @@ if (dataLength <= largeLobBlockSize) { return setBytesBACompressedPart(lobID, offset, dataBytes, - dataLength, isClob); + dataLength); } HsqlByteArrayInputStream is = new HsqlByteArrayInputStream(dataBytes, 0, dataLength); - return setBytesISCompressed(lobID, is, dataLength, isClob); + return setBytesISCompressed(lobID, is, offset, dataLength); } /** * Only for loading parts of the same lob, not for overwriting parts of existing lob */ private Result setBytesBACompressedPart(long lobID, long offset, - byte[] dataBytes, int dataLength, boolean isClob) { + byte[] dataBytes, int dataLength) { // get block offset after existing blocks and compressed block long[] lastPart = getLastPart(lobID); @@ -2189,7 +2182,7 @@ "compressed lobs")); } - int byteLength = deflate(dataBytes, 0, dataLength, isClob); + int byteLength = deflate(dataBytes, 0, dataLength); int blockCount = (byteLength + lobBlockSize - 1) / lobBlockSize; Result result = createFullBlockAddresses(lobID, blockOffset, blockCount); @@ -2216,8 +2209,7 @@ return ResultLob.newLobSetResponse(lobID, dataLength); } - private Result getBytesCompressed(long lobID, long offset, int length, - boolean isClob) { + private Result getBytesCompressed(long lobID, long offset, int length) { byte[] dataBytes = new byte[length]; long[][] parts = getParts(lobID, offset, offset + length); @@ -2226,8 +2218,7 @@ long[] part = parts[i]; long partOffset = part[ALLOC_PART.PART_OFFSET]; int partLength = (int) part[ALLOC_PART.PART_LENGTH]; - Result result = getPartBytesCompressedInBuffer(lobID, part, - isClob); + Result result = getPartBytesCompressedInBuffer(lobID, part); if (result.isError()) { return result; @@ -2240,8 +2231,7 @@ return ResultLob.newLobGetBytesResponse(lobID, offset, dataBytes); } - private Result getPartBytesCompressedInBuffer(long lobID, long[] part, - boolean isClob) { + private Result getPartBytesCompressedInBuffer(long lobID, long[] part) { long blockOffset = part[ALLOC_PART.BLOCK_OFFSET]; long partOffset = part[ALLOC_PART.PART_OFFSET]; @@ -2257,7 +2247,7 @@ byte[] byteBlock = ((ResultLob) result).getByteArray(); - inflate(byteBlock, partBytesLength, isClob); + inflate(byteBlock, partBytesLength); return ResultLob.newLobSetResponse(lobID, partLength); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/LobStoreRAFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/LobStoreRAFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/LobStoreRAFile.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/LobStoreRAFile.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/LockFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/LockFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/LockFile.java 2021-02-09 04:51:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/LockFile.java 2022-06-07 13:22:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ /** * Base cooperative file locking implementation and {@code LockFile} - * factory.

    + * factory. * *


    * @@ -65,43 +65,43 @@ * the contexts do not share a common parent class loader or do not implement * normal parent class loader delegation semantics.

    * - * * + * * * The only purely in-process global discovery alternative known to the author * is to reflect upon objects found while traversing up the Java runtime thread * hierarchy. However, this method is often subject to Java security * restrictions whose collective purpose is essentially dissimilar to that of * restrictions in effect relative to cooperative file locking requirements, - * making it a generally unacceptable option in this context.

    + * making it a generally unacceptable option in this context. * *


    * - * Here is the way this class presently operates:

    + * Here is the way this class presently operates: * *

      *
    1. A file with a commonly agreed-upon path is used to implement * cooperative locking semantics regarding another set of files with - * commonly agreed-upon paths.

      + * commonly agreed-upon paths. * *

    2. In particular, a background thread periodically writes a timestamp * value, which acts as a heartbeat that indicates to others whether a - * cooperative lock condition is currently held.

      + * cooperative lock condition is currently held. * *

    3. In addition, a magic value is written so that it is possible to * distinguish with a reasonably high degree of accuracy between the - * existence of a lock file and some other type of file.

      + * existence of a lock file and some other type of file. * *

    4. The generic rules used to acquire a cooperative lock condition are - * as follows:

      + * as follows: * *

        *
      1. If a lock condition is already held by this object, do nothing and - * signify that the lock attempt was successful, else...

        + * signify that the lock attempt was successful, else... * *

      2. Poll the underlying file, using a configured maximum number of * retries and a configured interval between the end of a failed - * poll and the beginning of the next.

        + * poll and the beginning of the next. * - *

      3. For each poll:

        + *

      4. For each poll: * *
          * @@ -109,11 +109,11 @@ * if it does not yet exist, exit the polling loop immediately * indicating success if the attempt succeeds, else fast fail * the current poll if a security exception is thrown in response - * to the attempt, else...

          + * to the attempt, else... * *

        1. Test if the underlying file exists, fast failing the current * poll if it is impossible to determine (i.e. if a security - * exception is thrown).

          + * exception is thrown). * *

        2. If the file does not exist, exit the polling loop immediately * indicating success.

          @@ -136,28 +136,28 @@ * non-{@code LockFile} entity deleted the file, then there are * much worse things to worry about, in particular that the files * this object is supposed to protect are in reality subject to - * arbitrary external modification and deletion.

          + * arbitrary external modification and deletion. * *

        3. Test the file's length, fast failing the current poll if the * length cannot be determined or it is not the expected - * value.

          + * value. * *

        4. Open a stream to read the file's {@code MAGIC} and heartbeat * timestamp values, fast failing the current poll if the stream - * cannot be opened.

          + * cannot be opened. * *

        5. Test the file's {@code MAGIC} value, failing the current poll * if the value cannot be read or it is not the expected - * value.

          + * value. * *

        6. Test the file's heartbeat timestamp value, fast failing the * current poll if it cannot be read or it is less than a * commonly agreed-upon value into the past (or future, to - * overcome a caveat observed by a patch contributor).

          + * overcome a caveat observed by a patch contributor). *

        *
      5. If the polling phase exits with a failure indication, then one or * more of the following cases must have been true at every poll - * iteration:

        + * iteration: * *

          *
        • The file had the wrong length or {@code MAGIC} value (was @@ -182,16 +182,16 @@ *

        * * In this case, signify failure indicating the last encountered - * reason, else...

        + * reason, else... * *

      6. Open the file for reading and writing, write the magic value and * an initial heartbeat timestamp, schedule a periodic heartbeat - * timestamp writer task and signify success.

        + * timestamp writer task and signify success. *

      - *
    5. The generic rules used to release a cooperative lock condition are:

      + *

    6. The generic rules used to release a cooperative lock condition are: *
        *
      1. If a lock condition is not currently held, do nothing and signify - * success, else...

        + * success, else... * *

      2. A lock condition is currently held by this object, so try to * release it.

        @@ -201,9 +201,9 @@ * lock file, cancelling the periodic heartbeat timestamp writer * task and deleting the lock file. If the release occurs without * raising an exception, signify success, else signify that the - * release attempt might have failed.

        + * release attempt might have failed. *

      - *

    + * * *


    * @@ -314,7 +314,7 @@ * external security or operating constraints that may need to be imposed.

    * * Alternate approaches that have been considered and rejected for now - * include:

    + * include: * *

      *
    • Socket-based locks (with/without broadcast protocol) @@ -638,7 +638,7 @@ try { lockFile = LockFile.newLockFile(path + ".lck"); } catch (LockFile.BaseException e) { - throw Error.error(ErrorCode.LOCK_FILE_ACQUISITION_FAILURE, + throw Error.error(e, ErrorCode.LOCK_FILE_ACQUISITION_FAILURE, e.getMessage()); } @@ -647,7 +647,7 @@ try { locked = lockFile.tryLock(); } catch (LockFile.BaseException e) { - throw Error.error(ErrorCode.LOCK_FILE_ACQUISITION_FAILURE, + throw Error.error(e, ErrorCode.LOCK_FILE_ACQUISITION_FAILURE, e.getMessage()); } @@ -668,7 +668,7 @@ * whether its heartbeat timestamp is live (is, as far as can be known, * presumably in use by another {@code LockFile} instance) or stale.

      * - * The check conforms to the following rules:

      + * The check conforms to the following rules: * *

        *
      1. If the parameter {@code withCreateNewFile} is true, {@link @@ -676,7 +676,7 @@ * upon this object's {@code file} object indicates the underlying * file was atomically created if and only if it did not yet exist, * then return immediately (we have won the race to establish - * a lock file).

        + * a lock file). * *

      2. Test again if the file exists, returning immediately if it does not * (there's no file and hence no heartbeat to check).

        @@ -699,7 +699,7 @@ * there are much worse things to worry about, in particular that the * files this object is supposed to protect are in reality subject to * arbitrary external modification and deletion by some uncooperative - * process.

        + * process. * *

      3. If a Java security exception is thrown while testing for existence, * it is rethrown as a {@code FileSecurityException}. @@ -907,7 +907,7 @@ * and only if {@code tryLock()} successfully invokes * {@code pollHeartbeat()} and {@code openRAF()} first.

        * - * From this, it can be inferred that upon entry:

        + * From this, it can be inferred that upon entry: * *

          *
        1. {@code locked == false}. @@ -989,7 +989,7 @@ * Initializes this object with a {@code File} object whose path has the * canonical form of the given {@code path} argument.

          * - * PRE:

          + * PRE: * *

            *
          1. This method is called once and only once per @@ -1294,7 +1294,7 @@ * only if it is not null, it is an instance of {@code LockFile} and * either it is the identical instance or it has the same lock file. More * formally, is is considered equal if and only if it is not null, it is an - * instance of {@code LockFile}, and the expression:

            + * instance of {@code LockFile}, and the expression: * *

                  * this == other ||
            @@ -1414,10 +1414,10 @@
                  * Retrieves whether this object holds a valid lock condition on its
                  * lock file. 

            * - * More formally, this method retrieves true if and only if:

            + * More formally, this method retrieves true if and only if: * *

            -     * isLocked() && file != null && file.exists() && raf != null
            +     * {@code isLocked() && file != null && file.exists() && raf != null}
                  * 
            * * @return {@code true} if this object holds a valid lock condition on its @@ -1433,7 +1433,7 @@ /** * Retrieves a String representation of this object.

            * - * The String is of the form:

            + * The String is of the form: * *

                  * super.toString() +
            @@ -1480,7 +1480,7 @@
                  * Retrieves the number of times {@code checkHeartbeat} may fail before
                  * {@code pollHeartbeat} fails as a consequence. 

            * - * The value is obtained in the following manner:

            + * The value is obtained in the following manner: * *

              *
            1. retries is assigned {@code POLL_RETRIES_DEFAULT}. @@ -1516,7 +1516,7 @@ * Retrieves the interval, in milliseconds, that {@code pollHeartbeat} * waits between failed invocations of {@code checkHeartbeat}. * - * The value is obtained in the following manner:

              + * The value is obtained in the following manner: * *

                *
              1. interval is assigned {@code 10 + (HEARTBEAT_INTERVAL_PADDED @@ -1895,7 +1895,7 @@ * For internal use only.

                * * This Runnable class provides the implementation for the timed task - * that periodically writes out a heartbeat timestamp to the lock file.

                + * that periodically writes out a heartbeat timestamp to the lock file. */ private final class HeartbeatRunner implements Runnable { @@ -1910,7 +1910,7 @@ } /** - * Base exception class for lock condition specific exceptions.

                + * Base exception class for lock condition specific exceptions. * */ public abstract static class BaseException extends Exception { @@ -2033,7 +2033,7 @@ * parent directories; or if its {@link * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not permit all necessary parent directories to be - * created.

                + * created. * */ public static final class FileSecurityException extends BaseException { @@ -2083,7 +2083,7 @@ * * Specifically, this exception is thrown when polling fails because the * lock file's heartbeat timestamp value indicates that another LockFile - * object still holds the lock condition.

                + * object still holds the lock condition. * */ public static final class LockHeldExternallyException diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/Logger.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/Logger.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/Logger.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/Logger.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,9 +58,11 @@ import org.hsqldb.index.IndexAVL; import org.hsqldb.index.IndexAVLMemory; import org.hsqldb.lib.ArrayUtil; +import org.hsqldb.lib.EventLogInterface; import org.hsqldb.lib.FileAccess; import org.hsqldb.lib.FileUtil; import org.hsqldb.lib.FrameworkLogger; +import org.hsqldb.lib.HashMap; import org.hsqldb.lib.HsqlArrayList; import org.hsqldb.lib.InputStreamInterface; import org.hsqldb.lib.InputStreamWrapper; @@ -85,7 +87,7 @@ * storage.

                * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.7.0 */ public class Logger implements EventLogInterface { @@ -117,6 +119,7 @@ private int propWriteDelay; private int propLogSize; private boolean propLogData = true; + private int propExternalEventLogLevel; private int propEventLogLevel; int propSqlLogLevel; int propGC; @@ -348,6 +351,13 @@ } level = database.urlProperties.getIntegerProperty( + HsqlDatabaseProperties.hsqldb_extlog, -1); + + if (level >= 0) { + setExternalEventLogLevel(level); + } + + level = database.urlProperties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_sqllog, -1); if (level >= 0) { @@ -511,8 +521,14 @@ database.sqlConvertTruncate = database.databaseProperties.isPropertyTrue( HsqlDatabaseProperties.sql_convert_trunc); + database.sqlTruncateTrailing = + database.databaseProperties.isPropertyTrue( + HsqlDatabaseProperties.sql_trunc_trailing); database.sqlAvgScale = database.databaseProperties.getIntegerProperty( HsqlDatabaseProperties.sql_avg_scale); + database.sqlMaxRecursive = + database.databaseProperties.getIntegerProperty( + HsqlDatabaseProperties.sql_max_recursive); database.sqlDoubleNaN = database.databaseProperties.isPropertyTrue( HsqlDatabaseProperties.sql_double_nan); database.sqlLongvarIsLob = database.databaseProperties.isPropertyTrue( @@ -542,6 +558,9 @@ propEventLogLevel = database.databaseProperties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_applog); + propExternalEventLogLevel = + database.databaseProperties.getIntegerProperty( + HsqlDatabaseProperties.hsqldb_extlog); propSqlLogLevel = database.databaseProperties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_sqllog); @@ -576,13 +595,11 @@ database.databaseProperties.getIntegerProperty( HsqlDatabaseProperties.hsqldb_cache_file_scale)); - // linked with FILES SCALE - int fileSpace = database.databaseProperties.getIntegerProperty( - HsqlDatabaseProperties.hsqldb_files_space, 0); + // linked with above FILES SCALE + boolean fileSpace = database.databaseProperties.isPropertyTrue( + HsqlDatabaseProperties.hsqldb_files_space); - if (fileSpace != 0) { - setDataFileSpace(fileSpace); - } + setDataFileSpace(fileSpace); propDataFileDefragLimit = database.databaseProperties.getIntegerProperty( @@ -762,22 +779,29 @@ sqlLog.setLevel(level); } else { - if (level > SimpleLog.LOG_DETAIL) { - level = SimpleLog.LOG_DETAIL; - } - propEventLogLevel = level; appLog.setLevel(level); } } + public void setExternalEventLogLevel(int level) { + + if (level < SimpleLog.LOG_NONE || level > SimpleLog.LOG_DETAIL) { + throw Error.error(ErrorCode.X_42556); + } + + propExternalEventLogLevel = level; + } + public void logSevereEvent(String message, Throwable t) { getEventLogger(); if (fwLogger != null) { - fwLogger.severe(message, t); + if (propExternalEventLogLevel >= SimpleLog.LOG_ERROR) { + fwLogger.severe(message, t); + } } if (appLog != null) { @@ -794,10 +818,12 @@ getEventLogger(); if (fwLogger != null) { - fwLogger.warning(message, t); + if (propExternalEventLogLevel >= SimpleLog.LOG_WARNING) { + fwLogger.warning(message, t); + } } - appLog.logContext(t, message, SimpleLog.LOG_ERROR); + appLog.logContext(t, message, SimpleLog.LOG_WARNING); } public void logInfoEvent(String message) { @@ -805,7 +831,9 @@ getEventLogger(); if (fwLogger != null) { - fwLogger.info(message); + if (propExternalEventLogLevel >= SimpleLog.LOG_NORMAL) { + fwLogger.info(message); + } } appLog.logContext(SimpleLog.LOG_NORMAL, message); @@ -816,7 +844,9 @@ getEventLogger(); if (fwLogger != null) { - fwLogger.finest(message); + if (propExternalEventLogLevel >= SimpleLog.LOG_DETAIL) { + fwLogger.finest(message); + } } if (appLog != null) { @@ -1015,7 +1045,7 @@ logInfoEvent("Checkpoint start"); log.checkpoint(session, defrag); logInfoEvent("Checkpoint end - txts: " - + database.txManager.getGlobalChangeTimestamp()); + + database.txManager.getSystemChangeNumber()); } } @@ -1137,7 +1167,7 @@ propDataFileScale = value; if (propDataFileSpace > 0) { - propDataFileSpace = propDataFileScale / 16; // reduce if too large + propDataFileSpace = propDataFileScale / 16; // change to default } } @@ -1261,14 +1291,10 @@ public void setNioMaxSize(int value) { - if (value < 8) { - throw Error.error(ErrorCode.X_42556); - } + value = ArrayUtil.getTwoPowerFloor(value); - if (!ArrayUtil.isTwoPower(value, 10)) { - if (value < 1024 || value % 512 != 0) { - throw Error.error(ErrorCode.X_42556); - } + if (value < 64) { + value = 64; } propNioMaxSize = value * 1024L * 1024L; @@ -1405,298 +1431,203 @@ throw Error.runtimeError(ErrorCode.U_S0500, "Logger"); } - public String getValueStringForProperty(String name) { - - String value = ""; - - if (HsqlDatabaseProperties.hsqldb_tx.equals(name)) { - switch (database.txManager.getTransactionControl()) { - - case TransactionManager.MVCC : - value = Tokens.T_MVCC.toLowerCase(); - break; - - case TransactionManager.MVLOCKS : - value = Tokens.T_MVLOCKS.toLowerCase(); - break; - - case TransactionManager.LOCKS : - value = Tokens.T_LOCKS.toLowerCase(); - break; - } - - return value; - } - - if (HsqlDatabaseProperties.hsqldb_tx_level.equals(name)) { - switch (database.defaultIsolationLevel) { - - case SessionInterface.TX_READ_COMMITTED : - value = new StringBuilder(Tokens.T_READ).append( - ' ').append( - Tokens.T_COMMITTED).toString().toLowerCase(); - break; - - case SessionInterface.TX_SERIALIZABLE : - value = Tokens.T_SERIALIZABLE.toLowerCase(); - break; - } - - return value; - } - - if (HsqlDatabaseProperties.hsqldb_applog.equals(name)) { - return String.valueOf(appLog.getLevel()); - } - - if (HsqlDatabaseProperties.hsqldb_sqllog.equals(name)) { - return String.valueOf(sqlLog.getLevel()); - } - - if (HsqlDatabaseProperties.hsqldb_lob_file_scale.equals(name)) { - return String.valueOf(propLobBlockSize / 1024); - } - - if (HsqlDatabaseProperties.hsqldb_lob_file_compressed.equals(name)) { - return String.valueOf(propCompressLobs); - } - - if (HsqlDatabaseProperties.hsqldb_cache_file_scale.equals(name)) { - return String.valueOf(propDataFileScale); - } - - if (HsqlDatabaseProperties.hsqldb_cache_free_count.equals(name)) { - return String.valueOf(propMaxFreeBlocks); - } - - if (HsqlDatabaseProperties.hsqldb_cache_rows.equals(name)) { - return String.valueOf(propCacheMaxRows); - } - - if (HsqlDatabaseProperties.hsqldb_cache_size.equals(name)) { - return String.valueOf(propCacheMaxSize / 1024); - } - - if (HsqlDatabaseProperties.hsqldb_default_table_type.equals(name)) { - return database.schemaManager.getDefaultTableType() - == TableBase.CACHED_TABLE ? Tokens.T_CACHED - : Tokens.T_MEMORY; - } - - if (HsqlDatabaseProperties.hsqldb_defrag_limit.equals(name)) { - return String.valueOf(propDataFileDefragLimit); - } - - if (HsqlDatabaseProperties.hsqldb_files_space.equals(name)) { - return String.valueOf(propDataFileSpace); - } - - if (HsqlDatabaseProperties.hsqldb_files_readonly.equals(name)) { - return database.databaseProperties.getPropertyString( - HsqlDatabaseProperties.hsqldb_files_readonly); - } - - if (HsqlDatabaseProperties.hsqldb_large_data.equals(name)) { - return String.valueOf(propLargeData); - } - - if (HsqlDatabaseProperties.hsqldb_lock_file.equals(name)) { - return database.databaseProperties.getPropertyString( - HsqlDatabaseProperties.hsqldb_lock_file); - } - - if (HsqlDatabaseProperties.hsqldb_log_data.equals(name)) { - return String.valueOf(propLogData); - } - - if (HsqlDatabaseProperties.hsqldb_log_size.equals(name)) { - return String.valueOf(propLogSize); - } - - if (HsqlDatabaseProperties.hsqldb_nio_data_file.equals(name)) { - return String.valueOf(propNioDataFile); - } - - if (HsqlDatabaseProperties.hsqldb_nio_max_size.equals(name)) { - return String.valueOf(propNioMaxSize / (1024 * 1024)); - } - - if (HsqlDatabaseProperties.hsqldb_script_format.equals(name)) { - return ScriptWriterBase.LIST_SCRIPT_FORMATS[propScriptFormat] - .toLowerCase(); - } - - if (HsqlDatabaseProperties.hsqldb_temp_directory.equals(name)) { - return tempDirectoryPath; - } - - if (HsqlDatabaseProperties.hsqldb_tx_conflict_rollback.equals(name)) { - return String.valueOf(database.txConflictRollback); - } - - if (HsqlDatabaseProperties.hsqldb_tx_interrupt_rollback.equals(name)) { - return String.valueOf(database.txInterruptRollback); - } - - if (HsqlDatabaseProperties.hsqldb_result_max_memory_rows.equals( - name)) { - return String.valueOf(database.getResultMaxMemoryRows()); - } - - if (HsqlDatabaseProperties.hsqldb_write_delay.equals(name)) { - return String.valueOf(propWriteDelay != 0); - } - - if (HsqlDatabaseProperties.hsqldb_write_delay_millis.equals(name)) { - return String.valueOf(propWriteDelay); - } - - if (HsqlDatabaseProperties.hsqldb_digest.equals(name)) { - return database.granteeManager.getDigestAlgo(); - } - - if (HsqlDatabaseProperties.sql_restrict_exec.equals(name)) { - return String.valueOf(database.sqlRestrictExec); - } - - if (HsqlDatabaseProperties.sql_avg_scale.equals(name)) { - return String.valueOf(database.sqlAvgScale); - } - - if (HsqlDatabaseProperties.sql_char_literal.equals(name)) { - return String.valueOf(database.sqlCharLiteral); - } - - if (HsqlDatabaseProperties.sql_concat_nulls.equals(name)) { - return String.valueOf(database.sqlConcatNulls); - } - - if (HsqlDatabaseProperties.sql_convert_trunc.equals(name)) { - return String.valueOf(database.sqlConvertTruncate); - } + public HashMap getPropertyValueMap(Session session) { - if (HsqlDatabaseProperties.sql_double_nan.equals(name)) { - return String.valueOf(database.sqlDoubleNaN); - } - - if (HsqlDatabaseProperties.sql_enforce_names.equals(name)) { - return String.valueOf(database.sqlEnforceNames); - } + HashMap map = new HashMap(); + String value = null; - if (HsqlDatabaseProperties.sql_enforce_refs.equals(name)) { - return String.valueOf(database.sqlEnforceRefs); - } + map.put(HsqlDatabaseProperties.sql_avg_scale, + String.valueOf(database.sqlAvgScale)); + map.put(HsqlDatabaseProperties.sql_char_literal, + String.valueOf(database.sqlCharLiteral)); + map.put(HsqlDatabaseProperties.sql_concat_nulls, + String.valueOf(database.sqlConcatNulls)); + map.put(HsqlDatabaseProperties.sql_convert_trunc, + String.valueOf(database.sqlConvertTruncate)); + map.put(HsqlDatabaseProperties.sql_default_collation, + String.valueOf(database.collation.getName().name)); + map.put(HsqlDatabaseProperties.sql_trunc_trailing, + String.valueOf(database.sqlTruncateTrailing)); + map.put(HsqlDatabaseProperties.sql_double_nan, + String.valueOf(database.sqlDoubleNaN)); + map.put(HsqlDatabaseProperties.sql_enforce_names, + String.valueOf(database.sqlEnforceNames)); + map.put(HsqlDatabaseProperties.sql_enforce_refs, + String.valueOf(database.sqlEnforceRefs)); + map.put(HsqlDatabaseProperties.sql_enforce_size, + String.valueOf(database.sqlEnforceSize)); + map.put(HsqlDatabaseProperties.sql_enforce_tdcd, + String.valueOf(database.sqlEnforceTDCD)); + map.put(HsqlDatabaseProperties.sql_enforce_tdcu, + String.valueOf(database.sqlEnforceTDCU)); + map.put(HsqlDatabaseProperties.sql_enforce_types, + String.valueOf(database.sqlEnforceTypes)); + map.put(HsqlDatabaseProperties.sql_ignore_case, + String.valueOf(database.sqlIgnoreCase)); + map.put(HsqlDatabaseProperties.sql_live_object, + String.valueOf(database.sqlLiveObject)); + map.put(HsqlDatabaseProperties.sql_longvar_is_lob, + String.valueOf(database.sqlLongvarIsLob)); + map.put(HsqlDatabaseProperties.sql_lowercase_ident, + String.valueOf(database.sqlLowerCaseIdentifier)); + map.put(HsqlDatabaseProperties.sql_max_recursive, + String.valueOf(database.sqlMaxRecursive)); + map.put(HsqlDatabaseProperties.sql_nulls_first, + String.valueOf(database.sqlNullsFirst)); + map.put(HsqlDatabaseProperties.sql_nulls_order, + String.valueOf(database.sqlNullsOrder)); + map.put(HsqlDatabaseProperties.sql_pad_space, + String.valueOf(database.collation.isPadSpace())); + map.put(HsqlDatabaseProperties.sql_ref_integrity, + String.valueOf(database.isReferentialIntegrity())); + map.put(HsqlDatabaseProperties.sql_regular_names, + String.valueOf(database.sqlRegularNames)); + map.put(HsqlDatabaseProperties.sql_restrict_exec, + String.valueOf(database.sqlRestrictExec)); + map.put(HsqlDatabaseProperties.sql_syntax_db2, + String.valueOf(database.sqlSyntaxDb2)); + map.put(HsqlDatabaseProperties.sql_syntax_mss, + String.valueOf(database.sqlSyntaxMss)); + map.put(HsqlDatabaseProperties.sql_syntax_mys, + String.valueOf(database.sqlSyntaxMys)); + map.put(HsqlDatabaseProperties.sql_syntax_ora, + String.valueOf(database.sqlSyntaxOra)); + map.put(HsqlDatabaseProperties.sql_syntax_pgs, + String.valueOf(database.sqlSyntaxPgs)); + map.put(HsqlDatabaseProperties.sql_sys_index_names, + String.valueOf(database.sqlSysIndexNames)); + map.put(HsqlDatabaseProperties.sql_unique_nulls, + String.valueOf(database.sqlUniqueNulls)); - if (HsqlDatabaseProperties.sql_enforce_size.equals(name)) { - return String.valueOf(database.sqlEnforceSize); - } - - if (HsqlDatabaseProperties.sql_enforce_tdcd.equals(name)) { - return String.valueOf(database.sqlEnforceTDCD); - } - - if (HsqlDatabaseProperties.sql_enforce_tdcu.equals(name)) { - return String.valueOf(database.sqlEnforceTDCU); - } - - if (HsqlDatabaseProperties.sql_enforce_types.equals(name)) { - return String.valueOf(database.sqlEnforceTypes); - } - - if (HsqlDatabaseProperties.sql_ignore_case.equals(name)) { - return String.valueOf(database.sqlIgnoreCase); - } - - if (HsqlDatabaseProperties.sql_longvar_is_lob.equals(name)) { - return String.valueOf(database.sqlLongvarIsLob); - } - - if (HsqlDatabaseProperties.sql_nulls_first.equals(name)) { - return String.valueOf(database.sqlNullsFirst); - } - - if (HsqlDatabaseProperties.sql_nulls_order.equals(name)) { - return String.valueOf(database.sqlNullsOrder); - } - - if (HsqlDatabaseProperties.sql_pad_space.equals(name)) { - return String.valueOf(database.collation.isPadSpace()); - } - - if (HsqlDatabaseProperties.sql_syntax_db2.equals(name)) { - return String.valueOf(database.sqlSyntaxDb2); - } - - if (HsqlDatabaseProperties.sql_syntax_mss.equals(name)) { - return String.valueOf(database.sqlSyntaxMss); - } + // + map.put(HsqlDatabaseProperties.jdbc_translate_tti_types, + String.valueOf(database.sqlTranslateTTI)); - if (HsqlDatabaseProperties.sql_syntax_mys.equals(name)) { - return String.valueOf(database.sqlSyntaxMys); - } + switch (database.txManager.getTransactionControl()) { - if (HsqlDatabaseProperties.sql_syntax_ora.equals(name)) { - return String.valueOf(database.sqlSyntaxOra); - } + case TransactionManager.MVCC : + value = Tokens.T_MVCC; + break; - if (HsqlDatabaseProperties.sql_syntax_pgs.equals(name)) { - return String.valueOf(database.sqlSyntaxPgs); - } + case TransactionManager.MVLOCKS : + value = Tokens.T_MVLOCKS; + break; - if (HsqlDatabaseProperties.sql_ref_integrity.equals(name)) { - return String.valueOf(database.isReferentialIntegrity()); + case TransactionManager.LOCKS : + value = Tokens.T_LOCKS; + break; } - if (HsqlDatabaseProperties.sql_regular_names.equals(name)) { - return String.valueOf(database.sqlRegularNames); - } + map.put(HsqlDatabaseProperties.hsqldb_tx, value); - if (HsqlDatabaseProperties.sql_unique_nulls.equals(name)) { - return String.valueOf(database.sqlUniqueNulls); - } + switch (database.defaultIsolationLevel) { - if (HsqlDatabaseProperties.sql_live_object.equals(name)) { - return String.valueOf(database.sqlLiveObject); - } + case SessionInterface.TX_READ_COMMITTED : + value = new StringBuilder(Tokens.T_READ).append('_').append( + Tokens.T_COMMITTED).toString(); + break; - if (HsqlDatabaseProperties.jdbc_translate_tti_types.equals(name)) { - return String.valueOf(database.sqlTranslateTTI); + case SessionInterface.TX_SERIALIZABLE : + value = Tokens.T_SERIALIZABLE; + break; } -/* - if (HsqlDatabaseProperties.textdb_all_quoted.equals(name)) { - return null; - } + map.put(HsqlDatabaseProperties.hsqldb_tx_level, value); + map.put( + HsqlDatabaseProperties.hsqldb_reconfig_logging, + System.getProperty( + HsqlDatabaseProperties.hsqldb_reconfig_logging)); + + if (HsqlDatabaseProperties.methodClassNames != null) { + map.put(HsqlDatabaseProperties.hsqldb_method_class_names, + HsqlDatabaseProperties.methodClassNames); + } + + map.put(HsqlDatabaseProperties.hsqldb_applog, + String.valueOf(appLog.getLevel())); + map.put(HsqlDatabaseProperties.hsqldb_extlog, + String.valueOf(propExternalEventLogLevel)); + map.put(HsqlDatabaseProperties.hsqldb_sqllog, + String.valueOf(sqlLog.getLevel())); + map.put(HsqlDatabaseProperties.hsqldb_lob_file_scale, + String.valueOf(propLobBlockSize / 1024)); + map.put(HsqlDatabaseProperties.hsqldb_lob_file_compressed, + String.valueOf(propCompressLobs)); + map.put(HsqlDatabaseProperties.hsqldb_cache_file_scale, + String.valueOf(propDataFileScale)); + map.put(HsqlDatabaseProperties.hsqldb_cache_free_count, + String.valueOf(propMaxFreeBlocks)); + map.put(HsqlDatabaseProperties.hsqldb_cache_rows, + String.valueOf(propCacheMaxRows)); + map.put(HsqlDatabaseProperties.hsqldb_cache_size, + String.valueOf(propCacheMaxSize / 1024)); - if (HsqlDatabaseProperties.textdb_allow_full_path.equals(name)) { - return null; - } + { + String prop; - if (HsqlDatabaseProperties.textdb_encoding.equals(name)) { - return null; - } + switch (database.schemaManager.getDefaultTableType()) { - if (HsqlDatabaseProperties.textdb_ignore_first.equals(name)) { - return null; - } + case TableBase.CACHED_TABLE : + prop = Tokens.T_CACHED; + break; - if (HsqlDatabaseProperties.textdb_quoted.equals(name)) { - return null; - } + case TableBase.MEMORY_TABLE : + default : + prop = Tokens.T_MEMORY; + } - if (HsqlDatabaseProperties.textdb_fs.equals(name)) { - return null; + map.put(HsqlDatabaseProperties.hsqldb_default_table_type, prop); } - if (HsqlDatabaseProperties.textdb_vs.equals(name)) { - return null; - } + map.put(HsqlDatabaseProperties.hsqldb_defrag_limit, + String.valueOf(propDataFileDefragLimit)); + map.put(HsqlDatabaseProperties.hsqldb_files_space, + String.valueOf(propDataFileSpace)); + map.put( + HsqlDatabaseProperties.hsqldb_files_readonly, + database.databaseProperties.isPropertyTrue( + HsqlDatabaseProperties.hsqldb_files_readonly) ? "true" + : "false"); + map.put(HsqlDatabaseProperties.hsqldb_large_data, + String.valueOf(propLargeData)); + map.put( + HsqlDatabaseProperties.hsqldb_lock_file, + database.databaseProperties.isPropertyTrue( + HsqlDatabaseProperties.hsqldb_lock_file) ? "true" + : "false"); + map.put(HsqlDatabaseProperties.hsqldb_log_data, + String.valueOf(propLogData)); + map.put(HsqlDatabaseProperties.hsqldb_log_size, + String.valueOf(propLogSize)); + map.put(HsqlDatabaseProperties.hsqldb_nio_data_file, + String.valueOf(propNioDataFile)); + map.put(HsqlDatabaseProperties.hsqldb_nio_max_size, + String.valueOf(propNioMaxSize / (1024 * 1024))); + map.put(HsqlDatabaseProperties.hsqldb_script_format, + ScriptWriterBase.LIST_SCRIPT_FORMATS[propScriptFormat] + .toLowerCase()); + map.put(HsqlDatabaseProperties.hsqldb_temp_directory, + tempDirectoryPath); + map.put(HsqlDatabaseProperties.hsqldb_tx_conflict_rollback, + String.valueOf(database.txConflictRollback)); + map.put(HsqlDatabaseProperties.hsqldb_tx_interrupt_rollback, + String.valueOf(database.txInterruptRollback)); + map.put(HsqlDatabaseProperties.hsqldb_result_max_memory_rows, + String.valueOf(database.getResultMaxMemoryRows())); + map.put(HsqlDatabaseProperties.hsqldb_readonly, + database.isReadOnly() ? "true" + : "false"); + map.put(HsqlDatabaseProperties.hsqldb_files_readonly, + database.isFilesReadOnly() ? "true" + : "false"); + map.put(HsqlDatabaseProperties.hsqldb_write_delay, + String.valueOf(propWriteDelay != 0)); + map.put(HsqlDatabaseProperties.hsqldb_write_delay_millis, + String.valueOf(propWriteDelay)); + map.put(HsqlDatabaseProperties.hsqldb_digest, + database.granteeManager.getDigestAlgo()); - if (HsqlDatabaseProperties.textdb_lvs.equals(name)) { - return null; - } -*/ - return null; + return map; } public String[] getPropertiesSQL(boolean indexRoots) { @@ -1708,10 +1639,6 @@ sb.append(Tokens.T_NAME).append(' ').append(database.getNameString()); list.add(sb.toString()); sb.setLength(0); - sb.append("SET DATABASE ").append(Tokens.T_GC).append(' '); - sb.append(propGC); - list.add(sb.toString()); - sb.setLength(0); sb.append("SET DATABASE ").append(Tokens.T_DEFAULT).append(' '); sb.append(Tokens.T_RESULT).append(' ').append(Tokens.T_MEMORY); sb.append(' ').append(Tokens.T_ROWS).append(' '); @@ -1724,6 +1651,15 @@ list.add(sb.toString()); sb.setLength(0); + if (propExternalEventLogLevel != SimpleLog.LOG_NONE) { + sb.append("SET DATABASE ").append(Tokens.T_EXTERNAL).append(' '); + sb.append(Tokens.T_EVENT).append(' '); + sb.append(Tokens.T_LOG).append(' ').append(Tokens.T_LEVEL); + sb.append(' ').append(propExternalEventLogLevel); + list.add(sb.toString()); + sb.setLength(0); + } + if (propSqlLogLevel != SimpleLog.LOG_NONE) { sb.append("SET DATABASE ").append(Tokens.T_EVENT).append(' '); sb.append(Tokens.T_LOG).append(' ').append(Tokens.T_SQL); @@ -1798,7 +1734,7 @@ list.add(sb.toString()); sb.setLength(0); - String temp = database.getProperties().getStringPropertyDefault( + String temp = HsqlDatabaseProperties.getStringPropertyDefault( HsqlDatabaseProperties.hsqldb_digest); if (!temp.equals(database.granteeManager.getDigestAlgo())) { @@ -1826,16 +1762,13 @@ : Tokens.T_FALSE); list.add(sb.toString()); sb.setLength(0); - - if (database.sqlRestrictExec) { - sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); - sb.append(Tokens.T_RESTRICT).append(' '); - sb.append(Tokens.T_EXEC).append(' '); - sb.append(database.sqlRestrictExec ? Tokens.T_TRUE - : Tokens.T_FALSE); - list.add(sb.toString()); - sb.setLength(0); - } + sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); + sb.append(Tokens.T_RESTRICT).append(' '); + sb.append(Tokens.T_EXEC).append(' '); + sb.append(database.sqlRestrictExec ? Tokens.T_TRUE + : Tokens.T_FALSE); + list.add(sb.toString()); + sb.setLength(0); if (!database.sqlRegularNames) { sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); @@ -1889,15 +1822,13 @@ list.add(sb.toString()); } - if (database.sqlSysIndexNames) { - sb.setLength(0); - sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); - sb.append(Tokens.T_SYS).append(' ').append(Tokens.T_INDEX); - sb.append(' ').append(Tokens.T_NAMES).append(' '); - sb.append(database.sqlSysIndexNames ? Tokens.T_TRUE - : Tokens.T_FALSE); - list.add(sb.toString()); - } + sb.setLength(0); + sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); + sb.append(Tokens.T_SYS).append(' ').append(Tokens.T_INDEX); + sb.append(' ').append(Tokens.T_NAMES).append(' '); + sb.append(database.sqlSysIndexNames ? Tokens.T_TRUE + : Tokens.T_FALSE); + list.add(sb.toString()); if (!database.sqlCharLiteral) { sb.setLength(0); @@ -1958,6 +1889,18 @@ sb.append(database.sqlAvgScale); list.add(sb.toString()); sb.setLength(0); + + if (database.sqlMaxRecursive + != HsqlDatabaseProperties.getIntegerPropertyDefault( + HsqlDatabaseProperties.sql_max_recursive)) { + sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); + sb.append(Tokens.T_MAX).append(' '); + sb.append(Tokens.T_RECURSIVE).append(' '); + sb.append(database.sqlMaxRecursive); + list.add(sb.toString()); + sb.setLength(0); + } + sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); sb.append(Tokens.T_DOUBLE).append(' '); sb.append(Tokens.T_NAN).append(' '); @@ -1966,6 +1909,15 @@ list.add(sb.toString()); sb.setLength(0); + if (database.sqlIgnoreCase) { + sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); + sb.append(Tokens.T_IGNORECASE).append(' '); + sb.append(database.sqlIgnoreCase ? Tokens.T_TRUE + : Tokens.T_FALSE); + list.add(sb.toString()); + sb.setLength(0); + } + if (database.sqlLongvarIsLob) { sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); sb.append(Tokens.T_LONGVAR).append(' '); @@ -1977,15 +1929,6 @@ sb.setLength(0); } - if (database.sqlIgnoreCase) { - sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); - sb.append(Tokens.T_IGNORECASE).append(' '); - sb.append(database.sqlIgnoreCase ? Tokens.T_TRUE - : Tokens.T_FALSE); - list.add(sb.toString()); - sb.setLength(0); - } - if (database.sqlLowerCaseIdentifier) { sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); sb.append(Tokens.T_LOWER).append(' '); @@ -1997,6 +1940,16 @@ sb.setLength(0); } + if (!database.sqlTruncateTrailing) { + sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); + sb.append(Tokens.T_TRUNCATE).append(' '); + sb.append(Tokens.T_TRAILING).append(' '); + sb.append(database.sqlTruncateTrailing ? Tokens.T_TRUE + : Tokens.T_FALSE); + list.add(sb.toString()); + sb.setLength(0); + } + if (database.sqlSyntaxDb2) { sb.append("SET DATABASE ").append(Tokens.T_SQL).append(' '); sb.append(Tokens.T_SYNTAX).append(' '); @@ -2349,9 +2302,9 @@ logInfoEvent("Successfully backed up instance '" + instanceName + "' to '" + destPath + "'"); } catch (IOException ioe) { - throw Error.error(ErrorCode.FILE_IO_ERROR, ioe.toString()); + throw Error.error(ioe, ErrorCode.FILE_IO_ERROR, ioe.toString()); } catch (TarMalformatException tme) { - throw Error.error(ErrorCode.FILE_IO_ERROR, tme.toString()); + throw Error.error(tme, ErrorCode.FILE_IO_ERROR, tme.toString()); } finally { if (scriptName != null) { FileUtil.getFileUtil().delete(scriptName); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/Log.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/Log.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/Log.java 2021-02-04 10:03:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/Log.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,7 +69,7 @@ * * @author Fred Toussi (fredt@users dot sourceforge.net) * @author Bob Preston (sqlbob@users dot sourceforge.net) - text table support - * @version 2.5.1 + * @version 2.7.0 * @since 1.8.0 */ public class Log { @@ -112,7 +112,7 @@ * When opening a database, the hsqldb.compatible_version property is * used to determine if this version of the engine is equal to or greater * than the earliest version of the engine capable of opening that - * database.

                + * database. */ void open() { @@ -186,7 +186,7 @@ void close(boolean script) { database.logger.setFilesTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); closeLog(); deleteOldFiles(); deleteOldTempFiles(); @@ -244,7 +244,7 @@ database.logger.textTableManager.closeAllTextCaches(false); database.logger.setFilesTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); closeLog(); } @@ -315,7 +315,7 @@ } database.logger.setFilesTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); database.logger.logInfoEvent("checkpointClose start"); synchLog(); database.lobManager.synch(); @@ -338,7 +338,6 @@ if (cache != null) { deleteBackupFile(); } - } catch (Throwable t) { // backup failed perhaps due to lack of disk space @@ -401,7 +400,7 @@ } database.logger.setFilesTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); database.logger.logInfoEvent("checkpointClose start"); synchLog(); database.lobManager.synch(); @@ -617,7 +616,7 @@ dbLogWriter.setWriteDelay(writeDelay); dbLogWriter.start(); } catch (Throwable e) { - throw Error.error(ErrorCode.FILE_IO_ERROR, getLogFileName()); + throw Error.error(e, ErrorCode.FILE_IO_ERROR, getLogFileName()); } } @@ -694,7 +693,7 @@ } else if (e instanceof IOException) { throw Error.error(ErrorCode.FILE_IO_ERROR, e); } else if (e instanceof OutOfMemoryError) { - throw Error.error(ErrorCode.OUT_OF_MEMORY); + throw Error.error(ErrorCode.OUT_OF_MEMORY, e); } else { throw Error.error(ErrorCode.GENERAL_ERROR, e); } @@ -734,14 +733,15 @@ } } - static boolean renameNewFile(FileAccess fileAccess, String baseFileName) { + boolean renameNewFile(FileAccess fileAccess, String baseFileName) { if (fileAccess.isStreamElement(baseFileName + Logger.newFileExtension)) { deleteFile(fileAccess, baseFileName); return fileAccess.renameElementOrCopy( - baseFileName + Logger.newFileExtension, baseFileName); + baseFileName + Logger.newFileExtension, baseFileName, + database.logger); } return true; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFileHybrid.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFileHybrid.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFileHybrid.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFileHybrid.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFile.java 2021-02-09 04:51:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFile.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,7 @@ import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.lib.ArrayUtil; +import org.hsqldb.lib.EventLogInterface; import org.hsqldb.lib.HsqlByteArrayInputStream; import org.hsqldb.lib.HsqlByteArrayOutputStream; @@ -49,7 +50,7 @@ * CACHED table storage. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.2 */ final class RAFile implements RandomAccessInterface { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFileNIO.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFileNIO.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFileNIO.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFileNIO.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.lib.ArrayUtil; +import org.hsqldb.lib.EventLogInterface; import org.hsqldb.lib.java.JavaSystem; /** @@ -52,7 +53,7 @@ * ScaledRAFile is used for data access. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.8.0.5 */ final class RAFileNIO implements RandomAccessInterface { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFileSimple.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFileSimple.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAFileSimple.java 2015-03-29 13:12:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAFileSimple.java 2022-07-07 15:44:42.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,13 +38,14 @@ import org.hsqldb.Database; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; +import org.hsqldb.lib.EventLogInterface; /** * This class is a simple wrapper for a random access file such as used * for backup and lobs. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.3.3 + * @version 2.7.0 * @since 1.9.0 */ final class RAFileSimple implements RandomAccessInterface { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAShadowFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAShadowFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RAShadowFile.java 2021-02-09 04:51:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RAShadowFile.java 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +36,7 @@ import java.io.IOException; import org.hsqldb.Database; +import org.hsqldb.lib.EventLogInterface; import org.hsqldb.lib.HsqlByteArrayOutputStream; import org.hsqldb.lib.InputStreamInterface; import org.hsqldb.lib.java.JavaSystem; @@ -45,7 +46,7 @@ * Wrapper for random access file for incremental backup of the .data file. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.0 + * @version 2.7.0 * @since 1.9.0 */ public class RAShadowFile { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVLDiskData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVLDiskData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVLDiskData.java 2021-02-11 11:26:20.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVLDiskData.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,6 @@ package org.hsqldb.persist; -import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantReadWriteLock; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVLDisk.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVLDisk.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVLDisk.java 2021-03-18 00:32:42.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVLDisk.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,6 @@ package org.hsqldb.persist; -import java.io.IOException; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -50,7 +49,6 @@ import org.hsqldb.index.NodeAVL; import org.hsqldb.index.NodeAVLDisk; import org.hsqldb.lib.ArrayUtil; -import org.hsqldb.lib.DoubleIntIndex; import org.hsqldb.lib.DoubleLongIndex; import org.hsqldb.lib.LongKeyHashMap; import org.hsqldb.lib.LongLookup; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVLHybrid.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVLHybrid.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVLHybrid.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVLHybrid.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ package org.hsqldb.persist; -import java.io.IOException; +import java.util.Arrays; import org.hsqldb.HsqlException; import org.hsqldb.Row; @@ -77,7 +77,7 @@ } if (table.getTableType() == TableBase.RESULT_TABLE) { - setTimestamp(session.getActionTimestamp()); + setTimestamp(session.getActionSCN()); } // test code to force use of cache @@ -215,9 +215,7 @@ elementCount.set(0); ArrayUtil.fillArray(accessorList, null); - for (int i = 0; i < nullsList.length; i++) { - nullsList[i] = false; - } + Arrays.fill(nullsList, false); } public void remove(CachedObject object) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreAVL.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreAVL.java 2022-06-08 09:12:38.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,7 +63,7 @@ * Base implementation of PersistentStore for different table types. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public abstract class RowStoreAVL implements PersistentStore { @@ -634,7 +634,7 @@ } } } catch (OutOfMemoryError e) { - throw Error.error(ErrorCode.OUT_OF_MEMORY); + throw Error.error(ErrorCode.OUT_OF_MEMORY, e); } } @@ -741,7 +741,7 @@ return true; } catch (OutOfMemoryError e) { - error = Error.error(ErrorCode.OUT_OF_MEMORY); + error = Error.error(ErrorCode.OUT_OF_MEMORY, e); } catch (HsqlException e) { error = e; } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreDataChange.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreDataChange.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/RowStoreDataChange.java 2020-07-10 14:10:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/RowStoreDataChange.java 2022-05-22 17:54:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,6 @@ package org.hsqldb.persist; -import java.io.IOException; - import org.hsqldb.HsqlException; import org.hsqldb.Row; import org.hsqldb.RowDiskDataChange; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/ScriptRunner.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/ScriptRunner.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/ScriptRunner.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/ScriptRunner.java 2022-06-03 13:24:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,7 +59,7 @@ * logged to the application log. If memory runs out, an exception is thrown. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.7.2 */ public class ScriptRunner { @@ -246,7 +246,7 @@ // catch out-of-memory errors and terminate database.logger.logSevereEvent(error, e); - throw Error.error(ErrorCode.OUT_OF_MEMORY); + throw Error.error(ErrorCode.OUT_OF_MEMORY, e); } catch (Throwable t) { HsqlException e = Error.error(t, ErrorCode.ERROR_IN_LOG_FILE, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TableSpaceManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TableSpaceManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TableSpaceManager.java 2020-05-20 08:55:38.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TableSpaceManager.java 2022-02-21 14:41:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2020, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TextFileOps.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TextFileOps.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TextFileOps.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TextFileOps.java 2022-03-08 11:25:34.000000000 +0000 @@ -0,0 +1,254 @@ +/* Copyright (c) 2001-2022, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.persist; + +import org.hsqldb.Database; +import org.hsqldb.Row; +import org.hsqldb.Session; +import org.hsqldb.Table; +import org.hsqldb.error.Error; +import org.hsqldb.error.ErrorCode; +import org.hsqldb.lib.FileUtil; +import org.hsqldb.navigator.RowIterator; +import org.hsqldb.result.Result; +import org.hsqldb.rowio.RowInputInterface; +import org.hsqldb.rowio.RowInputText; +import org.hsqldb.rowio.RowInputTextQuoted; +import org.hsqldb.rowio.RowOutputInterface; +import org.hsqldb.rowio.RowOutputText; +import org.hsqldb.rowio.RowOutputTextQuoted; +import org.hsqldb.types.Type; + +/** + * Read and write delimited text files. + * + * @author Fred Toussi (fredt@users dot sourceforge.net) + * @version 2.7.0 + * @since 2.7.0 +*/ +public class TextFileOps { + + public static Result loadTextData(Session session, String fileSettings, + Table table, int mode) { + + TextFileReader reader; + Database database = session.database; + FileUtil fa = FileUtil.getFileUtil(); + TextFileSettings textFileSettings = + new TextFileSettings(database.getProperties(), fileSettings); + String dataFileName = textFileSettings.getFileName(); + RandomAccessInterface dataFile; + RowInputInterface rowIn; + RowInsertSimple rowInsert; + + if (dataFileName == null || dataFileName.length() == 0) { + throw Error.error(ErrorCode.X_S0501); + } + + dataFileName = fa.canonicalOrAbsolutePath(dataFileName); + + boolean exists = FileUtil.getFileUtil().exists(dataFileName); + + if (!exists) { + throw Error.error(null, ErrorCode.FILE_IO_ERROR, + ErrorCode.M_TextCache_opening_file_error, + new String[] { + dataFileName, "file does not exist" + }); + } + + try { + dataFile = RAFile.newScaledRAFile(database, dataFileName, true, + RAFile.DATA_FILE_TEXT); + } catch (Throwable t) { + throw Error.error(t, ErrorCode.FILE_IO_ERROR, + ErrorCode.M_TextCache_opening_file_error, + new String[] { + dataFileName, t.toString() + }); + } + + if (textFileSettings.isQuoted || textFileSettings.isAllQuoted) { + rowIn = new RowInputTextQuoted(textFileSettings); + } else { + rowIn = new RowInputText(textFileSettings); + } + + reader = TextFileReader8.newTextFileReader(dataFile, textFileSettings, + rowIn, true); + + RowInsertInterface.ErrorLogger callback; + + if (mode == RowInsertInterface.modes.continueOnError) { + callback = new RowInsertSimple.InsertErrorHandler(database, + dataFileName); + } else { + callback = new RowInsertSimple.DefaultErrorHandler(); + } + + rowInsert = new RowInsertSimple(session, callback, mode); + + PersistentStore store = table.getRowStore(session); + Type[] types = table.getColumnTypes(); + boolean ignoreFirst = textFileSettings.isIgnoreFirst; + + try { + while (true) { + rowIn = reader.readObject(); + + if (rowIn == null) { + break; + } + + if (ignoreFirst) { + ignoreFirst = false; + + continue; + } + + Object[] data = rowIn.readData(types); + + if (textFileSettings.isNullDef) { + table.generateDefaultForNull(data); + } + + table.generateAndCheckData(session, data); + + if (mode == RowInsertInterface.modes.checkUntillError) { + continue; + } + + rowInsert.insert(table, store, data); + } + + rowInsert.finishTable(); + } catch (Throwable t) { + long linenumber = reader.getLineNumber(); + + throw Error.error(t, ErrorCode.TEXT_FILE, 0, new String[] { + String.valueOf(linenumber), t.toString() + }); + } finally { + rowInsert.close(); + + try { + if (callback != null) { + callback.close(); + } + } catch (Exception e) {} + + try { + dataFile.close(); + } catch (Exception e) {} + } + + return Result.newUpdateCountResult((int) reader.getLineNumber()); + } + + public static Result unloadTextData(Session session, String fileSettings, + Table table) { + + Database database = session.database; + FileUtil fa = FileUtil.getFileUtil(); + TextFileSettings textFileSettings = + new TextFileSettings(database.getProperties(), fileSettings); + String dataFileName = textFileSettings.getFileName(); + RandomAccessInterface dataFile; + RowOutputInterface rowOut; + int lineCount = 0; + + if (dataFileName == null || dataFileName.length() == 0) { + throw Error.error(ErrorCode.X_S0501); + } + + dataFileName = fa.canonicalOrAbsolutePath(dataFileName); + + boolean exists = FileUtil.getFileUtil().exists(dataFileName); + + if (exists) { + throw Error.error(null, ErrorCode.TEXT_SOURCE_EXISTS, + ErrorCode.M_TextCache_opening_file_error, + new String[] { + dataFileName, "file exists" + }); + } + + try { + dataFile = new RAFileSimple(database.logger, dataFileName, "rw"); + } catch (Throwable t) { + throw Error.error(t, ErrorCode.FILE_IO_ERROR, + ErrorCode.M_TextCache_opening_file_error, + new String[]{ dataFileName }); + } + + if (textFileSettings.isQuoted || textFileSettings.isAllQuoted) { + rowOut = new RowOutputTextQuoted(textFileSettings); + } else { + rowOut = new RowOutputText(textFileSettings); + } + + PersistentStore store = table.getRowStore(session); + Type[] types = table.getColumnTypes(); + RowIterator it = table.rowIteratorForScript(store); + long filePosition = 0; + + try { + while (it.next()) { + rowOut.reset(); + + Row row = it.getCurrentRow(); + + rowOut.writeData(row, types); + rowOut.writeEnd(); + dataFile.seek(filePosition); + dataFile.write(rowOut.getOutputStream().getBuffer(), 0, + rowOut.getOutputStream().size()); + + filePosition += rowOut.getOutputStream().size(); + + lineCount++; + } + + dataFile.synch(); + } catch (Throwable t) { + throw Error.error(t, ErrorCode.FILE_IO_ERROR, + ErrorCode.M_TextCache_opening_file_error, + new String[]{ dataFileName }); + } finally { + try { + dataFile.close(); + } catch (Exception e) {} + } + + return Result.newUpdateCountResult((int) lineCount); + } +} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TextFileReader8.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TextFileReader8.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TextFileReader8.java 2017-12-09 11:59:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TextFileReader8.java 2022-06-03 12:48:34.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +48,7 @@ * * @author Bob Preston (sqlbob@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.1 + * @version 2.7.0 * @since 2.2.7 */ public class TextFileReader8 implements TextFileReader { @@ -219,7 +219,7 @@ try { rowString = buffer.getString(); } catch (UnsupportedEncodingException e) { - throw Error.error(ErrorCode.X_S0531); + throw Error.error(ErrorCode.X_S0531, e); } ((RowInputText) rowIn).setSource(rowString, position, @@ -280,7 +280,7 @@ break; } } catch (IOException e) { - throw Error.error(ErrorCode.TEXT_FILE); + throw Error.error(ErrorCode.TEXT_FILE, e); } switch (c) { @@ -313,7 +313,7 @@ try { header = buffer.getString(); } catch (UnsupportedEncodingException e) { - throw Error.error(ErrorCode.X_S0531); + throw Error.error(ErrorCode.X_S0531, e); } position += buffer.getByteSize(); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TextFileSettings.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TextFileSettings.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/persist/TextFileSettings.java 2020-02-21 20:15:10.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/persist/TextFileSettings.java 2022-06-03 12:48:22.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ * * @author Bob Preston (sqlbob@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 2.2.6 */ public class TextFileSettings { @@ -277,7 +277,7 @@ bytesForSpace = " ".getBytes(charEncoding); } } catch (UnsupportedEncodingException e) { - throw Error.error(ErrorCode.X_S0531); + throw Error.error(ErrorCode.X_S0531, e); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/QueryExpression.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/QueryExpression.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/QueryExpression.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/QueryExpression.java 2022-03-24 13:06:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ * Implementation of an SQL query expression * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class QueryExpression implements RangeGroup { @@ -755,7 +755,7 @@ break; } - if (round > 256) { + if (round > session.database.sqlMaxRecursive) { throw Error.error(ErrorCode.X_22522); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/QuerySpecification.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/QuerySpecification.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/QuerySpecification.java 2021-10-10 20:33:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/QuerySpecification.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -87,7 +87,6 @@ int endInnerRange = -1; Expression queryCondition; Expression checkQueryCondition; - Expression rowExpression; Expression[] exprColumns; HsqlArrayList exprColumnList; GroupSet groupSet; @@ -956,8 +955,6 @@ (Expression) sortAndSlice.exprList.get(i); } } - - rowExpression = new Expression(OpTypes.ROW, exprColumns); } private int replaceColumnIndexInOrderBy(Expression orderBy) { @@ -1019,6 +1016,8 @@ */ public void resolveExpressionTypes(Session session) { + Expression rowExpression = new Expression(OpTypes.ROW, exprColumns); + for (int i = 0; i < indexStartAggregates; i++) { Expression e = exprColumns[i]; @@ -1038,11 +1037,18 @@ } } + rowExpression.nodes = new Expression[1]; + for (int i = 0; i < rangeVariables.length; i++) { Expression e = rangeVariables[i].getJoinCondition(); if (e != null) { - e.resolveTypes(session, null); + rowExpression.setLeftNode(e); + e.resolveTypes(session, rowExpression); + + e = rowExpression.getLeftNode(); + + rangeVariables[i].setJoinCondition(e); if (e.getDataType() != Type.SQL_BOOLEAN) { throw Error.error(ErrorCode.X_42568); @@ -1051,7 +1057,10 @@ } if (queryCondition != null) { - queryCondition.resolveTypes(session, null); + rowExpression.setLeftNode(queryCondition); + queryCondition.resolveTypes(session, rowExpression); + + queryCondition = rowExpression.getLeftNode(); if (queryCondition.getDataType() != Type.SQL_BOOLEAN) { throw Error.error(ErrorCode.X_42568); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/RangeVariable.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/RangeVariable.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/RangeVariable.java 2021-10-10 20:33:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/RangeVariable.java 2022-04-21 06:32:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -695,6 +695,10 @@ return joinCondition; } + public void setJoinCondition(Expression e) { + joinCondition = e; + } + public void addJoinCondition(Expression e) { joinCondition = ExpressionLogical.andExpressions(joinCondition, e); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/RangeVariableResolver.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/RangeVariableResolver.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/RangeVariableResolver.java 2021-10-10 20:33:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/RangeVariableResolver.java 2022-03-26 22:13:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ * processing and which indexes are used for table access. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class RangeVariableResolver { @@ -741,7 +741,7 @@ continue; } - for (int i = 0; i < starts.size(); i++) { + for (int i = 0; i < newRanges.length; i++) { Table table = newRanges[i].rangeTable; collectIndexableColumns(newRanges[i], starts); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/ReferenceObject.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/ReferenceObject.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/ReferenceObject.java 2020-03-25 23:25:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/ReferenceObject.java 2022-02-21 14:42:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2020, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/information-schema.sql hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/information-schema.sql --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/information-schema.sql 2021-07-10 19:21:02.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/information-schema.sql 2022-03-05 22:19:40.000000000 +0000 @@ -1,4 +1,4 @@ --- author Fred Toussi (fredt@users dot sourceforge.net) version 2.6.1 +-- author Fred Toussi (fredt@users dot sourceforge.net) version 2.7.0 /*system_procedures*/ SELECT ROUTINE_CATALOG AS PROCEDURE_CAT, ROUTINE_SCHEMA AS PROCEDURE_SCHEM, ROUTINE_NAME AS PROCEDURE_NAME, 0, 0, 0, @@ -531,7 +531,13 @@ ('T652', 'SQL-dynamic statements in SQL routines', '', '', 'NO', NULL, ''), ('T653', 'SQL-schema statements in external routines', '', '', 'NO', NULL, ''), ('T654', 'SQL-dynamic statements in external routines', '', '', 'YES', NULL, ''), -('T655', 'Cyclically dependent routines', '', '', 'YES', NULL, ''); +('T655', 'Cyclically dependent routines', '', '', 'YES', NULL, ''), +('T811', 'Basic SQL/JSON constructor functions', '', '', 'YES', NULL, ''), +('T812', 'SQL/JSON: JSON_OBJECTAGG with no on CONNECT statement' ), ( 17, 'DBMS NAME', NULL, 'HSQLDB', 'CHAR: Name of the implementation software' ), -( 18, 'DBMS VERSION', NULL, '2.6.1', 'CHAR: Version of the implementation software The format is: ..[] where: ::= ::= ::= ::= ' ), +( 18, 'DBMS VERSION', NULL, '2.7.0', 'CHAR: Version of the implementation software The format is: ..[] where: ::= ::= ::= ::= ' ), ( 26, 'DEFAULT TRANSACTION ISOLATION', 2, NULL, 'INT: 1: READ UNCOMMITTED 2: READ COMMITTED 3: REPEATABLE READ 4: SERIALIZABLE' ), ( 28, 'IDENTIFIER CASE', 3, NULL, 'The case in which identifiers are stored in the Definition Schema INT: 1: stored in upper case 2: stored in lower case 3: stored in mixed case - case sensitive 4: stored in mixed case - case insensitive' ), ( 85, 'NULL COLLATION', 1, NULL, 'INT: 0: nulls higher than non-nulls 1: nulls lower than non-nulls' ), diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/info-table-remarks.properties hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/info-table-remarks.properties --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/info-table-remarks.properties 2020-03-28 13:09:50.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/info-table-remarks.properties 2022-03-31 20:44:58.000000000 +0000 @@ -13,7 +13,7 @@ SYSTEM_PRIMARYKEYS=the visible columns of the primary key of each accessible table defined within this database SYSTEM_PROCEDURECOLUMNS=a description of the return type, parameters and result columns of each accessible callable procedure, SQL function, trigger body and UDT method defined within this database SYSTEM_PROCEDURES=the procedures, SQL functions, trigger body routines and UDT methods defined within the database -SYSTEM_PROPERTIES=the static and dynamic system properties and operating parameters of this database +SYSTEM_PROPERTIES=the system properties and operating parameters of this database SYSTEM_SCHEMAS=the accessible schemas defined within this database SYSTEM_SEQUENCES=the visible sequences in this database SYSTEM_SESSIONINFO=information about the current database session diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/jdklogging-default.properties hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/jdklogging-default.properties --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/jdklogging-default.properties 2018-10-23 07:24:28.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/jdklogging-default.properties 2022-07-07 16:32:28.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: jdklogging-default.properties 5440 2015-03-21 15:08:28Z unsaved $ +# $Id: jdklogging-default.properties 6572 2022-07-07 17:32:55Z fredt $ # As this is a Java .properties file, use ISO-8859-1 encoding for any # extended characters. @@ -22,6 +22,19 @@ java.util.logging.ConsoleHandler.level=WARNING java.util.logging.ConsoleHandler.formatter=org.hsqldb.lib.BasicTextJdkLogFormatter +# for use of custom ConsoleHandler uncomment below and comment out above two lines +#org.hsqldb.lib.HsqlConsoleHandler.level=WARNING +#for testing, comment out line above and uncomment line below +#org.hsqldb.lib.HsqlConsoleHandler.level=INFO +#org.hsqldb.lib.HsqlConsoleHandler.formatter=org.hsqldb.lib.BasicTextJdkLogFormatter + +#hsqldb.db.handlers=org.hsqldb.lib.HsqlConsoleHandler +#hsqldb.db.useParentHandlers=false +#org.hsqldb.auth.handlers=org.hsqldb.lib.HsqlConsoleHandler +#org.hsqldb.auth.useParentHandlers=false +#org.hsqldb.lib.FileUtil.handlers=org.hsqldb.lib.HsqlConsoleHandler +#org.hsqldb.lib.FileUtil.useParentHandlers=false + #java.util.logging.FileHandler.pattern=hsqldb.applog #java.util.logging.FileHandler.limit=50000 #java.util.logging.FileHandler.count=1 diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/ResourceBundleHandler.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/ResourceBundleHandler.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/resources/ResourceBundleHandler.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/resources/ResourceBundleHandler.java 2022-06-08 08:20:20.000000000 +0000 @@ -63,7 +63,7 @@ /** The Locale used internally to fetch resource bundles. */ private static Locale locale = Locale.getDefault(); - /** Map: Integer object handle => ResourceBundle object. */ + /** Map: Integer object handle maps to: ResourceBundle object. */ private static HashMap bundleHandleMap = new HashMap(); /** List whose elements are ResourceBundle objects */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/result/Result.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/result/Result.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/result/Result.java 2021-07-09 16:59:12.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/result/Result.java 2022-06-03 13:24:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,7 +69,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class Result { @@ -266,7 +266,7 @@ return result; } catch (IOException e) { - throw Error.error(ErrorCode.X_08000); + throw Error.error(ErrorCode.X_08000, e); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/result/ResultLob.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/result/ResultLob.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/result/ResultLob.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/result/ResultLob.java 2022-03-26 22:13:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ * Sub-class of Result for communicating Blob and Clob operations.

                * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public final class ResultLob extends Result { @@ -105,7 +105,7 @@ } public static ResultLob newLobGetBytesRequest(long id, long offset, - int length) { + long length) { ResultLob result = new ResultLob(); @@ -118,7 +118,7 @@ } public static ResultLob newLobGetCharsRequest(long id, long offset, - int length) { + long length) { ResultLob result = new ResultLob(); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/Grantee.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/Grantee.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/Grantee.java 2021-03-20 11:39:08.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/Grantee.java 2022-06-08 08:20:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,7 +72,7 @@ * @author Fred Toussi (fredt@users dot sourceforge.net) * @author Blaine Simpson (blaine dot simpson at admc dot com) * - * @version 2.6.0 + * @version 2.7.0 * @since 1.8.0 */ public class Grantee implements SchemaObject { @@ -294,15 +294,45 @@ return getAllRoles().contains(role); } + private void grantToAll(HsqlName name, Right right, Grantee grantor, + boolean withGrant) { + + int objectType = SchemaObject.TABLE; + + if (right.isFullUsage) { + right = Right.fullRights; + objectType = SchemaObject.SEQUENCE; + } else if (right.isFullExecute) { + right = Right.fullRights; + objectType = SchemaObject.SPECIFIC_ROUTINE; + } + + Iterator it = + granteeManager.database.schemaManager.databaseObjectIterator( + name.name, objectType); + + while (it.hasNext()) { + SchemaObject object = (SchemaObject) it.next(); + + grant(object.getName(), right, grantor, withGrant); + } + } + /** * Grants the specified rights on the specified database object.

                * * Keys stored in rightsMap for database tables are their HsqlName - * attribute. This allows rights to persist when a table is renamed.

                + * attribute. This allows rights to persist when a table is renamed. */ void grant(HsqlName name, Right right, Grantee grantor, boolean withGrant) { + if (name.type == SchemaObject.SCHEMA) { + grantToAll(name, right, grantor, withGrant); + + return; + } + final Right grantableRights = grantor.getAllGrantableRights(name); Right existingRight = null; @@ -357,6 +387,30 @@ updateAllRights(); } + private void revokeFromAll(HsqlName name, Right right, Grantee grantor, + boolean grantOption) { + + int objectType = SchemaObject.TABLE; + + if (right.isFullUsage) { + right = Right.fullRights; + objectType = SchemaObject.SEQUENCE; + } else if (right.isFullExecute) { + right = Right.fullRights; + objectType = SchemaObject.SPECIFIC_ROUTINE; + } + + Iterator it = + granteeManager.database.schemaManager.databaseObjectIterator( + name.name, objectType); + + while (it.hasNext()) { + SchemaObject object = (SchemaObject) it.next(); + + revoke(object, right, grantor, grantOption); + } + } + /** * Revokes the specified rights on the specified database object.

                * @@ -369,6 +423,12 @@ HsqlName name = object.getName(); + if (name.type == SchemaObject.SCHEMA) { + grantToAll(name, right, grantor, grantOption); + + return; + } + if (object instanceof Routine) { name = ((Routine) object).getSpecificName(); } @@ -427,7 +487,7 @@ } /** - * Update own table column set rights to include a newly created column. - * - * @todo -- see if this is correct and the currentRole.fullRightsMap - * is always updated prior to being added to this.fullRightsMap + * granted to the object itself. */ void updateAllRights() { @@ -1065,7 +1122,7 @@ * Retrieves the map object that represents the rights that have been * granted on database objects.

                * - * The map has keys and values with the following interpretation:

                + * The map has keys and values with the following interpretation: * *

                  *
                • The keys are generally (but not limited to) objects having diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/GranteeManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/GranteeManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/GranteeManager.java 2021-03-20 11:38:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/GranteeManager.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ * @author Fred Toussi (fredt@users dot sourceforge.net) * @author Blaine Simpson (blaine dot simpson at admc dot com) * - * @version 2.6.0 + * @version 2.7.0 * @since 1.8.0 * @see Grantee */ @@ -88,6 +88,7 @@ SqlInvariants.SYSTEM_SCHEMA_HSQLNAME); SqlInvariants.INFORMATION_SCHEMA_HSQLNAME.owner = systemAuthorisation; + SqlInvariants.SESSION_SCHEMA_HSQLNAME.owner = systemAuthorisation; SqlInvariants.SYSTEM_SCHEMA_HSQLNAME.owner = systemAuthorisation; SqlInvariants.LOBS_SCHEMA_HSQLNAME.owner = systemAuthorisation; SqlInvariants.SQLJ_SCHEMA_HSQLNAME.owner = systemAuthorisation; @@ -232,7 +233,7 @@ * rights checks and tests will fail, since the HsqlName * class implements its {@link HsqlName#hashCode() hashCode} and * {@link HsqlName#equals equals} methods based on pure object - * identity, rather than on attribute values.

                  + * identity, rather than on attribute values. */ public void grant(Session session, OrderedHashSet granteeList, SchemaObject dbObject, Right right, Grantee grantor, @@ -450,7 +451,7 @@ * Revokes the rights represented by the rights argument on * the database object identified by the dbobject argument * from the User object identified by the name - * argument.

                  + * argument. * @see #grant */ public void revoke(OrderedHashSet granteeList, SchemaObject dbObject, @@ -519,7 +520,7 @@ /** * Updates all the talbe level rights on a table after the addition of a - * column.

                  + * column. */ public void updateAddColumn(HsqlName table, HsqlName column) { @@ -659,7 +660,7 @@ /** * Creates a new Role object under management of this object.

                  * - * A set of constraints regarding user creation is imposed:

                  + * A set of constraints regarding user creation is imposed: * *

                    *
                  1. Can't create a role with name same as any right. @@ -787,13 +788,13 @@ * Attempts to drop a Role with the specified name * from this object's set.

                    * - * A successful drop action consists of:

                    + * A successful drop action consists of: * *

                      * *
                    • removing the Grantee object with the specified name * from the set. - *

                    + *

                * */ public void dropRole(String name) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/Right.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/Right.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/Right.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/Right.java 2022-05-14 09:52:40.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ * * @author Fred Toussi (fredt@users dot sourceforge.net) * - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public final class Right { @@ -55,9 +55,11 @@ boolean isFullSelect; boolean isFullInsert; boolean isFullUpdate; + boolean isFullDelete; boolean isFullReferences; boolean isFullTrigger; - boolean isFullDelete; + boolean isFullExecute; // used only in temporary Right object + boolean isFullUsage; // ditto OrderedHashSet selectColumnSet; OrderedHashSet insertColumnSet; OrderedHashSet updateColumnSet; @@ -86,11 +88,11 @@ fullRights.grantor = GranteeManager.systemAuthorisation; } - public static final String[] privilegeNames = { + public static final String[] tablePrivilegeNames = { Tokens.T_SELECT, Tokens.T_INSERT, Tokens.T_UPDATE, Tokens.T_DELETE, Tokens.T_REFERENCES, Tokens.T_TRIGGER }; - public static final int[] privilegeTypes = { + public static final int[] tablePrivilegeTypes = { GrantConstants.SELECT, GrantConstants.INSERT, GrantConstants.UPDATE, GrantConstants.DELETE, GrantConstants.REFERENCES, GrantConstants.TRIGGER @@ -121,7 +123,7 @@ : grantableRights; } - public Right duplicate() { + Right duplicate() { Right right = new Right(); @@ -194,7 +196,7 @@ /** * Supports column level GRANT */ - public void add(Right right) { + void add(Right right) { if (isFull) { return; @@ -275,7 +277,7 @@ /** * supports column level REVOKE */ - public void remove(SchemaObject object, Right right) { + void remove(SchemaObject object, Right right) { if (right.isFull) { clear(); @@ -400,7 +402,7 @@ /** * supports column level GRANT / REVOKE */ - public boolean isEmpty() { + boolean isEmpty() { if (isFull || isFullSelect || isFullInsert || isFullUpdate || isFullReferences || isFullDelete) { @@ -461,8 +463,7 @@ return set; } - // construction - public boolean contains(Right right) { + boolean contains(Right right) { if (isFull) { return true; @@ -579,9 +580,10 @@ return true; } - static boolean containsRights(boolean isFull, OrderedHashSet columnSet, - OrderedHashSet otherColumnSet, - boolean otherIsFull) { + private static boolean containsRights(boolean isFull, + OrderedHashSet columnSet, + OrderedHashSet otherColumnSet, + boolean otherIsFull) { if (isFull) { return true; @@ -664,41 +666,7 @@ return isFull || isFullDelete; } - public boolean canAccessFully(int action) { - - if (isFull) { - return true; - } - - switch (action) { - - case GrantConstants.DELETE : - return isFullDelete; - - case GrantConstants.SELECT : - return isFullSelect; - - case GrantConstants.INSERT : - return isFullInsert; - - case GrantConstants.UPDATE : - return isFullUpdate; - - case GrantConstants.REFERENCES : - return isFullReferences; - - case GrantConstants.TRIGGER : - return isFullTrigger; - - case GrantConstants.EXECUTE : - return isFull; - - default : - throw Error.runtimeError(ErrorCode.U_S0500, "Right"); - } - } - - public boolean canAccesssNonSelect() { + boolean canAccessNonSelect() { if (isFull) { return true; @@ -778,7 +746,7 @@ } } - public boolean canAccess(Table table, int[] columnMap) { + boolean canAccess(Table table, int[] columnMap) { if (isFull) { return true; @@ -847,7 +815,7 @@ }; } - public boolean hasFilter() { + boolean hasFilter() { return selectFilter != null || deleteFilter != null || insertFilter != null || updateFilter != null; } @@ -971,7 +939,7 @@ buf.append(')'); } - public void addNewColumn(HsqlName name) { + void addNewColumn(HsqlName name) { if (selectColumnSet != null) { selectColumnSet.add(name); @@ -1098,6 +1066,14 @@ triggerColumnSet = set; break; + case GrantConstants.EXECUTE : + isFullExecute = true; + break; + + case GrantConstants.USAGE : + isFullUsage = true; + break; + default : } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/UserManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/UserManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rights/UserManager.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rights/UserManager.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,7 +94,7 @@ /** * Creates a new User object under management of this object.

                * - * A set of constraints regarding user creation is imposed:

                + * A set of constraints regarding user creation is imposed: * *

                  *
                1. If the specified name is null, then an @@ -165,7 +165,7 @@ * Attempts to drop a User object with the specified name * from this object's set.

                  * - * A successful drop action consists of:

                  + * A successful drop action consists of: * *

                    * diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/RowActionBase.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/RowActionBase.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/RowActionBase.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/RowActionBase.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * timestamps are not in any order * * @author Fred Toussi (fredt@users dot sourceforge dot net) - * @version 2.3.2 + * @version 2.7.0 * @since 2.0.0 */ @@ -59,15 +59,15 @@ public static final byte ACTION_DEBUG = 7; // - RowActionBase next; - Session session; - long actionTimestamp; - long commitTimestamp; - byte type; - boolean deleteComplete; - boolean rolledback; - boolean prepared; - int[] changeColumnMap; + RowActionBase next; + Session session; + long actionSCN; + long commitSCN; + byte type; + boolean deleteComplete; + boolean rolledback; + boolean prepared; + int[] changeColumnMap; RowActionBase() {} @@ -76,17 +76,17 @@ */ RowActionBase(Session session, byte type) { - this.session = session; - this.type = type; - actionTimestamp = session.actionTimestamp; + this.session = session; + this.type = type; + actionSCN = session.actionSCN; } void setAsAction(RowActionBase action) { next = action.next; session = action.session; - actionTimestamp = action.actionTimestamp; - commitTimestamp = action.commitTimestamp; + actionSCN = action.actionSCN; + commitSCN = action.commitSCN; type = action.type; deleteComplete = action.deleteComplete; rolledback = action.rolledback; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/RowAction.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/RowAction.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/RowAction.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/RowAction.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ * Represents the chain of insert / delete / rollback / commit actions on a row. * * @author Fred Toussi (fredt@users dot sourceforge dot net) - * @version 2.6.0 + * @version 2.7.0 * @since 2.0.0 */ public class RowAction extends RowActionBase { @@ -101,7 +101,7 @@ this.session = session; this.type = type; - this.actionTimestamp = session.actionTimestamp; + this.actionSCN = session.actionSCN; this.table = table; this.store = store; this.memoryRow = row; @@ -136,7 +136,7 @@ switch (action.type) { case ACTION_INSERT : { - if (action.commitTimestamp == 0 + if (action.commitSCN == 0 && session != action.session) { throw Error.runtimeError(ErrorCode.U_S0500, "RowAction"); @@ -147,7 +147,7 @@ case ACTION_DELETE_FINAL : case ACTION_DELETE : { if (session != action.session) { - if (action.commitTimestamp == 0) { + if (action.commitSCN == 0) { if (!session.actionSet.isEmpty()) { session.actionSet.clear(); } @@ -162,7 +162,7 @@ } case ACTION_REF : { if (session != action.session - && action.commitTimestamp == 0) { + && action.commitSCN == 0) { if (colMap == null || ArrayUtil.haveCommonElement( colMap, action.changeColumnMap)) { @@ -213,18 +213,17 @@ if (session == action.session) { if (action.type == ACTION_REF && action.changeColumnMap == colMap - && action.commitTimestamp == 0) { + && action.commitSCN == 0) { return false; } if (action.type == ACTION_INSERT) { - if (action.commitTimestamp == 0) { + if (action.commitSCN == 0) { return false; } } } else { - if (action.type == ACTION_DELETE - && action.commitTimestamp == 0) { + if (action.type == ACTION_DELETE && action.commitSCN == 0) { if (action.changeColumnMap == null || ArrayUtil.haveCommonElement( colMap, action.changeColumnMap)) { @@ -256,9 +255,9 @@ synchronized void setNoOpAsAction(Session session, byte type) { - this.session = session; - this.type = type; - actionTimestamp = session.actionTimestamp; + this.session = session; + this.type = type; + actionSCN = session.actionSCN; } synchronized void setAsAction(RowActionBase action) { @@ -270,8 +269,8 @@ // memoryRow = null; session = null; type = ACTION_NONE; - actionTimestamp = 0; - commitTimestamp = 0; + actionSCN = 0; + commitSCN = 0; rolledback = false; deleteComplete = false; prepared = false; @@ -282,8 +281,8 @@ private void setAsDeleteFinal(long timestamp) { type = ACTION_DELETE_FINAL; - actionTimestamp = 0; - commitTimestamp = timestamp; + actionSCN = 0; + commitSCN = timestamp; rolledback = false; deleteComplete = false; prepared = false; @@ -297,7 +296,7 @@ RowActionBase action = this; do { - if (action.session == session && action.commitTimestamp == 0) { + if (action.session == session && action.commitSCN == 0) { action.prepared = true; } @@ -311,9 +310,9 @@ int actiontype = ACTION_NONE; do { - if (action.session == session && action.commitTimestamp == 0) { - action.commitTimestamp = session.actionTimestamp; - action.prepared = false; + if (action.session == session && action.commitSCN == 0) { + action.commitSCN = session.actionSCN; + action.prepared = false; if (action.type == ACTION_INSERT) { actiontype = action.type; @@ -339,7 +338,7 @@ RowActionBase action = this; do { - if (action.commitTimestamp != 0) { + if (action.commitSCN != 0) { if (action.type == ACTION_DELETE || action.type == ACTION_DELETE_FINAL) { return true; @@ -370,7 +369,7 @@ int actionType = ACTION_NONE; do { - if (action.commitTimestamp == timestamp) { + if (action.commitSCN == timestamp) { if (action.type == ACTION_INSERT) { actionType = action.type; } else if (action.type == ACTION_DELETE) { @@ -396,7 +395,7 @@ synchronized boolean canCommit(Session session) { RowActionBase action; - long timestamp = session.transactionTimestamp; + long timestamp = session.transactionSCN; long commitTimestamp = 0; final boolean readCommitted = session.isolationLevel == SessionInterface.TX_READ_COMMITTED; @@ -410,8 +409,8 @@ && action.type == ACTION_DELETE) { // for READ_COMMITTED, use action timestamp for later conflicts - if (action.commitTimestamp == 0) { - timestamp = action.actionTimestamp; + if (action.commitSCN == 0) { + timestamp = action.actionSCN; } } @@ -437,10 +436,10 @@ return false; } - if (action.commitTimestamp == 0) { + if (action.commitSCN == 0) { session.actionSet.add(action); - } else if (action.commitTimestamp > commitTimestamp) { - commitTimestamp = action.commitTimestamp; + } else if (action.commitSCN > commitTimestamp) { + commitTimestamp = action.commitSCN; } } @@ -486,7 +485,7 @@ } if (readCommitted) { - if (action.commitTimestamp > session.actionTimestamp) { + if (action.commitSCN > session.actionSCN) { // 2.0 -- investigate // can redo - if deletes @@ -495,13 +494,12 @@ set.add(session); result = false; - } else if (action.commitTimestamp == 0) { + } else if (action.commitSCN == 0) { set.add(action.session); result = false; } - } else if (action.commitTimestamp - > session.transactionTimestamp) { + } else if (action.commitSCN > session.transactionSCN) { return false; } } @@ -552,11 +550,11 @@ RowActionBase action = this; do { - if (action.session == session && action.commitTimestamp == 0) { - if (action.actionTimestamp >= timestamp) { - action.commitTimestamp = session.actionTimestamp; - action.rolledback = true; - action.prepared = false; + if (action.session == session && action.commitSCN == 0) { + if (action.actionSCN >= timestamp) { + action.commitSCN = session.actionSCN; + action.rolledback = true; + action.prepared = false; } } @@ -641,8 +639,8 @@ do { boolean expired = false; - if (action.commitTimestamp != 0) { - if (action.commitTimestamp <= timestamp) { + if (action.commitSCN != 0) { + if (action.commitSCN <= timestamp) { expired = true; } else if (action.type == ACTION_REF) { expired = true; @@ -711,13 +709,13 @@ break; case SessionInterface.TX_READ_COMMITTED : - threshold = session.actionTimestamp; + threshold = session.actionSCN; break; case SessionInterface.TX_REPEATABLE_READ : case SessionInterface.TX_SERIALIZABLE : default : - threshold = session.transactionTimestamp; + threshold = session.transactionSCN; break; } } @@ -749,7 +747,7 @@ action = action.next; continue; - } else if (action.commitTimestamp == 0) { + } else if (action.commitSCN == 0) { if (action.type == ACTION_NONE) { throw Error.runtimeError(ErrorCode.U_S0500, "RowAction"); } else if (action.type == ACTION_INSERT) { @@ -777,7 +775,7 @@ action = action.next; continue; - } else if (action.commitTimestamp < threshold) { + } else if (action.commitSCN < threshold) { if (action.type == ACTION_DELETE) { actionType = ACTION_DELETE; } else if (action.type == ACTION_INSERT) { @@ -813,7 +811,7 @@ RowActionBase action = this; do { - if (action.type == ACTION_REF && action.commitTimestamp == 0) { + if (action.type == ACTION_REF && action.commitSCN == 0) { return true; } @@ -848,10 +846,10 @@ } sb.append(action.session.getId()).append(' '); - sb.append(action.type).append(' ').append(action.actionTimestamp); - sb.append(' ').append(action.commitTimestamp); + sb.append(action.type).append(' ').append(action.actionSCN); + sb.append(' ').append(action.commitSCN); - if (action.commitTimestamp != 0) { + if (action.commitSCN != 0) { if (action.rolledback) { sb.append('r'); } else { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowInputBinary180.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowInputBinary180.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowInputBinary180.java 2015-03-27 15:35:48.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowInputBinary180.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the HSQL Development Group nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -package org.hsqldb.rowio; - -import java.util.Calendar; -import java.util.GregorianCalendar; - -import org.hsqldb.HsqlDateTime; -import org.hsqldb.types.TimeData; -import org.hsqldb.types.TimestampData; -import org.hsqldb.types.Type; -import org.hsqldb.types.Types; - -/** - * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.3.3 - * @since 1.9.0 - */ -public class RowInputBinary180 extends RowInputBinary { - - Calendar tempCalDefault = new GregorianCalendar(); - - public RowInputBinary180(byte[] buf) { - super(buf); - } - - protected TimeData readTime(Type type) { - - if (type.typeCode == Types.SQL_TIME) { - long millis = readLong(); - - millis = HsqlDateTime.convertMillisFromCalendar(tempCalDefault, - millis); - millis = HsqlDateTime.getNormalisedTime(millis); - - return new TimeData((int) (millis / 1000), 0, 0); - } else { - return new TimeData(readInt(), readInt(), readInt()); - } - } - - protected TimestampData readDate(Type type) { - - long millis = readLong(); - - millis = HsqlDateTime.convertMillisFromCalendar(tempCalDefault, - millis); - millis = HsqlDateTime.getNormalisedDate(millis); - - return new TimestampData(millis / 1000); - } - - protected TimestampData readTimestamp(Type type) { - - if (type.typeCode == Types.SQL_TIMESTAMP) { - long millis = readLong(); - int nanos = readInt(); - - millis = HsqlDateTime.convertMillisFromCalendar(tempCalDefault, - millis); - - return new TimestampData(millis / 1000, nanos); - } else { - return new TimestampData(readLong(), readInt(), readInt()); - } - } -} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowInputText.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowInputText.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowInputText.java 2021-01-03 20:46:40.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowInputText.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,6 @@ import java.math.BigDecimal; import org.hsqldb.Scanner; -import org.hsqldb.Tokens; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.map.ValuePool; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowInputTextLog.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowInputTextLog.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowInputTextLog.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowInputTextLog.java 2022-05-21 10:13:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,10 +32,7 @@ package org.hsqldb.rowio; import java.math.BigDecimal; -import java.util.Calendar; -import java.util.GregorianCalendar; -import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; import org.hsqldb.Scanner; import org.hsqldb.Session; @@ -50,7 +47,6 @@ import org.hsqldb.types.BlobDataID; import org.hsqldb.types.ClobData; import org.hsqldb.types.ClobDataID; -import org.hsqldb.types.DateTimeType; import org.hsqldb.types.IntervalMonthData; import org.hsqldb.types.IntervalSecondData; import org.hsqldb.types.IntervalType; @@ -63,7 +59,7 @@ * Class for reading the data for a database row from the script file. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.0 + * @version 2.7.0 * @since 1.7.3 */ public class RowInputTextLog extends RowInputBase @@ -74,9 +70,7 @@ String schemaName = null; int statementType; Object value; - boolean version18; boolean noSeparators; - Calendar tempCalDefault = new GregorianCalendar(); public RowInputTextLog() { @@ -85,14 +79,6 @@ scanner = new Scanner(); } - public RowInputTextLog(boolean version18) { - - super(new byte[0]); - - scanner = new Scanner(); - this.version18 = version18; - } - public void setSource(Session session, String text) { scanner.reset(session, text); @@ -337,17 +323,6 @@ return null; } - if (version18) { - java.sql.Time dateTime = java.sql.Time.valueOf((String) value); - long millis = - HsqlDateTime.convertMillisFromCalendar(tempCalDefault, - dateTime.getTime()); - - millis = HsqlDateTime.getNormalisedTime(millis); - - return new TimeData((int) millis / 1000, 0, 0); - } - return scanner.newTime((String) value); } @@ -359,17 +334,6 @@ return null; } - if (version18) { - java.sql.Date dateTime = java.sql.Date.valueOf((String) value); - long millis = - HsqlDateTime.convertMillisFromCalendar(tempCalDefault, - dateTime.getTime()); - - millis = HsqlDateTime.getNormalisedDate(millis); - - return new TimestampData(millis / 1000); - } - return scanner.newDate((String) value); } @@ -381,19 +345,6 @@ return null; } - if (version18) { - java.sql.Timestamp dateTime = - java.sql.Timestamp.valueOf((String) value); - long millis = - HsqlDateTime.convertMillisFromCalendar(tempCalDefault, - dateTime.getTime()); - int nanos = dateTime.getNanos(); - - nanos = DateTimeType.normaliseFraction(nanos, type.scale); - - return new TimestampData(millis / 1000, nanos, 0); - } - return scanner.newTimestamp((String) value); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowOutputBinary180.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowOutputBinary180.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/rowio/RowOutputBinary180.java 2012-04-05 23:03:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/rowio/RowOutputBinary180.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the HSQL Development Group nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -package org.hsqldb.rowio; - -import java.util.Calendar; -import java.util.GregorianCalendar; - -import org.hsqldb.HsqlDateTime; -import org.hsqldb.types.TimeData; -import org.hsqldb.types.TimestampData; -import org.hsqldb.types.Type; -import org.hsqldb.types.Types; - -/** - * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.2.9 - * @since 1.9.0 - */ -public class RowOutputBinary180 extends RowOutputBinary { - - Calendar tempCalDefault = new GregorianCalendar(); - - public RowOutputBinary180(int initialSize, int scale) { - super(initialSize, scale); - } - - protected void writeDate(TimestampData o, Type type) { - - long millis = o.getSeconds() * 1000L; - - millis = HsqlDateTime.convertMillisToCalendar(tempCalDefault, millis); - - writeLong(millis); - } - - protected void writeTime(TimeData o, Type type) { - - if (type.typeCode == Types.SQL_TIME) { - long millis = o.getSeconds() * 1000L; - - millis = HsqlDateTime.convertMillisToCalendar(tempCalDefault, - millis); - - writeLong(millis); - } else { - writeInt(o.getSeconds()); - writeInt(o.getNanos()); - writeInt(o.getZone()); - } - } - - protected void writeTimestamp(TimestampData o, Type type) { - - if (type.typeCode == Types.SQL_TIMESTAMP) { - long millis = o.getSeconds() * 1000L; - - millis = HsqlDateTime.convertMillisToCalendar(tempCalDefault, - millis); - - writeLong(millis); - writeInt(o.getNanos()); - } else { - writeLong(o.getSeconds()); - writeInt(o.getNanos()); - writeInt(o.getZone()); - } - } -} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/sample/FindFile.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/sample/FindFile.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/sample/FindFile.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/sample/FindFile.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -91,7 +91,7 @@ /** * Extracts a directory tree and stores it ina HSQLDB database.
                    - * Usage:

                    + * Usage: *

                          * java org.hsqldb.sample.FindFile -init .
                          * Re-create database from directory '.'
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/Scanner.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/Scanner.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/Scanner.java	2021-06-11 15:08:06.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/Scanner.java	2022-03-12 19:28:04.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -40,7 +40,6 @@
                     import org.hsqldb.lib.CharArrayWriter;
                     import org.hsqldb.lib.HsqlByteArrayOutputStream;
                     import org.hsqldb.lib.OrderedIntHashSet;
                    -import org.hsqldb.lib.java.JavaSystem;
                     import org.hsqldb.map.BitMap;
                     import org.hsqldb.map.ValuePool;
                     import org.hsqldb.types.BinaryData;
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SchemaManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SchemaManager.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SchemaManager.java	2021-03-18 00:31:36.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SchemaManager.java	2022-07-13 15:38:30.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -55,7 +55,7 @@
                      * Manages all SCHEMA related database objects
                      *
                      * @author Fred Toussi (fredt@users dot sourceforge.net)
                    - * @version 2.6.0
                    + * @version 2.7.0
                      * @since 1.8.0
                      */
                     public class SchemaManager {
                    @@ -108,7 +108,7 @@
                         }
                     
                         public void setSchemaChangeTimestamp() {
                    -        schemaChangeTimestamp = database.txManager.getGlobalChangeTimestamp();
                    +        schemaChangeTimestamp = database.txManager.getSystemChangeNumber();
                         }
                     
                         public long getSchemaChangeTimestamp() {
                    @@ -1836,6 +1836,10 @@
                             readLock.lock();
                     
                             try {
                    +            if (type == SchemaObject.SCHEMA) {
                    +                return getSchemaHsqlName(name);
                    +            }
                    +
                                 Schema          schema = (Schema) schemaMap.get(schemaName.name);
                                 SchemaObjectSet set    = null;
                     
                    @@ -1875,7 +1879,10 @@
                             readLock.lock();
                     
                             try {
                    -            Schema schema = (Schema) schemaMap.get(name.schema.name);
                    +            String nameString = name.type == SchemaObject.SCHEMA ? name.name
                    +                                                                 : name.schema
                    +                                                                     .name;
                    +            Schema schema = (Schema) schemaMap.get(nameString);
                     
                                 if (schema == null) {
                                     return null;
                    @@ -1960,6 +1967,9 @@
                     
                                     case SchemaObject.REFERENCE :
                                         return schema.referenceLookup.getObject(name.name);
                    +
                    +                case SchemaObject.SCHEMA :
                    +                    return schema;
                                 }
                     
                                 return null;
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/scriptio/ScriptReaderText.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/scriptio/ScriptReaderText.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/scriptio/ScriptReaderText.java	2021-01-29 13:34:34.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/scriptio/ScriptReaderText.java	2022-05-21 10:13:50.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -60,7 +60,7 @@
                      * corresponds to ScriptWriterText.
                      *
                      * @author Fred Toussi (fredt@users dot sourceforge.net)
                    - *  @version 2.6.0
                    + *  @version 2.7.0
                      *  @since 1.7.2
                      */
                     public class ScriptReaderText extends ScriptReaderBase {
                    @@ -96,7 +96,7 @@
                             }
                     
                             dataStreamIn = new LineReader(tempStream, JavaSystem.CS_ISO_8859_1);
                    -        rowIn        = new RowInputTextLog(false);
                    +        rowIn        = new RowInputTextLog();
                         }
                     
                         public void readAll(Session session) {
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java	2021-01-25 15:08:24.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java	2022-06-03 13:24:24.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -87,7 +87,7 @@
                      * DatabaseScriptReader and its subclasses read back the data at startup time.
                      *
                      * @author Fred Toussi (fredt@users dot sourceforge.net)
                    - * @version 2.5.1
                    + * @version 2.7.0
                      * @since 1.7.2
                      */
                     public abstract class ScriptWriterBase implements Runnable {
                    @@ -247,7 +247,7 @@
                                     isClosed      = true;
                                 }
                             } catch (IOException e) {
                    -            throw Error.error(ErrorCode.FILE_IO_ERROR);
                    +            throw Error.error(ErrorCode.FILE_IO_ERROR, e);
                             }
                     
                             byteCount = 0;
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/scriptio/ScriptWriterTextColumnNames.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/scriptio/ScriptWriterTextColumnNames.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/scriptio/ScriptWriterTextColumnNames.java	2020-04-05 12:44:28.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/scriptio/ScriptWriterTextColumnNames.java	2022-02-21 14:42:02.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2020, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/HsqlSocketFactory.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/HsqlSocketFactory.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/HsqlSocketFactory.java	2021-02-09 04:49:04.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/HsqlSocketFactory.java	2022-05-17 11:10:04.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -95,12 +95,12 @@
                         }
                     
                         /**
                    -     * Returns a server socket bound to the specified port.
                    -     * The socket is configured with the socket options
                    -     * given to this factory.
                    +     * Returns a server socket bound to the specified port. The socket is
                    +     * configured with the socket options given to this factory.
                          *
                          * @return the ServerSocket
                          * @param port the port to which to bind the ServerSocket
                    +     * @param address String
                          * @throws Exception if a network error occurs
                          */
                         public ServerSocket createServerSocket(int port,
                    @@ -150,7 +150,7 @@
                         }
                     
                     // ------------------------ static utility methods -----------------------------
                    -    private static HsqlSocketFactory getPlainImpl() throws Exception {
                    +    private static HsqlSocketFactory getPlainImpl() {
                     
                             synchronized (HsqlSocketFactory.class) {
                                 if (plainImpl == null) {
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/HsqlSocketFactorySecure.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/HsqlSocketFactorySecure.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/HsqlSocketFactorySecure.java	2021-02-09 17:42:38.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/HsqlSocketFactorySecure.java	2022-06-08 08:55:44.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -65,22 +65,22 @@
                     // --------------------------------- members -----------------------------------
                     
                         /** The underlying socket factory implementation. */
                    -    protected Object socketFactory;
                    +    Object socketFactory;
                     
                         /** The underlying server socket factory implementation. */
                    -    protected Object serverSocketFactory;
                    +    Object serverSocketFactory;
                     
                         /**
                          * Monitor object to guard against concurrent modification
                          * of the underlying socket factory implementation member.
                          */
                    -    protected final Object socket_factory_mutex = new Object();
                    +    final Object socket_factory_mutex = new Object();
                     
                         /**
                          * Monitor object to guard against concurrent modification of
                          * the underlying server socket factory implementation member.
                          */
                    -    protected final Object server_socket_factory_mutex = new Object();
                    +    final Object server_socket_factory_mutex = new Object();
                     
                     // ------------------------------ constructors ---------------------------------
                     
                    @@ -88,7 +88,7 @@
                          * External construction disabled.  New factory instances are retrieved
                          * through the newHsqlSocketFactory method instead.
                          */
                    -    protected HsqlSocketFactorySecure() throws Exception {
                    +    HsqlSocketFactorySecure() {
                             super();
                         }
                     
                    @@ -277,11 +277,9 @@
                         /**
                          * Retrieves the underlying javax.net.ssl.SSLServerSocketFactory.
                          *
                    -     * @throws Exception if there is a problem retrieving the
                    -     *      underlying factory
                          * @return the underlying javax.net.ssl.SSLServerSocketFactory
                          */
                    -    protected SSLServerSocketFactory getServerSocketFactoryImpl() {
                    +    SSLServerSocketFactory getServerSocketFactoryImpl() {
                     
                             Object factory;
                     
                    @@ -300,11 +298,9 @@
                         /**
                          * Retrieves the underlying javax.net.ssl.SSLSocketFactory.
                          *
                    -     * @throws Exception if there is a problem retrieving the
                    -     *      underlying factory
                          * @return the underlying javax.net.ssl.SSLSocketFactory
                          */
                    -    protected SSLSocketFactory getSocketFactoryImpl() {
                    +    SSLSocketFactory getSocketFactoryImpl() {
                     
                             Object factory;
                     
                    @@ -330,7 +326,7 @@
                          * @param session SSLSession used on the connection to host
                          * @throws Exception if the certificate chain cannot be verified
                          */
                    -    protected void verify(String host, SSLSession session) throws Exception {
                    +    void verify(String host, SSLSession session) throws Exception {
                     
                             Certificate[]   chain;
                             X509Certificate certificate;
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/OdbcUtil.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/OdbcUtil.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/OdbcUtil.java	2021-01-25 15:08:24.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/OdbcUtil.java	2022-05-17 11:13:12.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -226,6 +226,10 @@
                          * This ID should stick with the table
                          * column.  Here, it will change based on user-specified column label.
                          * The int has is also being truncated into a short.
                    +     *
                    +     * @param colIndex int
                    +     * @param md ResultMetaData
                    +     * @return short
                          */
                         public static short getIdForColumn(int colIndex, ResultMetaData md) {
                             if (!md.isTableColumn(colIndex)) {
                    @@ -241,8 +245,9 @@
                         }
                     
                         /**
                    -     * @param hexChars A String containing an EVEN number of hex
                    -     *                      characters.
                    +     *
                    +     * @param hexChars A String containing an EVEN number of hex characters.
                    +     * @return String
                          */
                         public static String hexCharsToOctalOctets(String hexChars) {
                             int chars = hexChars.length();
                    diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/PgType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/PgType.java
                    --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/PgType.java	2021-01-25 15:08:24.000000000 +0000
                    +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/PgType.java	2022-05-17 12:18:14.000000000 +0000
                    @@ -1,4 +1,4 @@
                    -/* Copyright (c) 2001-2021, The HSQL Development Group
                    +/* Copyright (c) 2001-2022, The HSQL Development Group
                      * All rights reserved.
                      *
                      * Redistribution and use in source and binary forms, with or without
                    @@ -30,7 +30,7 @@
                     
                     
                     /*
                    - * $Id: PgType.java 6266 2021-01-25 16:08:06Z fredt $
                    + * $Id: PgType.java 6509 2022-05-17 13:18:08Z fredt $
                      */
                     
                     package org.hsqldb.server;
                    @@ -275,6 +275,10 @@
                          * 

                    * * @throws SQLException if either argument is not acceptable. + * @throws RecoverableOdbcFailure for some unsupported features + * @param inString String + * @param session Session + * @return Object */ public Object getParameter(String inString, Session session) throws SQLException, RecoverableOdbcFailure { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerAcl.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerAcl.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerAcl.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerAcl.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -95,10 +95,10 @@ } } - protected static final byte[] ALL_SET_4BYTES = new byte[] { + static final byte[] ALL_SET_4BYTES = new byte[] { -1, -1, -1, -1 }; - protected static final byte[] ALL_SET_16BYTES = new byte[] { + static final byte[] ALL_SET_16BYTES = new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; @@ -351,7 +351,7 @@ aclEntries = load(); } - synchronized protected void ensureAclsUptodate() { + synchronized void ensureAclsUptodate() { if (lastLoadTime > aclFile.lastModified()) { return; @@ -368,7 +368,7 @@ } } - protected List load() throws IOException, AclFormatException { + List load() throws IOException, AclFormatException { if (!aclFile.exists()) { throw new IOException("File '" + aclFile.getAbsolutePath() diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerConfiguration.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerConfiguration.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerConfiguration.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerConfiguration.java 2022-05-17 11:10:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -91,8 +91,10 @@ * Retrieves a new HsqlProperties object, if possible, loaded from the * specified file. * - * @param path the file's path, without the .properties extension - * (which is added automatically) + * @param protocol int + * @param path the file's path, without the .properties extension (which is + * added automatically) + * @param extension String * @return a new properties object loaded from the specified file */ public static ServerProperties getPropertiesFromFile(int protocol, @@ -188,10 +190,11 @@ } /** - * Retrieves a new default properties object for a server of the - * specified protocol + * Retrieves a new default properties object for a server of the specified + * protocol * * @return a new default properties object + * @param protocol int */ public static ServerProperties newDefaultProperties(int protocol) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerConnection.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerConnection.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerConnection.java 2021-02-09 04:49:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerConnection.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,6 +98,7 @@ import org.hsqldb.rowio.RowInputBinary; import org.hsqldb.rowio.RowOutputBinary; import org.hsqldb.rowio.RowOutputInterface; +import org.hsqldb.types.DateTimeType; import org.hsqldb.types.Type; // fredt@users 20020215 - patch 461556 by paul-h@users - server factory @@ -122,7 +123,7 @@ * * @author Blaine Simpson (unsaved@users dot sourceforge.net * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.6.2 */ class ServerConnection implements Runnable { @@ -1559,8 +1560,7 @@ session = DatabaseManager.newSession(dbID, user, resultIn.getSubString(), - resultIn.getZoneString(), - resultIn.getUpdateCount()); + resultIn.getZoneString()); if (!server.isSilent()) { server.printWithThread(mThread + ":Connected user '" + user @@ -1852,8 +1852,8 @@ } try { - session = DatabaseManager.newSession(dbID, user, password, - null, 0); + session = DatabaseManager.newSession( + dbID, user, password, DateTimeType.systemTimeZone.getID()); // TODO: Find out what updateCount, the last para, is for: // resultIn.getUpdateCount()); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerProperties.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerProperties.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/ServerProperties.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/ServerProperties.java 2022-03-31 20:44:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,7 +67,7 @@ * against the set.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class ServerProperties extends HsqlProperties { @@ -106,7 +106,7 @@ static final String sc_default_web_root = "."; // - static final HashMap meta = new HashMap(); + static final HashMap serverMeta = new HashMap(); static final OrderedHashSet prefixes = new OrderedHashSet(); // @@ -154,14 +154,14 @@ Enumeration en = stringProps.propertyNames(); while (en.hasMoreElements()) { - String key = (String) en.nextElement(); - Object[] metadata = (Object[]) meta.get(key); + String key = (String) en.nextElement(); + PropertyMeta meta = serverMeta.get(key); - if (metadata == null) { - metadata = getPrefixedMetadata(key); + if (meta == null) { + meta = getPrefixedMetadata(key); } - if (metadata == null) { + if (meta == null) { String error = "unsupported property: " + key; super.addError(ANY_ERROR, error); @@ -171,25 +171,23 @@ String error = null; - if (((Integer) metadata[indexType]).intValue() - == SYSTEM_PROPERTY) { - error = validateSystemProperty(key, metadata); - } else if (((Integer) metadata[indexType]).intValue() - == SERVER_MULTI_PROPERTY) { - error = validateMultiProperty(key, metadata); + if (meta.propType == SYSTEM_PROPERTY) { + error = validateSystemProperty(key, meta); + } else if (meta.propType == SERVER_MULTI_PROPERTY) { + error = validateMultiProperty(key, meta); } else { String value = getProperty(key); if (value == null) { - if (metadata[indexDefaultValue] == null) { + if (meta.propDefaultValue == null) { error = "missing value for property: " + key; } else { setProperty(key, - metadata[indexDefaultValue].toString()); + meta.propDefaultValue.toString()); } } else { error = HsqlProperties.validateProperty(key, value, - metadata); + meta); } } @@ -221,13 +219,13 @@ initialised = true; } - Object[] getPrefixedMetadata(String key) { + PropertyMeta getPrefixedMetadata(String key) { for (int i = 0; i < prefixes.size(); i++) { String prefix = (String) prefixes.get(i); if (key.startsWith(prefix)) { - return (Object[]) meta.get(prefix); + return serverMeta.get(prefix); } } @@ -238,12 +236,12 @@ * Checks an alias or database path. Duplicates are checked as duplicate * numbering may result from different strings (e.g. 02 and 2). */ - String validateMultiProperty(String key, Object[] meta) { + String validateMultiProperty(String key, PropertyMeta meta) { int dbNumber; - String prefix = (String) meta[indexName]; + String prefix = meta.propName; - if (meta[indexName].equals(sc_key_database)) { + if (meta.propName.equals(sc_key_database)) { if (sc_key_database.equals(key)) { key = key + ".0"; } @@ -255,14 +253,14 @@ return ("malformed database enumerator: " + key); } - if (meta[indexName].equals(sc_key_dbname)) { + if (meta.propName.equals(sc_key_dbname)) { String alias = stringProps.getProperty(key).toLowerCase(); Object existing = idToAliasMap.put(dbNumber, alias); if (existing != null) { return "duplicate database enumerator: " + key; } - } else if (meta[indexName].equals(sc_key_database)) { + } else if (meta.propName.equals(sc_key_database)) { String path = stringProps.getProperty(key); Object existing = idToPathMap.put(dbNumber, path); @@ -278,9 +276,9 @@ * System properties are currently not checked, as different libraries in * the environment may need different names? */ - String validateSystemProperty(String key, Object[] meta) { + String validateSystemProperty(String key, PropertyMeta meta) { - String prefix = (String) meta[indexName]; + String prefix = meta.propName; String specificKey = key.substring(prefix.length() + 1); String value = stringProps.getProperty(key); @@ -296,34 +294,24 @@ static { // properties with variable suffixes - meta.put(sc_key_database, - getMeta(sc_key_database, SERVER_MULTI_PROPERTY, null)); - meta.put(sc_key_dbname, - getMeta(sc_key_dbname, SERVER_MULTI_PROPERTY, null)); - meta.put(sc_key_system, getMeta(sc_key_system, SYSTEM_PROPERTY, null)); + serverMeta.put(sc_key_database, newMeta(sc_key_database, SERVER_MULTI_PROPERTY, null)); + serverMeta.put(sc_key_dbname, newMeta(sc_key_dbname, SERVER_MULTI_PROPERTY, null)); + serverMeta.put(sc_key_system, newMeta(sc_key_system, SYSTEM_PROPERTY, null)); // properties with fixed names - meta.put(sc_key_silent, - getMeta(sc_key_silent, SERVER_PROPERTY, false)); - meta.put(sc_key_trace, getMeta(sc_key_trace, SERVER_PROPERTY, false)); - meta.put(sc_key_tls, getMeta(sc_key_tls, SERVER_PROPERTY, false)); - meta.put(sc_key_acl, getMeta(sc_key_acl, SERVER_PROPERTY, null)); - meta.put(sc_key_autorestart_server, - getMeta(sc_key_autorestart_server, SERVER_PROPERTY, false)); - meta.put(sc_key_remote_open_db, - getMeta(sc_key_remote_open_db, SERVER_PROPERTY, false)); - meta.put(sc_key_no_system_exit, - getMeta(sc_key_no_system_exit, SERVER_PROPERTY, false)); - meta.put(sc_key_daemon, - getMeta(sc_key_daemon, SERVER_PROPERTY, false)); - meta.put(sc_key_address, - getMeta(sc_key_address, SERVER_PROPERTY, null)); - meta.put(sc_key_port, getMeta(sc_key_port, 0, 9001, 0, 65535)); - meta.put(sc_key_http_port, getMeta(sc_key_http_port, 0, 80, 0, 65535)); - meta.put(sc_key_max_connections, - getMeta(sc_key_max_connections, 0, 100, 1, 10000)); - meta.put(sc_key_max_databases, - getMeta(sc_key_max_databases, 0, 10, 1, 1000)); + serverMeta.put(sc_key_silent, newMeta(sc_key_silent, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_trace, newMeta(sc_key_trace, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_tls, newMeta(sc_key_tls, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_acl, newMeta(sc_key_acl, SERVER_PROPERTY, null)); + serverMeta.put(sc_key_autorestart_server, newMeta(sc_key_autorestart_server, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_remote_open_db, newMeta(sc_key_remote_open_db, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_no_system_exit, newMeta(sc_key_no_system_exit, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_daemon, newMeta(sc_key_daemon, SERVER_PROPERTY, false)); + serverMeta.put(sc_key_address, newMeta(sc_key_address, SERVER_PROPERTY, null)); + serverMeta.put(sc_key_port, newMeta(sc_key_port, 0, 9001, 0, 65535)); + serverMeta.put(sc_key_http_port, newMeta(sc_key_http_port, 0, 80, 0, 65535)); + serverMeta.put(sc_key_max_connections, newMeta(sc_key_max_connections, 0, 100, 1, 10000)); + serverMeta.put(sc_key_max_databases, newMeta(sc_key_max_databases, 0, 10, 1, 1000)); // prefixes.add(sc_key_database); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/Servlet.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/Servlet.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/Servlet.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/Servlet.java 2022-04-12 08:02:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,6 +73,7 @@ import java.io.DataInputStream; import java.io.IOException; import java.io.PrintWriter; +import java.util.TimeZone; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -130,7 +131,7 @@ * calls are supported.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.6.2 */ public class Servlet extends HttpServlet { @@ -268,8 +269,7 @@ resultIn.getMainString(), resultIn.getSubString(), new HsqlProperties(), - resultIn.getZoneString(), - resultIn.getUpdateCount()); + TimeZone.getDefault()); resultOut = Result.newConnectionAcknowledgeResponse(session); } catch (HsqlException e) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/WebServerConnection.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/WebServerConnection.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/server/WebServerConnection.java 2021-02-09 04:51:06.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/server/WebServerConnection.java 2022-04-11 19:00:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -80,7 +80,7 @@ * (fredt@users) * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.6.2 */ class WebServerConnection implements Runnable { @@ -339,8 +339,7 @@ DatabaseManager.newSession(dbID, resultIn.getMainString(), resultIn.getSubString(), - resultIn.getZoneString(), - resultIn.getUpdateCount()); + resultIn.getZoneString()); resultOut = Result.newConnectionAcknowledgeResponse(session); } catch (HsqlException e) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionContext.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionContext.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionContext.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionContext.java 2022-07-13 17:41:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ * Session execution context and temporary data structures * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.0 + * @version 2.7.0 * @since 1.9.0 */ public class SessionContext { @@ -58,9 +58,10 @@ Session session; // - public Boolean isAutoCommit; - Boolean isReadOnly; - Boolean noSQL; + public boolean isAutoCommit; + boolean isReadOnly; + boolean noSQL; + int autoCommitRows; int currentMaxRows; // @@ -77,7 +78,7 @@ Object[] dynamicArguments = ValuePool.emptyObjectArray; Object[][] triggerArguments = null; public int depth; - Boolean isInRoutine; + boolean isInRoutine; // Number lastIdentity = ValuePool.INTEGER_0; @@ -89,7 +90,7 @@ // grouping sets data GroupSet groupSet; - List currentGroup; + List currentGroup; // session tables OrderedHashMap sessionTables; @@ -129,16 +130,16 @@ true, RangeVariable.VARIALBE_RANGE); sessionVariableRangeGroups = new RangeGroup[]{ new RangeGroupSimple(sessionVariablesRange, true) }; - isAutoCommit = Boolean.FALSE; - isReadOnly = Boolean.FALSE; - noSQL = Boolean.FALSE; - isInRoutine = Boolean.FALSE; + isAutoCommit = false; + isReadOnly = false; + noSQL = false; + isInRoutine = false; } void resetStack() { while (depth > 0) { - pop(isInRoutine.booleanValue()); + pop(isInRoutine); } } @@ -180,7 +181,7 @@ rangeIterators = new RangeIterator[8]; savepoints = new OrderedHashMap(4); savepointTimestamps = new LongDeque(); - isAutoCommit = Boolean.FALSE; + isAutoCommit = false; currentMaxRows = 0; isInRoutine = Boolean.valueOf(isRoutine); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionData.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionData.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ * Session semi-persistent data structures. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public class SessionData { @@ -147,7 +147,7 @@ int fetchSize = command.getFetchSize(); - result.setResultId(session.actionTimestamp); + result.setResultId(session.actionSCN); int required = command.rsProperties; int returned = result.rsProperties; @@ -600,7 +600,7 @@ return clob; } catch (IOException e) { - throw Error.error(ErrorCode.FILE_IO_ERROR, e.toString()); + throw Error.error(e, ErrorCode.FILE_IO_ERROR, e.toString()); } finally { try { if (is != null) { @@ -626,7 +626,7 @@ return blob; } catch (IOException e) { - throw Error.error(ErrorCode.FILE_IO_ERROR); + throw Error.error(ErrorCode.FILE_IO_ERROR, e); } finally { try { if (is != null) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionInterface.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionInterface.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionInterface.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionInterface.java 2022-06-28 18:49:12.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,6 @@ import org.hsqldb.result.ResultLob; import org.hsqldb.types.BlobDataID; import org.hsqldb.types.ClobDataID; -import org.hsqldb.types.TimestampData; /** * Interface to Session and its remote proxy objects. Used by the @@ -49,7 +48,7 @@ * the session level. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.7.2 */ public interface SessionInterface { @@ -141,8 +140,6 @@ SimpleDateFormat getSimpleDateFormatGMT(); - TimestampData getCurrentDate(); - int getZoneSeconds(); int getStreamBlockSize(); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/Session.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/Session.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/Session.java 2021-07-09 16:51:50.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/Session.java 2022-07-14 19:46:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,6 @@ import java.util.Locale; import java.util.Random; import java.util.TimeZone; -import java.util.concurrent.atomic.AtomicInteger; import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.error.Error; @@ -66,6 +65,7 @@ import org.hsqldb.rights.User; import org.hsqldb.types.BlobDataID; import org.hsqldb.types.ClobDataID; +import org.hsqldb.types.DateTimeType; import org.hsqldb.types.TimeData; import org.hsqldb.types.TimestampData; import org.hsqldb.types.Type; @@ -75,7 +75,7 @@ * Implementation of SQL sessions. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.7.0 */ public class Session implements SessionInterface { @@ -95,11 +95,11 @@ int isolationLevel = SessionInterface.TX_READ_COMMITTED; boolean isReadOnlyIsolation; int actionIndex; - long actionStartTimestamp; - long actionTimestamp; - long statementStartTimestamp; - long transactionTimestamp; - long transactionEndTimestamp; + long actionStartSCN; + long actionSCN; + long statementStartSCN; + long transactionSCN; + long transactionEndSCN; final boolean txConflictRollback; final boolean txInterruptRollback; boolean isPreTransaction; @@ -118,15 +118,15 @@ TimeoutManager timeoutManager; // current settings - final String zoneString; - final int sessionTimeZoneSeconds; - int timeZoneSeconds; - boolean isNetwork; - private int sessionMaxRows; - int sessionOptimization = 8; - private final long sessionId; - private boolean ignoreCase; - private final long connectTime = System.currentTimeMillis(); + final TimeZone timeZone; + TimeZone currentTimeZone; + final String zoneString; + boolean isNetwork; + private int sessionMaxRows; + int sessionOptimization = 8; + private final long sessionId; + private boolean ignoreCase; + private final TimestampData connectTimestamp; // internal connection private JDBCConnection intConnection; @@ -156,49 +156,48 @@ /** * Constructs a new Session object. - * * @param db the database to which this represents a connection * @param user the initial user * @param autocommit the initial autocommit value * @param readonly the initial readonly value * @param id the session identifier, as known to the database + * @param zone the TimeZone */ Session(Database db, User user, boolean autocommit, boolean readonly, - long id, String zoneString, int timeZoneSeconds) { + long id, TimeZone zone) { - sessionId = id; - database = db; - this.user = user; - this.sessionUser = user; - this.zoneString = zoneString; - this.sessionTimeZoneSeconds = timeZoneSeconds; - this.timeZoneSeconds = timeZoneSeconds; - rowActionList = new HsqlArrayList(128, true); - waitedSessions = new OrderedHashSet(); - waitingSessions = new OrderedHashSet(); - tempSet = new OrderedHashSet(); - actionSet = new OrderedHashSet(); - isolationLevelDefault = database.defaultIsolationLevel; - ignoreCase = database.sqlIgnoreCase; - isolationLevel = isolationLevelDefault; - txConflictRollback = database.txConflictRollback; - txInterruptRollback = database.txInterruptRollback; - isReadOnlyDefault = readonly; + this.database = db; + this.sessionUser = user; + this.user = user; + this.sessionId = id; + this.timeZone = zone; + this.currentTimeZone = zone; + this.zoneString = zone.getID(); + rowActionList = new HsqlArrayList(128, true); + waitedSessions = new OrderedHashSet(); + waitingSessions = new OrderedHashSet(); + tempSet = new OrderedHashSet(); + actionSet = new OrderedHashSet(); + isolationLevelDefault = database.defaultIsolationLevel; + ignoreCase = database.sqlIgnoreCase; + isolationLevel = isolationLevelDefault; + txConflictRollback = database.txConflictRollback; + txInterruptRollback = database.txInterruptRollback; + isReadOnlyDefault = readonly; isReadOnlyIsolation = isolationLevel == SessionInterface.TX_READ_UNCOMMITTED; sessionContext = new SessionContext(this); - sessionContext.isAutoCommit = autocommit ? Boolean.TRUE - : Boolean.FALSE; - sessionContext.isReadOnly = isReadOnlyDefault ? Boolean.TRUE - : Boolean.FALSE; + sessionContext.isAutoCommit = autocommit; + sessionContext.isReadOnly = isReadOnlyDefault; parser = new ParserCommand(this, new Scanner()); + sessionData = new SessionData(database, this); + statementManager = new StatementManager(this); + timeoutManager = new TimeoutManager(); setResultMemoryRowCount(database.getResultMaxMemoryRows()); resetSchema(); - sessionData = new SessionData(database, this); - statementManager = new StatementManager(this); - timeoutManager = new TimeoutManager(); + connectTimestamp = getCurrentTimestamp(); } void resetSchema() { @@ -414,7 +413,7 @@ */ void checkReadWrite() { - if (sessionContext.isReadOnly.booleanValue() || isReadOnlyIsolation) { + if (sessionContext.isReadOnly || isReadOnlyIsolation) { throw Error.error(ErrorCode.X_25006); } } @@ -431,8 +430,8 @@ checkReadWrite(); } - public long getActionTimestamp() { - return actionTimestamp; + public long getActionSCN() { + return actionSCN; } /** @@ -453,7 +452,6 @@ throw Error.error(ErrorCode.X_40502); } - getTransactionUTC(); database.txManager.addDeleteAction(this, table, store, row, changedColumns); } @@ -461,8 +459,6 @@ void addInsertAction(Table table, PersistentStore store, Row row, int[] changedColumns) { - getTransactionUTC(); - // tempActionHistory.add("add insert to transaction " + actionTimestamp); database.txManager.addInsertAction(this, table, store, row, changedColumns); @@ -496,12 +492,24 @@ return; } - if (sessionContext.isAutoCommit.booleanValue() != autocommit) { + if (sessionContext.isAutoCommit != autocommit) { commit(false); - sessionContext.isAutoCommit = autocommit ? Boolean.TRUE - : Boolean.FALSE; + sessionContext.isAutoCommit = autocommit; + } + } + + public void setAutoCommitRows(int rows) { + + if (isClosed) { + return; + } + + if (sessionContext.depth > 0) { + return; } + + sessionContext.autoCommitRows = rows; } public void beginAction(Statement cs) { @@ -521,8 +529,7 @@ sessionData.persistentStoreCollection.clearStatementTables(); if (result.mode == ResultConstants.ERROR) { - sessionData.persistentStoreCollection.clearResultTables( - actionTimestamp); + sessionData.persistentStoreCollection.clearResultTables(actionSCN); database.txManager.rollbackAction(this); } else { sessionContext @@ -639,8 +646,7 @@ sessionData.closeAllTransactionNavigators(); if (!chain) { - sessionContext.isReadOnly = isReadOnlyDefault ? Boolean.TRUE - : Boolean.FALSE; + sessionContext.isReadOnly = isReadOnlyDefault; setIsolation(isolationLevelDefault); } @@ -676,14 +682,14 @@ statementManager.reset(); sessionContext.lastIdentity = ValuePool.INTEGER_0; - sessionContext.isAutoCommit = Boolean.TRUE; + sessionContext.isAutoCommit = true; setResultMemoryRowCount(database.getResultMaxMemoryRows()); user = sessionUser; resetSchema(); - setZoneSeconds(sessionTimeZoneSeconds); + resetTimeZone(); sessionMaxRows = 0; ignoreCase = database.sqlIgnoreCase; @@ -706,11 +712,11 @@ sessionContext.savepointTimestamps.remove(index); } - actionTimestamp = database.txManager.getNextGlobalChangeTimestamp(); + actionSCN = database.txManager.getNextSystemChangeNumber(); sessionContext.savepoints.add(name, ValuePool.getInt(rowActionList.size())); - sessionContext.savepointTimestamps.addLast(actionTimestamp); + sessionContext.savepointTimestamps.addLast(actionSCN); } /** @@ -780,7 +786,7 @@ } public void setNoSQL() { - sessionContext.noSQL = Boolean.TRUE; + sessionContext.noSQL = true; } public void setIgnoreCase(boolean mode) { @@ -806,8 +812,7 @@ throw Error.error(ErrorCode.X_25001); } - sessionContext.isReadOnly = readonly ? Boolean.TRUE - : Boolean.FALSE; + sessionContext.isReadOnly = readonly; } public synchronized void setReadOnlyDefault(boolean readonly) { @@ -819,8 +824,7 @@ isReadOnlyDefault = readonly; if (!isInMidTransaction()) { - sessionContext.isReadOnly = isReadOnlyDefault ? Boolean.TRUE - : Boolean.FALSE; + sessionContext.isReadOnly = isReadOnlyDefault; } } @@ -830,7 +834,7 @@ * @return the current value */ public boolean isReadOnly() { - return sessionContext.isReadOnly.booleanValue() || isReadOnlyIsolation; + return sessionContext.isReadOnly || isReadOnlyIsolation; } public synchronized boolean isReadOnlyDefault() { @@ -843,7 +847,7 @@ * @return the current value */ public synchronized boolean isAutoCommit() { - return sessionContext.isAutoCommit.booleanValue(); + return sessionContext.isAutoCommit; } public synchronized int getStreamBlockSize() { @@ -907,8 +911,8 @@ * * @return the value */ - public long getConnectTime() { - return connectTime; + public TimestampData getConnectTimestamp() { + return connectTimestamp; } /** @@ -920,8 +924,8 @@ return rowActionList.size(); } - public long getTransactionTimestamp() { - return transactionTimestamp; + public long getTransactionSCN() { + return transactionSCN; } public Statement compileStatement(String sql, int props) { @@ -1229,7 +1233,7 @@ if (i > 0) { if (cs.getCompileTimestamp() - > database.txManager.getGlobalChangeTimestamp()) { + > database.txManager.getSystemChangeNumber()) { recompile = true; } @@ -1280,8 +1284,7 @@ } if (sessionContext.depth > 0) { - if (sessionContext.noSQL.booleanValue() - || cs.isAutoCommitStatement()) { + if (sessionContext.noSQL || cs.isAutoCommitStatement()) { return Result.newErrorResult(Error.error(ErrorCode.X_46000)); } } @@ -1301,14 +1304,12 @@ } sessionContext.currentStatement = cs; - statementStartTimestamp = - database.txManager.getGlobalChangeTimestamp(); + statementStartSCN = database.txManager.getSystemChangeNumber(); boolean isTX = cs.isTransactionStatement(); if (!isTX) { - actionTimestamp = - database.txManager.getNextGlobalChangeTimestamp(); + actionSCN = database.txManager.getNextSystemChangeNumber(); sessionContext.setDynamicArguments(pvals); @@ -1430,20 +1431,31 @@ return handleAbortTransaction(); } - if (sessionContext.depth == 0 - && (sessionContext.isAutoCommit.booleanValue() - || cs.isAutoCommitStatement())) { - try { - if (r.mode == ResultConstants.ERROR) { - rollbackNoCheck(false); - } else { - commit(false); + if (sessionContext.depth == 0) { + if (sessionContext.isAutoCommit || cs.isAutoCommitStatement()) { + try { + if (r.mode == ResultConstants.ERROR) { + rollbackNoCheck(false); + } else { + commit(false); + } + } catch (Exception e) { + sessionContext.currentStatement = null; + + return Result.newErrorResult(Error.error(ErrorCode.X_40001, + e)); } - } catch (Exception e) { - sessionContext.currentStatement = null; + } else if (sessionContext.autoCommitRows > 0) { + if (rowActionList.size() > sessionContext.autoCommitRows) { + try { + commit(false); + } catch (Exception e) { + sessionContext.currentStatement = null; - return Result.newErrorResult(Error.error(ErrorCode.X_40001, - e)); + return Result.newErrorResult( + Error.error(ErrorCode.X_40001, e)); + } + } } } @@ -1632,38 +1644,57 @@ } // session DATETIME functions - long currentTimestampSCN; - long currentMillis; + long currentTimestampSCN = -1; // initialise to invalid val + private TimestampData transactionUTC; + boolean transactionUTCSet; private TimestampData currentDate; private TimestampData currentTimestamp; private TimestampData localTimestamp; - private TimestampData transactionUTC; - boolean transactionUTCSet; private TimeData currentTime; private TimeData localTime; /** - * Returns the current date, unchanged for the duration of the current + * Returns the current date/time, unchanged for the duration of the current * execution unit (statement).

                    * - * SQL standards require that CURRENT_DATE, CURRENT_TIME and - * CURRENT_TIMESTAMP are all evaluated at the same point of - * time in the duration of each SQL statement, no matter how long the - * SQL statement takes to complete.

                    + * SQL standards require that CURRENT_DATE, CURRENT_TIME, + * CURRENT_TIMESTAMP, LOCALTIME, and LOCALTIMESTAMP are all evaluated at + * the same point of time in the duration of each SQL statement, no matter + * how long the SQL statement takes to complete.

                    * * When this method or a corresponding method for CURRENT_TIME or * CURRENT_TIMESTAMP is first called in the scope of a system change - * number, currentMillis is set to the current system time. All further - * CURRENT_XXXX calls in this scope will use this millisecond value. + * number, currentTimestamp is set to the current system time. All further + * CURRENT_XXXX and LOCALXXXX calls in this scope will use this base point + * of time. + * * (fredt@users) */ + synchronized TimestampData getCurrentTimestamp() { + + resetCurrentTimestamp(); + + return currentTimestamp; + } + + synchronized TimestampData getLocalTimestamp() { + + resetCurrentTimestamp(); + + if (localTimestamp == null) { + localTimestamp = + DateTimeType.toLocalTimestampValue(currentTimestamp); + } + + return localTimestamp; + } + public synchronized TimestampData getCurrentDate() { resetCurrentTimestamp(); if (currentDate == null) { - currentDate = (TimestampData) Type.SQL_DATE.getValue(this, - currentMillis / 1000, 0, getZoneSeconds()); + currentDate = DateTimeType.toCurrentDateValue(currentTimestamp); } return currentDate; @@ -1673,108 +1704,110 @@ * Returns the current time, unchanged for the duration of the current * execution unit (statement) */ - synchronized TimeData getCurrentTime(boolean withZone) { + synchronized TimeData getCurrentTime() { resetCurrentTimestamp(); - if (withZone) { - if (currentTime == null) { - int seconds = - (int) (HsqlDateTime.getNormalisedTime( - getCalendarGMT(), currentMillis)) / 1000; - int nanos = (int) (currentMillis % 1000) * 1000000; + if (currentTime == null) { + currentTime = + DateTimeType.toCurrentTimeWithZoneValue(currentTimestamp); + } - currentTime = new TimeData(seconds, nanos, getZoneSeconds()); - } + return currentTime; + } - return currentTime; - } else { - if (localTime == null) { - int seconds = - (int) (HsqlDateTime.getNormalisedTime( - getCalendarGMT(), - currentMillis + getZoneSeconds() * 1000L)) / 1000; - int nanos = (int) (currentMillis % 1000) * 1000000; + synchronized TimeData getLocalTime() { - localTime = new TimeData(seconds, nanos, 0); - } + resetCurrentTimestamp(); - return localTime; + if (localTime == null) { + localTime = DateTimeType.toCurrentTimeValue(currentTimestamp); } + + return localTime; } - /** - * Returns the current timestamp, unchanged for the duration of the current - * execution unit (statement) - */ - synchronized TimestampData getCurrentTimestamp(boolean withZone) { + private void resetCurrentTimestamp() { - resetCurrentTimestamp(); + if (currentTimestampSCN != actionSCN) { + currentTimestampSCN = actionSCN; + currentTimestamp = + DateTimeType.newCurrentTimestamp(currentTimeZone); + currentDate = null; + localTimestamp = null; + currentTime = null; + localTime = null; + } + } - if (withZone) { - if (currentTimestamp == null) { - int nanos = (int) (currentMillis % 1000) * 1000000; + TimestampData getTransactionUTC() { - currentTimestamp = new TimestampData((currentMillis / 1000), - nanos, getZoneSeconds()); - } + if (!transactionUTCSet) { + transactionUTC = DateTimeType.newSystemTimestampUTC(); + transactionUTCSet = true; + } - return currentTimestamp; - } else { - if (localTimestamp == null) { - int nanos = (int) (currentMillis % 1000) * 1000000; + return transactionUTC; + } - localTimestamp = new TimestampData(currentMillis / 1000 - + getZoneSeconds(), nanos, - 0); - } + // session calendars + private Calendar calendar; + private Calendar calendarGMT; + + public int getZoneSeconds() { + return currentTimestamp.getZone(); + } + + public void resetTimeZone() { - return localTimestamp; + currentTimeZone = timeZone; + + if (calendar != null) { + calendar.setTimeZone(currentTimeZone); } } - static TimestampData getSystemTimestamp(boolean withZone, boolean utc) { + public void setTimeZone(TimeZone zone) { - long millis = System.currentTimeMillis(); - long seconds = millis / 1000; - int nanos = (int) (millis % 1000) * 1000000; - int offset = 0; + currentTimeZone = zone; - if (!utc) { - TimeZone zone = TimeZone.getDefault(); + if (calendar != null) { + calendar.setTimeZone(currentTimeZone); + } - offset = zone.getOffset(millis) / 1000; + resetCurrentTimestamp(); + } - if (!withZone) { - seconds += offset; - offset = 0; - } + public Calendar getCalendar() { + + if (calendar == null) { + calendar = new GregorianCalendar(currentTimeZone); } - return new TimestampData(seconds, nanos, offset); + return calendar; } - TimestampData getTransactionUTC() { + public Calendar getCalendarGMT() { - if (!transactionUTCSet) { - transactionUTC = getSystemTimestamp(true, true); - transactionUTCSet = true; + if (calendarGMT == null) { + calendarGMT = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + + calendarGMT.setFirstDayOfWeek(Calendar.MONDAY); + calendarGMT.setMinimalDaysInFirstWeek(4); } - return transactionUTC; + return calendarGMT; } - private void resetCurrentTimestamp() { + public SimpleDateFormat getSimpleDateFormatGMT() { + + if (simpleDateFormatGMT == null) { + simpleDateFormatGMT = new SimpleDateFormat("MMMM", Locale.ENGLISH); - if (currentTimestampSCN != actionTimestamp) { - currentTimestampSCN = actionTimestamp; - currentMillis = System.currentTimeMillis(); - currentDate = null; - currentTimestamp = null; - localTimestamp = null; - currentTime = null; - localTime = null; + simpleDateFormatGMT.setCalendar(getCalendarGMT()); } + + return simpleDateFormatGMT; } private Result getAttributesResult(int id) { @@ -1870,8 +1903,7 @@ return sessionContext.isAutoCommit; case SessionInterface.INFO_CONNECTION_READONLY : - return isReadOnlyDefault ? Boolean.TRUE - : Boolean.FALSE; + return isReadOnlyDefault; case SessionInterface.INFO_CATALOG : return database.getCatalogName().name; @@ -2005,7 +2037,7 @@ if (result.getType() == ResultConstants.SQLCANCEL) { if (result.getSessionRandomID() == randomId) { database.txManager.resetSession( - this, this, statementStartTimestamp, + this, this, statementStartSCN, TransactionManager.resetSessionStatement); } } @@ -2128,56 +2160,6 @@ } } - // session zone - private Calendar calendar; - private Calendar calendarGMT; - - public int getZoneSeconds() { - return timeZoneSeconds; - } - - public void setZoneSeconds(int seconds) { - timeZoneSeconds = seconds; - } - - public Calendar getCalendar() { - - if (calendar == null) { - if (zoneString == null) { - calendar = new GregorianCalendar(); - } else { - TimeZone zone = TimeZone.getTimeZone(zoneString); - - calendar = new GregorianCalendar(zone); - } - } - - return calendar; - } - - public Calendar getCalendarGMT() { - - if (calendarGMT == null) { - calendarGMT = new GregorianCalendar(TimeZone.getTimeZone("GMT")); - - calendarGMT.setFirstDayOfWeek(Calendar.MONDAY); - calendarGMT.setMinimalDaysInFirstWeek(4); - } - - return calendarGMT; - } - - public SimpleDateFormat getSimpleDateFormatGMT() { - - if (simpleDateFormatGMT == null) { - simpleDateFormatGMT = new SimpleDateFormat("MMMM", Locale.ENGLISH); - - simpleDateFormatGMT.setCalendar(getCalendarGMT()); - } - - return simpleDateFormatGMT; - } - // services TypedComparator typedComparator = new TypedComparator(this); Scanner secondaryScanner; @@ -2326,11 +2308,11 @@ // timeouts class TimeoutManager { - volatile int currentTimeout; volatile long checkTimestampSCN; + volatile long checkTimestamp; - void startTimeout(int timeout) { + synchronized void startTimeout(int timeout) { if (timeout == 0) { return; @@ -2338,31 +2320,30 @@ boolean add = checkTimestampSCN == 0; - currentTimeout = timeout + 1; - checkTimestampSCN = statementStartTimestamp; + currentTimeout = timeout * 1000; + checkTimestampSCN = statementStartSCN; + checkTimestamp = System.currentTimeMillis(); if (add) { database.timeoutRunner.addSession(this); } } - void endTimeout() { + synchronized void endTimeout() { currentTimeout = 0; } - public boolean checkTimeout() { + synchronized public boolean checkTimeout(long systemMillis) { if (currentTimeout == 0) { return false; } - if (checkTimestampSCN != statementStartTimestamp) { + if (checkTimestampSCN != statementStartSCN) { return false; } - currentTimeout--; - - if (currentTimeout <= 0) { + if (checkTimestamp + currentTimeout < systemMillis) { currentTimeout = 0; database.txManager.resetSession( @@ -2375,7 +2356,7 @@ return false; } - public boolean isClosed() { + synchronized public boolean isClosed() { return Session.this.isClosed; } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SessionManager.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SessionManager.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,13 +37,14 @@ import org.hsqldb.rights.User; import java.util.concurrent.atomic.AtomicLong; +import java.util.TimeZone; /** * Container that maintains a map of session id's to Session objects. * Responsible for managing opening and closing of sessions. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.2 */ public class SessionManager { @@ -69,9 +70,11 @@ User sysUser = db.getUserManager().getSysUser(); sysSession = new Session(db, sysUser, false, false, - sessionIdCount.getAndIncrement(), null, 0); + sessionIdCount.getAndIncrement(), + TimeZone.getTimeZone("GMT")); sysLobSession = new Session(db, sysUser, true, false, - sessionIdCount.getAndIncrement(), null, 0); + sessionIdCount.getAndIncrement(), + TimeZone.getTimeZone("GMT")); } /* @@ -96,18 +99,16 @@ * @param db the database to which the new Session is initially connected * @param user the Session User * @param readonly the ReadOnly attribute for the new Session - * @param timeZoneSeconds the session time zone second interval + * @param zone the session time zone * @return Session */ public synchronized Session newSession(Database db, User user, boolean readonly, - boolean autoCommit, - String zoneString, - int timeZoneSeconds) { + boolean autoCommit, TimeZone zone) { long sessionId = sessionIdCount.getAndIncrement(); Session s = new Session(db, user, autoCommit, readonly, sessionId, - zoneString, timeZoneSeconds); + zone); sessionMap.put(sessionId, s); @@ -118,7 +119,7 @@ long sessionId = sessionIdCount.getAndIncrement(); Session s = new Session(db, db.getUserManager().getSysUser(), false, - false, sessionId, null, 0); + false, sessionId, TimeZone.getTimeZone("GMT")); s.isProcessingLog = true; @@ -133,7 +134,8 @@ public Session getSysSessionForScript(Database db) { Session session = new Session(db, db.getUserManager().getSysUser(), - false, false, 0, null, 0); + false, false, 0, + TimeZone.getTimeZone("GMT")); // some old 1.8.0 do not have SET SCHEMA PUBLIC session.setCurrentSchemaHsqlName( @@ -171,7 +173,7 @@ long sessionId = sessionIdCount.getAndIncrement(); Session session = new Session(sysSession.database, sysSession.getUser(), false, false, - sessionId, null, 0); + sessionId, TimeZone.getTimeZone("GMT")); session.currentSchema = sysSession.database.schemaManager.getDefaultSchemaHsqlName(); @@ -185,7 +187,7 @@ long sessionId = sessionIdCount.getAndIncrement(); Session session = new Session(sysSession.database, user, false, false, - sessionId, null, 0); + sessionId, TimeZone.getTimeZone("GMT")); session.currentSchema = schema; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SetFunctionValueAggregate.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SetFunctionValueAggregate.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SetFunctionValueAggregate.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SetFunctionValueAggregate.java 2022-05-01 17:51:20.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,7 +59,7 @@ * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.2 * */ @@ -365,6 +365,8 @@ case Types.SQL_INTERVAL_SECOND : case Types.SQL_INTERVAL_MONTH : case Types.SQL_DATE : + case Types.SQL_TIME : + case Types.SQL_TIME_WITH_TIME_ZONE : case Types.SQL_TIMESTAMP : case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { addLongGroup(item); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SortAndSlice.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SortAndSlice.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SortAndSlice.java 2021-05-30 14:47:48.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SortAndSlice.java 2022-06-30 18:26:44.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * Implementation of ORDER BY and LIMIT properties of query expressions. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public final class SortAndSlice { @@ -305,6 +305,10 @@ if (rangeIndex == primaryTableIndex) { if (descendingSort) { + if (select.isDistinctSelect) { + return; + } + boolean reversed = select.rangeVariables[0].reverseOrder(); if (!reversed) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/SqlInvariants.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/SqlInvariants.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/SqlInvariants.java 2021-03-20 11:39:38.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/SqlInvariants.java 2022-04-13 18:18:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,7 @@ * Invariant schema objects. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public final class SqlInvariants { @@ -68,6 +68,7 @@ /** The role name reserved for the special PUBLIC pseudo-user. */ public static final String PUBLIC_ROLE_NAME = "PUBLIC"; public static final String DEFAULT_CATALOG_NAME = "PUBLIC"; + public static final String SESSION_SCHEMA = "SESSION"; public static final String SYSTEM_SCHEMA = "SYSTEM_SCHEMA"; public static final String LOBS_SCHEMA = "SYSTEM_LOBS"; public static final String DEFINITION_SCHEMA = "DEFINITION_SCHEMA"; @@ -80,6 +81,7 @@ public static final String DUMMY = "DUMMY"; public static final String IDX = "IDX"; public static final HsqlName INFORMATION_SCHEMA_HSQLNAME; + public static final HsqlName SESSION_SCHEMA_HSQLNAME; public static final HsqlName SYSTEM_SCHEMA_HSQLNAME; public static final HsqlName LOBS_SCHEMA_HSQLNAME; public static final HsqlName SQLJ_SCHEMA_HSQLNAME; @@ -93,6 +95,9 @@ INFORMATION_SCHEMA_HSQLNAME = HsqlNameManager.newSystemObjectName(INFORMATION_SCHEMA, SchemaObject.SCHEMA); + SESSION_SCHEMA_HSQLNAME = + HsqlNameManager.newSystemObjectName(SESSION_SCHEMA, + SchemaObject.SCHEMA); SYSTEM_SCHEMA_HSQLNAME = HsqlNameManager.newSystemObjectName(SYSTEM_SCHEMA, SchemaObject.SCHEMA); @@ -137,7 +142,6 @@ } public static boolean isLobsSchemaName(String name) { - return SqlInvariants.LOBS_SCHEMA.equals(name); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementCommand.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementCommand.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementCommand.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementCommand.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,6 +47,7 @@ import org.hsqldb.persist.RowStoreAVLDisk; import org.hsqldb.persist.ScriptLoader; import org.hsqldb.persist.TableSpaceManager; +import org.hsqldb.persist.TextFileOps; import org.hsqldb.result.Result; import org.hsqldb.result.ResultMetaData; import org.hsqldb.rights.User; @@ -59,7 +60,7 @@ * Implementation of Statement for SQL commands.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public class StatementCommand extends Statement { @@ -117,6 +118,8 @@ break; } + case StatementTypes.UNLOAD_DATA : + case StatementTypes.LOAD_DATA : case StatementTypes.LOAD_SCRIPT : { group = StatementTypes.X_HSQLDB_DATABASE_OPERATION; isLogged = false; @@ -379,10 +382,8 @@ session.checkDDLWrite(); if (check) { - value = - session.database.getProperties() - .getPropertyWithinRange(HsqlDatabaseProperties - .hsqldb_cache_rows, value); + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.hsqldb_cache_rows, value); } session.database.logger.setCacheMaxRows(value); @@ -401,10 +402,8 @@ session.checkDDLWrite(); if (check) { - value = - session.database.getProperties() - .getPropertyWithinRange(HsqlDatabaseProperties - .hsqldb_cache_size, value); + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.hsqldb_cache_size, value); } session.database.logger.setCacheSize(value); @@ -424,13 +423,13 @@ if (session.isProcessingScript()) { session.database.logger.setFilesTimestamp(value1); - session.database.txManager.setGlobalChangeTimestamp( + session.database.txManager.setSystemChangeNumber( value1 + 1); } else if (session.isProcessingLog()) { if (value2 > 0) { session.database.logger.setFilesTimestamp(value1); session.database.txManager - .setGlobalChangeTimestamp(value1 + 1); + .setSystemChangeNumber(value1 + 1); } } @@ -530,7 +529,7 @@ session.checkAdmin(); session.checkDDLWrite(); - if (!session.database.getProperties().validateProperty( + if (!HsqlDatabaseProperties.validateProperty( HsqlDatabaseProperties.hsqldb_defrag_limit, value)) { throw Error.error(ErrorCode.X_42556); @@ -545,12 +544,19 @@ } case StatementTypes.SET_DATABASE_FILES_EVENT_LOG : { try { - int value = ((Integer) arguments[0]).intValue(); - boolean isSql = ((Boolean) arguments[1]).booleanValue(); + int value = ((Integer) arguments[0]).intValue(); + boolean isSql = ((Boolean) arguments[1]).booleanValue(); + boolean internal = ((Boolean) arguments[2]).booleanValue(); session.checkAdmin(); session.checkDDLWrite(); - session.database.logger.setEventLogLevel(value, isSql); + + if (internal) { + session.database.logger.setEventLogLevel(value, isSql); + } else { + session.database.logger.setExternalEventLogLevel( + value); + } return Result.updateZeroResult; } catch (HsqlException e) { @@ -572,6 +578,9 @@ } else { int value = ((Integer) arguments[0]).intValue(); + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.hsqldb_nio_max_size, value); + session.database.logger.setNioMaxSize(value); } @@ -599,6 +608,10 @@ session.checkAdmin(); session.checkDDLWrite(); + + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.hsqldb_log_size, value); + session.database.logger.setLogSize(value); return Result.updateZeroResult; @@ -636,6 +649,10 @@ try { int value = ((Integer) arguments[0]).intValue(); + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.hsqldb_write_delay_millis, + value); + session.checkAdmin(); session.checkDDLWrite(); session.database.logger.setWriteDelay(value); @@ -772,9 +789,21 @@ } else if (HsqlDatabaseProperties.sql_convert_trunc.equals( property)) { session.database.setConvertTrunc(mode); + } else if (HsqlDatabaseProperties.sql_trunc_trailing.equals( + property)) { + session.database.setTruncateTrailing(mode); } else if (HsqlDatabaseProperties.sql_avg_scale.equals( property)) { + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.sql_avg_scale, value); + session.database.setAvgScale(value); + } else if (HsqlDatabaseProperties.sql_max_recursive.equals( + property)) { + value = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.sql_max_recursive, value); + + session.database.setMaxRecursive(value); } else if (HsqlDatabaseProperties.sql_double_nan.equals( property)) { session.database.setDoubleNaN(mode); @@ -919,6 +948,11 @@ int size = ((Integer) arguments[0]).intValue(); session.checkAdmin(); + + size = HsqlDatabaseProperties.getPropertyWithinRange( + HsqlDatabaseProperties.hsqldb_result_max_memory_rows, + size); + session.database.setResultMaxMemoryRows(size); return Result.updateZeroResult; @@ -1049,6 +1083,55 @@ return Result.newErrorResult(e, sql); } } + case StatementTypes.LOAD_DATA : { + try { + HsqlName tableName = (HsqlName) arguments[0]; + String textprops = (String) arguments[1]; + int mode = ((Integer) arguments[2]).intValue(); + Table table = + session.database.schemaManager.findTable(session, + tableName.name, tableName.schema.name, null); + + if (table == null) { + throw Error.error( + ErrorCode.X_42501, + tableName.getSchemaQualifiedStatementName()); + } + + if (!session.getGrantee().canPerformScriptOps()) { + throw Error.error(ErrorCode.X_42507); + } + + return TextFileOps.loadTextData(session, textprops, table, + mode); + } catch (HsqlException e) { + return Result.newErrorResult(e, sql); + } + } + case StatementTypes.UNLOAD_DATA : { + try { + HsqlName tableName = (HsqlName) arguments[0]; + String textprops = (String) arguments[1]; + Table table = + session.database.schemaManager.findTable(session, + tableName.name, tableName.schema.name, null); + + if (table == null) { + throw Error.error( + ErrorCode.X_42501, + tableName.getSchemaQualifiedStatementName()); + } + + if (!session.getGrantee().canPerformScriptOps()) { + throw Error.error(ErrorCode.X_42507); + } + + return TextFileOps.unloadTextData(session, textprops, + table); + } catch (HsqlException e) { + return Result.newErrorResult(e, sql); + } + } case StatementTypes.CHECK_INDEX : { try { HsqlName tableName = (HsqlName) arguments[0]; @@ -1273,7 +1356,7 @@ return Result.updateZeroResult; } catch (Throwable e) { if (!(e instanceof HsqlException)) { - e = Error.error(ErrorCode.GENERAL_IO_ERROR, + e = Error.error(e, ErrorCode.GENERAL_IO_ERROR, e.toString()); } @@ -1310,13 +1393,12 @@ table.getSchemaName()); TableWorks tw = new TableWorks(session, table); - boolean result = tw.setTableType(session, type); + boolean result = tw.setTableType(type); if (!result) { throw Error.error(ErrorCode.GENERAL_IO_ERROR); } - oldStore.removeAll(); session.database.schemaManager.setSchemaChangeTimestamp(); if (name.schema == SqlInvariants.LOBS_SCHEMA_HSQLNAME) { @@ -1440,7 +1522,7 @@ session.database.txManager.resetSession(session, targetSession, - targetSession.statementStartTimestamp, + targetSession.statementStartSCN, TransactionManager.resetSessionStatement); break; } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementCompound.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementCompound.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementCompound.java 2021-02-03 21:23:16.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementCompound.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ * Implementation of Statement for PSM compound statements. * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public class StatementCompound extends Statement implements RangeGroup { @@ -375,7 +375,7 @@ if (hasUndoHandler) { String name = HsqlNameManager.getAutoSavepointNameString( - session.actionTimestamp, session.sessionContext.depth); + session.actionSCN, session.sessionContext.depth); session.savepoint(name); } @@ -695,9 +695,9 @@ int actionIndex = session.rowActionList.size(); long actionTimestamp = - session.database.txManager.getNextGlobalChangeTimestamp(); + session.database.txManager.getNextSystemChangeNumber(); - session.actionTimestamp = actionTimestamp; + session.actionSCN = actionTimestamp; Result result = statement.execute(session); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementDML.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementDML.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementDML.java 2021-05-30 14:47:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementDML.java 2022-03-26 22:13:18.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -55,7 +55,7 @@ * Implementation of Statement for DML statements.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ @@ -210,6 +210,8 @@ Result result = null; int limit = Integer.MAX_VALUE; + session.getTransactionUTC(); + if (sortAndSlice != null) { int[] limits = sortAndSlice.getLimits(session, null, Integer.MAX_VALUE); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementDMQL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementDMQL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementDMQL.java 2021-03-07 17:30:40.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementDMQL.java 2022-04-13 18:18:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -416,6 +416,11 @@ } if (range.rangeTable.getSchemaName() + == SqlInvariants.SESSION_SCHEMA_HSQLNAME) { + continue; + } + + if (range.rangeTable.getSchemaName() == SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) { continue; } @@ -505,19 +510,6 @@ } } - Result getWriteAccessResult(Session session) { - - try { - if (targetTable != null && !targetTable.isTemp()) { - session.checkReadWrite(); - } - } catch (HsqlException e) { - return Result.newErrorResult(e); - } - - return null; - } - /** * Returns the metadata, which is empty if the CompiledStatement does not * generate a Result. diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementInsert.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementInsert.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementInsert.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementInsert.java 2022-03-26 22:12:34.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ * Implementation of Statement for INSERT statements.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public class StatementInsert extends StatementDML { @@ -142,6 +142,8 @@ PersistentStore store = baseTable.getRowStore(session); int count = 0; + session.getTransactionUTC(); + if (isSimpleInsert) { Type[] colTypes = baseTable.getColumnTypes(); Object[] data = getInsertData(session, colTypes, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementManager.java 2021-07-10 17:51:08.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementManager.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,7 +69,7 @@ * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) * - * @version 2.6.1 + * @version 2.7.0 * @since 1.7.2 */ public final class StatementManager { @@ -83,7 +83,7 @@ /** Set of wrappers for Statement object. */ private HashSet statementSet; - /** Map: Statement id (int) => wrapper for Statement object. */ + /** Map: Statement id (int) maps to: wrapper for Statement object. */ private LongKeyHashMap csidMap; /** @@ -164,7 +164,7 @@ } newStatement.setCompileTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); sw.statement = newStatement; @@ -237,7 +237,7 @@ } newStatement.setCompileTimestamp( - database.txManager.getGlobalChangeTimestamp()); + database.txManager.getSystemChangeNumber()); if (setGenerated) { StatementDML si = (StatementDML) cs; @@ -264,7 +264,7 @@ Statement cs = wrapper.statement; - cs.setCompileTimestamp(database.txManager.getGlobalChangeTimestamp()); + cs.setCompileTimestamp(database.txManager.getSystemChangeNumber()); long csid = nextID(); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementResultUpdate.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementResultUpdate.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementResultUpdate.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementResultUpdate.java 2022-03-26 22:12:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ * Implementation of Statement for updating result rows.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.3.2 + * @version 2.7.0 * @since 1.9.0 */ public class StatementResultUpdate extends StatementDML { @@ -87,6 +87,7 @@ Result getResult(Session session) { + session.getTransactionUTC(); checkAccessRights(session); Object[] args = session.sessionContext.dynamicArguments; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSchemaDefinition.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSchemaDefinition.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSchemaDefinition.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSchemaDefinition.java 2022-03-23 16:31:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ * Implementation of Statement for CREATE SCHEMA statements.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.1.1 + * @version 2.7.0 * @since 1.9.0 */ public class StatementSchemaDefinition extends StatementSchema { @@ -126,6 +126,10 @@ cs.isLogged = false; result = cs.execute(session); + if (result.isError()) { + break; + } + HsqlName name = ((Table) cs.arguments[0]).getName(); Table table = (Table) session.database.schemaManager diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSchema.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSchema.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSchema.java 2021-02-28 10:29:22.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSchema.java 2022-03-26 22:12:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ * Implementation of Statement for DDL statements.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public class StatementSchema extends Statement { @@ -1830,6 +1830,10 @@ void setSchemaName(Session session, HsqlName parent, HsqlName name) { + if (name.type == SchemaObject.SCHEMA) { + return; + } + if (name.schema == null) { name.schema = schemaName == null ? session.getCurrentSchemaHsqlName() diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSession.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSession.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSession.java 2021-03-20 11:39:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSession.java 2022-05-30 12:32:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ package org.hsqldb; +import java.util.TimeZone; + import org.hsqldb.HsqlNameManager.HsqlName; import org.hsqldb.ParserDQL.CompileContext; import org.hsqldb.error.Error; @@ -40,6 +42,7 @@ import org.hsqldb.result.Result; import org.hsqldb.rights.Grantee; import org.hsqldb.rights.User; +import org.hsqldb.types.DateTimeType; import org.hsqldb.types.DTIType; import org.hsqldb.types.IntervalSecondData; import org.hsqldb.types.Type; @@ -49,7 +52,7 @@ * Implementation of Statement for SQL session statements.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.0 + * @version 2.7.0 * @since 1.9.0 */ public class StatementSession extends Statement { @@ -106,12 +109,9 @@ e.setDataType(session, Type.SQL_INTERVAL_HOUR_TO_MINUTE); } - if (e.dataType.isCharacterType()) { - e = new ExpressionOp(e, Type.SQL_INTERVAL_HOUR_TO_MINUTE); - expressions[0] = e; - } - - if (e.dataType.typeCode != Types.SQL_INTERVAL_HOUR_TO_MINUTE) { + if (e.dataType.isCharacterType()) {} + else if (e.dataType.typeCode + != Types.SQL_INTERVAL_HOUR_TO_MINUTE) { throw Error.error(ErrorCode.X_42563); } @@ -443,7 +443,7 @@ if (expressions[0].getType() == OpTypes.VALUE && expressions[0].getConstantValueNoCheck(session) == null) { - session.setZoneSeconds(session.sessionTimeZoneSeconds); + session.resetTimeZone(); return Result.updateZeroResult; } @@ -485,13 +485,40 @@ } } - long seconds = ((IntervalSecondData) value).getSeconds(); + if (value instanceof String) { + String zoneString = (String) value; - if (-DTIType.timezoneSecondsLimit <= seconds - && seconds <= DTIType.timezoneSecondsLimit) { - session.setZoneSeconds((int) seconds); + if (DateTimeType.zoneIDs.contains(zoneString)) { + TimeZone zone = TimeZone.getTimeZone(zoneString); - return Result.updateZeroResult; + session.setTimeZone(zone); + + return Result.updateZeroResult; + } else { + value = + Type.SQL_INTERVAL_HOUR_TO_MINUTE + .convertToDefaultType(session, value); + } + } + + if (value instanceof IntervalSecondData) { + IntervalSecondData interval = (IntervalSecondData) value; + long seconds = interval.getSeconds(); + + if (-DTIType.timezoneSecondsLimit <= seconds + && seconds <= DTIType.timezoneSecondsLimit) { + String i = + Type.SQL_INTERVAL_HOUR_TO_MINUTE.convertToString( + interval); + String sign = seconds < 0 ? "" + : "+"; + String zoneString = "GMT" + sign + i; + TimeZone zone = TimeZone.getTimeZone(zoneString); + + session.setTimeZone(zone); + + return Result.updateZeroResult; + } } return Result.newErrorResult(Error.error(ErrorCode.X_22009), @@ -677,9 +704,14 @@ // case StatementTypes.SET_SESSION_AUTOCOMMIT : { boolean mode = ((Boolean) arguments[0]).booleanValue(); + int rows = ((Integer) arguments[1]).intValue(); try { - session.setAutoCommit(mode); + if (rows < 0) { + session.setAutoCommit(mode); + } else { + session.setAutoCommitRows(rows); + } return Result.updateZeroResult; } catch (HsqlException e) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSet.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSet.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementSet.java 2020-07-10 12:49:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementSet.java 2022-05-24 08:38:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementTypes.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementTypes.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/StatementTypes.java 2021-02-28 18:48:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/StatementTypes.java 2022-03-08 11:56:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ * Codes based on SQL Standards for different types of statement. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public interface StatementTypes { @@ -174,6 +174,9 @@ int SET_PASSTHROUGH = 133; int CREATE_USER_MAPPING = 134; + // + int LOAD_DATA = 909; + int UNLOAD_DATA = 910; // hsqldb database int DATABASE_BACKUP = 1001; int DATABASE_CHECKPOINT = 1002; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/Table.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/Table.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/Table.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/Table.java 2022-03-12 19:28:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,7 +63,7 @@ * Holds the data structures and methods for creation of a named database table. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.6.1 */ public class Table extends TableBase implements SchemaObject { @@ -2506,8 +2506,7 @@ } /** - * Enforce max field sizes according to SQL column definition. - * SQL92 13.8 + * Enforce not null and domain size constraints */ public void enforceRowConstraints(Session session, Object[] data) { @@ -2552,6 +2551,10 @@ } } + /** + * Enforce max field sizes according to SQL column definition. + * SQL92 13.8 + */ public void enforceTypeLimits(Session session, Object[] data) { int i = 0; @@ -2567,7 +2570,8 @@ || code == -ErrorCode.X_22008) { ColumnSchema column = getColumn(i); String[] info = new String[] { - "", tableName.statementName, column.getName().statementName + "size limit: " + colTypes[i].precision, + tableName.statementName, column.getName().statementName }; throw Error.error(e, code, ErrorCode.COLUMN_CONSTRAINT, info); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TableWorks.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TableWorks.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TableWorks.java 2021-03-01 22:27:36.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TableWorks.java 2022-03-26 22:14:42.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ * existing table which may result in a new Table object * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.7.0 */ public class TableWorks { @@ -1160,27 +1160,27 @@ throw Error.error(ErrorCode.X_42525); } - if (checkData == 0) { + if (checkData == Type.ReType.keep) { if (newCol.isIdentity()) { if (!(oldCol.isIdentity() || !oldCol.isNullable() || oldCol.isPrimaryKey())) { - checkData = 1; + checkData = Type.ReType.check; } } if (newType.isDomainType() && newType.userTypeModifier.getConstraints().length > 0) { - checkData = 1; + checkData = Type.ReType.check; } } - if (checkData == 1) { + if (checkData == Type.ReType.check) { checkConvertColDataType(oldCol, newCol); - checkData = 0; + checkData = Type.ReType.keep; } - if (checkData == 0) { + if (checkData == Type.ReType.keep) { // size of some types may be increased // default expressions can change @@ -1351,11 +1351,10 @@ /** * Changes the type of a table * - * @param session Session * @param newType int * @return boolean */ - public boolean setTableType(Session session, int newType) { + public boolean setTableType(int newType) { int currentType = table.getTableType(); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestConnectionSettings.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestConnectionSettings.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestConnectionSettings.java 2020-12-16 19:41:40.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestConnectionSettings.java 2022-02-21 14:41:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2020, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestDatabaseMetaData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestDatabaseMetaData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestDatabaseMetaData.java 2021-01-27 04:03:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestDatabaseMetaData.java 2022-02-21 14:41:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,8 @@ import java.util.Iterator; import java.util.List; +import org.hsqldb.jdbc.JDBCDatabaseMetaData; + public class TestDatabaseMetaData extends TestBase { public TestDatabaseMetaData(String name) { @@ -218,31 +220,49 @@ Connection conn = newConnection(); int updateCount; + ResultSet result = null; + String s = ""; try { - TestUtil.testScript(conn, "testrun/hsqldb/TestSelf.txt"); + TestUtil.testScript(conn, "testrun/hsqldb/TestSelf01Function.txt"); + TestUtil.testScript(conn, "testrun/hsqldb/TestSelf01Procedure.txt"); DatabaseMetaData dbmeta = conn.getMetaData(); dbmeta.allProceduresAreCallable(); - dbmeta.getBestRowIdentifier(null, null, "T_1", + result = dbmeta.getBestRowIdentifier(null, null, "T_1", DatabaseMetaData.bestRowTransaction, true); - dbmeta.getCatalogs(); - dbmeta.getColumnPrivileges(null, "PUBLIC", "T_1", "%"); - dbmeta.getColumns("PUBLIC", "PUBLIC", "T_1", "%"); - dbmeta.getCrossReference(null, null, "T_1", null, null, "T_1"); - dbmeta.getExportedKeys(null, null, "T_1"); - dbmeta.getFunctionColumns(null, "%", "%", "%"); - dbmeta.getFunctions(null, "%", "%"); - dbmeta.getImportedKeys("PUBLIC", "PUBLIC", "T_1"); - dbmeta.getIndexInfo("PUBLIC", "PUBLIC", "T1", true, true); - dbmeta.getPrimaryKeys("PUBLIC", "PUBLIC", "T_1"); - dbmeta.getProcedureColumns(null, null, "%", "%"); - dbmeta.getProcedures("PUBLIC", "%", "%"); - dbmeta.getSchemas(null, "#"); - dbmeta.getTablePrivileges(null, "%", "%"); - dbmeta.getUDTs(null, "%", "%", new int[]{ Types.DISTINCT }); + result = dbmeta.getCatalogs(); + result = dbmeta.getColumnPrivileges(null, "PUBLIC", "T_1", "%"); + + while(result.next()) { + s = result.getString(3); + } + result = dbmeta.getColumns("PUBLIC", "PUBLIC", "T_1", "%"); + result = dbmeta.getCrossReference(null, null, "T_1", null, null, "T_1"); + result = dbmeta.getExportedKeys(null, null, "T_1"); + result = dbmeta.getFunctionColumns(null, "%", "%", "%"); + result = dbmeta.getFunctions(null, "%", "%"); + + while(result.next()) { + s = result.getString(3); + } + + result = dbmeta.getImportedKeys("PUBLIC", "PUBLIC", "T_1"); + result = dbmeta.getIndexInfo("PUBLIC", "PUBLIC", "T1", true, true); + result = dbmeta.getPrimaryKeys("PUBLIC", "PUBLIC", "T_1"); + result = dbmeta.getProcedureColumns(null, null, "%", "%"); + result = dbmeta.getProcedures("PUBLIC", "%", "%"); + + while(result.next()) { + s = result.getString(3); + s = result.getString(9); + } + + result = dbmeta.getSchemas(null, "#"); + result = dbmeta.getTablePrivileges(null, "%", "%"); + result = dbmeta.getUDTs(null, "%", "%", new int[]{ Types.DISTINCT }); } catch (Exception e) { assertTrue("unable to prepare or execute DDL", false); } finally { @@ -265,6 +285,8 @@ int txIsolation = dbmeta.getDefaultTransactionIsolation(); String userName = dbmeta.getUserName(); boolean isReadOnly = dbmeta.isReadOnly(); + String collation = ((JDBCDatabaseMetaData) dbmeta).getDatabaseDefaultCollation(); + assertEquals("SQL_TEXT", collation); } catch (Exception e) { assertTrue("unable to prepare or execute DDL", false); } finally { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestDataCube.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestDataCube.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestDataCube.java 2019-12-28 14:31:50.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestDataCube.java 2022-06-08 09:19:12.000000000 +0000 @@ -107,8 +107,8 @@ //Channel: Internet addRevenueSource("INTERNET", 2009, "GB", "CAMBRIDGE", 10000); addRevenueSource("INTERNET", 2009, "GB", "OXFORD", 15000); - addRevenueSource("INTERNET", 2009, "US", "STANFORD" ,100000); - addRevenueSource("INTERNET", 2009, "US", "NEW YORK" ,175000); + addRevenueSource("INTERNET", 2009, "US", "STANFORD", 100000); + addRevenueSource("INTERNET", 2009, "US", "NEW YORK", 175000); addRevenueSource("INTERNET", 2010, "GB", "CAMBRIDGE", 20000); addRevenueSource("INTERNET", 2010, "GB", "OXFORD", 25000); addRevenueSource("INTERNET", 2010, "US", "STANFORD", 200000); @@ -181,7 +181,7 @@ * Tests aggregated selection using the CUBE operator with a GROUP_BY clause. * This is a normal use of the CUBE operator acting on one column. * The result set will contain two groupings: (CHANNEL), () - **/ + */ public void testAggregatedGroupByCube() throws SQLException { String sql = "SELECT CHANNEL, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -205,7 +205,7 @@ * The result set will contain eight groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), (CHANNEL, COUNTRY), (CHANNEL), * (YEAR, COUNTRY), (YEAR), (COUNTRY), () - **/ + */ public void testAggregatedGroupByCube1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -301,7 +301,7 @@ * Tests aggregated selection using the ROLLUP operator with a GROUP_BY clause. * This is a normal use of the ROLLUP operator acting on one column. * The result set will contain two groupings: (CHANNEL), () - **/ + */ public void testAggregatedGroupByRollup() throws SQLException { String sql = "SELECT CHANNEL, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -324,7 +324,7 @@ * The ROLLUP operator acts on several column. * The result set will contain four groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), (CHANNEL), (), - **/ + */ public void testAggregatedGroupByRollup1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -396,7 +396,7 @@ * Tests aggregated selection using the GROUPING SETS operator with a GROUP_BY clause. * This is a trivial use of the GROUPING SETS operator acting on one group. * Equivalent to "GROUP BY CHANNEL" - **/ + */ public void testAggregatedGroupByGS() throws SQLException { String sql = "SELECT CHANNEL, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -416,7 +416,7 @@ * The GROUPING SETS operator acts on several groups of dimension 1. * The result set will contain three groupings: * (CHANNEL), (YEAR), (COUNTRY) - **/ + */ public void testAggregatedGroupByGS1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -443,7 +443,7 @@ * The GROUPING SETS operator acts on several groups of various dimensions. * The result set will contain three groupings: * (CHANNEL, YEAR, COUNTRY), (YEAR), (COUNTRY, YEAR), () - **/ + */ public void testAggregatedGroupByGS2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE \n" + @@ -521,7 +521,7 @@ * * The ROLLUP operator acts on several column, producing four groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), (CHANNEL), () - **/ + */ public void testAggregatedGrouping() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES), \n" + "GROUPING(CHANNEL) AS CH, GROUPING(YEAR) as YR, GROUPING(COUNTRY) AS CO\n" + @@ -573,7 +573,7 @@ * * The CUBE operator acts on several column, producing four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedGrouping1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES), GROUPING(CHANNEL, YEAR) " + "FROM REVENUE\n" + @@ -612,7 +612,7 @@ * * The CUBE operator acts on several column, producing four groupings: * (CHANNEL, COUNTRY), (CHANNEL), (COUNTRY), () - **/ + */ public void testAggregatedDecode() throws SQLException { String sql = "SELECT DECODE(GROUPING(CHANNEL), 1, 'MULTI-CHANNEL', CHANNEL), DECODE(GROUPING(COUNTRY), 0, COUNTRY, 'MULTI-COUNTRY'), SUM(SALES) \n" + "FROM REVENUE\n" + @@ -650,7 +650,7 @@ * * () evaluates to GRAND TOTAL, (CHANNEL) evaluate to the channel used, * (COUNTRY) evaluates to the country and (CHANNEL, COUNTRY) evaluates to NULL - **/ + */ public void testAggregatedDecode1() throws SQLException { String sql = "SELECT DECODE(GROUPING(CHANNEL, COUNTRY), 3, 'GRAND TOTAL', 2, COUNTRY, " + "1, CHANNEL, 0, null), SUM(SALES) \n" + @@ -685,7 +685,7 @@ * a GROUPING operator * * A SQLException should be thrown. - **/ + */ public void testInvalidGrouping() throws SQLException { String sql = "SELECT CHANNEL, COUNTRY, SUM(SALES)\n" + "FROM REVENUE\n" + @@ -702,7 +702,7 @@ * * The CUBE operator produces four groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL), (YEAR, COUNTRY), () - **/ + */ public void testAggregatedComposite() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -749,7 +749,7 @@ * * The ROLLUP operator produces three groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), () - **/ + */ public void testAggregatedComposite1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -792,7 +792,7 @@ * * The ROLLUP operator produces four groupings: * (CHANNEL, YEAR, COUNTRY, PROVINCE), (CHANNEL, YEAR), (COUNTRY, PROVINCE), () - **/ + */ public void testAggregatedComposite2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -862,7 +862,7 @@ * * Two groupings should be produced: * (CHANNEL, YEAR), (CHANNEL, COUNTRY) - **/ + */ public void testAggregatedConcat() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -888,12 +888,13 @@ compareResults(sql, expected, "00000"); } + /** * Tests concatenated groupings using GROUPING SETS. * * Four groupings should be produced: * (CHANNEL, COUNTRY), (YEAR, COUNTRY), (CHANNEL, PROVINCE), (YEAR, PROVINCE) - **/ + */ public void testAggregatedConcat1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -957,7 +958,7 @@ * * Four groupings should be produced: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), (CHANNEL, COUNTRY), (CHANNEL) - **/ + */ public void testAggregatedConcat2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1003,13 +1004,14 @@ compareResults(sql, expected, "00000"); } + /** * Tests concatenated groupings using CUBE and GROUPING SETS. * * Eight groupings should be produced: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, COUNTRY), (YEAR, COUNTRY), (COUNTRY), * (CHANNEL, YEAR, PROVINCE), (CHANNEL, PROVINCE), (YEAR, PROVINCE), (PROVINCE) - **/ + */ public void testAggregatedConcat3() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1135,7 +1137,7 @@ * (CHANNEL, COUNTRY, PROVINCE), (YEAR, COUNTRY, PROVINCE), * (CHANNEL, COUNTRY), (YEAR, COUNTRY), * (CHANNEL),(YEAR) - **/ + */ public void testAggregatedConcat4() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1209,7 +1211,7 @@ * (CHANNEL, YEAR, COUNTRY, PROVINCE), (CHANNEL, COUNTRY, PROVINCE), (YEAR, COUNTRY, PROVINCE), (COUNTRY, PROVINCE), * (CHANNEL, YEAR, COUNTRY), (CHANNEL, COUNTRY), (YEAR, COUNTRY), (COUNTRY), * (CHANNEL, YEAR), (CHANNEL), (YEAR), (), - **/ + */ public void testAggregatedConcat5() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1349,12 +1351,13 @@ //------------------------------------------------------------ // NESTED GROUPING TEST //------------------------------------------------------------ + /** * Tests nested groupings using GROUPING SETS within GROUPING SETS. * * Three groupings should be produced: * (CHANNEL), (YEAR), (COUNTRY) - **/ + */ public void testAggregatedNest() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1382,7 +1385,7 @@ * * Five groupings should be produced: * (CHANNEL, YEAR), (CHANNEL), (YEAR), (), (COUNTRY) - **/ + */ public void testAggregatedNest1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1420,7 +1423,7 @@ * * Four groupings should be produced: * (CHANNEL), (YEAR, COUNTRY), (YEAR), () - **/ + */ public void testAggregatedNest2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1454,7 +1457,7 @@ * * Six groupings should be produced: * (CHANNEL, YEAR), (CHANNEL), (), (COUNTRY, PROVINCE), (COUNTRY), () - **/ + */ public void testAggregatedNest3() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1500,7 +1503,7 @@ * (CHANNEL, YEAR), (CHANNEL), (), (COUNTRY, PROVINCE), (COUNTRY), () * * The second empty grouping is eliminated - **/ + */ public void testDistinctAggregatedNest3() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1542,7 +1545,7 @@ * nested ROLLUP within CUBE * * A SQLException should be thrown. - **/ + */ public void testInvalidNesting() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -1556,7 +1559,7 @@ * nested CUBE within CUBE * * A SQLException should be thrown. - **/ + */ public void testInvalidNesting1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -1570,7 +1573,7 @@ * nested GROUPING SETS within CUBE * * A SQLException should be thrown. - **/ + */ public void testInvalidNesting2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -1583,7 +1586,7 @@ * nested ROLLUP within ROLLUP * * A SQLException should be thrown. - **/ + */ public void testInvalidNesting3() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -1597,7 +1600,7 @@ * nested CUBE within ROLLUP * * A SQLException should be thrown. - **/ + */ public void testInvalidNesting4() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -1611,7 +1614,7 @@ * nested GROUPING SETS within ROLLUP * * A SQLException should be thrown. - **/ + */ public void testInvalidNesting5() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -1625,11 +1628,11 @@ /** * Tests WHERE clause with text fields. * - * Rows with COUNTRY <> 'GB' will be removed before grouping occurs + * Rows with {@code COUNTRY <> 'GB'} will be removed before grouping occurs * * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedWhere() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1662,11 +1665,11 @@ /** * Tests WHERE clause with numerical fields. * - * Rows with SALES <= 20000 will be removed before grouping occurs + * Rows with {@code SALES <= 20000} will be removed before grouping occurs * * ROLLUP will produce three groupings: * (CHANNEL, YEAR), (CHANNEL), () - **/ + */ public void testAggregatedWhere1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1695,11 +1698,11 @@ /** * Tests WHERE clause with multiple fields. * - * Rows with COUNTRY <> 'US' or YEAR = 2009 will be removed before grouping occurs + * Rows with {@code COUNTRY <> 'US' or YEAR = 2009} will be removed before grouping occurs * * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedWhere2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1722,9 +1725,11 @@ compareResults(sql, expected, "00000"); } + //------------------------------------------------------------ // HAVING CLAUSE TEST //------------------------------------------------------------ + /** * Tests HAVING clause with aggregated column and multiple * HAVING conditions @@ -1732,7 +1737,7 @@ * ROLLUP will produce four groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), (CHANNEL), () * which are then filtered by the HAVING condition - **/ + */ public void testAggregatedHaving() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -1762,7 +1767,7 @@ * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () * which are then filtered by the HAVING condition - **/ + */ public void testAggregatedHaving1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1792,7 +1797,7 @@ * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () * which are then filtered by the HAVING condition - **/ + */ public void testAggregatedHaving2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1813,12 +1818,13 @@ //------------------------------------------------------------ // ORDER BY CLAUSE TEST //------------------------------------------------------------ + /** * Tests ORDER BY clause * * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR),() - **/ + */ public void testAggregatedOrder() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1853,7 +1859,7 @@ * * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR),() - **/ + */ public void testAggregatedOrder1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1888,7 +1894,7 @@ * * CUBE will produce four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR),() - **/ + */ public void testAggregatedOrder2() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -1917,15 +1923,17 @@ compareResults(sql, expected, "00000"); } + //------------------------------------------------------------ // Miscellaneous columns TEST //------------------------------------------------------------ + /** * Tests the interaction with renamed columns with * aggregated selection using the CUBE operator with a GROUP_BY clause. * The CUBE operator produces four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedRename() throws SQLException { String sql = "SELECT CHANNEL as ROUTES, YEAR, SUM(SALES) as SALES\n" + "FROM REVENUE \n" + @@ -1950,6 +1958,7 @@ null, Integer.valueOf(2010), Integer.valueOf(2559000) }, }; + compareResults(sql, expected, "00000"); } @@ -1960,7 +1969,7 @@ * * The CUBE operator produces four groupings: * (CHANNEL, YEAR), (CHANNEL), () - **/ + */ public void testAggregatedRename1() throws SQLException { String sql = "SELECT CHANNEL as ROUTES, YEAR as CALENDAR, SUM(SALES) as SALES\n" + "FROM REVENUE \n" + @@ -1991,7 +2000,7 @@ * * The CUBE operator produces four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR),() - **/ + */ public void testAggregatedReorder() throws SQLException { String sql = "SELECT YEAR, SUM(SALES) as SALES, CHANNEL\n" + "FROM REVENUE\n" + @@ -2026,7 +2035,7 @@ * * The CUBE operator produces four groupings: * (YEAR, CHANNEL), (YEAR), (CHANNEL), () - **/ + */ public void testAggregatedReorder1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, SUM(SALES) as SALES\n" + "FROM REVENUE \n" + @@ -2061,7 +2070,7 @@ * * The ROLLUP operator produces four groupings: * (YEAR, CHANNEL), (YEAR), () - **/ + */ public void testAggregatedReorder2() throws SQLException { String sql = "SELECT CHANNEL as ROUTES, SUM(SALES) as SALES, YEAR AS CALENDAR\n" + "FROM REVENUE \n" + @@ -2091,7 +2100,7 @@ * with a GROUP_BY clause. * * Not all columns involved in GROUP BY are displayed - **/ + */ public void testAggregatedMissingColumns() throws SQLException { String sql = "SELECT CHANNEL, COUNTRY, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -2122,7 +2131,7 @@ * * The ROLLUP operator produces five groupings: * (CHANNEL, YEAR), (CHANNEL, YEAR),(CHANNEL, YEAR),(CHANNEL), () - **/ + */ public void testAggregatedRepeatedColumns() throws SQLException { String sql = "SELECT CHANNEL as ROUTES, YEAR as CALENDAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -2171,7 +2180,7 @@ * (CHANNEL, YEAR), (CHANNEL, YEAR),(CHANNEL, YEAR),(CHANNEL), () * * The duplicate (CHANNEL, YEAR) groupings are eliminated. - **/ + */ public void testDistinctAggregatedRepeatedColumns() throws SQLException { String sql = "SELECT CHANNEL as ROUTES, YEAR as CALENDAR, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -2201,7 +2210,7 @@ * columns not in the GROUP BY clause * * A SQLException should be thrown. - **/ + */ public void testInvalidMissingColumns() throws SQLException { String sql = "SELECT CHANNEL, COUNTRY, SUM(SALES)\n" + "FROM REVENUE \n" + @@ -2213,12 +2222,13 @@ //------------------------------------------------------------ // Aggregate Functions TEST //------------------------------------------------------------ + /** * Tests the data-cube with the MIN aggregate function * * The CUBE operator produces four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedMin() throws SQLException { String sql = "SELECT CHANNEL, YEAR, MIN(SALES) as SALES \n" + "FROM REVENUE\n" + @@ -2243,6 +2253,7 @@ null, Integer.valueOf(2010), Integer.valueOf(20000) }, }; + compareResults(sql, expected, "00000"); } @@ -2251,7 +2262,7 @@ * * The CUBE operator produces four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedCount() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNT(*) \n" + "FROM REVENUE\n" + @@ -2276,6 +2287,7 @@ null, Integer.valueOf(2010), Integer.valueOf(8) }, }; + compareResults(sql, expected, "00000"); } @@ -2284,7 +2296,7 @@ * * The CUBE operator produces two groupings: * (CHANNEL), () - **/ + */ public void testAggregatedAvg() throws SQLException { String sql = "SELECT CHANNEL, AVG(SALES), VAR_SAMP(SALES), STDDEV_SAMP(SALES), VAR_POP (SALES), STDDEV_POP(SALES)\n" + "FROM REVENUE\n" + @@ -2297,14 +2309,16 @@ "DIRECT SALES", Integer.valueOf(472312), 1.7276678125E11, Integer.valueOf(415652), 1.5117093359375E11, 388807 }, }; + compareResults(sql, expected, "00000"); } + /** * Tests the data-cube without an aggregate function * * The CUBE operator produces four groupings: * (CHANNEL, YEAR), (CHANNEL), (YEAR), () - **/ + */ public void testAggregatedMissing() throws SQLException { String sql = "SELECT CHANNEL, YEAR \n" + "FROM REVENUE\n" + @@ -2329,14 +2343,16 @@ null, Integer.valueOf(2010) }, }; + compareResults(sql, expected, "00000"); } + /** * Tests an invalid GROUP BY clause that contains * an aggregate function * * A SQLException should be thrown. - **/ + */ public void testInvalidAggregate() throws SQLException { String sql = "SELECT CHANNEL, COUNTRY, SUM(SALES)\n" + "FROM REVENUE\n" + @@ -2344,13 +2360,15 @@ Object[][] expected = new Object[][]{}; compareResults(sql, expected, "42572"); } + //------------------------------------------------------------ // Functions in GROUP BY TEST //------------------------------------------------------------ + /** * Tests the interaction of functions within the GROUP BY clause * and datacube operators. - **/ + */ public void testFunctionGroupBy() throws SQLException { String sql = "SELECT CASE WHEN A.SEL=1 THEN A.NAME2 ELSE A.NAME1 END AS NAME,\n" + " COUNT(A.NAME1) AS COUNTER FROM TEST A \n" + @@ -2374,6 +2392,7 @@ }}; compareResults(sql, expected, "00000"); } + public void testFunctionGroupBy1() throws SQLException { String sql = "SELECT CASE WHEN A.SEL=1 THEN A.NAME2 ELSE A.NAME1 END AS NAME,\n" + " COUNT(A.NAME1) AS COUNTER FROM TEST A \n" + @@ -2403,6 +2422,7 @@ }}; compareResults(sql, expected, "00000"); } + public void testFunctionGroupBy3() throws SQLException { String sql = "SELECT A.SEL, COALESCE(A.NAME1, A.NAME2) AS NAME,\n" + "COUNT(A.SEL) AS COUNTER FROM TEST A \n" + @@ -2427,10 +2447,10 @@ compareResults(sql, expected, "00000"); } - //------------------------------------------------------------ // Complex Query TEST //------------------------------------------------------------ + /** * Tests the interaction of multiple features * Concatenated grouping, nesting and composite columns @@ -2438,7 +2458,7 @@ * Produces seven groupings: * (CHANNEL, COUNTRY, PROVINCE), (CHANNEL, COUNTRY), (CHANNEL, PROVINCE), (CHANNEL) * (CHANNEL, YEAR, COUNTRY, PROVINCE), (CHANNEL, YEAR), (CHANNEL) - **/ + */ public void testAggregatedComplex() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -2546,7 +2566,7 @@ * (CHANNEL, YEAR, COUNTRY, PROVINCE), (CHANNEL, YEAR), (CHANNEL) * * The duplicate are eliminated - **/ + */ public void testDistinctAggregatedComplex() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, PROVINCE, SUM(SALES) \n" + "FROM REVENUE\n" + @@ -2648,7 +2668,7 @@ * Produces Eight groupings: * (CHANNEL, YEAR, COUNTRY), (CHANNEL, YEAR), (CHANNEL, COUNTRY), (CHANNEL) * (YEAR, COUNTRY), (YEAR), (COUNTRY), () - **/ + */ public void testAggregatedComplex1() throws SQLException { String sql = "SELECT CHANNEL, YEAR, COUNTRY, SUM(SALES), SUM(LOSSES)\n" + "FROM REVENUE\n" + @@ -2675,7 +2695,6 @@ compareResults(sql, expected, "00000"); } - //------------------------------------------------------------ // Helper methods //------------------------------------------------------------ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestDatetimeSimple.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestDatetimeSimple.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestDatetimeSimple.java 2020-07-10 12:13:42.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestDatetimeSimple.java 2022-03-26 22:15:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,11 @@ import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; +import java.util.Calendar; import java.util.TimeZone; import junit.framework.TestCase; -import java.util.Calendar; -import java.text.DateFormat; - /** * Date Test Case. */ diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestJavaFunctions.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestJavaFunctions.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestJavaFunctions.java 2021-01-25 13:36:02.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestJavaFunctions.java 2022-03-27 21:17:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestPreparedSubQueries.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestPreparedSubQueries.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestPreparedSubQueries.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestPreparedSubQueries.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,7 +60,6 @@ update = u; } } - ; private sqlStmt[] stmtArray = { new sqlStmt("drop table a if exists cascade", false, false), diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestSchemaParse.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestSchemaParse.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestSchemaParse.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestSchemaParse.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1018,7 +1018,6 @@ return newSuite; } - ; public void fire(int i, String name, String table, Object[] row1, Object[] row2) {} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestScript.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestScript.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestScript.java 2021-01-25 14:26:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestScript.java 2022-06-08 08:24:02.000000000 +0000 @@ -85,8 +85,8 @@ // String path = "TestSelfSysTables.txt"; // String path = "TestTemp.txt"; public TestScript(String name) { - super(name, "jdbc:hsqldb:mem:test", false, false); -// super(name, "jdbc:hsqldb:file:test1", false, false); + super(name, "jdbc:hsqldb:mem:test"); +// super(name, "jdbc:hsqldb:file:test1"); } public void test() throws java.lang.Exception { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestTextTable.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestTextTable.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestTextTable.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestTextTable.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -163,7 +163,6 @@ statement.execute(setTableSource); } } - ; TextTableDescriptor m_products = new TextTableDescriptor("products", "ID INTEGER PRIMARY KEY, \"name\" VARCHAR(20)", "\t", "\\t", diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestUtil.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestUtil.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/test/TestUtil.java 2021-02-04 10:10:36.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/test/TestUtil.java 2022-06-02 18:00:58.000000000 +0000 @@ -677,26 +677,27 @@ * (note that UPPERCASE codes, while valid are only processed if the * system property IgnoreCodeCase has been set to true) * - * 'u' - update - * 'c' - count + * ' ' - not a test + * 'd' - display this line verbatim + * 'o' - dump result set * 'e' - exception - * 'r' - results + * 's' - silent + * 'c' - count number of lines in result set + * 'r' - result set + * 'u' - update count * 'w' - wait * 'p' - proceed - * 's' - silent - * 'd' - display (No reason to use upper-case). - * ' ' - not a test */ switch (aCode) { case ' ' : - case 'r' : + case 'd' : case 'o' : case 'e' : + case 's' : case 'c' : + case 'r' : case 'u' : - case 's' : - case 'd' : case 'w' : case 'p' : return true; @@ -906,7 +907,7 @@ String actualS = actual; if (results.getMetaData().getColumnClassName( - i).equals("java.lang.String")) { + j).equals("java.lang.String")) { actualS = StringConverter.toQuotedString(actualS, '\'', diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/Tokens.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/Tokens.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/Tokens.java 2021-07-15 13:57:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/Tokens.java 2022-03-25 12:50:46.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,7 @@ * Defines and enumerates reserved and non-reserved SQL keywords.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.7.2 */ public class Tokens { @@ -220,7 +220,7 @@ public static final String T_LOOP = "LOOP"; public static final String T_LOWER = "LOWER"; static final String T_MATCH = "MATCH"; - static final String T_MAX = "MAX"; + public static final String T_MAX = "MAX"; static final String T_MAX_CARDINALITY = "MAX_CARDINALITY"; static final String T_MEMBER = "MEMBER"; static final String T_MERGE = "MERGE"; @@ -281,7 +281,7 @@ static final String T_RANK = "RANK"; static final String T_READS = "READS"; public static final String T_REAL = "REAL"; - static final String T_RECURSIVE = "RECURSIVE"; + public static final String T_RECURSIVE = "RECURSIVE"; static final String T_REF = "REF"; public static final String T_REFERENCES = "REFERENCES"; static final String T_REFERENCING = "REFERENCING"; @@ -348,7 +348,7 @@ public static final String T_TIMEZONE_HOUR = "TIMEZONE_HOUR"; public static final String T_TIMEZONE_MINUTE = "TIMEZONE_MINUTE"; public static final String T_TO = "TO"; - static final String T_TRAILING = "TRAILING"; + public static final String T_TRAILING = "TRAILING"; public static final String T_TRANSLATE = "TRANSLATE"; static final String T_TRANSLATE_REGEX = "TRANSLATE_REGEX"; static final String T_TRANSLATION = "TRANSLATION"; @@ -393,12 +393,13 @@ public static final String T_COMMA = ","; static final String T_CIRCUMFLEX = "^"; public static final String T_CLOSEBRACKET = ")"; - static final String T_COLON = ":"; + public static final String T_COLON = ":"; static final String T_CONCAT_OP = "||"; public static final String T_DIVIDE_OP = "/"; static final String T_EQUALS_OP = "="; static final String T_GREATER_OP = ">"; static final String T_GREATER_EQUALS = ">="; + public static final String T_LEFTBRACE = "{"; public static final String T_LEFTBRACKET = "["; static final String T_LESS_OP = "<"; static final String T_LESS_EQUALS = "<="; @@ -409,12 +410,14 @@ static final String T_NOT_EQUALS_ALT = "!="; public static final String T_OPENBRACKET = "("; static final String T_QUESTION = "?"; + public static final String T_RIGHTBRACE = "}"; public static final String T_RIGHTBRACKET = "]"; static final String T_SEMICOLON = ";"; static final String T_DOUBLE_COLON = "::"; // SQL:200n non-reserved word list static final String T_A = "A"; + static final String T_ABSENT = "ABSENT"; static final String T_ABSOLUTE = "ABSOLUTE"; static final String T_ACTION = "ACTION"; static final String T_ADA = "ADA"; @@ -455,6 +458,7 @@ static final String T_COMPARABLE = "COMPARABLE"; // SQL/JRT static final String T_CONDITION_IDENTIFIER = "CONDIITON_IDENTIFIER"; static final String T_CONDITION_NUMBER = "CONDITION_NUMBER"; + static final String T_CONDITIONAL = "CONDITIONAL"; static final String T_CONNECTION = "CONNECTION"; static final String T_CONNECTION_NAME = "CONNECTION_NAME"; static final String T_CONSTRAINT_CATALOG = "CONSTRAINT_CATALOG"; @@ -484,7 +488,10 @@ public static final String T_DOMAIN = "DOMAIN"; static final String T_DYNAMIC_FUNCTION = "DYNAMIC_FUNCTION"; static final String T_DYNAMIC_FUNCTION_CODE = "DYNAMIC_FUNCTION_CODE"; + static final String T_EMPTY = "EMPTY"; + static final String T_ENCODING = "ENCODING"; static final String T_ENFORCED = "ENFORCED"; + public static final String T_ERROR = "ERROR"; static final String T_EXCEPTION = "EXCEPTION"; static final String T_EXCLUDE = "EXCLUDE"; static final String T_EXCLUDING = "EXCLUDING"; @@ -494,6 +501,7 @@ public static final String T_FIRST = "FIRST"; static final String T_FLAG = "FLAG"; static final String T_FOLLOWING = "FOLLOWING"; + static final String T_FORMAT = "FORMAT"; static final String T_FORTRAN = "FORTRAN"; static final String T_FOUND = "FOUND"; public static final String T_G_FACTOR = "G"; @@ -518,8 +526,19 @@ static final String T_INVOKER = "INVOKER"; public static final String T_ISOLATION = "ISOLATION"; public static final String T_JAVA = "JAVA"; // SQL/JRT + static final String T_JSON = "JSON"; + static final String T_JSON_ARRAY = "JSON_ARRAY"; + static final String T_JSON_ARRAYAGG = "JSON_ARRAYAGG"; + static final String T_JSON_EXISTS = "JSON_EXISTS"; + static final String T_JSON_OBJECT = "JSON_OBJECT"; + static final String T_JSON_OBJECTAGG = "JSON_OBJECTAGG"; + static final String T_JSON_QUERY = "JSON_QUERY"; + static final String T_JSON_TABLE = "JSON_TABLE"; + static final String T_JSON_VALUE = "JSON_VALUE"; public static final String T_K_FACTOR = "K"; + static final String T_KEEP = "KEEP"; static final String T_KEY = "KEY"; + static final String T_KEYS = "KEYS"; static final String T_KEY_MEMBER = "KEY_MEMBER"; static final String T_KEY_TYPE = "KEY_TYPE"; static final String T_LAST = "LAST"; @@ -539,6 +558,7 @@ static final String T_MUMPS = "MUMPS"; public static final String T_NAME = "NAME"; public static final String T_NAMES = "NAMES"; + static final String T_NESTED = "NESTED"; static final String T_NESTING = "NESTING"; static final String T_NEXT = "NEXT"; static final String T_NFC = "NFC"; @@ -551,6 +571,7 @@ static final String T_NUMBER = "NUMBER"; public static final String T_OBJECT = "OBJECT"; static final String T_OCTETS = "OCTETS"; + public static final String T_OMIT = "OMIT"; static final String T_OPTION = "OPTION"; static final String T_OPTIONS = "OPTIONS"; static final String T_ORDERING = "ORDERING"; @@ -571,6 +592,7 @@ static final String T_PARAMETER_SPEC_SCHEMA = "PARAMETER_SPECIFIC_SCHEMA"; static final String T_PARTIAL = "PARTIAL"; static final String T_PASCAL = "PASCAL"; + static final String T_PASSING = "PASSSING"; public static final String T_PATH = "PATH"; static final String T_PLACING = "PLACING"; static final String T_PLI = "PLI"; @@ -590,12 +612,14 @@ static final String T_RETURNED_LENGTH = "RETURNED_LENGTH"; static final String T_RETURNED_OCTET_LENGTH = "RETURNED_OCTET_LENGTH"; static final String T_RETURNED_SQLSTATE = "RETURNED_SQLSTATE"; + static final String T_RETURNING = "RETURNING"; public static final String T_ROLE = "ROLE"; public static final String T_ROUTINE = "ROUTINE"; static final String T_ROUTINE_CATALOG = "ROUTINE_CATALOG"; static final String T_ROUTINE_NAME = "ROUTINE_NAME"; static final String T_ROUTINE_SCHEMA = "ROUTINE_SCHEMA"; static final String T_ROW_COUNT = "ROW_COUNT"; + static final String T_SCALAR = "SCALAR"; public static final String T_SCALE = "SCALE"; public static final String T_SCHEMA = "SCHEMA"; static final String T_SCHEMA_NAME = "SCHEMA_NAME"; @@ -640,6 +664,7 @@ static final String T_TRIGGER_SCHEMA = "TRIGGER_SCHEMA"; public static final String T_TYPE = "TYPE"; static final String T_UNBOUNDED = "UNBOUNDED"; + static final String T_UNCONDITIONAL = "UNCONDITIONAL"; static final String T_UNCOMMITTED = "UNCOMMITTED"; static final String T_UNDER = "UNDER"; static final String T_UNDO = "UNDO"; @@ -693,7 +718,6 @@ public static final String T_DIGEST = "DIGEST"; static final String T_DUAL = "DUAL"; static final String T_DUPLICATE = "DUPLICATE"; - public static final String T_ERROR = "ERROR"; public static final String T_EVENT = "EVENT"; static final String T_EXCLUSIVE = "EXCLUSIVE"; static final String T_EXPLAIN = "EXPLAIN"; @@ -702,7 +726,6 @@ static final String T_FILE = "FILE"; public static final String T_FILES = "FILES"; static final String T_FOLD = "FOLD"; - static final String T_FORMAT = "FORMAT"; static final String T_GROUP_CONCAT = "GROUP_CONCAT"; static final String T_HEADER = "HEADER"; public static final String T_IDENTIFIER = "IDENTIFIER"; @@ -720,7 +743,6 @@ "IS_READONLY_DATABASE_FILES"; static final String T_IS_READONLY_SESSION = "IS_READONLY_SESSION"; static final String T_ISNULL = "ISNULL"; - static final String T_KEEP = "KEEP"; static final String T_LASTVAL = "LASTVAL"; static final String T_LIMIT = "LIMIT"; public static final String T_LOB = "LOB"; @@ -1345,327 +1367,346 @@ // //SQL 200n Standard non-reserved keywords - full set public static final int A = 351; - public static final int ABSOLUTE = 352; - public static final int ACTION = 353; - public static final int ADA = 354; - public static final int ADD = 355; - public static final int ADMIN = 356; - public static final int AFTER = 357; - public static final int ALWAYS = 358; - public static final int ASC = 359; - public static final int ASSERTION = 360; - public static final int ASSIGNMENT = 361; - public static final int ATTRIBUTE = 362; - public static final int ATTRIBUTES = 363; - public static final int BEFORE = 364; - public static final int BERNOULLI = 365; - public static final int BREADTH = 366; - public static final int C = 367; - public static final int CASCADE = 368; - public static final int CATALOG = 369; - public static final int CATALOG_NAME = 370; - public static final int CHAIN = 371; - public static final int CHARACTER_SET_CATALOG = 372; - public static final int CHARACTER_SET_NAME = 373; - public static final int CHARACTER_SET_SCHEMA = 374; - public static final int CHARACTERISTICS = 375; - public static final int CHARACTERS = 376; - public static final int CLASS_ORIGIN = 377; - public static final int COBOL = 378; - public static final int COLLATION = 379; - public static final int COLLATION_CATALOG = 380; - public static final int COLLATION_NAME = 381; - public static final int COLLATION_SCHEMA = 382; - public static final int COLUMN_NAME = 383; - public static final int COMMAND_FUNCTION = 384; - public static final int COMMAND_FUNCTION_CODE = 385; - public static final int COMMITTED = 386; - public static final int CONDITION_IDENTIFIER = 387; - public static final int CONDITION_NUMBER = 388; - public static final int CONNECTION = 389; - public static final int CONNECTION_NAME = 390; - public static final int CONSTRAINT_CATALOG = 391; - public static final int CONSTRAINT_NAME = 392; - public static final int CONSTRAINT_SCHEMA = 393; - public static final int CONSTRAINTS = 394; - public static final int CONSTRUCTOR = 395; - public static final int XCONTAINS = 396; - public static final int CONTINUE = 397; - public static final int CURSOR_NAME = 398; - public static final int DATA = 399; - public static final int DATETIME_INTERVAL_CODE = 400; - public static final int DATETIME_INTERVAL_PRECISION = 401; - public static final int DEFAULTS = 402; - public static final int DEFERRABLE = 403; - public static final int DEFERRED = 404; - public static final int DEFINED = 405; - public static final int DEFINER = 406; - public static final int DEGREE = 407; - public static final int DEPTH = 408; - public static final int DERIVED = 409; - public static final int DESC = 410; - public static final int DESCRIPTOR = 411; - public static final int DIAGNOSTICS = 412; - public static final int DISPATCH = 413; - public static final int DOMAIN = 414; - public static final int DYNAMIC_FUNCTION = 415; - public static final int DYNAMIC_FUNCTION_CODE = 416; - public static final int EQUALS_OP = 417; - public static final int EXCEPTION = 418; - public static final int EXCLUDE = 419; - public static final int EXCLUDING = 420; - public static final int EXPRESSION = 421; - public static final int FINAL = 422; - public static final int FIRST = 423; - public static final int FOLLOWING = 424; - public static final int FORTRAN = 425; - public static final int FOUND = 426; - public static final int G = 427; - public static final int GENERAL = 428; - public static final int GENERATED = 429; - public static final int GO = 430; - public static final int GOTO = 431; - public static final int GRANTED = 432; - public static final int HIERARCHY = 433; - public static final int IF = 434; - public static final int IGNORE = 435; - public static final int IMMEDIATE = 436; - public static final int IMPLEMENTATION = 437; - public static final int INCLUDING = 438; - public static final int INCREMENT = 439; - public static final int INITIALLY = 440; - public static final int INPUT = 441; - public static final int INSTANCE = 442; - public static final int INSTANTIABLE = 443; - public static final int INSTEAD = 444; - public static final int INVOKER = 445; - public static final int ISOLATION = 446; - public static final int JAVA = 447; - public static final int K = 448; - public static final int KEY = 449; - public static final int KEY_MEMBER = 450; - public static final int KEY_TYPE = 451; - public static final int LAST = 452; - public static final int LENGTH = 453; - public static final int LEVEL = 454; - public static final int LIBRARY = 455; - public static final int LOCATOR = 456; - public static final int M = 457; - public static final int MAP = 458; - public static final int MATCHED = 459; - public static final int MAXVALUE = 460; - public static final int MESSAGE_LENGTH = 461; - public static final int MESSAGE_OCTET_LENGTH = 462; - public static final int MESSAGE_TEXT = 463; - public static final int MINVALUE = 464; - public static final int MORE = 465; - public static final int MUMPS = 466; - public static final int NAME = 467; - public static final int NAMES = 468; - public static final int NESTING = 469; - public static final int NEXT = 470; - public static final int NORMALIZED = 471; - public static final int NULLABLE = 472; - public static final int NULLS = 473; - public static final int NUMBER = 474; - public static final int OBJECT = 475; - public static final int OCTETS = 476; - public static final int OPTION = 477; - public static final int OPTIONS = 478; - public static final int ORDERING = 479; - public static final int ORDINALITY = 480; - public static final int OTHERS = 481; - public static final int OUTPUT = 482; - public static final int OVERFLOW = 483; - public static final int OVERRIDING = 484; - public static final int P = 485; - public static final int PAD = 486; - public static final int PARAMETER_MODE = 487; - public static final int PARAMETER_NAME = 488; - public static final int PARAMETER_ORDINAL_POSITION = 489; - public static final int PARAMETER_SPECIFIC_CATALOG = 490; - public static final int PARAMETER_SPECIFIC_NAME = 491; - public static final int PARAMETER_SPECIFIC_SCHEMA = 492; - public static final int PARTIAL = 493; - public static final int PASCAL = 494; - public static final int PATH = 495; - public static final int PLACING = 496; - public static final int PLI = 497; - public static final int PRECEDING = 498; - public static final int PRESERVE = 499; - public static final int PRIOR = 500; - public static final int PRIVILEGES = 501; - public static final int PUBLIC = 502; - public static final int READ = 503; - public static final int RELATIVE = 504; - public static final int REPEATABLE = 505; - public static final int RESPECT = 506; - public static final int RESTART = 507; - public static final int RESTRICT = 508; - public static final int RETURNED_CARDINALITY = 509; - public static final int RETURNED_LENGTH = 510; - public static final int RETURNED_OCTET_LENGTH = 511; - public static final int RETURNED_SQLSTATE = 512; - public static final int ROLE = 513; - public static final int ROUTINE = 514; - public static final int ROUTINE_CATALOG = 515; - public static final int ROUTINE_NAME = 516; - public static final int ROUTINE_SCHEMA = 517; - public static final int ROW_COUNT = 518; - public static final int SCALE = 519; - public static final int SCHEMA = 520; - public static final int SCHEMA_NAME = 521; - public static final int SCOPE_CATALOG = 522; - public static final int SCOPE_NAME = 523; - public static final int SCOPE_SCHEMA = 524; - public static final int SECTION = 525; - public static final int SECURITY = 526; - public static final int SELF = 527; - public static final int SEQUENCE = 528; - public static final int SERIALIZABLE = 529; - public static final int SERVER_NAME = 530; - public static final int SESSION = 531; - public static final int SERVER = 532; - public static final int SETS = 533; - public static final int SIMPLE = 534; - public static final int SIZE = 535; - public static final int SOURCE = 536; - public static final int SPACE = 537; - public static final int SPECIFIC_NAME = 538; - public static final int STATE = 539; - public static final int STATEMENT = 540; - public static final int STRUCTURE = 541; - public static final int STYLE = 542; - public static final int SUBCLASS_ORIGIN = 543; - public static final int T = 544; - public static final int TABLE_NAME = 545; - public static final int TEMPORARY = 546; - public static final int TIES = 547; - public static final int TOP_LEVEL_COUNT = 548; - public static final int TRANSACTION = 549; - public static final int TRANSACTION_ACTIVE = 550; - public static final int TRANSACTIONS_COMMITTED = 551; - public static final int TRANSACTIONS_ROLLED_BACK = 552; - public static final int TRANSFORM = 553; - public static final int TRANSFORMS = 554; - public static final int TRIGGER_CATALOG = 555; - public static final int TRIGGER_NAME = 556; - public static final int TRIGGER_SCHEMA = 557; - public static final int TYPE = 558; - public static final int UNBOUNDED = 559; - public static final int UNCOMMITTED = 560; - public static final int UNDER = 561; - public static final int UNNAMED = 562; - public static final int USAGE = 563; - public static final int USER_DEFINED_TYPE_CATALOG = 564; - public static final int USER_DEFINED_TYPE_CODE = 565; - public static final int USER_DEFINED_TYPE_NAME = 566; - public static final int USER_DEFINED_TYPE_SCHEMA = 567; - public static final int VIEW = 568; - public static final int WORK = 569; - public static final int WRITE = 570; - public static final int WRAPPER = 571; - public static final int ZONE = 572; + public static final int ABSENT = 352; + public static final int ABSOLUTE = 353; + public static final int ACTION = 354; + public static final int ADA = 355; + public static final int ADD = 356; + public static final int ADMIN = 357; + public static final int AFTER = 358; + public static final int ALWAYS = 359; + public static final int ASC = 360; + public static final int ASSERTION = 361; + public static final int ASSIGNMENT = 362; + public static final int ATTRIBUTE = 363; + public static final int ATTRIBUTES = 364; + public static final int BEFORE = 365; + public static final int BERNOULLI = 366; + public static final int BREADTH = 367; + public static final int C = 368; + public static final int CASCADE = 369; + public static final int CATALOG = 370; + public static final int CATALOG_NAME = 371; + public static final int CHAIN = 372; + public static final int CHARACTER_SET_CATALOG = 373; + public static final int CHARACTER_SET_NAME = 374; + public static final int CHARACTER_SET_SCHEMA = 375; + public static final int CHARACTERISTICS = 376; + public static final int CHARACTERS = 377; + public static final int CLASS_ORIGIN = 378; + public static final int COBOL = 379; + public static final int COLLATION = 380; + public static final int COLLATION_CATALOG = 381; + public static final int COLLATION_NAME = 382; + public static final int COLLATION_SCHEMA = 383; + public static final int COLUMN_NAME = 384; + public static final int COMMAND_FUNCTION = 385; + public static final int COMMAND_FUNCTION_CODE = 386; + public static final int COMMITTED = 387; + public static final int CONDITION_IDENTIFIER = 388; + public static final int CONDITION_NUMBER = 389; + public static final int CONDITIONAL = 390; + public static final int CONNECTION = 391; + public static final int CONNECTION_NAME = 392; + public static final int CONSTRAINT_CATALOG = 393; + public static final int CONSTRAINT_NAME = 394; + public static final int CONSTRAINT_SCHEMA = 395; + public static final int CONSTRAINTS = 396; + public static final int CONSTRUCTOR = 397; + public static final int CONTINUE = 398; + public static final int CURSOR_NAME = 399; + public static final int DATA = 400; + public static final int DATETIME_INTERVAL_CODE = 401; + public static final int DATETIME_INTERVAL_PRECISION = 402; + public static final int DEFAULTS = 403; + public static final int DEFERRABLE = 404; + public static final int DEFERRED = 405; + public static final int DEFINED = 406; + public static final int DEFINER = 407; + public static final int DEGREE = 408; + public static final int DEPTH = 409; + public static final int DERIVED = 410; + public static final int DESC = 411; + public static final int DESCRIPTOR = 412; + public static final int DIAGNOSTICS = 413; + public static final int DISPATCH = 414; + public static final int DOMAIN = 415; + public static final int DYNAMIC_FUNCTION = 416; + public static final int DYNAMIC_FUNCTION_CODE = 417; + public static final int EMPTY = 418; + public static final int ENCODING = 419; + public static final int EQUALS_OP = 420; + public static final int ERROR = 421; + public static final int EXCEPTION = 422; + public static final int EXCLUDE = 423; + public static final int EXCLUDING = 424; + public static final int EXPRESSION = 425; + public static final int FINAL = 426; + public static final int FIRST = 427; + public static final int FOLLOWING = 428; + public static final int FORMAT = 429; + public static final int FORTRAN = 430; + public static final int FOUND = 431; + public static final int G = 432; + public static final int GENERAL = 433; + public static final int GENERATED = 434; + public static final int GO = 435; + public static final int GOTO = 436; + public static final int GRANTED = 437; + public static final int HIERARCHY = 438; + public static final int IF = 439; + public static final int IGNORE = 440; + public static final int IMMEDIATE = 441; + public static final int IMPLEMENTATION = 442; + public static final int INCLUDING = 443; + public static final int INCREMENT = 444; + public static final int INITIALLY = 445; + public static final int INPUT = 446; + public static final int INSTANCE = 447; + public static final int INSTANTIABLE = 448; + public static final int INSTEAD = 449; + public static final int INVOKER = 450; + public static final int ISOLATION = 451; + public static final int JSON = 452; + public static final int JSON_ARRAY = 453; + public static final int JSON_ARRAYAGG = 454; + public static final int JSON_EXISTS = 455; + public static final int JSON_OBJECT = 456; + public static final int JSON_OBJECTAGG = 457; + public static final int JSON_QUERY = 458; + public static final int JSON_TABLE = 459; + public static final int JSON_VALUE = 460; + public static final int JAVA = 461; + public static final int K = 462; + public static final int KEY = 463; + public static final int KEY_MEMBER = 464; + public static final int KEY_TYPE = 465; + public static final int KEYS = 466; + public static final int LAST = 467; + public static final int LENGTH = 468; + public static final int LEVEL = 469; + public static final int LIBRARY = 470; + public static final int LOCATOR = 471; + public static final int M = 472; + public static final int MAP = 473; + public static final int MATCHED = 474; + public static final int MAXVALUE = 475; + public static final int MESSAGE_LENGTH = 476; + public static final int MESSAGE_OCTET_LENGTH = 477; + public static final int MESSAGE_TEXT = 478; + public static final int MINVALUE = 479; + public static final int MORE = 480; + public static final int MUMPS = 481; + public static final int NAME = 482; + public static final int NAMES = 483; + public static final int NESTED = 484; + public static final int NESTING = 485; + public static final int NEXT = 486; + public static final int NORMALIZED = 487; + public static final int NULLABLE = 488; + public static final int NULLS = 489; + public static final int NUMBER = 490; + public static final int OBJECT = 491; + public static final int OCTETS = 492; + public static final int OMIT = 493; + public static final int OPTION = 494; + public static final int OPTIONS = 495; + public static final int ORDERING = 496; + public static final int ORDINALITY = 497; + public static final int OTHERS = 498; + public static final int OUTPUT = 499; + public static final int OVERFLOW = 500; + public static final int OVERRIDING = 501; + public static final int P = 502; + public static final int PAD = 503; + public static final int PARAMETER_MODE = 504; + public static final int PARAMETER_NAME = 505; + public static final int PARAMETER_ORDINAL_POSITION = 506; + public static final int PARAMETER_SPECIFIC_CATALOG = 507; + public static final int PARAMETER_SPECIFIC_NAME = 508; + public static final int PARAMETER_SPECIFIC_SCHEMA = 509; + public static final int PARTIAL = 510; + public static final int PASCAL = 511; + public static final int PASSING = 512; + public static final int PATH = 513; + public static final int PLACING = 514; + public static final int PLI = 515; + public static final int PRECEDING = 516; + public static final int PRESERVE = 517; + public static final int PRIOR = 518; + public static final int PRIVILEGES = 519; + public static final int PUBLIC = 520; + public static final int READ = 521; + public static final int RELATIVE = 522; + public static final int REPEATABLE = 523; + public static final int RESPECT = 524; + public static final int RESTART = 525; + public static final int RESTRICT = 526; + public static final int RETURNED_CARDINALITY = 527; + public static final int RETURNED_LENGTH = 528; + public static final int RETURNED_OCTET_LENGTH = 529; + public static final int RETURNED_SQLSTATE = 530; + public static final int RETURNING = 531; + public static final int ROLE = 532; + public static final int ROUTINE = 533; + public static final int ROUTINE_CATALOG = 534; + public static final int ROUTINE_NAME = 535; + public static final int ROUTINE_SCHEMA = 536; + public static final int ROW_COUNT = 537; + public static final int SCALAR = 538; + public static final int SCALE = 539; + public static final int SCHEMA = 540; + public static final int SCHEMA_NAME = 541; + public static final int SCOPE_CATALOG = 542; + public static final int SCOPE_NAME = 543; + public static final int SCOPE_SCHEMA = 544; + public static final int SECTION = 545; + public static final int SECURITY = 546; + public static final int SELF = 547; + public static final int SEQUENCE = 548; + public static final int SERIALIZABLE = 549; + public static final int SERVER_NAME = 550; + public static final int SESSION = 551; + public static final int SERVER = 552; + public static final int SETS = 553; + public static final int SIMPLE = 554; + public static final int SIZE = 555; + public static final int SOURCE = 556; + public static final int SPACE = 557; + public static final int SPECIFIC_NAME = 558; + public static final int STATE = 559; + public static final int STATEMENT = 560; + public static final int STRUCTURE = 561; + public static final int STYLE = 562; + public static final int SUBCLASS_ORIGIN = 563; + public static final int T = 564; + public static final int TABLE_NAME = 565; + public static final int TEMPORARY = 566; + public static final int TIES = 567; + public static final int TOP_LEVEL_COUNT = 568; + public static final int TRANSACTION = 569; + public static final int TRANSACTION_ACTIVE = 570; + public static final int TRANSACTIONS_COMMITTED = 571; + public static final int TRANSACTIONS_ROLLED_BACK = 572; + public static final int TRANSFORM = 573; + public static final int TRANSFORMS = 574; + public static final int TRIGGER_CATALOG = 575; + public static final int TRIGGER_NAME = 576; + public static final int TRIGGER_SCHEMA = 577; + public static final int TYPE = 578; + public static final int UNBOUNDED = 579; + public static final int UNCOMMITTED = 580; + public static final int UNCONDITIONAL = 581; + public static final int UNDER = 582; + public static final int UNNAMED = 583; + public static final int USAGE = 584; + public static final int USER_DEFINED_TYPE_CATALOG = 585; + public static final int USER_DEFINED_TYPE_CODE = 586; + public static final int USER_DEFINED_TYPE_NAME = 587; + public static final int USER_DEFINED_TYPE_SCHEMA = 588; + public static final int VIEW = 589; + public static final int WORK = 590; + public static final int WRITE = 591; + public static final int WRAPPER = 592; + public static final int ZONE = 593; // other token values used as switch cases - static final int ALIAS = 581; - static final int AGGREGATE = 582; - static final int AUTOCOMMIT = 583; - static final int AUTHENTICATION = 584; - static final int BACKUP = 585; - static final int BINARY_FLOAT = 586; - static final int BINARY_DOUBLE = 587; - static final int BIT = 588; - static final int BLOCKING = 589; - static final int BODY = 590; - static final int BYTE = 591; - static final int CACHE = 592; - static final int CACHED = 593; - static final int CASEWHEN = 594; - static final int CHECKPOINT = 595; - static final int CITEXT = 596; - static final int CLASS = 597; - static final int CLUSTERED = 598; - static final int COMMENT = 599; - static final int COMPACT = 600; - static final int COMPRESSED = 601; - static final int CONFLICT = 602; - static final int CONTROL = 603; - static final int CURRVAL = 604; - static final int DATABASE = 605; - static final int DEADLOCK = 606; - static final int DEFRAG = 607; - static final int DELAY = 608; - static final int DIGEST = 609; - static final int ENUM = 610; - static final int ERROR = 611; - static final int EVENT = 612; - static final int EXPLAIN = 613; - static final int EXPORT = 614; - static final int FEATURE = 615; - static final int FILE = 616; - public static final int FILES = 617; - static final int FORMAT = 618; - static final int GC = 619; - static final int HEADER = 620; - static final int IDENTIFIER = 621; - static final int IGNORECASE = 622; - static final int IMMEDIATELY = 623; - static final int INTEGRITY = 624; - static final int INTERRUPT = 625; - static final int INDEX = 626; - static final int INDEXER = 627; - static final int INFINITY = 628; - static final int INITIAL = 629; - static final int LASTVAL = 630; - static final int LIMIT = 631; - static final int LITERAL = 632; - static final int LIVE = 633; - static final int LOAD = 634; - static final int LOCK = 635; - static final int LOCKS = 636; - static final int LONG = 637; - static final int LONGVAR = 638; - static final int MAXROWS = 639; - static final int MEDIAN = 640; - static final int MEMORY = 641; - static final int MILLIS = 642; - static final int MINUS_EXCEPT = 643; - static final int NAN = 644; - static final int NEXTVAL = 645; - static final int NOWAIT = 646; - static final int NVARCHAR2 = 647; - static final int NVL2 = 648; - static final int OFF = 649; - static final int PASSWORD = 650; - static final int PERFORM = 651; - static final int PLAN = 652; - static final int PREVVAL = 653; - static final int PROPERTY = 654; - static final int RAW = 655; - static final int READONLY = 656; - static final int REFERENTIAL = 657; - static final int REGULAR = 658; - static final int RENAME = 659; - static final int RESET = 660; - static final int ROOTS = 661; - static final int ROWNUM = 662; - static final int SCRIPT = 663; - static final int SEPARATOR = 664; - static final int SHUTDOWN = 665; - static final int STOP = 666; - static final int SYNONYM = 667; - static final int SYNTAX = 668; - static final int TDC = 669; - static final int TEMP = 670; - static final int TEXT = 671; - static final int TOP = 672; - static final int TTI = 673; - static final int TYPES = 674; - static final int USE = 675; - static final int UNLOAD = 676; - static final int VARCHAR2 = 677; - static final int WRITE_DELAY = 678; + static final int ALIAS = 601; + static final int AGGREGATE = 602; + static final int AUTOCOMMIT = 603; + static final int AUTHENTICATION = 604; + static final int BACKUP = 605; + static final int BINARY_FLOAT = 606; + static final int BINARY_DOUBLE = 607; + static final int BIT = 608; + static final int BLOCKING = 609; + static final int BODY = 610; + static final int BYTE = 611; + static final int CACHE = 612; + static final int CACHED = 613; + static final int CASEWHEN = 614; + static final int CHECKPOINT = 615; + static final int CITEXT = 616; + static final int CLASS = 617; + static final int CLUSTERED = 618; + static final int COMMENT = 619; + static final int COMPACT = 620; + static final int COMPRESSED = 621; + static final int CONFLICT = 622; + static final int CONTROL = 623; + static final int CURRVAL = 624; + static final int DATABASE = 625; + static final int DEADLOCK = 626; + static final int DEFRAG = 627; + static final int DELAY = 628; + static final int DIGEST = 629; + static final int ENUM = 630; + static final int EVENT = 631; + static final int EXPLAIN = 632; + static final int EXPORT = 633; + static final int FEATURE = 634; + static final int FILE = 635; + public static final int FILES = 636; + static final int GC = 637; + static final int HEADER = 638; + static final int IDENTIFIER = 639; + static final int IGNORECASE = 640; + static final int IMMEDIATELY = 641; + static final int INTEGRITY = 642; + static final int INTERRUPT = 643; + static final int INDEX = 644; + static final int INDEXER = 645; + static final int INFINITY = 646; + static final int INITIAL = 647; + static final int LASTVAL = 648; + static final int LIMIT = 649; + static final int LITERAL = 650; + static final int LIVE = 651; + static final int LOAD = 652; + static final int LOCK = 653; + static final int LOCKS = 654; + static final int LONG = 655; + static final int LONGVAR = 656; + static final int MAXROWS = 657; + static final int MEDIAN = 658; + static final int MEMORY = 659; + static final int MILLIS = 660; + static final int MINUS_EXCEPT = 661; + static final int NAN = 662; + static final int NEXTVAL = 663; + static final int NOWAIT = 664; + static final int NVARCHAR2 = 665; + static final int NVL2 = 666; + static final int OFF = 667; + static final int PASSWORD = 668; + static final int PERFORM = 669; + static final int PLAN = 670; + static final int PREVVAL = 671; + static final int PROPERTY = 672; + static final int RAW = 673; + static final int READONLY = 674; + static final int REFERENTIAL = 675; + static final int REGULAR = 676; + static final int RENAME = 677; + static final int RESET = 678; + static final int ROOTS = 679; + static final int ROWNUM = 680; + static final int SCRIPT = 681; + static final int SEPARATOR = 682; + static final int SHUTDOWN = 683; + static final int STOP = 684; + static final int SYNONYM = 685; + static final int SYNTAX = 686; + static final int TDC = 687; + static final int TEMP = 688; + static final int TEXT = 689; + static final int TOP = 690; + static final int TTI = 691; + static final int TYPES = 692; + static final int USE = 693; + static final int UNLOAD = 694; + static final int VARCHAR2 = 695; + static final int WRITE_DELAY = 696; // static final int ACOS = 701; @@ -1846,25 +1887,27 @@ // static final int ASTERISK = 921; static final int CLOSEBRACKET = 922; - static final int COLON = 923; - static final int COMMA = 924; + public static final int COLON = 923; + public static final int COMMA = 924; static final int CONCAT_OP = 925; static final int DIVIDE_OP = 926; static final int DOUBLE_COLON_OP = 927; static final int DOUBLE_PERIOD_OP = 928; static final int GREATER_OP = 929; static final int GREATER_EQUALS = 930; - static final int LEFTBRACKET = 931; - static final int LESS_OP = 932; - static final int LESS_EQUALS = 933; - public static final int MINUS_OP = 934; - static final int NOT_EQUALS = 935; - static final int OPENBRACKET = 936; - static final int PLUS_OP = 937; - static final int QUESTION = 938; - static final int RIGHT_ARROW_OP = 939; - static final int RIGHTBRACKET = 940; - static final int SEMICOLON = 941; + public static final int LEFTBRACE = 931; + public static final int LEFTBRACKET = 932; + static final int LESS_OP = 933; + static final int LESS_EQUALS = 934; + public static final int MINUS_OP = 935; + static final int NOT_EQUALS = 936; + static final int OPENBRACKET = 937; + static final int PLUS_OP = 938; + static final int QUESTION = 939; + static final int RIGHT_ARROW_OP = 940; + public static final int RIGHTBRACE = 941; + public static final int RIGHTBRACKET = 942; + static final int SEMICOLON = 943; // public static final int SQL_BIGINT = 951; @@ -2288,6 +2331,7 @@ private static final IntValueHashMap commandSet = new IntValueHashMap(449); static { + commandSet.put(T_ABSENT, ABSENT); commandSet.put(T_ACTION, ACTION); commandSet.put(T_ADD, ADD); commandSet.put(T_ADMIN, ADMIN); @@ -2345,6 +2389,7 @@ commandSet.put(T_DIAGNOSTICS, DIAGNOSTICS); commandSet.put(T_DIGEST, DIGEST); commandSet.put(T_DOMAIN, DOMAIN); + commandSet.put(T_EMPTY, EMPTY); commandSet.put(T_ENUM, ENUM); commandSet.put(T_ERROR, ERROR); commandSet.put(T_EVENT, EVENT); @@ -2388,9 +2433,19 @@ commandSet.put(T_IS_READONLY_DATABASE_FILES, IS_READONLY_DATABASE_FILES); commandSet.put(T_IS_READONLY_SESSION, IS_READONLY_SESSION); + commandSet.put(T_JSON, JSON); + commandSet.put(T_JSON_ARRAY, JSON_ARRAY); + commandSet.put(T_JSON_ARRAYAGG, JSON_ARRAYAGG); + commandSet.put(T_JSON_EXISTS, JSON_EXISTS); + commandSet.put(T_JSON_OBJECT, JSON_OBJECT); + commandSet.put(T_JSON_OBJECTAGG, JSON_OBJECTAGG); + commandSet.put(T_JSON_QUERY, JSON_QUERY); + commandSet.put(T_JSON_TABLE, JSON_TABLE); + commandSet.put(T_JSON_VALUE, JSON_VALUE); commandSet.put(T_JAVA, JAVA); commandSet.put(T_K_FACTOR, K); commandSet.put(T_KEY, KEY); + commandSet.put(T_KEYS, KEYS); commandSet.put(T_LAST, LAST); commandSet.put(T_LASTVAL, LASTVAL); commandSet.put(T_LENGTH, LENGTH); @@ -2435,6 +2490,7 @@ commandSet.put(T_OBJECT, OBJECT); commandSet.put(T_OCTETS, OCTETS); commandSet.put(T_OFF, OFF); + commandSet.put(T_OMIT, OMIT); commandSet.put(T_OPTION, OPTION); commandSet.put(T_ORDINALITY, ORDINALITY); commandSet.put(T_OTHERS, OTHERS); @@ -2463,6 +2519,7 @@ commandSet.put(T_RESTART, RESTART); commandSet.put(T_RESTRICT, RESTRICT); commandSet.put(T_RESULT, RESULT); + commandSet.put(T_RETURNING, RETURNING); commandSet.put(T_ROLE, ROLE); commandSet.put(T_ROUTINE, ROUTINE); commandSet.put(T_ROW_COUNT, ROW_COUNT); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManager2PL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManager2PL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManager2PL.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManager2PL.java 2022-07-13 14:05:42.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,7 @@ * Manages rows involved in transactions * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 2.0.0 */ public class TransactionManager2PL extends TransactionManagerCommon @@ -53,12 +53,12 @@ txModel = LOCKS; } - public long getGlobalChangeTimestamp() { - return globalChangeTimestamp.get(); + public long getSystemChangeNumber() { + return systemChangeNumber.get(); } - public void setGlobalChangeTimestamp(long ts) { - globalChangeTimestamp.set(ts); + public void setSystemChangeNumber(long ts) { + systemChangeNumber.set(ts); } public boolean isMVRows() { @@ -87,7 +87,7 @@ public boolean prepareCommitActions(Session session) { - session.actionTimestamp = getNextGlobalChangeTimestamp(); + session.actionSCN = getNextSystemChangeNumber(); return true; } @@ -104,8 +104,8 @@ int limit = session.rowActionList.size(); // new actionTimestamp used for commitTimestamp - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.transactionEndTimestamp = session.actionTimestamp; + session.actionSCN = getNextSystemChangeNumber(); + session.transactionEndSCN = session.actionSCN; endTransaction(session); @@ -135,11 +135,11 @@ writeLock.lock(); try { - session.abortTransaction = false; - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.transactionEndTimestamp = session.actionTimestamp; + session.abortTransaction = false; + session.actionSCN = getNextSystemChangeNumber(); + session.transactionEndSCN = session.actionSCN; - rollbackPartial(session, 0, session.transactionTimestamp); + rollbackPartial(session, 0, session.transactionSCN); endTransaction(session); session.logSequences(); @@ -167,9 +167,7 @@ } public void rollbackAction(Session session) { - - rollbackPartial(session, session.actionIndex, - session.actionStartTimestamp); + rollbackPartial(session, session.actionIndex, session.actionStartSCN); endActionTPL(session); } @@ -317,8 +315,8 @@ public void beginActionResume(Session session) { if (session.isTransaction) { - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.actionStartTimestamp = session.actionTimestamp; + session.actionSCN = getNextSystemChangeNumber(); + session.actionStartSCN = session.actionSCN; } else { beginTransactionCommon(session); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManagerCommon.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManagerCommon.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManagerCommon.java 2021-07-09 16:52:10.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManagerCommon.java 2022-07-13 14:23:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ * Shared code for TransactionManager classes * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 2.0.0 */ class TransactionManagerCommon { @@ -68,10 +68,10 @@ // functional unit - sessions involved in live transactions /** live transactions keeping committed transactions from being merged */ - LongDeque liveTransactionTimestamps = new LongDeque(); + LongDeque liveTransactionSCNs = new LongDeque(); /** global timestamp for database */ - AtomicLong globalChangeTimestamp = new AtomicLong(1); + AtomicLong systemChangeNumber = new AtomicLong(1); // AtomicInteger transactionCount = new AtomicInteger(); @@ -85,7 +85,7 @@ // functional unit - cached table transactions - /** Map : rowID -> RowAction */ + /** Map : rowID maps to: RowAction */ public LongKeyHashMap rowActionMap; TransactionManagerCommon(Database database) { @@ -109,7 +109,7 @@ case TransactionManager.MVCC : case TransactionManager.MVLOCKS : - if (liveTransactionTimestamps.size() != 1) { + if (liveTransactionSCNs.size() != 1) { throw Error.error(ErrorCode.X_25001); } } @@ -120,8 +120,7 @@ TransactionManagerMVCC txMan = new TransactionManagerMVCC(database); - txMan.liveTransactionTimestamps.addLast( - session.transactionTimestamp); + txMan.liveTransactionSCNs.addLast(session.transactionSCN); txMan.catalogWriteSession = session; txMan.isLockedMode = true; @@ -141,8 +140,8 @@ case TransactionManager.MVLOCKS : { manager = new TransactionManagerMV2PL(database); - manager.liveTransactionTimestamps.addLast( - session.transactionTimestamp); + manager.liveTransactionSCNs.addLast( + session.transactionSCN); OrderedHashSet set = session.waitingSessions; @@ -172,7 +171,7 @@ "TransactionManagerCommon"); } - manager.globalChangeTimestamp.set(globalChangeTimestamp.get()); + manager.systemChangeNumber.set(systemChangeNumber.get()); manager.transactionCount = transactionCount; hasExpired = true; @@ -184,11 +183,11 @@ void beginTransactionCommon(Session session) { - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.actionStartTimestamp = session.actionTimestamp; - session.transactionTimestamp = session.actionTimestamp; - session.isPreTransaction = false; - session.isTransaction = true; + session.actionSCN = getNextSystemChangeNumber(); + session.actionStartSCN = session.actionSCN; + session.transactionSCN = session.actionSCN; + session.isPreTransaction = false; + session.isTransaction = true; transactionCount.incrementAndGet(); } @@ -196,7 +195,7 @@ void adjustLobUsage(Session session) { int limit = session.rowActionList.size(); - long lastActionTimestamp = session.actionTimestamp; + long lastActionTimestamp = session.actionSCN; for (int i = 0; i < limit; i++) { RowAction action = (RowAction) session.rowActionList.get(i); @@ -265,7 +264,7 @@ continue; } - int type = action.getCommitTypeOn(session.actionTimestamp); + int type = action.getCommitTypeOn(session.actionSCN); Row row = action.memoryRow; if (row == null) { @@ -326,8 +325,8 @@ /** * gets the next timestamp for an action */ - public long getNextGlobalChangeTimestamp() { - return globalChangeTimestamp.incrementAndGet(); + public long getNextSystemChangeNumber() { + return systemChangeNumber.incrementAndGet(); } boolean checkDeadlock(Session session, OrderedHashSet newWaits) { @@ -374,7 +373,7 @@ Session[] sessions = database.sessionManager.getAllSessions(); for (int i = 0; i < sessions.length; i++) { - long timestamp = sessions[i].transactionTimestamp; + long timestamp = sessions[i].transactionSCN; if (session != sessions[i] && sessions[i].isTransaction) { set.add(sessions[i]); @@ -388,7 +387,7 @@ Session[] sessions = database.sessionManager.getAllSessions(); for (int i = 0; i < sessions.length; i++) { - long timestamp = sessions[i].transactionTimestamp; + long timestamp = sessions[i].transactionSCN; if (session == sessions[i]) { continue; @@ -702,9 +701,12 @@ void setWaitingSessionTPL(Session session) { - int count = session.tempSet.size(); + int count = session.tempSet.size(); + int latchCount = session.latch.getCount(); - assert session.latch.getCount() <= count + 1; + if (latchCount > count + 1) { + System.out.println("latch count " + latchCount); + } for (int i = 0; i < count; i++) { Session current = (Session) session.tempSet.get(i); @@ -836,11 +838,11 @@ long getFirstLiveTransactionTimestamp() { - if (liveTransactionTimestamps.isEmpty()) { + if (liveTransactionSCNs.isEmpty()) { return Long.MAX_VALUE; } - return liveTransactionTimestamps.get(0); + return liveTransactionSCNs.get(0); } /** @@ -880,8 +882,8 @@ (RowAction) sessions[i].rowActionList.get( tIndex[i]); - if (current.actionTimestamp < minChangeNo) { - minChangeNo = current.actionTimestamp; + if (current.actionSCN < minChangeNo) { + minChangeNo = current.actionSCN; sessionIndex = i; } @@ -901,11 +903,11 @@ (RowAction) currentList.get(tIndex[sessionIndex]); // if the next change no is in this session, continue adding - if (current.actionTimestamp == minChangeNo + 1) { + if (current.actionSCN == minChangeNo + 1) { minChangeNo++; } - if (current.actionTimestamp == minChangeNo) { + if (current.actionSCN == minChangeNo) { rowActions[rowActionCount++] = current; tIndex[sessionIndex]++; @@ -979,9 +981,8 @@ break; case TransactionManager.resetSessionStatement : - if (statementTimestamp - != targetSession.statementStartTimestamp) { + != targetSession.statementStartSCN) { break; } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManager.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManager.java 2022-07-13 15:38:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ * Manages rows involved in transactions * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 2.0.0 */ public interface TransactionManager { @@ -60,11 +60,11 @@ int resetSessionStatement = 5; int resetSessionClose = 6; - long getGlobalChangeTimestamp(); + long getSystemChangeNumber(); - long getNextGlobalChangeTimestamp(); + long getNextSystemChangeNumber(); - void setGlobalChangeTimestamp(long ts); + void setSystemChangeNumber(long ts); RowAction addDeleteAction(Session session, Table table, PersistentStore store, Row row, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManagerMV2PL.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManagerMV2PL.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManagerMV2PL.java 2021-01-24 21:01:28.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManagerMV2PL.java 2022-07-13 14:23:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,15 +41,15 @@ * Manages rows involved in transactions * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 2.0.0 */ public class TransactionManagerMV2PL extends TransactionManagerCommon implements TransactionManager { // functional unit - merged committed transactions - HsqlDeque committedTransactions = new HsqlDeque(); - LongDeque committedTransactionTimestamps = new LongDeque(); + HsqlDeque committedTransactions = new HsqlDeque(); + LongDeque committedTransactionSCNs = new LongDeque(); public TransactionManagerMV2PL(Database db) { @@ -59,12 +59,12 @@ txModel = MVLOCKS; } - public long getGlobalChangeTimestamp() { - return globalChangeTimestamp.get(); + public long getSystemChangeNumber() { + return systemChangeNumber.get(); } - public void setGlobalChangeTimestamp(long ts) { - globalChangeTimestamp.set(ts); + public void setSystemChangeNumber(long ts) { + systemChangeNumber.set(ts); } public boolean isMVRows() { @@ -98,7 +98,7 @@ try { int limit = session.rowActionList.size(); - session.actionTimestamp = getNextGlobalChangeTimestamp(); + session.actionSCN = getNextSystemChangeNumber(); for (int i = 0; i < limit; i++) { RowAction action = (RowAction) session.rowActionList.get(i); @@ -124,8 +124,8 @@ int limit = session.rowActionList.size(); // new actionTimestamp used for commitTimestamp - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.transactionEndTimestamp = session.actionTimestamp; + session.actionSCN = getNextSystemChangeNumber(); + session.transactionEndSCN = session.actionSCN; endTransaction(session); @@ -143,8 +143,7 @@ if (newLimit > limit) { Object[] list = session.rowActionList.getArray(); - mergeTransaction(list, limit, newLimit, - session.actionTimestamp); + mergeTransaction(list, limit, newLimit, session.actionSCN); finaliseRows(session, list, limit, newLimit); session.rowActionList.setSize(limit); } @@ -152,10 +151,10 @@ // session.actionTimestamp is the committed tx timestamp if (session == lobSession || getFirstLiveTransactionTimestamp() - > session.actionTimestamp) { + > session.actionSCN) { Object[] list = session.rowActionList.getArray(); - mergeTransaction(list, 0, limit, session.actionTimestamp); + mergeTransaction(list, 0, limit, session.actionSCN); finaliseRows(session, list, 0, limit); } else { Object[] list = session.rowActionList.toArray(); @@ -179,11 +178,11 @@ writeLock.lock(); try { - session.abortTransaction = false; - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.transactionEndTimestamp = session.actionTimestamp; + session.abortTransaction = false; + session.actionSCN = getNextSystemChangeNumber(); + session.transactionEndSCN = session.actionSCN; - rollbackPartial(session, 0, session.transactionTimestamp); + rollbackPartial(session, 0, session.transactionSCN); endTransaction(session); session.logSequences(); @@ -211,9 +210,7 @@ } public void rollbackAction(Session session) { - - rollbackPartial(session, session.actionIndex, - session.actionStartTimestamp); + rollbackPartial(session, session.actionIndex, session.actionStartSCN); endActionTPL(session); } @@ -341,13 +338,13 @@ */ void addToCommittedQueue(Session session, Object[] list) { - synchronized (committedTransactionTimestamps) { + synchronized (committedTransactionSCNs) { // add the txList according to commit timestamp committedTransactions.addLast(list); // get session commit timestamp - committedTransactionTimestamps.addLast(session.actionTimestamp); + committedTransactionSCNs.addLast(session.actionSCN); /* debug 190 if (committedTransactions.size() > 64) { System.out.println("******* excessive transaction queue"); @@ -367,15 +364,15 @@ long commitTimestamp = 0; Object[] actions = null; - synchronized (committedTransactionTimestamps) { - if (committedTransactionTimestamps.isEmpty()) { + synchronized (committedTransactionSCNs) { + if (committedTransactionSCNs.isEmpty()) { break; } - commitTimestamp = committedTransactionTimestamps.getFirst(); + commitTimestamp = committedTransactionSCNs.getFirst(); if (commitTimestamp < timestamp) { - committedTransactionTimestamps.removeFirst(); + committedTransactionSCNs.removeFirst(); actions = (Object[]) committedTransactions.removeFirst(); } else { @@ -395,8 +392,7 @@ try { if (!session.isTransaction) { beginTransactionCommon(session); - liveTransactionTimestamps.addLast( - session.transactionTimestamp); + liveTransactionSCNs.addLast(session.transactionSCN); } } finally { writeLock.unlock(); @@ -454,12 +450,11 @@ try { if (session.isTransaction) { - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.actionStartTimestamp = session.actionTimestamp; + session.actionSCN = getNextSystemChangeNumber(); + session.actionStartSCN = session.actionSCN; } else { beginTransactionCommon(session); - liveTransactionTimestamps.addLast( - session.transactionTimestamp); + liveTransactionSCNs.addLast(session.transactionSCN); } } finally { writeLock.unlock(); @@ -479,12 +474,12 @@ */ private void endTransaction(Session session) { - long timestamp = session.transactionTimestamp; - int index = liveTransactionTimestamps.indexOf(timestamp); + long timestamp = session.transactionSCN; + int index = liveTransactionSCNs.indexOf(timestamp); if (index >= 0) { transactionCount.decrementAndGet(); - liveTransactionTimestamps.remove(index); + liveTransactionSCNs.remove(index); mergeExpiredTransactions(session); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManagerMVCC.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManagerMVCC.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TransactionManagerMVCC.java 2021-01-24 21:01:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TransactionManagerMVCC.java 2022-07-13 14:23:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,15 +41,15 @@ * Manages rows involved in transactions * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 2.0.0 */ public class TransactionManagerMVCC extends TransactionManagerCommon implements TransactionManager { // functional unit - merged committed transactions - HsqlDeque committedTransactions = new HsqlDeque(); - LongDeque committedTransactionTimestamps = new LongDeque(); + HsqlDeque committedTransactions = new HsqlDeque(); + LongDeque committedTransactionSCNs = new LongDeque(); // locks boolean isLockedMode; @@ -73,12 +73,12 @@ txModel = MVCC; } - public long getGlobalChangeTimestamp() { - return globalChangeTimestamp.get(); + public long getSystemChangeNumber() { + return systemChangeNumber.get(); } - public void setGlobalChangeTimestamp(long ts) { - globalChangeTimestamp.set(ts); + public void setSystemChangeNumber(long ts) { + systemChangeNumber.set(ts); } public boolean isMVRows() { @@ -126,7 +126,7 @@ } } - session.actionTimestamp = getNextGlobalChangeTimestamp(); + session.actionSCN = getNextSystemChangeNumber(); for (int i = 0; i < limit; i++) { RowAction action = (RowAction) session.rowActionList.get(i); @@ -170,8 +170,8 @@ } // new actionTimestamp used for commitTimestamp - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.transactionEndTimestamp = session.actionTimestamp; + session.actionSCN = getNextSystemChangeNumber(); + session.transactionEndSCN = session.actionSCN; endTransaction(session); @@ -196,8 +196,7 @@ if (newLimit > limit) { Object[] list = session.rowActionList.getArray(); - mergeTransaction(list, limit, newLimit, - session.actionTimestamp); + mergeTransaction(list, limit, newLimit, session.actionSCN); finaliseRows(session, list, limit, newLimit); session.rowActionList.setSize(limit); } @@ -205,10 +204,10 @@ // session.actionTimestamp is the committed tx timestamp if (session == lobSession || getFirstLiveTransactionTimestamp() - > session.actionTimestamp) { + > session.actionSCN) { Object[] list = session.rowActionList.getArray(); - mergeTransaction(list, 0, limit, session.actionTimestamp); + mergeTransaction(list, 0, limit, session.actionSCN); finaliseRows(session, list, 0, limit); } else { if (session.rowActionList.size() > 0) { @@ -237,11 +236,11 @@ writeLock.lock(); try { - session.abortTransaction = false; - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.transactionEndTimestamp = session.actionTimestamp; + session.abortTransaction = false; + session.actionSCN = getNextSystemChangeNumber(); + session.transactionEndSCN = session.actionSCN; - rollbackPartial(session, 0, session.transactionTimestamp); + rollbackPartial(session, 0, session.transactionSCN); endTransaction(session); session.logSequences(); endTransactionTPL(session); @@ -270,8 +269,7 @@ } public void rollbackAction(Session session) { - rollbackPartial(session, session.actionIndex, - session.actionStartTimestamp); + rollbackPartial(session, session.actionIndex, session.actionStartSCN); } /** @@ -467,7 +465,7 @@ session.actionSet.clear(); - if (otherAction.commitTimestamp != 0) { + if (otherAction.commitSCN != 0) { redoWait = false; } @@ -585,13 +583,13 @@ */ void addToCommittedQueue(Session session, Object[] list) { - synchronized (committedTransactionTimestamps) { + synchronized (committedTransactionSCNs) { // add the txList according to commit timestamp committedTransactions.addLast(list); // get session commit timestamp - committedTransactionTimestamps.addLast(session.actionTimestamp); + committedTransactionSCNs.addLast(session.actionSCN); /* debug 190 if (committedTransactions.size() > 64) { System.out.println("******* excessive transaction queue"); @@ -611,15 +609,15 @@ long commitTimestamp; Object[] actions; - synchronized (committedTransactionTimestamps) { - if (committedTransactionTimestamps.isEmpty()) { + synchronized (committedTransactionSCNs) { + if (committedTransactionSCNs.isEmpty()) { break; } - commitTimestamp = committedTransactionTimestamps.getFirst(); + commitTimestamp = committedTransactionSCNs.getFirst(); if (commitTimestamp < timestamp) { - committedTransactionTimestamps.removeFirst(); + committedTransactionSCNs.removeFirst(); actions = (Object[]) committedTransactions.removeFirst(); } else { @@ -639,8 +637,7 @@ try { if (!session.isTransaction) { beginTransactionCommon(session); - liveTransactionTimestamps.addLast( - session.transactionTimestamp); + liveTransactionSCNs.addLast(session.transactionSCN); } } finally { writeLock.unlock(); @@ -700,12 +697,11 @@ try { if (session.isTransaction) { - session.actionTimestamp = getNextGlobalChangeTimestamp(); - session.actionStartTimestamp = session.actionTimestamp; + session.actionSCN = getNextSystemChangeNumber(); + session.actionStartSCN = session.actionSCN; } else { beginTransactionCommon(session); - liveTransactionTimestamps.addLast( - session.transactionTimestamp); + liveTransactionSCNs.addLast(session.transactionSCN); } } finally { writeLock.unlock(); @@ -720,12 +716,12 @@ */ void endTransaction(Session session) { - long timestamp = session.transactionTimestamp; - int index = liveTransactionTimestamps.indexOf(timestamp); + long timestamp = session.transactionSCN; + int index = liveTransactionSCNs.indexOf(timestamp); if (index >= 0) { transactionCount.decrementAndGet(); - liveTransactionTimestamps.remove(index); + liveTransactionSCNs.remove(index); mergeExpiredTransactions(session); } } @@ -782,7 +778,7 @@ catalogWriteSession = nextSession; } - unlockTxTs = session.actionTimestamp; + unlockTxTs = session.actionSCN; unlockSessionId = session.getId(); } @@ -798,7 +794,7 @@ if (catalogWriteSession == null) { catalogWriteSession = session; isLockedMode = true; - lockTxTs = session.actionTimestamp; + lockTxTs = session.actionSCN; lockSessionId = session.getId(); getTransactionAndPreSessions(session); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/TypeInvariants.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/TypeInvariants.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/TypeInvariants.java 2020-06-24 09:02:18.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/TypeInvariants.java 2022-04-10 09:21:18.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * Information Schema types. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.0 + * @version 2.7.0 * @since 1.9.0 */ public class TypeInvariants { @@ -90,7 +90,7 @@ name = HsqlNameManager.newInfoSchemaObjectName("TIME_STAMP", false, SchemaObject.DOMAIN); TIME_STAMP = new DateTimeType(Types.SQL_TIMESTAMP, - Types.SQL_TIMESTAMP, 6); + Types.SQL_TIMESTAMP_WITH_TIME_ZONE, 6); TIME_STAMP.userTypeModifier = new UserTypeModifier(name, SchemaObject.DOMAIN, TIME_STAMP); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ArrayType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ArrayType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ArrayType.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ArrayType.java 2022-03-04 19:10:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,12 +48,12 @@ * Class for ARRAY type objects.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 2.0.0 */ public class ArrayType extends Type { - public static final int defaultArrayCardinality = 1024*1024; + public static final int defaultArrayCardinality = 1024 * 1024; public static final int defaultLargeArrayCardinality = Integer.MAX_VALUE; final Type dataType; final int maxCardinality; @@ -330,6 +330,54 @@ return sb.toString(); } + public void convertToJSON(Object a, StringBuilder sb) { + + Object[] arra = (Object[]) a; + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('['); + + for (int i = 0; i < arra.length; i++) { + if (i > 0) { + sb.append(','); + } + + dataType.convertToJSON(arra[i], sb); + } + + sb.append(']'); + } + + public void convertToJSONsimple(Object a, StringBuilder sb) { + + Object[] arra = (Object[]) a; + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('['); + + for (int i = 0; i < arra.length; i++) { + if (i > 0) { + sb.append(','); + } + + Object value = dataType.convertToString(arra[i]); + + sb.append(value); + } + + sb.append(']'); + } + public boolean canConvertFrom(Type otherType) { if (otherType == null) { @@ -348,15 +396,15 @@ public int canMoveFrom(Type otherType) { if (!otherType.isArrayType()) { - return -1; + return Type.ReType.change; } if (maxCardinality >= ((ArrayType) otherType).maxCardinality) { return dataType.canMoveFrom(otherType); - } else if (dataType.canMoveFrom(otherType) == 0) { - return 1; + } else if (dataType.canMoveFrom(otherType) == ReType.keep) { + return Type.ReType.check; } else { - return -1; + return Type.ReType.change; } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BinaryType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BinaryType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BinaryType.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BinaryType.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,17 +46,16 @@ * SQL:2008 Standard specifies silent truncation of zero bytes at the end of the * binary strings used for assignment and concatenation.

                    * - * * A binary string of type BINARY VARYING and BLOB when assigned to a column + * A binary string of type BINARY VARYING and BLOB when assigned to a column * of similar type but shorter maximum length.

                    * - * * The Second operand of a concatenation when the length of the result exceeds + * The Second operand of a concatenation when the length of the result exceeds * the maximum implementation-dependent length of BINARY VARYING and BLOB * binary strings.

                    * * The behaviour is similar to trimming of space characters from strings of * CHARACTER VARYING and CLOB types.

                    * - *

                    * In most real-world use-cases, all the bytes of variable-length binary values * stored in a database are significant and should not be discarded.

                    * @@ -72,11 +71,11 @@ * * As an extension to the Standard, HSQLDB supports cast from CHARACTER types * to BINARY. The length of the string must be even and all character - * must be hexadecimal characters.

                    + * must be hexadecimal characters. * * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public class BinaryType extends Type { @@ -339,15 +338,14 @@ return 1; } } - } else { for (int i = data1.length; i < data2.length; i++) { if (data2[i] != 0) { return -1; } } - } + return 0; } @@ -453,13 +451,20 @@ b = new BinaryData(bytes, false); } - if (b.length(session) > precision - && b.nonZeroLength(session) > precision) { - if (!cast) { - throw Error.error(ErrorCode.X_22001); + if (b.length(session) > precision) { + if (!cast && session instanceof Session) { + if (!((Session) session).database.sqlTruncateTrailing) { + throw Error.error(ErrorCode.X_22001); + } } - session.addWarning(Error.error(ErrorCode.W_01004)); + if (b.nonZeroLength(session) > precision) { + if (!cast) { + throw Error.error(ErrorCode.X_22001); + } + + session.addWarning(Error.error(ErrorCode.W_01004)); + } } switch (typeCode) { @@ -529,6 +534,19 @@ ((BinaryData) a).getBytes()); } + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('"'); + sb.append(convertToString(a)); + sb.append('"'); + } + public boolean canConvertFrom(Type otherType) { return otherType.typeCode == Types.SQL_ALL_TYPES @@ -539,46 +557,46 @@ public int canMoveFrom(Type otherType) { if (otherType.isBitType() || otherType.isCharacterType()) { - return -1; + return ReType.change; } switch (typeCode) { case Types.SQL_VARBINARY : { if (otherType.typeCode == typeCode) { - return precision >= otherType.precision ? 0 - : 1; + return precision >= otherType.precision ? ReType.keep + : ReType.check; } if (otherType.typeCode == Types.SQL_BINARY) { - return precision >= otherType.precision ? 0 - : -1; + return precision >= otherType.precision ? ReType.keep + : ReType.change; } if (otherType.typeCode == Types.SQL_GUID) { - return precision >= otherType.precision ? 0 - : -1; + return precision >= otherType.precision ? ReType.keep + : ReType.change; } break; } case Types.SQL_BINARY : { if (otherType.typeCode == typeCode) { - return precision == otherType.precision ? 0 - : -1; + return precision == otherType.precision ? ReType.keep + : ReType.change; } if (otherType.typeCode == Types.SQL_GUID) { - return precision == otherType.precision ? 0 - : -1; + return precision == otherType.precision ? ReType.keep + : ReType.change; } break; } case Types.SQL_BLOB : { if (otherType.typeCode == typeCode) { - return precision >= otherType.precision ? 0 - : -1; + return precision >= otherType.precision ? ReType.keep + : ReType.change; } break; @@ -586,7 +604,7 @@ default : } - return -1; + return ReType.change; } public long position(SessionInterface session, BlobData data, @@ -608,41 +626,28 @@ public BlobData substring(SessionInterface session, BlobData data, long offset, long length, boolean hasLength) { - long end; - long dataLength = data.length(session); - - if (hasLength) { - end = offset + length; - } else { - end = dataLength > offset ? dataLength - : offset; - } - - if (offset > end) { + if (length < 0) { throw Error.error(ErrorCode.X_22011); } - if (end < 0) { - - // return zero length data - offset = 0; - end = 0; - } - - if (offset < 0) { - offset = 0; - } + long dataLength = data.length(session); + LongPair segment = CharacterType.substringParams(dataLength, offset, + length, hasLength); - if (end > dataLength) { - end = dataLength; - } + offset = segment.a; + length = segment.b; - length = end - offset; + if (data instanceof BinaryData) { + byte[] bytes = data.getBytes(session, offset, (int) length); - // change method signature to take long - byte[] bytes = data.getBytes(session, offset, (int) length); + return new BinaryData(bytes, false); + } else if (data instanceof BlobData) { + BlobData blob = ((BlobData) data).getBlob(session, offset, length); - return new BinaryData(bytes, false); + return blob; + } else { + throw Error.runtimeError(ErrorCode.U_S0500, "CharacterType"); + } } int getRightTrimSize(BlobData data) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BinaryUUIDType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BinaryUUIDType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BinaryUUIDType.java 2020-07-10 09:42:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BinaryUUIDType.java 2022-03-26 22:12:46.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,7 +52,7 @@ * Cast to CHARACTER types converts to a hexadecimal UUID string. * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 2.3.4 */ public class BinaryUUIDType extends BinaryType { @@ -346,22 +346,22 @@ public int canMoveFrom(Type otherType) { if (otherType == this) { - return 0; + return ReType.keep; } switch (otherType.typeCode) { case Types.SQL_GUID : - return 0; + return ReType.keep; case Types.SQL_VARBINARY : case Types.SQL_BINARY : case Types.SQL_CHAR : case Types.SQL_VARCHAR : - return -1; + return ReType.change; default : - return -1; + return ReType.change; } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BitType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BitType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BitType.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BitType.java 2022-03-04 20:50:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ * string

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public final class BitType extends BinaryType { @@ -429,6 +429,20 @@ (int) ((BinaryData) a).bitLength(null)); } + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('"'); + sb.append(convertToString(a)); + sb.append('"'); + } + + public boolean canConvertFrom(Type otherType) { return otherType.typeCode == Types.SQL_ALL_TYPES @@ -444,19 +458,19 @@ case Types.SQL_BIT : { if (otherType.typeCode == typeCode) { - return precision == otherType.precision ? 0 - : -1; + return precision == otherType.precision ? ReType.keep + : ReType.change; } - return -1; + return ReType.change; } case Types.SQL_BIT_VARYING : { return otherType.isBitType() - && precision >= otherType.precision ? 0 - : -1; + && precision >= otherType.precision ? ReType.keep + : ReType.change; } default : - return -1; + return ReType.change; } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BlobDataID.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BlobDataID.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BlobDataID.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BlobDataID.java 2022-02-21 14:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -155,7 +155,6 @@ Result resultIn = session.execute(resultOut); if (resultIn.isError()) { - throw resultIn.getException(); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BlobData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BlobData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BlobData.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BlobData.java 2022-02-21 14:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,7 +68,8 @@ void setBytes(SessionInterface session, long pos, byte[] bytes); - void setBytes(SessionInterface session, long pos, BlobData b, long offset, long length); + void setBytes(SessionInterface session, long pos, BlobData b, long offset, + long length); void setBinaryStream(SessionInterface session, long pos, InputStream in); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BooleanType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BooleanType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/BooleanType.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/BooleanType.java 2022-03-04 20:50:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * Type implementation for BOOLEAN.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public final class BooleanType extends Type { @@ -282,6 +282,20 @@ : Tokens.T_FALSE; } + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + String val = ((Boolean) a).toString(); + + sb.append(val); + } + + public boolean canConvertFrom(Type otherType) { return otherType.typeCode == Types.SQL_ALL_TYPES @@ -291,8 +305,8 @@ } public int canMoveFrom(Type otherType) { - return otherType.isBooleanType() ? 0 - : -1; + return otherType.isBooleanType() ? ReType.keep + : ReType.change; } public static BooleanType getBooleanType() { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/CharacterType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/CharacterType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/CharacterType.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/CharacterType.java 2022-03-04 20:50:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ * Type subclass for CHARACTER, VARCHAR, etc.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.0 + * @version 2.7.0 * @since 1.9.0 */ public class CharacterType extends Type { @@ -281,7 +281,6 @@ case Types.OTHER : throw Error.error(ErrorCode.X_42562); default : - /* * @todo - this seems to be allowed in SQL-92 (is in NIST) * but is disallowed in SQL:2003 @@ -417,14 +416,18 @@ switch (typeCode) { - case Types.SQL_CHAR : { + case Types.SQL_CHAR : + case Types.SQL_VARCHAR : { int slen = ((String) a).length(); - if (slen == precision) { - return a; - } - if (slen > precision) { + if (session instanceof Session) { + if (!((Session) session).database + .sqlTruncateTrailing) { + throw Error.error(ErrorCode.X_22001); + } + } + if (getRightTrimSize((String) a, ' ') <= precision) { return ((String) a).substring(0, (int) precision); } else { @@ -432,6 +435,14 @@ } } + if (typeCode == Types.SQL_VARCHAR) { + return a; + } + + if (slen == precision) { + return a; + } + char[] b = new char[(int) precision]; ((String) a).getChars(0, slen, b, 0); @@ -442,19 +453,6 @@ return new String(b); } - case Types.SQL_VARCHAR : { - int slen = ((String) a).length(); - - if (slen > precision) { - if (getRightTrimSize((String) a, ' ') <= precision) { - return ((String) a).substring(0, (int) precision); - } else { - throw Error.error(ErrorCode.X_22001); - } - } - - return a; - } case Types.SQL_CLOB : { ClobData clob = (ClobData) a; @@ -652,7 +650,7 @@ } else if (a instanceof java.util.UUID) { s = a.toString(); } else { - s = convertJavaTimeObject(session, a); + s = convertJavaDateTimeObject(a); if (s == null) { throw Error.error(ErrorCode.X_42561); @@ -663,7 +661,7 @@ } //#ifdef JAVA8 - String convertJavaTimeObject(SessionInterface session, Object a) { + String convertJavaDateTimeObject(Object a) { switch(a.getClass().getName()){ case "java.time.LocalDate": @@ -680,7 +678,7 @@ //#else /* - String convertJavaTimeObject(SessionInterface session, Object a) { + String convertJavaDateTimeObject(Object a) { return null; } */ @@ -734,6 +732,17 @@ return StringConverter.toQuotedString(s, '\'', true); } + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + StringConverter.toJSONString((String) a, sb); + } + public boolean canConvertFrom(Type otherType) { return !otherType.isObjectType(); } @@ -748,32 +757,32 @@ case Types.SQL_VARCHAR : { if (otherType.typeCode == typeCode) { - return precision >= otherType.precision ? 0 - : 1; + return precision >= otherType.precision ? ReType.keep + : ReType.check; } if (otherType.typeCode == Types.SQL_CHAR) { - return precision >= otherType.precision ? 0 - : -1; + return precision >= otherType.precision ? ReType.keep + : ReType.change; } return -1; } case Types.SQL_CLOB : { if (otherType.typeCode == Types.SQL_CLOB) { - return precision >= otherType.precision ? 0 - : 1; + return precision >= otherType.precision ? ReType.keep + : ReType.check; } return -1; } case Types.SQL_CHAR : { return otherType.typeCode == Types.SQL_CHAR - && precision == otherType.precision ? 0 - : -1; + && precision == otherType.precision ? ReType.keep + : ReType.change; } default : - return -1; + return ReType.change; } } @@ -838,66 +847,60 @@ } } - public Object substring(SessionInterface session, Object data, - long offset, long length, boolean hasLength, - boolean trailing) { + /** + * length must not be negative + */ + public static LongPair substringParams(long dataLength, long start, + long length, boolean hasLength) { long end; - long dataLength = typeCode == Types.SQL_CLOB - ? ((ClobData) data).length(session) - : ((String) data).length(); - if (trailing) { - end = dataLength; - - if (length > dataLength) { - offset = 0; - } else { - offset = dataLength - length; - } - } else if (hasLength) { - end = offset + length; + if (hasLength) { + end = start + length; } else { - end = dataLength > offset ? dataLength - : offset; + end = Math.max(dataLength, start); } - if (end < offset) { - throw Error.error(ErrorCode.X_22011); + // trim + if (start >= dataLength || end < 0) { + start = 0; + length = 0; + } else { + start = Math.max(start, 0); + end = Math.min(end, dataLength); + length = end - start; } - if (end < 0) { + return new LongPair(start, length); + } - // return zero length data - offset = 0; - end = 0; - } + public Object substring(SessionInterface session, Object data, + long offset, long length, boolean hasLength, + boolean trailing) { - if (offset < 0) { - offset = 0; + if (length < 0) { + throw Error.error(ErrorCode.X_22011); } - if (end > dataLength) { - end = dataLength; + long dataLength = typeCode == Types.SQL_CLOB + ? ((ClobData) data).length(session) + : ((String) data).length(); + + if (trailing) { + offset = dataLength - offset; } - length = end - offset; + LongPair segment = substringParams(dataLength, offset, length, + hasLength); + + offset = segment.a; + length = segment.b; if (data instanceof String) { return ((String) data).substring((int) offset, (int) (offset + length)); } else if (data instanceof ClobData) { - ClobData clob = session.createClob(length); - - if (length > Integer.MAX_VALUE) { - throw Error.error(ErrorCode.X_22001); - } - - /* @todo - change to support long strings */ - String result = ((ClobData) data).getSubString(session, offset, - (int) length); - - clob.setString(session, 0, result); + ClobData clob = ((ClobData) data).getClob(session, offset, length); return clob; } else { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ClobDataID.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ClobDataID.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ClobDataID.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ClobDataID.java 2022-02-21 14:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -101,7 +101,6 @@ length = (int) (clobLength - pos); } - char[] chars = getChars(session, pos, length); return new String(chars); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ClobData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ClobData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ClobData.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ClobData.java 2022-02-21 14:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,14 +62,13 @@ void setString(SessionInterface session, long pos, String str); - void setClob(SessionInterface session, long pos, ClobData clob, long offset, - long len); + void setClob(SessionInterface session, long pos, ClobData clob, + long offset, long len); - void setChars(SessionInterface session, long pos, char[] chars, int offset, - int len); + void setChars(SessionInterface session, long pos, char[] chars, + int offset, int len); - void setCharacterStream(SessionInterface session, long pos, - Reader in); + void setCharacterStream(SessionInterface session, long pos, Reader in); long position(SessionInterface session, String searchstr, long start); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ClobType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ClobType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/ClobType.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/ClobType.java 2022-02-21 14:41:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -144,8 +144,8 @@ if (b instanceof String) { long lobId = ((ClobData) a).getId(); - return session.database.lobManager.compare(collation, - lobId, (String) b); + return session.database.lobManager.compare(collation, lobId, + (String) b); } return session.database.lobManager.compare(collation, (ClobData) a, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/Collation.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/Collation.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/Collation.java 2020-03-25 23:13:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/Collation.java 2022-03-26 22:13:46.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,12 +54,12 @@ * * @author Frand Schoenheit (frank.schoenheit@sun dot com) * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.8.0 */ public class Collation implements SchemaObject { - static String defaultCollationName = "SQL_TEXT"; + public static String defaultCollationName = "SQL_TEXT"; static String defaultIgnoreCaseCollationName = "SQL_TEXT_UCC"; public static final HashMap nameToJavaName = new HashMap(101); public static final HashMap dbNameToJavaName = new HashMap(101); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/DateTimeType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/DateTimeType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/DateTimeType.java 2021-05-30 14:45:50.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/DateTimeType.java 2022-06-29 17:43:38.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,11 +42,13 @@ import java.time.OffsetDateTime; import java.time.OffsetTime; import java.time.ZoneOffset; +import java.time.ZonedDateTime; import java.time.temporal.ChronoField; //#endif JAVA8 import java.util.Calendar; import java.util.Date; +import java.util.TimeZone; import org.hsqldb.HsqlDateTime; import org.hsqldb.HsqlException; @@ -56,19 +58,18 @@ import org.hsqldb.Tokens; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; +import org.hsqldb.lib.HashSet; import org.hsqldb.lib.StringConverter; /** * Type subclass for DATE, TIME and TIMESTAMP.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public final class DateTimeType extends DTIType { - public final boolean withTimeZone; - private String nameString; public static final long epochSeconds = HsqlDateTime.getDateSeconds("1-01-01"); public static final TimestampData epochTimestamp = @@ -78,6 +79,13 @@ public static final TimestampData epochLimitTimestamp = new TimestampData(epochLimitSeconds); + // this is used for the lifetime of the JVM - it should not be altered + public final static TimeZone systemTimeZone = TimeZone.getDefault(); + public final static HashSet zoneIDs = + new HashSet(TimeZone.getAvailableIDs()); + public final boolean withTimeZone; + private final String nameString; + public DateTimeType(int typeGroup, int type, int scale) { super(typeGroup, type, 0, scale); @@ -511,12 +519,10 @@ case Types.SQL_TIME : case Types.SQL_TIME_WITH_TIME_ZONE : { - diff = ((TimeData) a).getSeconds() - - ((TimeData) b).getSeconds(); + diff = ((TimeData) a).seconds - ((TimeData) b).seconds; if (diff == 0) { - diff = ((TimeData) a).getNanos() - - ((TimeData) b).getNanos(); + diff = ((TimeData) a).nanos - ((TimeData) b).nanos; } return diff == 0 ? 0 @@ -526,12 +532,12 @@ case Types.SQL_DATE : case Types.SQL_TIMESTAMP : case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { - diff = ((TimestampData) a).getSeconds() - - ((TimestampData) b).getSeconds(); + diff = ((TimestampData) a).seconds + - ((TimestampData) b).seconds; if (diff == 0) { - diff = ((TimestampData) a).getNanos() - - ((TimestampData) b).getNanos(); + diff = ((TimestampData) a).nanos + - ((TimestampData) b).nanos; } return diff == 0 ? 0 @@ -557,22 +563,22 @@ case Types.SQL_TIME_WITH_TIME_ZONE : case Types.SQL_TIME : { TimeData ti = (TimeData) a; - int nanos = ti.getNanos(); + int nanos = ti.nanos; int newNanos = scaleNanos(nanos); if (newNanos == nanos) { return ti; } - return new TimeData(ti.getSeconds(), newNanos, ti.getZone()); + return new TimeData(ti.seconds, newNanos, ti.zone); } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : case Types.SQL_TIMESTAMP : { TimestampData ts = (TimestampData) a; - int nanos = ts.getNanos(); + int nanos = ts.nanos; int newNanos = scaleNanos(nanos); - if (ts.getSeconds() > epochLimitSeconds) { + if (ts.seconds > epochLimitSeconds) { throw Error.error(ErrorCode.X_22008); } @@ -580,8 +586,7 @@ return ts; } - return new TimestampData(ts.getSeconds(), newNanos, - ts.getZone()); + return new TimestampData(ts.seconds, newNanos, ts.zone); } default : throw Error.runtimeError(ErrorCode.U_S0500, "DateTimeType"); @@ -649,19 +654,19 @@ return a; case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { - long seconds = ((TimestampData) a).getSeconds() - + ((TimestampData) a).getZone(); - long millis = HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), seconds * 1000); + long seconds = ((TimestampData) a).seconds + + ((TimestampData) a).zone; + + seconds = toDateSeconds(seconds); - return new TimestampData(millis / 1000); + return new TimestampData(seconds); } case Types.SQL_TIMESTAMP : { - long l = HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), - ((TimestampData) a).getSeconds() * 1000); + long seconds = ((TimestampData) a).seconds; - return new TimestampData(l / 1000); + seconds = DateTimeType.toDateSeconds(seconds); + + return new TimestampData(seconds); } default : throw Error.error(ErrorCode.X_42561); @@ -673,36 +678,26 @@ return convertToTypeLimits(session, a); case Types.SQL_TIME : { - TimeData ti = (TimeData) a; + TimeData ti = (TimeData) a; + int zoneSeconds = session.getZoneSeconds(); - return new TimeData( - ti.getSeconds() - session.getZoneSeconds(), - scaleNanos(ti.getNanos()), - session.getZoneSeconds()); + return new TimeData(ti.seconds - zoneSeconds, + scaleNanos(ti.nanos), zoneSeconds); } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { - TimestampData ts = (TimestampData) a; - long seconds = - HsqlDateTime.convertToNormalisedTime( - ts.getSeconds() * 1000) / 1000; - - return new TimeData((int) (seconds), - scaleNanos(ts.getNanos()), - ts.getZone()); + TimestampData ts = (TimestampData) a; + int seconds = toTimeSeconds(ts.seconds); + + return new TimeData(seconds, scaleNanos(ts.nanos), + ts.zone); } case Types.SQL_TIMESTAMP : { - TimestampData ts = (TimestampData) a; - long seconds = ts.getSeconds() - - session.getZoneSeconds(); + TimestampData ts = (TimestampData) a; + int zoneSeconds = session.getZoneSeconds(); + int seconds = toTimeSeconds(ts.seconds - zoneSeconds); - seconds = - HsqlDateTime.convertToNormalisedTime( - session.getCalendarGMT(), - seconds * 1000) / 1000; - - return new TimeData((int) (seconds), - scaleNanos(ts.getNanos()), - session.getZoneSeconds()); + return new TimeData(seconds, scaleNanos(ts.nanos), + zoneSeconds); } default : throw Error.error(ErrorCode.X_42561); @@ -711,86 +706,59 @@ switch (otherType.typeCode) { case Types.SQL_TIME_WITH_TIME_ZONE : { - TimeData ti = (TimeData) a; + TimeData ti = (TimeData) a; + int seconds = toTimeSeconds(ti.seconds + ti.zone); - return new TimeData(ti.getSeconds() + ti.getZone(), - scaleNanos(ti.getNanos()), 0); + return new TimeData(seconds, scaleNanos(ti.nanos)); } case Types.SQL_TIME : return convertToTypeLimits(session, a); case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { - TimestampData ts = (TimestampData) a; - long seconds = ts.getSeconds() + ts.getZone(); - - seconds = - HsqlDateTime.convertToNormalisedTime( - session.getCalendarGMT(), - seconds * 1000) / 1000; - - return new TimeData((int) (seconds), - scaleNanos(ts.getNanos()), 0); - } - case Types.SQL_TIMESTAMP : TimestampData ts = (TimestampData) a; - long seconds = - HsqlDateTime.convertToNormalisedTime( - session.getCalendarGMT(), - ts.getSeconds() * 1000) / 1000; + int seconds = toTimeSeconds(ts.seconds + ts.zone); - return new TimeData((int) (seconds), - scaleNanos(ts.getNanos())); + return new TimeData(seconds, scaleNanos(ts.nanos)); + } + case Types.SQL_TIMESTAMP : { + TimestampData ts = (TimestampData) a; + int seconds = toTimeSeconds(ts.seconds); + return new TimeData(seconds, scaleNanos(ts.nanos)); + } default : throw Error.error(ErrorCode.X_42561); } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : switch (otherType.typeCode) { - case Types.SQL_TIME_WITH_TIME_ZONE : { - TimeData ti = (TimeData) a; - long seconds = session.getCurrentDate().getSeconds() - + ti.getSeconds(); - - return new TimestampData(seconds, - scaleNanos(ti.getNanos()), - ti.getZone()); - } + case Types.SQL_TIME_WITH_TIME_ZONE : case Types.SQL_TIME : { TimeData ti = (TimeData) a; - long seconds = session.getCurrentDate().getSeconds() - + ti.getSeconds() - - session.getZoneSeconds(); - return new TimestampData(seconds, - scaleNanos(ti.getNanos()), - session.getZoneSeconds()); + return convertTimeToTimestamp(session.getCalendar(), + ti.seconds + ti.zone, + scaleNanos(ti.nanos)); } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : return convertToTypeLimits(session, a); + case Types.SQL_DATE : case Types.SQL_TIMESTAMP : { if (!(a instanceof TimestampData)) { throw Error.error(ErrorCode.X_42561); } - TimestampData ts = (TimestampData) a; - long seconds = ts.getSeconds() - - session.getZoneSeconds(); + TimestampData ts = (TimestampData) a; + Calendar calendar = session.getCalendar(); + long seconds = HsqlDateTime.convertSecondsFromCalendar( + session.getCalendarGMT(), calendar, ts.seconds); + int zoneSeconds = + getZoneSeconds(seconds, calendar.getTimeZone()); return new TimestampData(seconds, - scaleNanos(ts.getNanos()), - session.getZoneSeconds()); - } - case Types.SQL_DATE : { - if (!(a instanceof TimestampData)) { - throw Error.error(ErrorCode.X_42561); - } - - TimestampData ts = (TimestampData) a; - - return new TimestampData(ts.getSeconds(), 0, - session.getZoneSeconds()); + scaleNanos(ts.nanos), + zoneSeconds); } default : throw Error.error(ErrorCode.X_42561); @@ -798,30 +766,20 @@ case Types.SQL_TIMESTAMP : switch (otherType.typeCode) { - case Types.SQL_TIME_WITH_TIME_ZONE : { - TimeData ti = (TimeData) a; - long seconds = session.getCurrentDate().getSeconds() - + ti.getSeconds() - - session.getZoneSeconds(); - - return new TimestampData(seconds, - scaleNanos(ti.getNanos()), - session.getZoneSeconds()); - } + case Types.SQL_TIME_WITH_TIME_ZONE : case Types.SQL_TIME : { TimeData ti = (TimeData) a; - long seconds = session.getCurrentDate().getSeconds() - + ti.getSeconds(); - return new TimestampData(seconds, - scaleNanos(ti.getNanos())); + return convertTimeToTimestamp(session.getCalendar(), + ti.seconds + ti.zone, + scaleNanos(ti.nanos)); } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { TimestampData ts = (TimestampData) a; - long seconds = ts.getSeconds() + ts.getZone(); + long seconds = ts.seconds + ts.zone; return new TimestampData(seconds, - scaleNanos(ts.getNanos())); + scaleNanos(ts.nanos)); } case Types.SQL_TIMESTAMP : return convertToTypeLimits(session, a); @@ -845,295 +803,149 @@ return convertToType(session, a, otherType); } - /* @todo - check the time zone conversion */ public Object convertJavaToSQL(SessionInterface session, Object a) { + return convertJavaToSQL(session, a, null); + } + + public Object convertJavaToSQL(SessionInterface session, Object a, + Calendar calendar) { if (a == null) { return null; } - switch (typeCode) { - - case Types.SQL_TIME : - case Types.SQL_TIME_WITH_TIME_ZONE : - if (a instanceof java.sql.Date) { - break; - } - - if (a instanceof java.util.Date) { - long millis; - int nanos = 0; - int zoneSeconds = 0; - - if (typeCode == Types.SQL_TIME) { - millis = HsqlDateTime.convertMillisFromCalendar( - session.getCalendarGMT(), session.getCalendar(), - ((java.util.Date) a).getTime()); - } else { - millis = ((java.util.Date) a).getTime(); - zoneSeconds = session.getZoneSeconds(); - } - - millis = HsqlDateTime.getNormalisedTime( - session.getCalendarGMT(), millis); - - if (a instanceof java.sql.Timestamp) { - nanos = ((java.sql.Timestamp) a).getNanos(); - nanos = normaliseFraction(nanos, scale); - } - - return new TimeData((int) millis / 1000, nanos, - zoneSeconds); - } - - TimeData time = convertJavaTimeObject(session, a); - - if (time != null) { - return time; - } - break; - - case Types.SQL_DATE : { - if (a instanceof java.sql.Time) { - break; - } - - if (a instanceof java.util.Date) { - long millis; - long seconds; - - millis = HsqlDateTime.convertMillisFromCalendar( - session.getCalendarGMT(), session.getCalendar(), - ((java.util.Date) a).getTime()); - millis = HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), millis); - seconds = millis / 1000; - - if (seconds < epochSeconds - || seconds > epochLimitSeconds) { - throw Error.error(ErrorCode.X_22008); - } - - return new TimestampData(seconds); - } - - TimestampData timestamp = convertJavaDateTimeObject(session, - a); - - if (timestamp != null) { - return timestamp; - } - - break; - } - case Types.SQL_TIMESTAMP : - case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { - if (a instanceof java.sql.Time) { - break; - } - - if (a instanceof java.util.Date) { - long millis = ((java.util.Date) a).getTime(); - long seconds; - int nanos; - int zoneSeconds = 0; - - if (typeCode == Types.SQL_TIMESTAMP) { - millis = HsqlDateTime.convertMillisFromCalendar( - session.getCalendarGMT(), session.getCalendar(), - millis); - - if (a instanceof java.sql.Date) { - millis = HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), millis); - } - } else { - if (a instanceof java.sql.Date) { - millis = HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), millis); - } - - zoneSeconds = - HsqlDateTime.getZoneMillis( - session.getCalendar(), millis) / 1000; - } - - seconds = millis / 1000; - - if (seconds < epochSeconds - || seconds > epochLimitSeconds) { - throw Error.error(ErrorCode.X_22008); - } - - if (a instanceof java.sql.Timestamp) { - nanos = ((java.sql.Timestamp) a).getNanos(); - nanos = DateTimeType.normaliseFraction(nanos, scale); - } else { - nanos = DateTimeType.normaliseFraction( - (int) (millis % 1000) * 1000000, scale); - } - - return new TimestampData(seconds, nanos, zoneSeconds); - } - - TimestampData timestamp = convertJavaDateTimeObject(session, - a); - - if (timestamp != null) { - return timestamp; - } + if (calendar == null) { + calendar = session.getCalendar(); + } - break; + long seconds = 0; + int nanos = 0; + int zoneSeconds = 0; + boolean hasZone = false; + boolean isTimeObject = false; + boolean isDateObject = false; + + if (a instanceof java.util.Date) { + long millis = ((java.util.Date) a).getTime(); + + if (a instanceof java.sql.Time) { + isTimeObject = true; + nanos = (int) (millis % millisInSecond * nanosInMilli); + } else if (a instanceof java.sql.Date) { + isDateObject = true; + } else if (a instanceof java.sql.Timestamp) { + nanos = ((java.sql.Timestamp) a).getNanos(); + millis -= (nanos / nanosInMilli); + } else { + nanos = (int) (millis % millisInSecond * nanosInMilli); } - } - throw Error.error(ErrorCode.X_42561); - } + seconds = millis / millisInSecond; + zoneSeconds = getZoneSeconds(seconds, calendar.getTimeZone()); //#ifdef JAVA8 - TimestampData convertJavaDateTimeObject(SessionInterface session, - Object a) { - - long seconds; - int nanos = 0; - int zoneSeconds = 0; - boolean timestamp = this.typeCode != Types.SQL_DATE; - - if (a instanceof java.time.LocalDate) { + } else if (a instanceof java.time.LocalDate) { LocalDate ld = (LocalDate) a; - a = ld.atStartOfDay(); - } + setDateComponents(calendar, ld); - if (a instanceof java.time.OffsetDateTime) { + seconds = calendar.getTimeInMillis() / millisInSecond; + zoneSeconds = getZoneSeconds(seconds, calendar.getTimeZone()); + nanos = 0; + isDateObject = true; + } else if (a instanceof OffsetDateTime) { OffsetDateTime odt = (OffsetDateTime) a; - seconds = odt.toEpochSecond(); - - int offset = odt.get(ChronoField.OFFSET_SECONDS); - - if (timestamp) { - nanos = odt.getNano(); - nanos = DateTimeType.normaliseFraction(nanos, scale); - - if (withTimeZone) { - zoneSeconds = offset; - } else { - seconds += offset; - } - } else { - seconds += offset; - seconds = - HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), seconds * 1000) / 1000; - } - - return new TimestampData(seconds, nanos, zoneSeconds); + seconds = odt.toEpochSecond(); + zoneSeconds = odt.get(ChronoField.OFFSET_SECONDS); + nanos = odt.getNano(); + hasZone = true; + } else if (a instanceof ZonedDateTime) { + ZonedDateTime zdt = (ZonedDateTime) a; + + seconds = zdt.toEpochSecond(); + zoneSeconds = zdt.get(ChronoField.OFFSET_SECONDS); + nanos = zdt.getNano(); + hasZone = true; } else if (a instanceof java.time.LocalDateTime) { LocalDateTime ldt = (LocalDateTime) a; - seconds = ldt.toEpochSecond(ZoneOffset.UTC); + setDateTimeComponents(calendar, ldt); - if (timestamp) { - nanos = ldt.getNano(); - nanos = DateTimeType.normaliseFraction(nanos, scale); - - if (withTimeZone) { - zoneSeconds = session.getZoneSeconds(); - seconds -= zoneSeconds; - } - } else { - seconds = - HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), seconds * 1000) / 1000; - } - - return new TimestampData(seconds, nanos, zoneSeconds); + seconds = calendar.getTimeInMillis() / millisInSecond; + zoneSeconds = getZoneSeconds(seconds, calendar.getTimeZone()); + nanos = ldt.getNano(); } else if (a instanceof java.time.Instant) { Instant ins = (Instant) a; - seconds = ins.getEpochSecond(); - - if (timestamp) { - nanos = ins.getNano(); - - if (nanos < 0) { - nanos += DTIType.limitNanoseconds; - - seconds--; - } - nanos = DateTimeType.normaliseFraction(nanos, scale); - zoneSeconds = session.getZoneSeconds(); + seconds = ins.getEpochSecond(); + zoneSeconds = getZoneSeconds(seconds, calendar.getTimeZone()); + nanos = ins.getNano(); + } else if (a instanceof java.time.OffsetTime) { + OffsetTime ot = (OffsetTime) a; + + seconds = ot.toLocalTime().toSecondOfDay(); + zoneSeconds = ot.get(ChronoField.OFFSET_SECONDS); + seconds = seconds - zoneSeconds; + nanos = ot.getNano(); + isTimeObject = true; + hasZone = true; + } else if (a instanceof java.time.LocalTime) { + LocalTime lt = (LocalTime) a; - if (!withTimeZone) { - seconds += zoneSeconds; - } - } else { - seconds += zoneSeconds; - seconds = - HsqlDateTime.getNormalisedDate( - session.getCalendarGMT(), seconds * 1000) / 1000; - } + seconds = lt.toSecondOfDay(); + zoneSeconds = getZoneSeconds(seconds, calendar.getTimeZone()); + nanos = lt.getNano(); + isTimeObject = true; - return new TimestampData(seconds, nanos, zoneSeconds); +//#endif JAVA8 + } else { + throw Error.error(ErrorCode.X_42561); } - return null; - } + if (!withTimeZone) { + seconds += zoneSeconds; + zoneSeconds = 0; + } - TimeData convertJavaTimeObject(SessionInterface session, Object a) { + switch (typeCode) { - int seconds; - int nanos; - int zoneSeconds = 0; + case Types.SQL_TIME : + case Types.SQL_TIME_WITH_TIME_ZONE : { + if (isDateObject) { + throw Error.error(ErrorCode.X_42561); + } - if (a instanceof java.time.OffsetTime) { - OffsetTime ot = (OffsetTime) a; + nanos = DateTimeType.normaliseFraction(nanos, scale); - seconds = ot.toLocalTime().toSecondOfDay(); - nanos = ot.getNano(); - nanos = DateTimeType.normaliseFraction(nanos, scale); + return new TimeData((int) seconds, nanos, zoneSeconds); + } + case Types.SQL_DATE : { + if (isTimeObject) { + throw Error.error(ErrorCode.X_42561); + } - if (withTimeZone) { - zoneSeconds = ot.get(ChronoField.OFFSET_SECONDS); + seconds = toDateSeconds(seconds); - seconds -= zoneSeconds; - seconds = DateTimeType.normaliseTime(seconds); + return new TimestampData(seconds); } + case Types.SQL_TIMESTAMP : + case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { + if (isTimeObject) { + return convertTimeToTimestamp(calendar, + seconds + zoneSeconds, + nanos); + } - return new TimeData(seconds, nanos, zoneSeconds); - } else if (a instanceof java.time.LocalTime) { - LocalTime lt = (LocalTime) a; - - seconds = lt.toSecondOfDay(); - nanos = lt.getNano(); - nanos = DateTimeType.normaliseFraction(nanos, scale); + nanos = DateTimeType.normaliseFraction(nanos, scale); - if (withTimeZone) { - zoneSeconds = session.getZoneSeconds(); - seconds -= zoneSeconds; - seconds = DateTimeType.normaliseTime(seconds); + return new TimestampData(seconds, nanos, zoneSeconds); } - - return new TimeData(seconds, nanos, zoneSeconds); + default : + throw Error.error(ErrorCode.X_42561); } - - return null; } -//#else -/* - TimestampData convertJavaDateTimeObject(SessionInterface session, - Object a) { - return null; - } - - TimeData convertJavaTimeObject(SessionInterface session, Object a) { - return null; - } -*/ - -//#endif JAVA8 public Object convertSQLToJavaGMT(SessionInterface session, Object a) { long millis; @@ -1142,23 +954,23 @@ case Types.SQL_TIME : case Types.SQL_TIME_WITH_TIME_ZONE : - millis = ((TimeData) a).getSeconds() * 1000L; - millis += ((TimeData) a).getNanos() / 1000000; + millis = ((TimeData) a).seconds * millisInSecond; + millis += ((TimeData) a).nanos / nanosInMilli; return new java.sql.Time(millis); case Types.SQL_DATE : - millis = ((TimestampData) a).getSeconds() * 1000; + millis = ((TimestampData) a).seconds * millisInSecond; return new java.sql.Date(millis); case Types.SQL_TIMESTAMP : case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : - millis = ((TimestampData) a).getSeconds() * 1000; + millis = ((TimestampData) a).seconds * millisInSecond; java.sql.Timestamp value = new java.sql.Timestamp(millis); - value.setNanos(((TimestampData) a).getNanos()); + value.setNanos(((TimestampData) a).nanos); return value; @@ -1169,36 +981,43 @@ public Object convertSQLToJava(SessionInterface session, Object a) { + Calendar cal = session.getCalendar(); + + return convertSQLToJava(session, a, null); + } + + public Object convertSQLToJava(SessionInterface session, Object a, + Calendar cal) { + if (a == null) { return null; } + if (cal == null) { + cal = session.getCalendar(); + } + switch (typeCode) { case Types.SQL_TIME : { - Calendar cal = session.getCalendar(); - long millis = HsqlDateTime.convertMillisToCalendar(cal, - ((TimeData) a).getMillis()); + TimeData td = ((TimeData) a); - millis = HsqlDateTime.getNormalisedTime(cal, millis); + setTimeComponents(cal, td.seconds); - java.sql.Time value = new java.sql.Time(millis); + long millis = cal.getTimeInMillis() + td.nanos / nanosInMilli; - return value; + return new java.sql.Time(millis); } case Types.SQL_TIME_WITH_TIME_ZONE : { //#ifdef JAVA8 - TimeData ts = (TimeData) a; - ZoneOffset zone = ZoneOffset.ofTotalSeconds(ts.zone); - long millis = - HsqlDateTime.getNormalisedTime((ts.seconds + ts.zone) - * 1_000L); - long nanos = millis * 1_000_000L; - LocalTime ldt = LocalTime.ofNanoOfDay(nanos + ts.nanos); - Object value = OffsetTime.of(ldt, zone); + TimeData ts = (TimeData) a; + ZoneOffset zone = ZoneOffset.ofTotalSeconds(ts.zone); + int seconds = toTimeSeconds(ts.seconds + ts.zone); + long nanos = seconds * nanosInSecond; + LocalTime ldt = LocalTime.ofNanoOfDay(nanos + ts.nanos); - return value; + return OffsetTime.of(ldt, zone); //#else /* @@ -1210,22 +1029,26 @@ //#endif JAVA8 } case Types.SQL_DATE : { - Calendar cal = session.getCalendar(); - long millis = HsqlDateTime.convertMillisToCalendar(cal, - ((TimestampData) a).getMillis()); + Calendar calGMT = session.getCalendarGMT(); + long millis = ((TimestampData) a).getMillis(); - // millis = HsqlDateTime.getNormalisedDate(cal, millis); - java.sql.Date value = new java.sql.Date(millis); + HsqlDateTime.convertMillisFromCalendar(calGMT, cal, millis); + HsqlDateTime.zeroFromPart(cal, Types.SQL_INTERVAL_DAY); - return value; + millis = cal.getTimeInMillis(); + + return new java.sql.Date(millis); } case Types.SQL_TIMESTAMP : { - Calendar cal = session.getCalendar(); - long millis = HsqlDateTime.convertMillisToCalendar(cal, - ((TimestampData) a).getMillis()); + Calendar calGMT = session.getCalendarGMT(); + long millis = ((TimestampData) a).getMillis(); + + millis = HsqlDateTime.convertMillisFromCalendar(calGMT, cal, + millis); + java.sql.Timestamp value = new java.sql.Timestamp(millis); - value.setNanos(((TimestampData) a).getNanos()); + value.setNanos(((TimestampData) a).nanos); return value; } @@ -1244,7 +1067,7 @@ long millis = ((TimestampData) a).getMillis(); java.sql.Timestamp value = new java.sql.Timestamp(millis); - value.setNanos(((TimestampData) a).getNanos()); + value.setNanos(((TimestampData) a).nanos); return value; */ @@ -1252,21 +1075,8 @@ //#endif JAVA8 } default : - throw Error.runtimeError(ErrorCode.U_S0500, "DateTimeType"); - } - } - - public static int normaliseTime(int seconds) { - - while (seconds < 0) { - seconds += 24 * 60 * 60; - } - - if (seconds >= 24 * 60 * 60) { - seconds %= 24 * 60 * 60; + throw Error.error(ErrorCode.X_42561); } - - return seconds; } public String convertToString(Object a) { @@ -1282,38 +1092,33 @@ switch (typeCode) { case Types.SQL_DATE : - return HsqlDateTime.getDateString( - ((TimestampData) a).getSeconds()); + return HsqlDateTime.getDateString(((TimestampData) a).seconds); case Types.SQL_TIME_WITH_TIME_ZONE : case Types.SQL_TIME : { TimeData t = (TimeData) a; - int seconds = normaliseTime(t.getSeconds() + t.getZone()); + int seconds = toTimeSeconds(t.seconds + t.zone); - s = intervalSecondToString(seconds, t.getNanos(), false); + s = intervalSecondToString(seconds, t.nanos, false); if (!withTimeZone) { return s; } - sb = new StringBuilder(s); - s = Type.SQL_INTERVAL_HOUR_TO_MINUTE.intervalSecondToString( - ((TimeData) a).getZone(), 0, true); + s += Type.SQL_INTERVAL_HOUR_TO_MINUTE.intervalSecondToString( + t.zone, 0, true); - sb.append(s); - - return sb.toString(); + return s; } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : case Types.SQL_TIMESTAMP : { TimestampData ts = (TimestampData) a; - String tss = HsqlDateTime.getTimestampString(ts.getSeconds() - + ts.getZone(), ts.getNanos(), scale); + String tss = HsqlDateTime.getTimestampString(ts.seconds + + ts.zone, ts.nanos, scale); if (withTimeZone) { s = Type.SQL_INTERVAL_HOUR_TO_MINUTE - .intervalSecondToString(((TimestampData) a).getZone(), - 0, true); + .intervalSecondToString(ts.zone, 0, true); tss += s; } @@ -1355,6 +1160,19 @@ return sb.toString(); } + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('"'); + sb.append(convertToString(a)); + sb.append('"'); + } + public boolean canConvertFrom(Type otherType) { if (otherType.typeCode == Types.SQL_ALL_TYPES) { @@ -1381,12 +1199,12 @@ public int canMoveFrom(Type otherType) { if (otherType == this) { - return 0; + return ReType.keep; } if (typeCode == otherType.typeCode) { - return scale >= otherType.scale ? 0 - : -1; + return scale >= otherType.scale ? ReType.keep + : ReType.change; } return -1; @@ -1495,22 +1313,22 @@ double fraction; if (a instanceof TimeData) { - seconds = ((TimeData) a).getSeconds(); - fraction = ((TimeData) a).getNanos() / 1000000000d; + seconds = ((TimeData) a).seconds; + fraction = ((TimeData) a).nanos / 1000000000d; } else { - seconds = ((TimestampData) a).getSeconds(); - fraction = ((TimestampData) a).getNanos() / 1000000000d; + seconds = ((TimestampData) a).seconds; + fraction = ((TimestampData) a).nanos / 1000000000d; } return seconds + fraction; } - public Object convertFromDouble(Session session, double value) { + public TimestampData convertFromDouble(Session session, double value) { long units = (long) value; - int nanos = (int) ((value - units) * limitNanoseconds); + int nanos = (int) ((value - units) * nanosInSecond); - return getValue(session, units, nanos, 0); + return getDateTimeValue(session, units, nanos); } public Object truncate(Session session, Object a, int part) { @@ -1519,7 +1337,7 @@ return null; } - long millis = getMillis(a); + long millis = getTotalMillis(a); Calendar calendar = session.getCalendarGMT(); millis = HsqlDateTime.getTruncatedPart(calendar, millis, part); @@ -1528,18 +1346,17 @@ switch (typeCode) { case Types.SQL_TIME_WITH_TIME_ZONE : + case Types.SQL_TIME : { millis = HsqlDateTime.getNormalisedTime(calendar, millis); - //fall through - case Types.SQL_TIME : { - return new TimeData((int) (millis / 1000), 0, - ((TimeData) a).getZone()); + return new TimeData((int) (millis / millisInSecond), 0, + ((TimeData) a).zone); } case Types.SQL_DATE : case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : case Types.SQL_TIMESTAMP : { - return new TimestampData(millis / 1000, 0, - ((TimestampData) a).getZone()); + return new TimestampData(millis / millisInSecond, 0, + ((TimestampData) a).zone); } default : } @@ -1553,7 +1370,7 @@ return null; } - long millis = getMillis(a); + long millis = getTotalMillis(a); Calendar calendar = session.getCalendarGMT(); millis = HsqlDateTime.getRoundedPart(calendar, millis, part); @@ -1565,14 +1382,14 @@ case Types.SQL_TIME : { millis = HsqlDateTime.getNormalisedTime(millis); - return new TimeData((int) (millis / 1000), 0, - ((TimeData) a).getZone()); + return new TimeData((int) (millis / millisInSecond), 0, + ((TimeData) a).zone); } case Types.SQL_DATE : case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : case Types.SQL_TIMESTAMP : { - return new TimestampData(millis / 1000, 0, - ((TimestampData) a).getZone()); + return new TimestampData(millis / millisInSecond, 0, + ((TimestampData) a).zone); } default : } @@ -1638,37 +1455,27 @@ break; case Types.DTI_SECONDS_MIDNIGHT : { - if (typeCode == Types.SQL_TIME - || typeCode == Types.SQL_TIME_WITH_TIME_ZONE) {} - else { - try { - Type target = withTimeZone - ? Type.SQL_TIME_WITH_TIME_ZONE - : Type.SQL_TIME; + long seconds = getTotalSeconds(dateTime); - dateTime = target.castToType(session, dateTime, this); - } catch (HsqlException e) {} - } - - return ((TimeData) dateTime).getSeconds(); + return toTimeSeconds(seconds); } case Types.DTI_TIMEZONE_HOUR : if (typeCode == Types.SQL_TIMESTAMP_WITH_TIME_ZONE) { - return ((TimestampData) dateTime).getZone() / 3600; + return ((TimestampData) dateTime).zone / 3600; } else { - return ((TimeData) dateTime).getZone() / 3600; + return ((TimeData) dateTime).zone / 3600; } case Types.DTI_TIMEZONE_MINUTE : if (typeCode == Types.SQL_TIMESTAMP_WITH_TIME_ZONE) { - return ((TimestampData) dateTime).getZone() / 60 % 60; + return ((TimestampData) dateTime).zone / 60 % 60; } else { - return ((TimeData) dateTime).getZone() / 60 % 60; + return ((TimeData) dateTime).zone / 60 % 60; } case Types.DTI_TIMEZONE : if (typeCode == Types.SQL_TIMESTAMP_WITH_TIME_ZONE) { - return ((TimestampData) dateTime).getZone() / 60; + return ((TimestampData) dateTime).zone / 60; } else { - return ((TimeData) dateTime).getZone() / 60; + return ((TimeData) dateTime).zone / 60; } case Types.DTI_QUARTER : increment = 1; @@ -1682,25 +1489,49 @@ case Types.DTI_MILLISECOND : if (this.isDateOrTimestampType()) { - return ((TimestampData) dateTime).getNanos() / 1000000; + return ((TimestampData) dateTime).nanos + / (int) nanosInMilli; } else { - return ((TimeData) dateTime).getNanos() / 1000000; + return ((TimeData) dateTime).nanos / (int) nanosInMilli; + } + case Types.DTI_MICROSECOND : + if (this.isDateOrTimestampType()) { + return ((TimestampData) dateTime).nanos / 1000; + } else { + return ((TimeData) dateTime).nanos / 1000; } case Types.DTI_NANOSECOND : if (this.isDateOrTimestampType()) { - return ((TimestampData) dateTime).getNanos(); + return ((TimestampData) dateTime).nanos; } else { - return ((TimeData) dateTime).getNanos(); + return ((TimeData) dateTime).nanos; } default : throw Error.runtimeError(ErrorCode.U_S0500, "DateTimeType - " + part); } - long millis = getMillis(dateTime); + long millis = getTotalMillis(dateTime); + Calendar calendar = session.getCalendarGMT(); + + calendar.setTimeInMillis(millis); - return HsqlDateTime.getDateTimePart(session.getCalendarGMT(), millis, calendarPart) - / divisor + increment; + return calendar.get(calendarPart) / divisor + increment; + } + + /** + * Returns the indicated part of the given millisecond date object. + * @param m the millisecond time value from which to extract the indicated part + * @param part an integer code corresponding to the desired date part + * @return the indicated part of the given java.util.Date object + */ + public static int getDateTimePart(Calendar calendar, long m, int part) { + + synchronized (calendar) { + calendar.setTimeInMillis(m); + + return calendar.get(part); + } } public Object addMonthsSpecial(Session session, Object dateTime, @@ -1708,7 +1539,7 @@ TimestampData ts = (TimestampData) dateTime; Calendar cal = session.getCalendarGMT(); - long millis = (ts.getSeconds() + ts.getZone()) * 1000; + long millis = (ts.seconds + ts.zone) * millisInSecond; boolean lastDay; HsqlDateTime.setTimeInMillis(cal, millis); @@ -1729,14 +1560,14 @@ millis = cal.getTimeInMillis(); - return new TimestampData(millis / 1000, 0, 0); + return new TimestampData(millis / millisInSecond, 0, 0); } public Object getLastDayOfMonth(Session session, Object dateTime) { TimestampData ts = (TimestampData) dateTime; Calendar cal = session.getCalendarGMT(); - long millis = (ts.getSeconds() + ts.getZone()) * 1000; + long millis = (ts.seconds + ts.zone) * millisInSecond; HsqlDateTime.setTimeInMillis(cal, millis); cal.set(Calendar.DAY_OF_MONTH, 1); @@ -1745,36 +1576,35 @@ millis = cal.getTimeInMillis(); - return new TimestampData(millis / 1000, 0, 0); + return new TimestampData(millis / millisInSecond, 0, 0); } - long getMillis(Object dateTime) { + long getTotalMillis(Object dateTime) { + return getTotalSeconds(dateTime) * millisInSecond; + } - long millis; + long getTotalSeconds(Object dateTime) { if (typeCode == Types.SQL_TIME || typeCode == Types.SQL_TIME_WITH_TIME_ZONE) { - millis = - (((TimeData) dateTime).getSeconds() + ((TimeData) dateTime) - .getZone()) * 1000L; + TimeData td = ((TimeData) dateTime); + + return td.seconds + td.zone; } else { - millis = - (((TimestampData) dateTime) - .getSeconds() + ((TimestampData) dateTime).getZone()) * 1000; - } + TimestampData ts = ((TimestampData) dateTime); - return millis; + return ts.seconds + ts.zone; + } } long getZoneMillis(Object dateTime) { long millis; - if (typeCode == Types.SQL_TIME - || typeCode == Types.SQL_TIME_WITH_TIME_ZONE) { - millis = ((TimeData) dateTime).getZone() * 1000L; + if (dateTime instanceof TimeData) { + millis = ((TimeData) dateTime).zone * millisInSecond; } else { - millis = ((TimestampData) dateTime).getZone() * 1000L; + millis = ((TimestampData) dateTime).zone * millisInSecond; } return millis; @@ -1787,10 +1617,10 @@ if (typeCode == Types.SQL_TIMESTAMP || typeCode == Types.SQL_TIMESTAMP_WITH_TIME_ZONE) { - nanos = ((TimestampData) dateTime).getNanos(); + nanos = ((TimestampData) dateTime).nanos; } else if (typeCode == Types.SQL_TIME || typeCode == Types.SQL_TIME_WITH_TIME_ZONE) { - nanos = ((TimeData) dateTime).getNanos(); + nanos = ((TimeData) dateTime).nanos; } return getSecondPart(seconds, nanos); @@ -1822,73 +1652,77 @@ return format.format(date); } - public Object getValue(Session session, long seconds, int nanos, - int zoneSeconds) { + TimestampData convertTimeToTimestamp(Calendar calendar, long seconds, + int nanos) { - Calendar calendar = session.getCalendarGMT(); + calendar.setTimeInMillis(System.currentTimeMillis()); + setTimeComponentsOnly(calendar, (int) seconds); - switch (typeCode) { + seconds = calendar.getTimeInMillis() / millisInSecond; - case Types.SQL_DATE : - seconds = - HsqlDateTime.getNormalisedDate( - calendar, (seconds + zoneSeconds) * 1000) / 1000; + int zoneSeconds = getZoneSeconds(seconds, calendar.getTimeZone()); - return new TimestampData(seconds); + if (!withTimeZone) { + seconds += zoneSeconds; + zoneSeconds = 0; + } - case Types.SQL_TIME_WITH_TIME_ZONE : - seconds = - HsqlDateTime.getNormalisedDate(calendar, seconds * 1000) - / 1000; + return new TimestampData(seconds, zoneSeconds, nanos); + } - return new TimeData((int) seconds, nanos, zoneSeconds); + /** + * Session derivatives of CURRENT_TIMESTAMP + */ + public static TimestampData toLocalTimestampValue( + TimestampData tsWithZone) { + return new TimestampData(tsWithZone.seconds + tsWithZone.zone, + tsWithZone.nanos); + } - case Types.SQL_TIME : - seconds = - HsqlDateTime.getNormalisedTime( - calendar, (seconds + zoneSeconds) * 1000) / 1000; + public static TimestampData toCurrentDateValue(TimestampData tsWithZone) { - return new TimeData((int) seconds, nanos); + long seconds = toDateSeconds(tsWithZone.seconds + tsWithZone.zone); - case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : - return new TimestampData(seconds, nanos, zoneSeconds); + return new TimestampData(seconds); + } - case Types.SQL_TIMESTAMP : - return new TimestampData(seconds + zoneSeconds, nanos); + public static TimeData toCurrentTimeValue(TimestampData tsWithZone) { - default : - throw Error.runtimeError(ErrorCode.U_S0500, "DateTimeType"); - } + int seconds = toTimeSeconds(tsWithZone.seconds + tsWithZone.zone); + + return new TimeData(seconds, tsWithZone.nanos); } - public DateTimeType getDateTimeTypeWithoutZone() { + public static TimeData toCurrentTimeWithZoneValue( + TimestampData tsWithZone) { - if (this.withTimeZone) { - DateTimeType type; + int seconds = toTimeSeconds(tsWithZone.seconds); - switch (typeCode) { + return new TimeData(seconds, tsWithZone.nanos, tsWithZone.zone); + } - case Types.SQL_TIME_WITH_TIME_ZONE : - type = new DateTimeType(Types.SQL_TIME, Types.SQL_TIME, - scale); - break; + public TimestampData getDateTimeValue(SessionInterface session, + long seconds, int nanos) { - case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : - type = new DateTimeType(Types.SQL_TIMESTAMP, - Types.SQL_TIMESTAMP, scale); - break; + nanos = DateTimeType.normaliseFraction(nanos, scale); - default : - throw Error.runtimeError(ErrorCode.U_S0500, - "DateTimeType"); - } + switch (typeCode) { - type.nameString = nameString; + case Types.SQL_DATE : + seconds = toDateSeconds(seconds); - return type; - } + return new TimestampData(seconds); + + case Types.SQL_TIMESTAMP : + return new TimestampData(seconds, nanos); + + case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : + return new TimestampData(seconds, nanos, + session.getZoneSeconds()); - return this; + default : + throw Error.runtimeError(ErrorCode.U_S0500, "DateTimeType"); + } } public static DateTimeType getDateTimeType(int type, int scale) { @@ -1939,20 +1773,18 @@ } } - public static Object changeZoneToUTC(Object a) { + public Object changeZoneToUTC(Object a) { if (a instanceof TimestampData) { TimestampData ts = (TimestampData) a; - if (ts.getZone() != 0) { + if (ts.zone != 0) { return new TimestampData(ts.seconds, ts.nanos); } - } - - if (a instanceof TimeData) { + } else { TimeData ts = (TimeData) a; - if (ts.getZone() != 0) { + if (ts.zone != 0) { return new TimeData(ts.seconds, ts.nanos); } } @@ -1960,17 +1792,59 @@ return a; } + public Object changeZone(Session session, Object a, String zoneString) { + + TimestampData value = (TimestampData) a; + long seconds = value.seconds + value.zone; + Calendar calendar = session.getCalendar(); + TimeZone zone = TimeZone.getTimeZone(zoneString); + TimeZone sessionZone = calendar.getTimeZone(); + + calendar.setTimeZone(zone); + + seconds = + HsqlDateTime.convertSecondsFromCalendar(session.getCalendarGMT(), + calendar, seconds); + + int offset = zone.getOffset(seconds * millisInSecond) + / (int) millisInSecond; + + calendar.setTimeZone(sessionZone); + + return new TimestampData(seconds, value.nanos, offset); + } + public Object changeZone(Session session, Object a, Type otherType, - int targetZone, int localZone) { + String zoneString) { - Calendar calendar = session.getCalendarGMT(); + TimestampData value = (TimestampData) a; + long seconds = value.seconds; + Calendar calendar = session.getCalendar(); + + if (!zoneIDs.contains(zoneString)) { + throw Error.error(ErrorCode.X_22009, zoneString); + } + + if (!otherType.isDateTimeTypeWithZone()) { + seconds = HsqlDateTime.convertSecondsFromCalendar( + session.getCalendarGMT(), calendar, seconds); + } + + TimeZone zone = TimeZone.getTimeZone(zoneString); + int offset = getZoneSeconds(seconds, zone); + + return new TimestampData(seconds, value.nanos, offset); + } + + public Object changeZone(Session session, Object a, Type otherType, + int zoneSeconds, boolean atLocal) { if (a == null) { return null; } - if (targetZone > DTIType.timezoneSecondsLimit - || -targetZone > DTIType.timezoneSecondsLimit) { + if (zoneSeconds > DTIType.timezoneSecondsLimit + || -zoneSeconds > DTIType.timezoneSecondsLimit) { throw Error.error(ErrorCode.X_22009); } @@ -1979,38 +1853,46 @@ case Types.SQL_TIME_WITH_TIME_ZONE : { TimeData value = (TimeData) a; + if (atLocal) { + zoneSeconds = session.getZoneSeconds(); + } + if (otherType.isDateTimeTypeWithZone()) { - if (value.zone != targetZone) { - return new TimeData(value.getSeconds(), - value.getNanos(), targetZone); + if (value.zone == zoneSeconds) { + return value; } + + return new TimeData(value.seconds, value.nanos, + zoneSeconds); } else { - int seconds = value.getSeconds() - localZone; + int localZone = session.getZoneSeconds(); + int seconds = value.seconds - localZone; - seconds = - (int) (HsqlDateTime.getNormalisedTime(calendar, seconds * 1000L) - / 1000); + seconds = toTimeSeconds(seconds); - return new TimeData(seconds, value.getNanos(), targetZone); + return new TimeData(seconds, value.nanos, zoneSeconds); } - - break; } case Types.SQL_TIMESTAMP_WITH_TIME_ZONE : { - TimestampData value = (TimestampData) a; - long seconds = value.getSeconds(); + TimestampData value = (TimestampData) a; + long seconds = value.seconds; + Calendar calendar = session.getCalendar(); if (!otherType.isDateTimeTypeWithZone()) { - seconds -= localZone; + seconds = HsqlDateTime.convertSecondsFromCalendar( + session.getCalendarGMT(), calendar, seconds); } - if (value.getSeconds() != seconds - || value.zone != targetZone) { - return new TimestampData(seconds, value.getNanos(), - targetZone); + if (atLocal) { + zoneSeconds = getZoneSeconds(seconds, + calendar.getTimeZone()); } - break; + if (value.seconds == seconds && value.zone == zoneSeconds) { + return value; + } + + return new TimestampData(seconds, value.nanos, zoneSeconds); } } @@ -2197,8 +2079,7 @@ * The predicate "a OVERLAPS b" applies when both a and b are either period * names or period constructors. * This predicate returns True if the two periods have at least one time - * point in common, i.e, if a[0] < b[1] and - * a[1] > b[0]. This predicates is commutative: "a OVERLAPS B" must return + * point in common, i.e, if {@code a[0] < b[1] && a[1] > b[0]}. This predicate is commutative: "a OVERLAPS B" must return * the same result of "b OVERLAPS a" *

                    * @@ -2237,8 +2118,7 @@ /** * The predicate "a OVERLAPS b" applies when both a and b are rows. * This predicate returns True if the two periods have at least one time - * point in common, i.e, if a[0] < b[1] and - * a[1] > b[0]. This predicates is commutative: "a OVERLAPS B" must return + * point in common, i.e, if {@code a[0] < b[1] && a[1] > b[0]}. This predicate is commutative: "a OVERLAPS B" must return * the same result of "b OVERLAPS a" *

                    * Important: when this method returns, the boundaries of the periods may @@ -2280,7 +2160,7 @@ * The predicate "a PRECEDES b" applies when both a and b are either period * names or period constructors. * In this case, the predicate returns True if the end value of a is less - * than or equal to the start value of b, i.e., if ae <= as. + * than or equal to the start value of b, i.e., if {@code ae <= as}. *

                    * * @param session The session @@ -2373,7 +2253,7 @@ /** * The predicate "x SUCCEEDS y" applies when both x and y are either period names or period constructors. * In this case, the predicate returns True if the start value of x is greater than or equal to the end value of y, - * i.e., if xs >= ye. + * i.e., if {@code xs >= ye}. *

                    * * @param session The session @@ -2435,9 +2315,9 @@ /** * The predicate "x CONTAINS y" applies when
                    * a) both x and y are either period names or period constructors. In this case, the predicate returns True if - * x contains every time point in y, i.e., if xs <= ys and xe >= ye.
                    + * x contains every time point in y, i.e., if {@code xs <= ys && xe >= ye}.
                    * b) x is either a period name or a period constructor and y is a datetime value expression. In this case, the - * predicate returns True if x contains y, i.e., if xs <= y and xe > y. + * predicate returns True if x contains y, i.e., if {@code xs <= y && xe > y}. *

                    * The b part of this definition is not supported yet. In order to get the same result, one have to specify * a period with the same date time value for the period start and end. @@ -2468,7 +2348,7 @@ if (compareStart <= 0 && compareEnd >= 0) { // if the end of the two period are equals, period a does not - // contains period b if it is defined by a single point in time + // contain period b if it is defined by a single point in time if (pointOfTime) { if (compareEnd == 0) { return Boolean.FALSE; @@ -2484,8 +2364,8 @@ public static BigDecimal subtractMonthsSpecial(Session session, TimestampData a, TimestampData b) { - long s1 = (a.getSeconds() + a.getZone()) * 1000; - long s2 = (b.getSeconds() + b.getZone()) * 1000; + long s1 = (a.seconds + a.zone) * millisInSecond; + long s2 = (b.seconds + b.zone) * millisInSecond; boolean minus = false; if (s1 < s2) { @@ -2497,11 +2377,11 @@ s2 = temp; } - s1 = HsqlDateTime.getNormalisedDate(session.getCalendarGMT(), s1); - s2 = HsqlDateTime.getNormalisedDate(session.getCalendarGMT(), s2); - Calendar cal = session.getCalendarGMT(); + s1 = HsqlDateTime.getNormalisedDate(cal, s1); + s2 = HsqlDateTime.getNormalisedDate(cal, s2); + cal.setTimeInMillis(s1); int lastDay1; @@ -2509,16 +2389,9 @@ int day1 = cal.get(Calendar.DAY_OF_MONTH); cal.set(Calendar.DAY_OF_MONTH, 1); - - long millis = cal.getTimeInMillis(); - cal.add(Calendar.MONTH, 1); - - millis = cal.getTimeInMillis(); - cal.add(Calendar.DAY_OF_MONTH, -1); - millis = cal.getTimeInMillis(); lastDay1 = cal.get(Calendar.DAY_OF_MONTH); cal.setTimeInMillis(s2); @@ -2528,16 +2401,9 @@ int day2 = cal.get(Calendar.DAY_OF_MONTH); cal.set(Calendar.DAY_OF_MONTH, 1); - - millis = cal.getTimeInMillis(); - cal.add(Calendar.MONTH, 1); - - millis = cal.getTimeInMillis(); - cal.add(Calendar.DAY_OF_MONTH, -1); - millis = cal.getTimeInMillis(); lastDay2 = cal.get(Calendar.DAY_OF_MONTH); double months; @@ -2580,7 +2446,7 @@ Calendar calendar = session.getCalendarGMT(); boolean negate = false; - if (b.getSeconds() > a.getSeconds()) { + if (b.seconds > a.seconds) { negate = true; TimestampData temp = a; @@ -2589,12 +2455,12 @@ b = temp; } - calendar.setTimeInMillis(a.getSeconds() * 1000); + calendar.setTimeInMillis(a.seconds * millisInSecond); int months = calendar.get(Calendar.MONTH); int years = calendar.get(Calendar.YEAR); - calendar.setTimeInMillis(b.getSeconds() * 1000); + calendar.setTimeInMillis(b.seconds * millisInSecond); months -= calendar.get(Calendar.MONTH); years -= calendar.get(Calendar.YEAR); @@ -2621,7 +2487,7 @@ public static TimeData addSeconds(TimeData source, long seconds, int nanos) { - nanos += source.getNanos(); + nanos += source.nanos; seconds += nanos / limitNanoseconds; nanos %= limitNanoseconds; @@ -2631,34 +2497,30 @@ seconds--; } - seconds += source.getSeconds(); + seconds += source.seconds; seconds %= (24 * 60 * 60); - TimeData ti = new TimeData((int) seconds, nanos, source.getZone()); - - return ti; + return new TimeData((int) seconds, nanos, source.zone); } /* @todo - overflow */ public static TimestampData addMonths(Session session, TimestampData source, int months) { - int n = source.getNanos(); + int n = source.nanos; Calendar cal = session.getCalendarGMT(); - HsqlDateTime.setTimeInMillis(cal, source.getSeconds() * 1000); + HsqlDateTime.setTimeInMillis(cal, source.seconds * millisInSecond); cal.add(Calendar.MONTH, months); - TimestampData ts = new TimestampData(cal.getTimeInMillis() / 1000, n, - source.getZone()); - - return ts; + return new TimestampData(cal.getTimeInMillis() / millisInSecond, n, + source.zone); } public static TimestampData addSeconds(TimestampData source, long seconds, int nanos) { - nanos += source.getNanos(); + nanos += source.nanos; seconds += nanos / limitNanoseconds; nanos %= limitNanoseconds; @@ -2668,11 +2530,9 @@ seconds--; } - long newSeconds = source.getSeconds() + seconds; - TimestampData ts = new TimestampData(newSeconds, nanos, - source.getZone()); + long newSeconds = source.seconds + seconds; - return ts; + return new TimestampData(newSeconds, nanos, source.zone); } public static TimestampData convertToDatetimeSpecial( @@ -2752,7 +2612,7 @@ millis = HsqlDateTime.getNormalisedDate(cal, millis); - return new TimestampData(millis / 1000); + return new TimestampData(millis / millisInSecond); } public static int getDayOfWeek(String name) { @@ -2799,4 +2659,238 @@ throw Error.error(ErrorCode.X_22007, name); } + + public static int toTimeSeconds(long seconds) { + + int timeSeconds = (int) (seconds % secondsInDay); + + if (timeSeconds < 0) { + timeSeconds += secondsInDay; + } + + return timeSeconds; + } + + static long toDateSeconds(long seconds) { + + long timeSeconds = seconds % secondsInDay; + + if (timeSeconds < 0) { + timeSeconds += secondsInDay; + } + + return seconds - timeSeconds; + } + + public static TimestampData newSysDateTimestamp() { + + long millis = System.currentTimeMillis(); + long seconds = millis / millisInSecond; + int offset = systemTimeZone.getOffset(millis) / (int) millisInSecond; + + return new TimestampData(seconds + offset); + } + + public static TimestampData newSystemTimestampWithZone() { + return newCurrentTimestamp(systemTimeZone); + } + + public static int getZoneSeconds(long utcSeconds, TimeZone zone) { + return zone.getOffset(utcSeconds * millisInSecond) + / (int) millisInSecond; + } + + static void setTimeComponents(Calendar calendar, int seconds) { + + seconds %= DTIType.secondsInDay; + + calendar.clear(); + calendar.set(Calendar.YEAR, 1970); + calendar.set(Calendar.MONTH, 0); + calendar.set(Calendar.DAY_OF_MONTH, 1); + setTimeComponentsOnly(calendar, seconds); + } + + static void setTimeComponentsOnly(Calendar calendar, int seconds) { + + seconds = toTimeSeconds(seconds); + + calendar.set(Calendar.HOUR_OF_DAY, seconds / 3600); + calendar.set(Calendar.MINUTE, (seconds % 3600) / 60); + calendar.set(Calendar.SECOND, seconds % 60); + } + +//#ifdef JAVA8 + public static TimestampData newCurrentTimestamp(TimeZone zone) { + + Instant instant = Instant.now(); + long seconds = instant.getEpochSecond(); + int nanos = (instant.getNano() / 1000) * 1000; + int zoneSeconds = zone.getOffset(seconds * millisInSecond) + / (int) millisInSecond; + + return new TimestampData(seconds, nanos, zoneSeconds); + } + + public static TimestampData newSystemTimestampUTC() { + + Instant instant = Instant.now(); + long seconds = instant.getEpochSecond(); + int nanos = (instant.getNano() / 1000) * 1000; + + return new TimestampData(seconds, nanos); + } + + public static void setDateTimeComponents(Calendar calendar, + LocalDateTime ldt) { + + calendar.clear(); + calendar.set(Calendar.YEAR, ldt.getYear()); + calendar.set(Calendar.MONTH, ldt.getMonthValue() - 1); + calendar.set(Calendar.DAY_OF_MONTH, ldt.getDayOfMonth()); + calendar.set(Calendar.HOUR_OF_DAY, ldt.getHour()); + calendar.set(Calendar.MINUTE, ldt.getMinute()); + calendar.set(Calendar.SECOND, ldt.getSecond()); + } + + public static void setDateComponents(Calendar calendar, LocalDate ldt) { + + calendar.clear(); + calendar.set(Calendar.YEAR, ldt.getYear()); + calendar.set(Calendar.MONTH, ldt.getMonthValue() - 1); + calendar.set(Calendar.DAY_OF_MONTH, ldt.getDayOfMonth()); + } + + public static void setTimeComponents(Calendar calendar, LocalTime ldt) { + + calendar.clear(); + calendar.set(Calendar.YEAR, 1970); + calendar.set(Calendar.MONTH, 0); + calendar.set(Calendar.DAY_OF_MONTH, 1); + calendar.set(Calendar.HOUR_OF_DAY, ldt.getHour()); + calendar.set(Calendar.MINUTE, ldt.getMinute()); + calendar.set(Calendar.SECOND, ldt.getSecond()); + } + + public Instant toInstant(SessionInterface session, TimestampData v) { + + long seconds; + + if (withTimeZone) { + seconds = v.seconds; + } else { + seconds = HsqlDateTime.convertSecondsFromCalendar( + session.getCalendarGMT(), session.getCalendar(), v.seconds); + } + + return Instant.ofEpochSecond(seconds, v.nanos); + } + + public LocalDate toLocalDate(SessionInterface session, TimestampData v) { + + long millis = (v.seconds + v.zone) * millisInSecond; + Calendar cal = session.getCalendarGMT(); + + cal.setTimeInMillis(millis); + + return LocalDate.of(cal.get(Calendar.YEAR), + cal.get(Calendar.MONTH) + 1, + cal.get(Calendar.DAY_OF_MONTH)); + } + + public LocalDateTime toLocalDateTime(SessionInterface session, + TimestampData v) { + + long millis = (v.seconds + v.zone) * millisInSecond; + int nanos = v.nanos; + Calendar cal = session.getCalendarGMT(); + + cal.setTimeInMillis(millis); + + return LocalDateTime.of(cal.get(Calendar.YEAR), + cal.get(Calendar.MONTH) + 1, + cal.get(Calendar.DAY_OF_MONTH), + cal.get(Calendar.HOUR_OF_DAY), + cal.get(Calendar.MINUTE), + cal.get(Calendar.SECOND), nanos); + } + + public LocalTime toLocalTime(SessionInterface session, TimeData v) { + + int seconds = toTimeSeconds(v.seconds + v.zone); + + return LocalTime.ofNanoOfDay(seconds * nanosInSecond + v.nanos); + } + + public LocalTime toLocalTime(SessionInterface session, TimestampData v) { + + int seconds = toTimeSeconds(v.getSeconds() + v.zone); + + return LocalTime.ofNanoOfDay(seconds * nanosInSecond + v.nanos); + } + + public OffsetTime toOffsetTime(SessionInterface session, TimeData v) { + + int zoneSeconds = withTimeZone ? v.zone + : session.getZoneSeconds(); + ZoneOffset zone = ZoneOffset.ofTotalSeconds(zoneSeconds); + LocalTime lt = toLocalTime(session, v); + + return OffsetTime.of(lt, zone); + } + + public OffsetTime toOffsetTime(SessionInterface session, TimestampData v) { + + int zoneSeconds = withTimeZone ? v.zone + : session.getZoneSeconds(); + ZoneOffset zone = ZoneOffset.ofTotalSeconds(zoneSeconds); + LocalTime lt = toLocalTime(session, v); + + return OffsetTime.of(lt, zone); + } + + public OffsetDateTime toOffsetDateTime(SessionInterface session, + TimestampData v) { + + int zoneSeconds; + + if (withTimeZone) { + zoneSeconds = v.zone; + } else { + long seconds = HsqlDateTime.convertSecondsFromCalendar( + session.getCalendarGMT(), session.getCalendar(), v.seconds); + + zoneSeconds = getZoneSeconds(seconds, + session.getCalendar().getTimeZone()); + } + + ZoneOffset zone = ZoneOffset.ofTotalSeconds(zoneSeconds); + LocalDateTime lt = toLocalDateTime(session, v); + + return OffsetDateTime.of(lt, zone); + } + +//#else +/* + public static TimestampData newCurrentTimestamp(TimeZone zone) { + + long millis = System.currentTimeMillis(); + long seconds = millis / millisInSecond; + int nanos = (int) (millis % millisInSecond * nanosInMilli); + int zoneSeconds = zone.getOffset(millis) / (int) millisInSecond; + + return new TimestampData(seconds, nanos, zoneSeconds); + } + + public static TimestampData newSystemTimestampUTC() { + + long millis = System.currentTimeMillis(); + long seconds = millis / millisInSecond; + int nanos = (int) (millis % millisInSecond * nanosInMilli); + + return new TimestampData(seconds, nanos); + } +*/ + +//#endif JAVA8 } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/DTIType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/DTIType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/DTIType.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/DTIType.java 2022-06-28 17:27:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,11 +43,16 @@ * Common elements for Type instances for DATETIME and INTERVAL.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.9.0 */ public abstract class DTIType extends Type { + public static final int secondsInDay = 60 * 60 * 24; + public static final long millisInSecond = 1000L; + public static final long nanosInMilli = 1000000L; + public static final long nanosInSecond = 1000000000L; + public static final byte[] yearToSecondSeparators = { '-', '-', ' ', ':', ':', '.' }; @@ -71,7 +76,7 @@ 1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1 }; - public static final int timezoneSecondsLimit = 14 * 60 * 60; + public static final int timezoneSecondsLimit = 18 * 60 * 60; static final int[] intervalParts = { Types.SQL_INTERVAL_YEAR, Types.SQL_INTERVAL_MONTH, Types.SQL_INTERVAL_DAY, Types.SQL_INTERVAL_HOUR, diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/IntervalType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/IntervalType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/IntervalType.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/IntervalType.java 2022-03-04 20:50:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ * Type subclass for various types of INTERVAL.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.5.1 + * @version 2.7.0 * @since 1.9.0 */ public final class IntervalType extends DTIType { @@ -764,6 +764,19 @@ return sb.toString(); } + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('"'); + sb.append(convertToString(a)); + sb.append('"'); + } + public boolean canConvertFrom(Type otherType) { if (otherType.typeCode == Types.SQL_ALL_TYPES) { @@ -789,36 +802,36 @@ public int canMoveFrom(Type otherType) { if (otherType == this) { - return 0; + return ReType.keep; } if (typeCode == otherType.typeCode) { - return scale >= otherType.scale ? 0 - : -1; + return scale >= otherType.scale ? ReType.keep + : ReType.change; } if (!otherType.isIntervalType()) { - return -1; + return ReType.change; } if (isYearMonth == ((IntervalType) otherType).isYearMonth) { if (scale < otherType.scale) { - return -1; + return ReType.change; } if (endPartIndex >= ((IntervalType) otherType).endPartIndex) { if (precision >= otherType.precision) { if (startPartIndex <= ((IntervalType) otherType).startPartIndex) { - return 0; + return ReType.keep; } } - return 1; + return ReType.check; } } - return -1; + return ReType.change; } public int compareToTypeRange(Object o) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/LongPair.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/LongPair.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/LongPair.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/LongPair.java 2022-02-21 14:41:50.000000000 +0000 @@ -0,0 +1,43 @@ +/* Copyright (c) 2001-2021, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.types; + +public final class LongPair { + + public long a; + public long b; + + public LongPair(long a, long b) { + this.a = a; + this.b = b; + } +} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/NumberType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/NumberType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/NumberType.java 2021-06-11 15:07:36.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/NumberType.java 2022-05-22 18:01:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,14 +41,13 @@ import org.hsqldb.Tokens; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; -import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.map.ValuePool; /** * Type subclass for all NUMBER types.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.6.1 + * @version 2.7.0 * @since 1.9.0 */ public final class NumberType extends Type { @@ -65,6 +64,7 @@ static final int decimalLiteralPrecision = 24; // + public static final int BIT_WIDTH = 1; public static final int TINYINT_WIDTH = 8; public static final int SMALLINT_WIDTH = 16; public static final int INTEGER_WIDTH = 32; @@ -1285,28 +1285,28 @@ public int canMoveFrom(Type otherType) { if (otherType == this) { - return 0; + return ReType.keep; } switch (typeCode) { case Types.TINYINT : if (otherType.typeCode == Types.SQL_SMALLINT) { - return 1; + return ReType.check; } break; case Types.SQL_SMALLINT : if (otherType.typeCode == typeCode || otherType.typeCode == Types.TINYINT) { - return 0; + return ReType.keep; } break; case Types.SQL_INTEGER : case Types.SQL_BIGINT : if (otherType.typeCode == typeCode) { - return 0; + return ReType.keep; } break; @@ -1316,9 +1316,9 @@ || otherType.typeCode == Types.SQL_NUMERIC) { if (scale == otherType.scale) { if (precision >= otherType.precision) { - return 0; + return ReType.keep; } else { - return 1; + return ReType.check; } } } @@ -1330,11 +1330,11 @@ if (otherType.typeCode == Types.SQL_REAL || otherType.typeCode == Types.SQL_FLOAT || otherType.typeCode == Types.SQL_DOUBLE) { - return 0; + return ReType.keep; } } - return -1; + return ReType.change; } public int compareToTypeRange(Object o) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/RowType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/RowType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/RowType.java 2019-05-24 13:39:04.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/RowType.java 2022-03-04 19:14:36.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ * Class for ROW type objects.

                    * * @author Fred Toussi (fredt@users dot sourceforge.net) - * @version 2.4.1 + * @version 2.7.0 * @since 2.0.0 */ public class RowType extends Type { @@ -246,6 +246,29 @@ return sb.toString(); } + public void convertToJSON(Object a, StringBuilder sb) { + + Object[] array = (Object[]) a; + + if (a == null) { + sb.append("null"); + + return; + } + + sb.append('{'); + + for (int i = 0; i < array.length; i++) { + if (i > 0) { + sb.append(','); + } + + dataTypes[i].convertToJSON(array[i], sb); + } + + sb.append('}'); + } + public boolean canConvertFrom(Type otherType) { if (otherType == null) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/Type.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/Type.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/types/Type.java 2021-01-29 13:34:34.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/types/Type.java 2022-03-04 20:50:54.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,6 +53,13 @@ */ public abstract class Type implements SchemaObject, Cloneable { + public interface ReType { + + int keep = 0; // only metadata change is required + int check = 1; // range check is also required + int change = -1; // data conversion is required + } + public static final Type[] emptyArray = new Type[]{}; // @@ -334,6 +341,19 @@ public abstract String convertToSQLString(Object a); + public void convertToJSON(Object a, StringBuilder sb) { + + if (a == null) { + sb.append("null"); + + return; + } + + String val = convertToString(a); + + sb.append(val); + } + public abstract boolean canConvertFrom(Type otherType); /** @@ -343,10 +363,10 @@ public int canMoveFrom(Type otherType) { if (otherType == this) { - return 0; + return ReType.keep; } - return -1; + return ReType.change; } public boolean canBeAssignedFrom(Type otherType) { @@ -631,6 +651,8 @@ public static final CharacterType SQL_VARCHAR_DEFAULT = new CharacterType(Types.SQL_VARCHAR, CharacterType.defaultVarcharPrecision); + public static final CharacterType SQL_VARCHAR_LONG = + new CharacterType(Types.SQL_VARCHAR, ClobType.defaultShortClobSize); public static final ClobType SQL_CLOB = new ClobType(ClobType.defaultClobSize); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/CodeSwitcher.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/CodeSwitcher.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/CodeSwitcher.java 2021-01-05 23:42:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/CodeSwitcher.java 2022-05-23 11:23:28.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -341,7 +341,7 @@ if (line.startsWith("//#")) { if (line.startsWith("//#ifdef ")) { if (state != 0) { - printError("'#ifdef' not allowed inside '#ifdef'"); + printError("'#ifdef' not allowed inside '#ifdef' at line " + i); return false; } @@ -350,10 +350,10 @@ String s = line.substring(9); - if (vSwitchOn.indexOf(s) != -1) { + if (vSwitchOn.contains(s)) { working = true; switchoff = false; - } else if (vSwitchOff.indexOf(s) != -1) { + } else if (vSwitchOff.contains(s)) { working = true; v.add(++i, "/*"); @@ -361,7 +361,7 @@ switchoff = true; } - if (vSwitches.indexOf(s) == -1) { + if (!vSwitches.contains(s)) { vSwitches.add(s); } } else if (line.startsWith("//#ifndef ")) { @@ -376,10 +376,10 @@ String s = line.substring(10); - if (vSwitchOff.indexOf(s) != -1) { + if (vSwitchOff.contains(s)) { working = true; switchoff = false; - } else if (vSwitchOn.indexOf(s) != -1) { + } else if (vSwitchOn.contains(s)) { working = true; v.add(++i, "/*"); @@ -387,7 +387,7 @@ switchoff = true; } - if (vSwitches.indexOf(s) == -1) { + if (!vSwitches.contains(s)) { vSwitches.add(s); } } else if (line.startsWith("//#else")) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/CommonSwing.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/CommonSwing.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/CommonSwing.java 2021-01-05 22:06:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/CommonSwing.java 2022-05-23 11:22:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,13 +56,13 @@ */ final class CommonSwing { - protected static final String messagerHeader = + static final String messagerHeader = "Database Manager Swing Error"; - protected static final String Native = "Native"; - protected static final String Java = "Java"; - protected static final String Motif = "Motif"; - protected static String plaf = "plaf"; - protected static String GTK = "GTK"; + static final String Native = "Native"; + static final String Java = "Java"; + static final String Motif = "Motif"; + static String plaf = "plaf"; + static String GTK = "GTK"; // (ulrivo): An actual Image. static Image getIcon(String target) { @@ -106,7 +106,7 @@ } // (weconsultants@users: Callable errorMessage method - protected static void errorMessage(String errorMessage) { + static void errorMessage(String errorMessage) { /* * Display Jpanel Error messages any text Errors. Overloads diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/ConnectionDialogCommon.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/ConnectionDialogCommon.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/ConnectionDialogCommon.java 2021-02-09 04:50:50.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/ConnectionDialogCommon.java 2022-06-03 13:24:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ * New class based on Hypersonic original * * @author Thomas Mueller (Hypersonic SQL Group) - * @version 1.7.2 + * @version 2.7.0 * @since 1.7.0 */ final class ConnectionDialogCommon { @@ -210,10 +210,10 @@ // reached end of file -- this is not clean but it works } catch (ClassNotFoundException cnfe) { throw new IOException("Unrecognized class type " - + cnfe.getMessage()); + + cnfe.getMessage(), cnfe); } catch (ClassCastException cce) { throw new IOException("Unrecognized class type " - + cce.getMessage()); + + cce.getMessage(), cce); } catch (Throwable t) {} finally { if (objStream != null) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/ConnectionSetting.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/ConnectionSetting.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/ConnectionSetting.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/ConnectionSetting.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,7 +63,6 @@ // Constructors private ConnectionSetting() {} - ; ConnectionSetting(String name, String driver, String url, String user, String pw) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DataAccessPoint.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DataAccessPoint.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DataAccessPoint.java 2021-02-09 04:49:40.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DataAccessPoint.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ tracer = t; helper = HelperFactory.getHelper(""); - helper.set(null, t, "\'"); + helper.set(null, t, "'"); databaseToConvert = ""; } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DatabaseManagerCommon.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DatabaseManagerCommon.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DatabaseManagerCommon.java 2021-01-05 22:08:12.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DatabaseManagerCommon.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -227,9 +227,7 @@ // drop table may fail try { sStatement.execute(demo[i]); - } catch (SQLException e) { - ; - } + } catch (SQLException e) {} } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DatabaseManager.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DatabaseManager.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DatabaseManager.java 2021-06-17 22:25:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DatabaseManager.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,6 @@ package org.hsqldb.util; -import java.applet.Applet; import java.io.File; import java.io.IOException; import java.io.PrintWriter; @@ -43,6 +42,7 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; + import java.awt.BorderLayout; import java.awt.Button; import java.awt.Color; @@ -122,13 +122,13 @@ "See the forums, mailing lists, and HSQLDB User Guide\n" + "at http://hsqldb.org.\n\n" + "Please paste the following version identifier with any\n" - + "problem reports or help requests: $Revision: 6351 $" + + "problem reports or help requests: $Revision: 6494 $" + (TT_AVAILABLE ? "" : ("\n\nTransferTool classes are not in CLASSPATH.\n" + "To enable the Tools menu, add 'transfer.jar' to your class path.")); - ; + private static final String ABOUT_TEXT = - "$Revision: 6351 $ of DatabaseManager\n\n" + "$Revision: 6494 $ of DatabaseManager\n\n" + "Copyright (c) 1995-2000, The Hypersonic SQL Group.\n" + "Copyright (c) 2001-2021, The HSQL Development Group.\n" + "http://hsqldb.org (User Guide available at this site).\n\n\n" diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DatabaseManagerSwing.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DatabaseManagerSwing.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/DatabaseManagerSwing.java 2021-01-29 13:39:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/DatabaseManagerSwing.java 2022-06-03 13:24:24.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -149,7 +149,7 @@ * * @author dmarshall@users * @author Bob Preston (sqlbob@users dot sourceforge.net) - * @version 2.6.0 + * @version 2.7.0 * @since 1.7.0 */ public class DatabaseManagerSwing extends JFrame @@ -195,14 +195,14 @@ "See the HSQLDB Utilities Guide, forums and mailing lists \n" + "at http://hsqldb.org.\n\n" + "Please paste the following version identifier with any\n" - + "problem reports or help requests: $Revision: 6271 $" + + "problem reports or help requests: $Revision: 6544 $" + (TT_AVAILABLE ? "" : ("\n\nTransferTool classes are not in CLASSPATH.\n" + "To enable the Tools menu, add 'transfer.jar' " + "to your class path.")); private static final String ABOUT_TEXT = - "$Revision: 6271 $ of DatabaseManagerSwing\n\n" - + "Copyright (c) 2001-2021, The HSQL Development Group.\n" + "$Revision: 6544 $ of DatabaseManagerSwing\n\n" + + "Copyright (c) 2001-2022, The HSQL Development Group.\n" + "http://hsqldb.org (Utilities Guide available at this site).\n\n\n" + "You may use and redistribute according to the HSQLDB\n" + "license documented in the source code and at the web\n" @@ -329,6 +329,7 @@ /** * Run with --help switch for usage instructions. * + * @param arg arguments * @throws IllegalArgumentException for the obvious reason */ public static void main(String[] arg) { @@ -461,9 +462,11 @@ } /** - * This stuff is all quick, except for the refreshTree(). - * This unit can be kicked off in main Gui thread. The refreshTree - * will be backgrounded and this method will return. + * This stuff is all quick, except for the refreshTree(). This unit can be + * kicked off in main Gui thread. The refreshTree will be backgrounded and + * this method will return. + * + * @param c Connection */ public void connect(Connection c) { @@ -1999,7 +2002,7 @@ result += " WHERE " + quoteObjectName(column); if (isChar) { - result += " LIKE \'%%\'"; + result += " LIKE '%%'"; } else { result += " = "; } @@ -2037,7 +2040,7 @@ result += " WHERE " + quoteObjectName(column); if (isChar) { - result += " LIKE \'%%\'"; + result += " LIKE '%%'"; } else { result += " = "; } @@ -2087,7 +2090,7 @@ // in the string. Makes is more obvious to the user when // they need to use a string if (childName.contains("CHAR")) { - quote = "\'\'"; + quote = "''"; } else { quote = ""; } @@ -2821,7 +2824,7 @@ } catch (IOException ioe) { throw new IOException("Failed to read preferences file '" + prefsFile + "': " - + ioe.getMessage()); + + ioe.getMessage(), ioe); } tmpString = props.getProperty("autoRefresh"); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/HsqldbTransferHelper.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/HsqldbTransferHelper.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/HsqldbTransferHelper.java 2021-02-09 04:49:14.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/HsqldbTransferHelper.java 2022-05-23 11:24:48.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,6 @@ import java.sql.ResultSet; import java.sql.ResultSetMetaData; -import java.sql.SQLException; import java.sql.Types; // sqlbob@users 20020325 - patch 1.7.0 - reengineering @@ -93,14 +92,14 @@ String fixupColumnDefRead(String aTableName, ResultSetMetaData meta, String columnType, ResultSet columnDesc, - int columnIndex) throws SQLException { + int columnIndex) { return fixupColumnDefRead((TransferTable) null, meta, columnType, columnDesc, columnIndex); } String fixupColumnDefWrite(String aTableName, ResultSetMetaData meta, String columnType, ResultSet columnDesc, - int columnIndex) throws SQLException { + int columnIndex) { return fixupColumnDefWrite((TransferTable) null, meta, columnType, columnDesc, columnIndex); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/MainInvoker.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/MainInvoker.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/MainInvoker.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/MainInvoker.java 2022-05-17 12:18:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,7 +42,7 @@ * * @author Blaine Simpson (blaine dot simpson at admc dot com) * @since HSQLDB 1.8.0 - * @version $Revision: 6266 $, $Date: 2021-01-25 16:08:06 +0000 (Mon, 25 Jan 2021) $ + * @version $Revision: 6509 $, $Date: 2022-05-17 14:18:08 +0100 (Tue, 17 May 2022) $ */ public class MainInvoker { @@ -124,6 +124,13 @@ /** * Invokes the static main(String[]) method from each specified class. + * + * @param className String + * @param args String[] + * @throws ClassNotFoundException if not found + * @throws NoSuchMethodException if not found + * @throws IllegalAccessException on no access + * @throws InvocationTargetException on invocation failure */ public static void invoke(String className, String[] args) diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/McKoiTransferHelper.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/McKoiTransferHelper.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/McKoiTransferHelper.java 2021-02-09 04:50:32.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/McKoiTransferHelper.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,6 @@ import java.sql.ResultSet; import java.sql.ResultSetMetaData; -import java.sql.SQLException; /** * Helper class for conversion from a different databases @@ -51,7 +50,7 @@ String columnType, ResultSet columnDesc, int columnIndex) { - String CompareString = "UNIQUEKEY(\'" + t.Stmts.sDestTable + "\'"; + String CompareString = "UNIQUEKEY('" + t.Stmts.sDestTable + "'"; if (columnType.indexOf(CompareString) > 0) { @@ -71,8 +70,8 @@ int columnIndex) { if (columnType.equals("SERIAL")) { - columnType = "INTEGER DEFAULT UNIQUEKEY (\'" - + t.Stmts.sSourceTable + "\')"; + columnType = "INTEGER DEFAULT UNIQUEKEY ('" + + t.Stmts.sSourceTable + "')"; } return (columnType); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/OracleTransferHelper.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/OracleTransferHelper.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/OracleTransferHelper.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/OracleTransferHelper.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ private static final int HSQLDB = 1; String[][] Funcs = { { - "now()", "\'now\'" + "now()", "'now'" } }; @@ -155,7 +155,7 @@ SeqName = aTableName + SeqName; } - String CompareString = "nextval(\'\"" + SeqName + "\"\'"; + String CompareString = "nextval('\"" + SeqName + "\"'"; if (columnType.contains(CompareString)) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/PostgresTransferHelper.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/PostgresTransferHelper.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/PostgresTransferHelper.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/PostgresTransferHelper.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ private static final int HSQLDB = 1; String[][] Funcs = { { - "now()", "\'now\'" + "now()", "'now'" } }; @@ -87,7 +87,7 @@ SeqName = t.Stmts.sDestTable + SeqName; } - String CompareString = "nextval(\'\"" + SeqName + "\"\'"; + String CompareString = "nextval('\"" + SeqName + "\"'"; if (columnType.contains(CompareString)) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/AntResolver.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/AntResolver.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/AntResolver.java 2018-10-23 07:24:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/AntResolver.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the HSQL Development Group nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -package org.hsqldb.util.preprocessor; - -import java.io.File; -import org.apache.tools.ant.Project; - -/* $Id: AntResolver.java 5793 2018-01-06 13:12:38Z fredt $ */ - -/** - * Resolves properties and paths using an ANT Project. - * - * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 - * @since 1.8.1 - */ -class AntResolver implements IResolver { - - private Project project; - - /** Creates a new instance of AntResolver */ - public AntResolver(Project project) { - this.project = project; - } - - public String resolveProperties(String expression) { - return this.project.replaceProperties(expression); - } - - public File resolveFile(String path) { - return this.project.resolveFile(path); - } -} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/BasicResolver.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/BasicResolver.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/BasicResolver.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/BasicResolver.java 2022-04-12 08:47:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,47 +34,104 @@ import java.io.File; import java.io.IOException; -/* $Id: BasicResolver.java 5793 2018-01-06 13:12:38Z fredt $ */ - +/* + * $Id: BasicResolver.java 6480 2022-04-12 09:46:56Z fredt $ + */ /** * Resolves paths using a parent directory; does not resolve properties. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 + * @version 2.7.0 * @since 1.8.1 */ -class BasicResolver implements IResolver { - File parentDir; +@SuppressWarnings("ClassWithoutLogger") +public class BasicResolver implements IResolver { - public BasicResolver(File parentDir) { + /** + * creates a new resolver rooted at the given path or its parent. + * + * @param path for resolving other abstract paths. + * @return a new instance. + * @throws IllegalArgumentException if the path is not a directory, cannot + * be created as a directory, does not have + * a parent and a parent cannot be created + * as a directory, of if the file exist and + * is not a file or a directory. + * + */ + public static IResolver forPath(final String path) { + if (path == null) { + return new BasicResolver(null); + } else if (path.isEmpty()) { + return new BasicResolver(new File("")); + } + final File file = new File(path); + if (!file.exists()) { + if (file.mkdirs()) { + return new BasicResolver(file); + } else { + throw new IllegalArgumentException("could not makedirs for: " + + file.getAbsolutePath()); + } + } else if (file.isDirectory()) { + return new BasicResolver(file); + } else if (file.isFile()) { + final File parentFile = file.getParentFile(); + if (parentFile == null) { + throw new IllegalArgumentException("path is not a directory" + + " and has no parent: " + file.getAbsolutePath()); + } else if (parentFile.isFile()) { + throw new IllegalArgumentException("parent path is a file: " + + parentFile.getAbsolutePath()); + } else if (parentFile.isDirectory()) { + return new BasicResolver(file); + } else if (parentFile.exists()) { + throw new IllegalArgumentException("parent path exists but" + + " is not a file or directory: " + + file.getAbsolutePath()); + } else if (parentFile.mkdirs()) { + return new BasicResolver(parentFile); + } else { + throw new IllegalArgumentException("could not makedirs for: " + + parentFile.getAbsolutePath()); + } + } else { + throw new IllegalArgumentException("path exists but is not a file" + + " or a directory: " + file.getAbsolutePath()); + } + } + + private final File parentDir; + + public BasicResolver() { + this(null); + } + + public BasicResolver(final File parentDir) { this.parentDir = parentDir; } - public String resolveProperties(String expression) { + @Override + public String resolveProperties(final String expression) { return expression; } - public File resolveFile(String path) { - File file = new File(path); - if (parentDir != null && !file.isAbsolute()) { + @Override + public File resolveFile(final String path) { + final File dir = this.parentDir; + final String actualPath = path == null || path.isEmpty() ? "" : path; + File file = new File(actualPath); + if (dir != null && !file.isAbsolute()) { try { - path = this.parentDir.getCanonicalPath() - + File.separatorChar - + path; - - file = new File(path); + file = new File(dir.getCanonicalFile(), file.getPath()); } catch (IOException ex) { - path = this.parentDir.getAbsolutePath() - + File.separatorChar - + path; - - file = new File(path); + file = new File(dir.getAbsoluteFile(), file.getPath()); } } try { return file.getCanonicalFile(); - } catch (Exception e) { + } catch (IOException e) { return file.getAbsoluteFile(); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Defines.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Defines.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Defines.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Defines.java 2022-06-08 10:09:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,118 +31,161 @@ package org.hsqldb.util.preprocessor; -import java.util.Hashtable; - -/* $Id: Defines.java 5793 2018-01-06 13:12:38Z fredt $ */ +import java.util.HashMap; +import java.util.Map; +/* + * $Id: Defines.java 6550 2022-06-08 11:09:08Z fredt $ + */ /** - * Simple preprocessor symbol table. + * A simple Preprocessor symbol table. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 + * @version 2.7.0 * @since 1.8.1 */ -class Defines { - private Hashtable symbols = new Hashtable(); +@SuppressWarnings("ClassWithoutLogger") +public class Defines { - public Defines() {} + private final Map symbols; - public Defines(String csvExpressions) throws PreprocessorException { - defineCSV(csvExpressions); + /** + * Constructs a new, empty instance. + */ + public Defines() { + this.symbols = new HashMap<>(16); + } + + /** + * Constructs a new instance initially defined using the comma-separated + * list of Preprocessor expressions. + * + * @param csvExpressions a comma-separated list of Preprocessor expressions; + * may be {@code null} or empty, in which case no + * symbols are added. + * @throws PreprocessorException if the given list contains an illegal + * expression. + * @see #defineCSV(String) + */ + public Defines(final String csvExpressions) throws PreprocessorException { + this(); + if (csvExpressions != null && !csvExpressions.isEmpty()) { + final Defines target = this; + target.defineCSV(csvExpressions); + } } + /** + * removes all defined symbols. + */ public void clear() { this.symbols.clear(); } - public void defineCSV(String csvExpressions) - throws PreprocessorException { - if (csvExpressions != null) { - csvExpressions = csvExpressions + ','; - - int start = 0; - int len = csvExpressions.length(); - - while (start < len) { - int end = csvExpressions.indexOf(',', start); - String expr = csvExpressions.substring(start, end).trim(); - - if (expr.length() > 0) { - defineSingle(expr); - } - - start = end + 1; - } + /** + * adds the given comma-separated list of Preprocessor expressions to the + * symbol table. + * + * @param csvExpressions a comma-separated list of Preprocessor expressions; + * may be {@code null} or empty, in which case no + * symbols are added. + * @throws PreprocessorException if the given list contains an illegal + * expression. + */ + public void defineCSV(final String csvExpressions) + throws PreprocessorException { + if (csvExpressions == null || csvExpressions.isEmpty()) { + return; + } + final String tce = csvExpressions.trim() + ','; + int start = 0; + int len = tce.length(); + while (start < len) { + final int end = tce.indexOf(',', start); + final String expr = tce.substring(start, end).trim(); + if (!expr.isEmpty()) { + defineSingle(expr); + } + start = end + 1; } } - public void defineSingle(String expression) throws PreprocessorException { - Tokenizer tokenizer = new Tokenizer(expression); - + /** + * adds a single Preprocessor expression to the symbol table. + * + * @param expression to add; may be {@code null} or empty, in which case no + * action is taken. + * @throws PreprocessorException if the given expression is illegal or has + * trailing tokens. + */ + public void defineSingle(final String expression) throws PreprocessorException { + if (expression == null || expression.isEmpty()) { + return; + } + final Tokenizer tokenizer = new Tokenizer(expression); tokenizer.next(); - if (!tokenizer.isToken(Token.IDENT)) { throw new PreprocessorException("IDENT token required at position: " + tokenizer.getStartIndex() + " in [" - + expression + - "]"); // NOI18N + + expression + + "]"); // NOI18N } - String ident = tokenizer.getIdent(); + final String ident = tokenizer.getIdent(); int tokenType = tokenizer.next(); - switch(tokenType) { - case Token.EOI : { + switch (tokenType) { + case Token.EOI: { this.symbols.put(ident, ident); return; } - case Token.ASSIGN : { + case Token.ASSIGN: { tokenType = tokenizer.next(); break; } - default : { + default: { break; } } - switch(tokenType) { - case Token.NUMBER : { - Number number = tokenizer.getNumber(); + switch (tokenType) { + case Token.NUMBER: { + final Number number = tokenizer.getNumber(); this.symbols.put(ident, number); break; } - case Token.STRING : { - String string = tokenizer.getString(); + case Token.STRING: { + final String string = tokenizer.getString(); this.symbols.put(ident, string); break; } - case Token.IDENT : { - String rhsIdent = tokenizer.getIdent(); + case Token.IDENT: { + final String rhsIdent = tokenizer.getIdent(); if (!isDefined(rhsIdent)) { - throw new PreprocessorException("Right hand side" + - "IDENT token [" + rhsIdent + "] at position: " + throw new PreprocessorException("Right hand side" + + "IDENT token [" + rhsIdent + "] at position: " + tokenizer.getStartIndex() + " is undefined in [" + expression + "]"); // NOI18N } - Object value = this.symbols.get(rhsIdent); + final Object value = this.symbols.get(rhsIdent); symbols.put(ident, value); break; } - default : { + default: { throw new PreprocessorException("Right hand side NUMBER," - + "STRING or IDENT token required at position: " + - + tokenizer.getStartIndex() + + "STRING or IDENT token required at position: " + + +tokenizer.getStartIndex() + " in [" + expression + "]"); // NOI18N @@ -161,26 +204,32 @@ } } - public void undefine(String symbol) { + public void undefine(final String symbol) { this.symbols.remove(symbol); } - public boolean isDefined(String symbol) { - return this.symbols.containsKey(symbol); + public boolean isDefined(final String symbol) { + return symbol == null || symbol.isEmpty() + ? false + : this.symbols.containsKey(symbol); } - public Object getDefintion(String symbol) { - return this.symbols.get(symbol); + public Object getDefintion(final String symbol) { + return symbol == null || symbol.isEmpty() + ? null + : this.symbols.get(symbol); } - public boolean evaluate(String expression) throws PreprocessorException { - Tokenizer tokenizer = new Tokenizer(expression); + public boolean evaluate(final String expression) throws PreprocessorException { + if (expression == null || expression.isEmpty()) { + return false; + } + final Tokenizer tokenizer = new Tokenizer(expression); tokenizer.next(); - Parser parser = new Parser(this, tokenizer); - - boolean result = parser.parseExpression(); + final Parser parser = new Parser(this, tokenizer); + final boolean result = parser.parseExpression(); if (!tokenizer.isToken(Token.EOI)) { throw new PreprocessorException("Illegal trailing " @@ -194,6 +243,7 @@ return result; } + @Override public String toString() { return super.toString() + this.symbols.toString(); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Document.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Document.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Document.java 2018-10-23 07:24:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Document.java 2022-06-08 10:09:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,165 +42,354 @@ import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; -import java.io.UnsupportedEncodingException; import java.io.Writer; -import java.util.Vector; - -/* $Id: Document.java 5793 2018-01-06 13:12:38Z fredt $ */ +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.List; +/* + * $Id: Document.java 6550 2022-06-08 11:09:08Z fredt $ + */ /** * Simple line-oriented text document ADT. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 + * @version 2.7.0 * @since 1.8.1 */ -class Document { - Vector lines = new Vector(); +@SuppressWarnings("ClassWithoutLogger") +public class Document { - Document() {} - - Document(Document source) { - this.appendDocument(source); + /** + * for the given character set name. + * + * @param charsetName to test; {@code null} returns {@code false}. + * @return {@code true} if supported, else {@code false}. + */ + public static boolean isSupportedCharset(final String charsetName) { + return charsetName != null + && !charsetName.trim().isEmpty() + && Charset.isSupported(charsetName); + } + + private final List lines; + + /** + * constructs a new, empty instance. + */ + public Document() { + this.lines = new ArrayList<>(16); + } + + /** + * Constructs a new instance that is effectively a copy of {@code source}. + * + * @param source to copy; may be {@code null}, which is treated like an + * {@code empty} instance. + */ + public Document(final Document source) { + this(); + if (source != null) { + final Document target = this; + target.appendDocument(source); + } } - Document addSouceLine(String line) { + /** + * to this instance. + * + * @param line to add; must not be {@code null}. + * @return this instance. + * @throws IllegalArgumentException if {@code line} is {@code null}. + */ + public Document addSouceLine(final String line) { if (line == null) { throw new IllegalArgumentException("line: null"); } - - this.lines.addElement(line); - + this.lines.add(line); return this; } - Document appendDocument(Document doc) { - if (doc != null) { - int count = doc.size(); - Vector src = doc.lines; - Vector dst = this.lines; - - for (int i = 0; i < count; i++) { - dst.addElement(src.elementAt(i)); - } + /** + * to this instance. + * + * @param source to append; may be {@code null}, which is treated like an + * {@code empty} instance. + * @return this instance + */ + @SuppressWarnings("AccessingNonPublicFieldOfAnotherObject") + public Document appendDocument(final Document source) { + if (source != null && source.size() > 0) { + this.lines.addAll(source.lines); } - return this; } - Document clear() { - this.lines.removeAllElements(); - + /** + * this instance, making it {@link #isEmpty() empty}. + * + * @return this instance. + */ + public Document clear() { + this.lines.clear(); return this; } - boolean contains(String pattern) { - Vector lines = this.lines; - int size = lines.size(); - + /** + * if at least one line in this instance contains the given sequence. + *

                    + * Note: each line is tested separately; no test is performed to see + * if the sequence spans more than one line. + *

                    + * + * @param sequence to test. + * @return {@code true} if the condition holds, else {@code false}. + */ + public boolean contains(final CharSequence sequence) { + if (sequence == null) { + return false; + } + final String toFind = sequence.toString(); + final List list = this.lines; + final int size = list.size(); for (int i = 0; i < size; i++) { - if (((String)lines.elementAt(i)).indexOf(pattern) >= 0) { + if (-1 < list.get(i).indexOf(toFind, 0)) { return true; } } - return false; } - Document deleteSourceLine(int index) { - this.lines.removeElementAt(index); - + /** + * from this instance at the given index. + * + * @param index at which to remove a line. + * @return this instance. + * @throws IndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size())} + */ + public Document deleteSourceLine(final int index) { + this.lines.remove(index); return this; } - public boolean equals(Object o) { - if (this == o) { - return true; - } else if (o instanceof Document) { - Document other = (Document) o; - - Vector v1 = this.lines; - Vector v2 = other.lines; - - if (v1.size() != v2.size()) { - return false; - } - - for (int i = v1.size() - 1; i >= 0; i--) { - if (v1.elementAt(i).equals(v2.elementAt(i))) { - continue; - } else { - return false; - } - } - - return true; - } else { - return false; - } - } - - String getSourceLine(int index) { - return (String) this.lines.elementAt(index); - } - - Document insertSourceLine(int index, String line) { + /** + * if the given document has effectively the same content as this instance. + * + * @param document to test; may be {@code null}, which is treated as + * {@link #isEmpty() empty}. + * @return {@code true} if the content of the given {@code document} is + * equal to the content of this instance, as per + * {@link List#equals(Object)}. + */ + @SuppressWarnings("AccessingNonPublicFieldOfAnotherObject") + public boolean contentEquals(final Document document) { + return (document == this) + ? true + : document == null + ? this.isEmpty() + : this.lines.equals(document.lines); + } + + /** + * at the given index. + * + * @param index at which to retrieve the line. + * @return the line at the given index. + * @throws IndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) + */ + public String getSourceLine(final int index) { + return this.lines.get(index); + } + + /** + * if this instance contains no lines. + * + * @return {@code true} if {@link #size()} {@code == 0}, else {@code false}. + */ + public boolean isEmpty() { + return this.lines.isEmpty(); + } + + /** + * at the specified index. + * + * @param index at which the specified line is to be inserted + * @param line to be inserted + * @return this instance + * @throws NullPointerException if the specified line is {@code null}. + * @throws IndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) + */ + public Document insertSourceLine(final int index, final String line) { if (line == null) { throw new IllegalArgumentException("line: null"); } - - this.lines.insertElementAt(line, index); - + this.lines.add(index, line); return this; } - Document replaceWith(Document source) { + /** + * as if by invoking {@code this.clear().appendDocument(source)}. + * + * @param source content used to replace the existing content of this + * instance; may be {@code null}, which is treated as + * {@link #isEmpty() empty}. + * @return this instance. + */ + public Document replaceWith(final Document source) { return this.clear().appendDocument(source); } - Document setSourceLine(int index, String line) { + /** + * at the specified index in this instance. + * + * @param index index of the line to replace + * @param line to be stored at the specified index + * @return this instance. + * @throws NullPointerException if the specified line is {@code null}. + * @throws IndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) + */ + public Document setSourceLine(final int index, final String line) { if (line == null) { throw new IllegalArgumentException("null"); } - - this.lines.setElementAt(line, index); - + this.lines.set(index, line); return this; } - int size() { + /** + * of this instance, as the number of lines. + * + * @return the number of lines in this instance. + */ + public int size() { return this.lines.size(); } // ------------------------ I/O convenience methods ---------------------------- - - Document load(Object source, String encoding) throws IOException, - UnsupportedEncodingException{ + /** + * this instance from the given input stream using the given character + * encoding. + *

                    + * Note: it is the responsibility of the caller to close the input + * stream. + *

                    + * + * @param inputStream from which to load; must not be {@code null}. + * @param encoding {@code null} for the system default. + * @return this object. + * @throws IOException if an I/O error occurs. + * @throws IllegalArgumentException if the encoding is not supported. + * @throws NullPointerException if the inputStream is {@code null}. + */ + public Document load(final InputStream inputStream, final String encoding) throws IOException, + IllegalArgumentException, NullPointerException { + return load((Object) inputStream, encoding); + } + + /** + * this instance from the given reader. + *

                    + * Note: it is the responsibility of the caller to close the reader. + *

                    + * + * @param reader from which to load; must not be {@code null}. + * @return this object. + * @throws IOException in an I/O error occurs. + * @throws NullPointerException if the reader is {@code null}. + */ + public Document load(final Reader reader) throws IOException, + NullPointerException { + return load(reader, null); + } + + /** + * this instance from the given file using the given character encoding. + *

                    + * Note: the underlying file input stream is closed automatically. + *

                    + * + * @param file from which to load; {@code null} is treated the empty + * path. + * @param encoding {@code null} for the system default. + * @return this object. + * @throws IOException in an I/O error occurs. + * @throws IllegalArgumentException if the encoding is not supported. + */ + public Document load(final File file, final String encoding) throws IOException, + IllegalArgumentException { + return load((Object) (file == null ? new File("") : file), encoding); + } + + /** + * this instance from the given abstract file path using the given character + * encoding. + *

                    + * Note: the underlying file input stream is closed automatically. + *

                    + * + * @param path from which to load; {@code null} is treated the empty + * path. + * @param encoding {@code null} for the system default. + * @return this object. + * @throws IOException in an I/O error occurs. + * @throws IllegalArgumentException if the encoding is not supported. + */ + public Document load(final String path, final String encoding) throws IOException, + IllegalArgumentException { + return load((Object) (path == null ? "" : path), encoding); + } + + /** + * this instance from the given source. + *

                    + * Note: if the source is an InputStream or Reader, it is the + * responsibility of the caller to close; otherwise, the underlying file + * input stream is closed automatically. + *

                    + * + * @param source required; by default, must be an instance of an + * InputStream, Reader, File, or String denoting an + * abstract file path. + * @param encoding optional; ignored if source is a Writer. {@code null} is + * taken to be {@link Charset#defaultCharset()}. + * @return this instance. + * @throws IOException if an I/O error occurs. + * @throws NullPointerException if source is {@code null}. + * @throws IllegalArgumentException if the encoding is not supported. + */ + @SuppressWarnings("NestedAssignment") + protected Document load(final Object source, final String encoding) throws IOException, + NullPointerException, + IllegalArgumentException { + if (source == null) { + throw new NullPointerException("source must not be null."); + } + Charset charset = (source instanceof Reader || encoding == null) + ? Charset.defaultCharset() : null; + if (charset == null && isSupportedCharset(encoding)) { + charset = Charset.forName(encoding); + } else { + throw new IllegalArgumentException("encoding: " + encoding); + } BufferedReader reader = null; - boolean close = false; - + boolean close = false; if (source instanceof InputStream) { - InputStream is = (InputStream) source; - InputStreamReader isr = isEncoding(encoding) - ? new InputStreamReader(is, encoding) - : new InputStreamReader(is); - + final InputStream is = (InputStream) source; + final InputStreamReader isr = new InputStreamReader(is, charset); reader = new BufferedReader(isr); } else if (source instanceof File) { - InputStream is = new FileInputStream((File) source); - InputStreamReader isr = isEncoding(encoding) - ? new InputStreamReader(is, encoding) - : new InputStreamReader(is); - - close = true; + final InputStream fis = new FileInputStream((File) source); + final InputStreamReader isr = new InputStreamReader(fis, charset); + close = true; reader = new BufferedReader(isr); } else if (source instanceof String) { - InputStream is = new FileInputStream((String) source); - InputStreamReader isr = isEncoding(encoding) - ? new InputStreamReader(is, encoding) - : new InputStreamReader(is); - - close = true; + final InputStream fis = new FileInputStream((String) source); + final InputStreamReader isr = new InputStreamReader(fis, charset); + close = true; reader = new BufferedReader(isr); } else if (source instanceof BufferedReader) { reader = (BufferedReader) source; @@ -209,84 +398,154 @@ } else { throw new IOException("unhandled load source: " + source); // NOI18N } - clear(); - String line; - Vector lines = this.lines; - + final List list = this.lines; try { - while(null != (line = reader.readLine())) { - lines.addElement(line); + while (null != (line = reader.readLine())) { + list.add(line); } } finally { if (close) { try { reader.close(); - } catch (IOException ex) {} + } catch (IOException ex) { + } } } - return this; } - Document save(Object target, String encoding) throws IOException { + /** + * to the given output stream using the given character encoding. + *

                    + * Note: it is the responsibility of the caller to close the output + * stream. + *

                    + * + * @param outputStream to which to save; must not be {@code null}. + * @param encoding {@code null} for the system default. + * @return this object. + * @throws IOException if an I/O error occurs. + * @throws IllegalArgumentException if the encoding is not supported. + * @throws NullPointerException if the output stream is {@code null}. + */ + public Document save(final OutputStream outputStream, final String encoding) throws IOException { + return save((Object) outputStream, encoding); + } + + /** + * to the given file using the given character encoding. + * + * @param file to which to save; {@code null} is treated as having an + * empty path + * @param encoding {@code null} for the system default. + * @return this object. + * @throws IOException if an I/O error occurs. + * @throws IllegalArgumentException if the encoding is not supported. + */ + public Document save(final File file, final String encoding) throws IOException, + IllegalArgumentException { + return save((Object) (file == null ? new File("") : file), encoding); + } + + /** + * to the given abstract file path using the given character encoding. + * + * @param path to which to save; {@code null} is treated as the empty + * path; + * @param encoding {@code null} for the system default. + * @return this object. + * @throws IOException if an I/O error occurs. + * @throws IllegalArgumentException if the encoding is not supported. + */ + public Document save(final String path, final String encoding) throws IOException, + IllegalArgumentException { + return save((Object) (path == null ? "" : path), encoding); + } + + /** + * to the given writer. + *

                    + * Note: it is the responsibility of the caller to close the writer. + *

                    + * + * @param writer to which to save; must not be {@code null}. + * @return this object. + * @throws IOException if an I/O error occurs. + * @throws NullPointerException if the writer is {@code null}. + */ + public Document save(final Writer writer) throws IOException { + return save(writer, null); + } + + /** + * this instance to the given target. + *

                    + * Note: if the target is an OutputStream or Writer, it is the + * responsibility of the caller to close; otherwise, the underlying file + * output stream is closed automatically. + *

                    + * + * @param target required; by default, must be an instance of an + * OutputStream, Writer, File, or String denoting an + * abstract file path. + * @param encoding optional; does not apply to Writer. {@code null} is taken + * to be {@link Charset#defaultCharset()}. + * @return this instance. + * @throws IOException if an I/O error occurs. + * @throws NullPointerException if target is {@code null}. + */ + protected Document save(final Object target, final String encoding) throws IOException { + if (target == null) { + throw new NullPointerException("target must not be null."); + } + Charset charset = (target instanceof Writer || encoding == null) + ? Charset.defaultCharset() : null; + if (charset == null && isSupportedCharset(encoding)) { + charset = Charset.forName(encoding); + } else { + throw new IllegalArgumentException("encoding: " + encoding); + } BufferedWriter writer = null; - boolean close = false; - + boolean close = false; if (target instanceof OutputStream) { - OutputStream os = (OutputStream) target; - OutputStreamWriter osr = isEncoding(encoding) - ? new OutputStreamWriter(os, encoding) - : new OutputStreamWriter(os); - - writer = new BufferedWriter(osr); + final OutputStream os = (OutputStream) target; + final OutputStreamWriter osw = new OutputStreamWriter(os, charset); + writer = new BufferedWriter(osw); } else if (target instanceof File) { - OutputStream os = new FileOutputStream((File) target); - OutputStreamWriter osr = isEncoding(encoding) - ? new OutputStreamWriter(os, encoding) - : new OutputStreamWriter(os); - - close = true; - writer = new BufferedWriter(osr); + final OutputStream fos = new FileOutputStream((File) target); + final OutputStreamWriter osw = new OutputStreamWriter(fos, charset); + close = true; + writer = new BufferedWriter(osw); } else if (target instanceof String) { - OutputStream os = new FileOutputStream((String) target); - OutputStreamWriter osr = isEncoding(encoding) - ? new OutputStreamWriter(os, encoding) - : new OutputStreamWriter(os); - - close = true; - writer = new BufferedWriter(osr); + OutputStream fos = new FileOutputStream((String) target); + final OutputStreamWriter osw = new OutputStreamWriter(fos, charset); + close = true; + writer = new BufferedWriter(osw); } else if (target instanceof BufferedWriter) { writer = (BufferedWriter) target; } else if (target instanceof Writer) { writer = new BufferedWriter(writer); } else { - throw new IOException("unhandled save target: " + target); // NOI18N + throw new IOException("unhandled save target: " + target); } - - Vector lines = this.lines; - int count = lines.size(); - + final List list = this.lines; + final int count = list.size(); try { for (int i = 0; i < count; i++) { - writer.write((String)lines.elementAt(i)); + writer.write(list.get(i)); writer.newLine(); } - writer.flush(); } finally { if (close) { try { writer.close(); - } catch (IOException ex) {} + } catch (IOException ignored) { + } } } - return this; } - - static boolean isEncoding(String enc) { - return enc != null && enc.trim().length() > 0; - } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Line.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Line.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Line.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Line.java 2022-04-12 08:47:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,30 +31,48 @@ package org.hsqldb.util.preprocessor; -/* $Id: Line.java 5793 2018-01-06 13:12:38Z fredt $ */ - +/* + * $Id: Line.java 6480 2022-04-12 09:46:56Z fredt $ + */ /** - * Preprocessor's view of a line in a text document. + * Preprocessor view of a line in a text document. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 + * @version 2.7.0 * @since 1.8.1 */ -class Line { - static final String DIRECTIVE_PREFIX = "//#"; - static final String SPACE_CHARS = " \t"; - static final int DIRECTIVE_PREFIX_LENGTH = DIRECTIVE_PREFIX.length(); - static final int DIRECTIVE_PREFIX_LENGTH_PLUS_ONE = - DIRECTIVE_PREFIX_LENGTH + 1; - static final String HIDE_DIRECTIVE = DIRECTIVE_PREFIX + ' '; - - int type; - String sourceText; - String indent; - String text; - String arguments; +public class Line { - static int indexOfNonTabOrSpace(String line) { + /** + * Is {@code "//#"}. + */ + public static final String DIRECTIVE_PREFIX = "//#"; + /** + * Is {@code " \t"}. + */ + public static final String SPACE_CHARS = " \t"; + /** + * Is {@code 3}. + */ + public static final int DIRECTIVE_PREFIX_LENGTH = DIRECTIVE_PREFIX.length(); + /** + * Is {@code 4}. + */ + private static final int DIRECTIVE_PREFIX_LENGTH_PLUS_ONE + = DIRECTIVE_PREFIX_LENGTH + 1; + /** + * Id {@code ' '}. + */ + public static final String HIDE_DIRECTIVE = DIRECTIVE_PREFIX + ' '; + + /** + * in the given line. + * + * @param line to inspect + * @return the first index of any non-tab or non-space character. + * @throws NullPointerException if line is {@code null}. + */ + public static int indexOfNonTabOrSpace(final String line) { int pos = 0; int len = line.length(); @@ -72,92 +90,144 @@ return pos; } - static int indexOfTabOrSpace(String s, int fromIndex) { - int spos = s.indexOf(' ', fromIndex); - int tpos = s.indexOf('\t', fromIndex); + /** + * in the given, generic string. + * + * @param string to inspect + * @param fromIndex at which to start the inspection; There is no + * restriction on the value . If it is negative, it has the + * same effect as if it were zero: the entire string may be + * searched. If it is greater than the length of the string, + * it has the same effect as if it were equal to the length + * of string: {@code -1} is returned. + * @return the first index of either a tab ort a space character; {@code -1} + * if no such characters are found. + * @throws NullPointerException if string is {@code null}. + */ + public static int indexOfTabOrSpace(final String string, final int fromIndex) { + final int spos = string.indexOf(' ', fromIndex); + final int tpos = string.indexOf('\t', fromIndex); return (((tpos != -1) && (tpos < spos)) || (spos == -1)) ? tpos : spos; } - Line(String line) throws PreprocessorException { - setSourceText(line); + private int type; + private String sourceText; + private String indent; + private String text; + private String arguments; + + /** + * Constructs a new instance from the given line. + * + * @param line in a Document being Preprocessed. + * @throws PreprocessorException + * @throws NullPointerException + */ + public Line(String line) throws PreprocessorException, NullPointerException { + final Line target = this; + target.setSourceText(line); } - void setSourceText(String line) throws PreprocessorException { + public void setSourceText(String line) throws PreprocessorException, NullPointerException { this.sourceText = line; - int pos = indexOfNonTabOrSpace(line); - this.indent = line.substring(0, pos); - line = line.substring(pos); + int pos = indexOfNonTabOrSpace(line); + this.indent = line.substring(0, pos); + final String subline = line.substring(pos); - if (!line.startsWith(DIRECTIVE_PREFIX)) { - this.text = line; + if (!subline.startsWith(DIRECTIVE_PREFIX)) { + this.text = subline; this.arguments = null; - this.type = LineType.VISIBLE; - } else if (line.length() == DIRECTIVE_PREFIX_LENGTH){ - this.text = ""; + this.type = LineType.VISIBLE; + } else if (subline.length() == DIRECTIVE_PREFIX_LENGTH) { + this.text = ""; this.arguments = null; - this.type = LineType.HIDDEN; - } else if (SPACE_CHARS.indexOf(line. - charAt(DIRECTIVE_PREFIX_LENGTH)) != -1) { - this.text = line.substring(DIRECTIVE_PREFIX_LENGTH_PLUS_ONE); + this.type = LineType.HIDDEN; + } else if (SPACE_CHARS.indexOf(subline.charAt(DIRECTIVE_PREFIX_LENGTH)) != -1) { + this.text = subline.substring(DIRECTIVE_PREFIX_LENGTH_PLUS_ONE); this.arguments = null; - this.type = LineType.HIDDEN; + this.type = LineType.HIDDEN; } else { - pos = indexOfTabOrSpace(line, DIRECTIVE_PREFIX_LENGTH_PLUS_ONE); - + pos = indexOfTabOrSpace(subline, DIRECTIVE_PREFIX_LENGTH_PLUS_ONE); if (pos == -1) { - this.text = line; + this.text = subline; this.arguments = null; } else { - this.text = line.substring(0, pos); - this.arguments = line.substring(pos + 1).trim(); + this.text = subline.substring(0, pos); + this.arguments = subline.substring(pos + 1).trim(); } - - Integer oType = (Integer) LineType.directives().get(text); - - if (oType == null) { + final Integer typeId = LineType.id(text); + if (typeId == null) { throw new PreprocessorException("Unknown directive [" - + text + "] in [" + line + "]"); // NOI18N + + text + "] in [" + subline + "]"); // NOI18N } - - this.type = oType.intValue(); + this.type = typeId; } } - String getArguments() throws PreprocessorException { - if (arguments == null || arguments.length() == 0) { - throw new PreprocessorException("["+ text + /** + * for this line, if they exist. + * + * @return the value. + * @throws PreprocessorException if the line has no arguments. + */ + public String getArguments() throws PreprocessorException { + if (arguments == null || arguments.isEmpty()) { + throw new PreprocessorException("[" + text + "]: has no argument(s)"); // NOI18N } - return arguments; } - String getSourceText() { + /** + * which is the original, verbatim value with which this instance was + * constructed. + * + * @return the source text val + */ + public String getSourceText() { return sourceText; } - String getIndent() { + /** + * prefix for this instance, which is any leading space or table characters. + * + * @return the leading space or table characters for this instance. + */ + public String getIndent() { return indent; } - String getText() { + /** + * which is not the directive or directive arguments portion of the line. + *

                    + * For visible lines, this is the portion following the indent, if any. + *

                    + *

                    + * For hidden lines, this is the text, if any, following the directive + * prefix used to hide the line. + *

                    + * + * @return + */ + public String getText() { return text; } - int getType() { + public int getType() { return type; } - boolean isType(int lineType) { + public boolean isType(int lineType) { return (this.type == lineType); } + @Override public String toString() { - return LineType.labels()[this.type] + "(" + this.type + "): indent [" + return "" + LineType.label(this.type) + "(" + this.type + "): indent [" + this.indent + "] text [" + this.text + ((this.arguments == null) ? "]" : ("] args [" - + this.arguments + "]")) ; + + this.arguments + "]")); } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/LineType.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/LineType.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/LineType.java 2018-10-23 07:24:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/LineType.java 2022-04-12 08:47:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,83 +32,82 @@ package org.hsqldb.util.preprocessor; import java.lang.reflect.Field; -import java.util.Hashtable; +import java.util.HashMap; import java.util.Locale; +import java.util.Map; -/* $Id: LineType.java 5793 2018-01-06 13:12:38Z fredt $ */ - +/* + * $Id: LineType.java 6480 2022-04-12 09:46:56Z fredt $ + */ /** - * Static methods and constants to decode preprocessor line types. + * Static methods and constants to decode Preprocessor line types. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 + * @version 2.7.0 * @since 1.8.1 */ -class LineType { - // - static final int UNKNOWN = 0; - static final int DEF = 1; - static final int DEFINE = 1; - static final int ELIF = 2; - static final int ELIFDEF = 3; - static final int ELIFNDEF = 4; - static final int ELSE = 5; - static final int ENDIF = 6; - static final int ENDINCLUDE = 7; - static final int HIDDEN = 8; - static final int IF = 9; - static final int IFDEF = 10; - static final int IFNDEF = 11; - static final int INCLUDE = 12; - static final int UNDEF = 13; - static final int UNDEFINE = 13; - static final int VISIBLE = 14; +@SuppressWarnings("ClassWithoutLogger") +public class LineType { // - private static Hashtable directives; - private static String[] labels; + public static final int UNKNOWN = 0; + public static final int DEF = 1; + public static final int DEFINE = 1; + public static final int ELIF = 2; + public static final int ELIFDEF = 3; + public static final int ELIFNDEF = 4; + public static final int ELSE = 5; + public static final int ENDIF = 6; + public static final int ENDINCLUDE = 7; + public static final int HIDDEN = 8; + public static final int IF = 9; + public static final int IFDEF = 10; + public static final int IFNDEF = 11; + public static final int INCLUDE = 12; + public static final int UNDEF = 13; + public static final int UNDEFINE = 13; + public static final int VISIBLE = 14; - static synchronized String[] labels() { - if (labels == null) { - init(); - } + // + private static Map directives; + private static Map labels; - return labels; + static { + init(); } - static synchronized Hashtable directives() { - if (directives == null) { - init(); - } + public static String label(final Integer key) { + return labels.get(key); + } - return directives; + public static Integer id(final String key) { + return directives.get(key); } private static void init() { - directives = new Hashtable(); - labels = new String[17]; - Field[] fields = LineType.class.getDeclaredFields(); - + directives = new HashMap<>(23); + labels = new HashMap<>(23); + final Field[] fields = LineType.class.getDeclaredFields(); for (int i = 0, j = 0; i < fields.length; i++) { - Field field = fields[i]; + final Field field = fields[i]; if (field.getType().equals(Integer.TYPE)) { - String label = field.getName(); + final String label = field.getName(); try { int value = field.getInt(null); - labels[value] = label; + labels.put(value, label); - switch(value) { - case VISIBLE : - case HIDDEN : { + switch (value) { + case VISIBLE: + case HIDDEN: { // ignore break; } - default : { - String key = Line.DIRECTIVE_PREFIX + default: { + final String key = Line.DIRECTIVE_PREFIX + label.toLowerCase(Locale.ENGLISH); directives.put(key, new Integer(value)); @@ -117,12 +116,14 @@ } } - } catch (IllegalArgumentException ex) { - // ex.printStackTrace(); - } catch (IllegalAccessException ex) { + } catch (IllegalArgumentException | IllegalAccessException ignored) { // ex.printStackTrace(); } } } } + + private LineType() { + throw new AssertionError("Pure Utiluity Class"); + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Option.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Option.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Option.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Option.java 2022-03-09 18:43:38.000000000 +0000 @@ -31,7 +31,7 @@ package org.hsqldb.util.preprocessor; -/* $Id: Option.java 5793 2018-01-06 13:12:38Z fredt $ */ +/* $Id: Option.java 6434 2022-03-06 09:02:19Z campbell-burnet $ */ /** * Static methods and constants to decode preprocessor options. @@ -98,4 +98,15 @@ public static int setVerbose(int options, boolean verbose) { return (verbose) ? (options | VERBOSE) : (options & ~VERBOSE); } + + public static String toOptionsString(int options) { + Object[] values = { + isBackup(options), + isFilter(options), + isIndent(options), + isTestOnly(options), + isVerbose(options)}; + + return String.format("backup: %s, filter: %s, indent: %s, testOnly: %s, verbose: %s", values); + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/package-info.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/package-info.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/package-info.java 2022-03-09 18:43:38.000000000 +0000 @@ -0,0 +1,11 @@ +/** + * Provides a simple text document preprocessor.

                    + * + * Aims specifically at transforming the HSQLDB code base to one of a small + * number of specific build targets, while keeping complexity and external + * dependencies to a minimum, yet providing an environment that is + * sufficiently powerful to solve most easily imaginable preprocessing + * scenarios. + * + */ +package org.hsqldb.util.preprocessor; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorAntTask.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorAntTask.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorAntTask.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorAntTask.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,243 +0,0 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the HSQL Development Group nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -package org.hsqldb.util.preprocessor; - -import java.io.File; - -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.MatchingTask; - -/* $Id: PreprocessorAntTask.java 5793 2018-01-06 13:12:38Z fredt $ */ - -/** - * Provides a facility for invoking the Preprocessor from ANT.

                    - * - * Example ANT target:

                    - * - *

                    - * 
                    - *
                    - *     
                    - *
                    - *     
                    - *     
                    - *
                    - * 
                    - * 
                    - * - * Task attributes : - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
                    namedescription
                    srcdir (required)string - directory under which input files are located
                    targetdir (required)string - directory under which output files are to be written
                    altext (optional)string - alternate extension to use for output file names.
                    - * If needed, leading dot should be provided
                    backup (optional - default: false)boolean - whether to back up pre-existing target files.
                    - * When true, pre-existing target files are preserved by renaming with - * postfix "~"
                    encoding (optional)string - the encoding with which to read and write file content.
                    - * If specified, must be a valid Java encoding identifier, such as "UTF8".
                    - * When unspecified, the default Java platformn encoding is used.
                    filter (optional - default: false)boolean - whether to exclude directive lines from output.
                    indent (optional - default: false)boolean - whether to indent directive lines in output.
                    symbols (optional)string - CSV list of preprocessor symbols to predefine.
                    - * When specified, each list element must be of the form:
                    - * IDENT (ASSIGN? (STRING | NUMBER | IDENT) )?
                    - * Not that forward assignments are illegal.
                    - * See {@link Preprocessor Preprocessor} for details
                    testonly (optional - default: false)boolean - whether to omit writing output files.
                    verbose (optional - default: false)boolean - whether to log detailed information.
                    - * - * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 - * @since 1.8.1 - */ -public class PreprocessorAntTask extends MatchingTask { - - private String ifExpr; - private String unlessExpr; - private File sourceDir; - private File targetDir; - private String defines; - private String altExt; - private String encoding; - private int options = Option.INDENT; - - public void init() { - super.init(); - } - - public void setSrcdir(final File value) { - sourceDir = value; - } - - public void setTargetdir(final File value) { - targetDir = value; - } - - public void setSymbols(final String value) { - defines = value; - } - - public void setVerbose(final boolean verbose) { - options = Option.setVerbose(options, verbose); - } - - public void setBackup(final boolean backup) { - options = Option.setBackup(options, backup); - } - - public void setIndent(final boolean indent) { - options = Option.setIndent(options, indent); - } - - public void setTestonly(final boolean testOnly) { - options = Option.setTestOnly(options, testOnly); - } - - public void setFilter(final boolean filter) { - options = Option.setFilter(options, filter); - } - - public void setAltext(final String ext) { - this.altExt = ext; - } - - public void setEncoding(final String encoding) { - this.encoding = encoding; - } - - public void setIf(final String expr) { - this.ifExpr = expr; - } - - public void setUnless(final String expr) { - this.unlessExpr = expr; - } - - public boolean isActive() { - return (this.ifExpr == null - || getProject().getProperty(this.ifExpr) != null - || this.unlessExpr == null - || getProject().getProperty(this.unlessExpr) == null); - } - - public void execute() throws BuildException { - - if (!isActive()) { - return; - } - - checkTargetDir(); - - this.sourceDir = getProject().resolveFile("" + this.sourceDir); - - IResolver resolver = new AntResolver(getProject()); - String[] files = getFiles(); - - log("Preprocessing " + files.length + " file(s)"); - - try { - Preprocessor.preprocessBatch(this.sourceDir, this.targetDir, files, - this.altExt, this.encoding, this.options, this.defines, - resolver); - } catch (Exception ex) { - ex.printStackTrace(); - - throw new BuildException("Preprocessing failed: " + ex, - ex); - } - } - - private String[] getFiles() { - return getDirectoryScanner(sourceDir).getIncludedFiles(); - } - - private void checkTargetDir() throws BuildException { - if (targetDir == null) { - throw new BuildException("Target directory required."); - } - } -} diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorException.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorException.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorException.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/PreprocessorException.java 2022-03-09 18:43:38.000000000 +0000 @@ -31,7 +31,7 @@ package org.hsqldb.util.preprocessor; -/* $Id: PreprocessorException.java 5793 2018-01-06 13:12:38Z fredt $ */ +/* $Id: PreprocessorException.java 6434 2022-03-06 09:02:19Z campbell-burnet $ */ /** * Thrown when preprocessing fails. @@ -40,6 +40,7 @@ * @version 1.8.1 * @since 1.8.1 */ +@SuppressWarnings("serial") public class PreprocessorException extends Exception { public PreprocessorException(String message) { super(message); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Preprocessor.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Preprocessor.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Preprocessor.java 2018-10-23 07:24:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Preprocessor.java 2022-06-08 10:09:08.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + package org.hsqldb.util.preprocessor; @@ -36,10 +36,12 @@ import java.io.UnsupportedEncodingException; import java.util.Stack; -/* $Id: Preprocessor.java 5793 2018-01-06 13:12:38Z fredt $ */ - +/* + * $Id: Preprocessor.java 6550 2022-06-08 11:09:08Z fredt $ + */ /** - * Simple text document preprocessor.

                    + * Simple text document preprocessor. + *

                    * * Aims specifically at transforming the HSQLDB codebase to one of a small * number of specific build targets, while keeping complexity and external @@ -47,21 +49,21 @@ * sufficiently powerful to solve most easily imaginable preprocessing * scenarios. * - * Supports the following (case-sensitive) directives:

                    + * Supports the following (case-sensitive) directives: * *

                      - *
                    • //#def[ine] IDENT (ASSIGN? (STRING | NUMBER | IDENT) )? - *
                    • //#elif BOOLEXPR - *
                    • //#elifdef IDENT - *
                    • //#elifndef IDENT - *
                    • //#else - *
                    • //#endif - *
                    • //#endinclude - *
                    • //#if BOOLEXPR - *
                    • //#ifdef IDENT - *
                    • //#ifndef IDENT - *
                    • //#include FILEPATH - *
                    • //#undef[ine] IDENT + *
                    • //#def[ine] IDENT (ASSIGN? (STRING | NUMBER | IDENT) )? + *
                    • //#elif BOOLEXPR + *
                    • //#elifdef IDENT + *
                    • //#elifndef IDENT + *
                    • //#else + *
                    • //#endif + *
                    • //#endinclude + *
                    • //#if BOOLEXPR + *
                    • //#ifdef IDENT + *
                    • //#ifndef IDENT + *
                    • //#include FILEPATH + *
                    • //#undef[ine] IDENT *
                    * * where BOOLEXPR is: @@ -72,7 +74,7 @@ * | BOOLEXPR { OR | XOR | AND } BOOLEXPR * | NOT BOOLEXPR * | LPAREN BOOLEXPR RPAREN ) - *
                    + *
            * * and VALUE is : * @@ -82,18 +84,18 @@ * | IDENT ) *
            * - * and lexographic elements are : + * and lexicographic elements are : * *
              * ASSIGN     : '='
              * EQ         : '=='
            - * LT         : '<'
            - * LTE        : '<='
            - * GT         : '>'
            - * GTE        : '>='
            + * LT         : {@code '<'}
            + * LTE        : {@code '<='}
            + * GT         : {@code '>'}
            + * GTE        : {@code '>='}
              * OR         : ('|' | '||')
              * XOR        : '^'
            - * AND        : ('&' | '&&')
            + * AND        : {@code ('&' | '&&')}
              * NOT        : '!'
              * DQUOTE     : '"'
              * LPAREN     : '('
            @@ -112,38 +114,43 @@
              * FILEPATH   : NON_SPACE (ANY_UNICODE_CHARACTER* NON_WS)?     -- i.e. trailing SPACE elements are ignored
              * 
            * - * The lexographic definitions above use the BNF conventions : + * The lexicographic definitions above use the BNF conventions : * *
            - * '?' -> zero or one
            - * '*' -> zero or more
            - * '+' -> one or more
            + * '?' : zero or one
            + * '*' : zero or more
            + * '+' : one or more
              * 
            * * Directives may be arbitrarily indented; there is an option (INDENT) to set * or unset directive indentation on output. There is also an option (FILTER) - * to remove directive lines from output. See {@link Option Option} for other - * preprocessor options.

            + * to remove directive lines from output. See {@link Option Option} for other + * preprocessor options. + *

            * * '//#ifxxx' directives may be nested to arbitrary depth, * may be chained with an arbitrary number of '//#elifxxx' directives, * may be optionally followed by a single '//#else' directive, and - * must be terminated by a single '//#endif' directive.

            + * must be terminated by a single '//#endif' directive. + *

            * * Each '//#include' directive must be terminated by an '//#endinclude' * directive; lines between '//#include' and '//#endinclude' are replaced - * by the content retrieved from the specified FILEPATH.

            + * by the content retrieved from the specified FILEPATH. + *

            * * Included files are preprocessed in a nested scope that inherits the * defined symbols of the including scope. Directive lines in included files - * are always excluded from output.

            + * are always excluded from output. + *

            * * Design Notes

            * * There are many better/more sophisticated preprocessors/templating - * engines out there. FreeMaker and Velocity come to mind immediately. + * engines out there. FreeMaker and Velocity come to mind immediately. * Another--the NetBeans MIDP preprocessor--was the direct inspiration for - * this class.

            + * this class. + *

            * * Other options were rejected because the work of creating this class appeared * to be less than dealing with the complexity and dependency issues of hooking @@ -152,10 +159,11 @@ * The NetBeans preprocessor, in particular, was rejected because it was * not immediately evident how to invoke it independently from the IDE, * how to make it available to non-MIDP projects from within the IDE or how to - * isolate the correct OpenIDE jars to allow stand-alone operation.

            + * isolate the correct OpenIDE jars to allow stand-alone operation. + *

            * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) - * @version 1.8.1 + * @version 2.7.0 * @since 1.8.1 */ public class Preprocessor { @@ -163,26 +171,34 @@ // ========================================================================= // ------------------------------- Public API ------------------------------ // ========================================================================= - /** - * Preprocesses the specified list of files.

            + * Preprocesses the specified list of files. + *

            * * @param sourceDir under which input files are located * @param targetDir under which output files are to be written * @param fileNames to be preprocessed - * @param altExt to use for output file names - * @param encoding with which to write output files - * @param options used to control preprocessing - * @param defines CSV list of symbol definition expressions - * @param resolver with which to perform property and path expansions + * @param altExt to use for output file names + * @param encoding with which to write output files + * @param options used to control preprocessing + * @param defines CSV list of symbol definition expressions + * @param resolver with which to perform property and path expansions * @throws PreprocessorException if an error occurs while loading, - * preprocessing or saving the result of preprocessing one of the - * specified input files + * preprocessing or saving the result of preprocessing one of the + * specified input files */ public static void preprocessBatch(File sourceDir, File targetDir, String[] fileNames, String altExt, String encoding, int options, String defines, IResolver resolver) throws PreprocessorException { +// log("sourceDir: " + sourceDir); +// log("targetDir: " + targetDir); +// log("fileNames: " + Arrays.asList(fileNames)); +// log("altExt : " + altExt); +// log("encoding : " + encoding); +// log("options : " + Option.toOptionsString(options)); +// log("defines : " + defines); +// log("resolver : " + resolver); for (int i = 0; i < fileNames.length; i++) { String fileName = fileNames[i]; @@ -201,44 +217,54 @@ } /** - * Preprocesses a single file.

            + * Preprocesses a single file. + *

            * * @param sourceDir under which the input file is located * @param targetDir under which the output file is to be written - * @param fileName to be preprocessed - * @param altExt to use for output file name - * @param encoding with which to write output file - * @param options used to control preprocessing - * @param defines CSV list of symbol definition expressions - * @param resolver with which to perform property and path expansions + * @param fileName to be preprocessed + * @param altExt to use for output file name + * @param encoding with which to write output file + * @param options used to control preprocessing + * @param defines CSV list of symbol definition expressions + * @param resolver with which to perform property and path expansions * @throws PreprocessorException if an error occurs while loading, - * preprocessing or saving the result of preprocessing the - * specified input file + * preprocessing or saving the result of preprocessing the + * specified input file */ public static void preprocessFile(File sourceDir, File targetDir, String fileName, String altExt, String encoding, int options, String defines, IResolver resolver) throws PreprocessorException { - String sourcePath = translatePath(sourceDir, fileName, null); - String targetPath = translatePath(targetDir, fileName, altExt); - File targetFile = new File(targetPath); - File backupFile = new File(targetPath + "~"); - boolean sameDir = sourceDir.equals(targetDir); - boolean sameExt = (altExt == null); - boolean verbose = Option.isVerbose(options); - boolean testOnly = Option.isTestOnly(options); - boolean backup = Option.isBackup(options); + String sourcePath = translatePath(sourceDir, fileName, null); + String targetPath = translatePath(targetDir, fileName, altExt); + File targetFile = new File(targetPath); + File backupFile = new File(targetPath + "~"); + boolean sameDir = sourceDir.equals(targetDir); + boolean sameExt = (altExt == null); + boolean verbose = Option.isVerbose(options); + boolean testOnly = Option.isTestOnly(options); + boolean backup = Option.isBackup(options); Preprocessor preprocessor = new Preprocessor(sourcePath, encoding, options, resolver, defines); if (verbose) { - log("Reading \"" + sourcePath + "\""); +// log("sourceDir : " + sourceDir); +// log("targetDir : " + targetDir); +// log("fileName : " + fileName); +// log("altExt : " + altExt); +// log("encoding : " + encoding); +// log("options : " + Option.toOptionsString(options)); +// log("defines : " + defines); +// log("resolver : " + resolver); + log("sourcePath: " + sourcePath); + log("targetPath: " + targetPath); } preprocessor.loadDocument(); boolean modified = preprocessor.preprocess(); - boolean rewrite = modified || !sameDir || !sameExt; + boolean rewrite = modified || !sameDir || !sameExt; if (!rewrite) { if (verbose) { @@ -268,7 +294,7 @@ + targetFile + "\" => \"" + backupFile - +"\"" ); // NOI18N + + "\""); // NOI18N } if (verbose) { @@ -285,17 +311,16 @@ // ========================================================================= // ----------------------------- Implementation ---------------------------- // ========================================================================= - // Fields - // static - static final int CONDITION_NONE = 0; - static final int CONDITION_ARMED = 1; - static final int CONDITION_IN_TRUE = 2; + static final int CONDITION_NONE = 0; + static final int CONDITION_ARMED = 1; + static final int CONDITION_IN_TRUE = 2; static final int CONDITION_TRIGGERED = 3; // optimization - zero new object burn rate for statePush() - static final Integer[] STATES = new Integer[] { + @SuppressWarnings("UnnecessaryBoxing") + static final Integer[] STATES = new Integer[]{ new Integer(CONDITION_NONE), new Integer(CONDITION_ARMED), new Integer(CONDITION_IN_TRUE), @@ -303,17 +328,16 @@ }; // instance - private String documentPath; - private String encoding; - private int options; - private IResolver resolver; - private Document document; - private Defines defines; - private Stack stack; - private int state; + private final String documentPath; + private final String encoding; + private final int options; + private final IResolver resolver; + private final Document document; + private final Defines defines; + private final Stack stack; + private int state; // Constructors - private Preprocessor(String documentPath, String encoding, int options, IResolver resolver, String predefined) throws PreprocessorException { @@ -329,31 +353,30 @@ if (predefined == null || predefined.trim().length() == 0) { this.defines = new Defines(); } else { - predefined = this.resolver.resolveProperties(predefined); + predefined = this.resolver.resolveProperties(predefined); this.defines = new Defines(predefined); } this.documentPath = documentPath; - this.encoding = encoding; - this.options = options; - this.document = new Document(); - this.stack = new Stack(); - this.state = CONDITION_NONE; + this.encoding = encoding; + this.options = options; + this.document = new Document(); + this.stack = new Stack(); + this.state = CONDITION_NONE; } private Preprocessor(Preprocessor other, Document include) { - this.document = include; - this.encoding = other.encoding; - this.stack = new Stack(); - this.state = CONDITION_NONE; - this.options = other.options; + this.document = include; + this.encoding = other.encoding; + this.stack = new Stack(); + this.state = CONDITION_NONE; + this.options = other.options; this.documentPath = other.documentPath; - this.resolver = other.resolver; - this.defines = other.defines; + this.resolver = other.resolver; + this.defines = other.defines; } // Main entry point - private boolean preprocess() throws PreprocessorException { this.stack.clear(); @@ -386,39 +409,39 @@ } } - return (!this.document.equals(originalDocument)); + return (!this.document.contentEquals(originalDocument)); } private void preprocessImpl() throws PreprocessorException { - int includeCount = 0; - int lineCount = 0; + int includeCount = 0; + int lineCount = 0; while (lineCount < this.document.size()) { try { Line line = resolveLine(this.document.getSourceLine(lineCount)); - switch(line.getType()) { - case LineType.INCLUDE : { + switch (line.getType()) { + case LineType.INCLUDE: { lineCount = processInclude(lineCount, line); break; } - case LineType.VISIBLE : - case LineType.HIDDEN : { + case LineType.VISIBLE: + case LineType.HIDDEN: { this.document.setSourceLine(lineCount, toSourceLine(line)); if (Option.isVerbose(options)) { - log((isHidingLines() ? "Commented: " - : "Uncommented: ") + line); + log((isHidingLines() ? "Commented: " + : "Uncommented: ") + line); } lineCount++; break; } - default : { + default: { processDirective(line); lineCount++; @@ -435,28 +458,27 @@ } // -------------------------- Line-level Handlers -------------------------- - private void processIf(boolean condition) { statePush(); this.state = isHidingLines() ? CONDITION_TRIGGERED - : (condition) ? CONDITION_IN_TRUE - : CONDITION_ARMED; + : (condition) ? CONDITION_IN_TRUE + : CONDITION_ARMED; } private void processElseIf(boolean condition) throws PreprocessorException { - switch(state) { - case CONDITION_NONE : { + switch (state) { + case CONDITION_NONE: { throw new PreprocessorException("Unexpected #elif"); // NOI18N } - case CONDITION_ARMED : { + case CONDITION_ARMED: { if (condition) { this.state = CONDITION_IN_TRUE; } break; } - case CONDITION_IN_TRUE : { + case CONDITION_IN_TRUE: { this.state = CONDITION_TRIGGERED; break; @@ -465,16 +487,16 @@ } private void processElse() throws PreprocessorException { - switch(state) { - case CONDITION_NONE : { + switch (state) { + case CONDITION_NONE: { throw new PreprocessorException("Unexpected #else"); // NOI18N } - case CONDITION_ARMED : { + case CONDITION_ARMED: { this.state = CONDITION_IN_TRUE; break; } - case CONDITION_IN_TRUE : { + case CONDITION_IN_TRUE: { this.state = CONDITION_TRIGGERED; break; @@ -491,62 +513,62 @@ } private void processDirective(Line line) throws PreprocessorException { - switch(line.getType()) { - case LineType.DEFINE : { + switch (line.getType()) { + case LineType.DEFINE: { if (!isHidingLines()) { this.defines.defineSingle(line.getArguments()); } break; } - case LineType.UNDEFINE : { + case LineType.UNDEFINE: { if (!isHidingLines()) { this.defines.undefine(line.getArguments()); } break; } - case LineType.IF : { + case LineType.IF: { processIf(this.defines.evaluate(line.getArguments())); break; } - case LineType.IFDEF : { + case LineType.IFDEF: { processIf(this.defines.isDefined(line.getArguments())); break; } - case LineType.IFNDEF : { + case LineType.IFNDEF: { processIf(!this.defines.isDefined(line.getArguments())); break; } - case LineType.ELIF : { + case LineType.ELIF: { processElseIf(this.defines.evaluate(line.getArguments())); break; } - case LineType.ELIFDEF : { + case LineType.ELIFDEF: { processElseIf(this.defines.isDefined(line.getArguments())); break; } - case LineType.ELIFNDEF : { + case LineType.ELIFNDEF: { processElseIf(!this.defines.isDefined(line.getArguments())); break; } - case LineType.ELSE : { + case LineType.ELSE: { processElse(); break; } - case LineType.ENDIF : { + case LineType.ENDIF: { processEndIf(); break; } - default : { + default: { throw new PreprocessorException("Unhandled line type: " + line); // NOI18N } @@ -554,9 +576,9 @@ } private int processInclude(int lineCount, Line line) - throws PreprocessorException { - String path = resolvePath(line.getArguments()); - boolean hidden = isHidingLines(); + throws PreprocessorException { + String path = resolvePath(line.getArguments()); + boolean hidden = isHidingLines(); lineCount++; @@ -575,7 +597,7 @@ } if (!hidden) { - Document include = loadInclude(path); + Document include = loadInclude(path); Preprocessor preprocessor = new Preprocessor(this, include); preprocessor.preprocess(); @@ -597,29 +619,29 @@ } // -------------------------- Preprocessor State --------------------------- - private boolean isHidingLines() { - switch(state) { - case CONDITION_ARMED : + switch (state) { + case CONDITION_ARMED: case CONDITION_TRIGGERED: { return true; } - default : { + default: { return false; } } } + @SuppressWarnings("unchecked") private void statePush() { this.stack.push(STATES[this.state]); } + @SuppressWarnings("UnnecessaryUnboxing") private void statePop() { this.state = ((Integer) stack.pop()).intValue(); } // ------------------------------ Resolution ------------------------------- - private Line resolveLine(String line) throws PreprocessorException { return new Line(this.resolver.resolveProperties(line)); } @@ -629,49 +651,70 @@ throw new IllegalArgumentException("path: null"); } - String value = this.resolver.resolveProperties(path); - File file = this.resolver.resolveFile(value); + if (Option.isVerbose(options)) { + log("resolve path: " + path); + } + + if (path.contains("${")) { + path = this.resolver.resolveProperties(path); + + if (Option.isVerbose(options)) { + log("resolved properties: " + path); + } + } + + + + File file = this.toCanonicalOrAbsoluteFile(path); + + if (Option.isVerbose(options)) { + log("resolved file: " + file.getAbsolutePath()); + } try { - return file.getCanonicalPath(); + path = file.getCanonicalPath(); } catch (IOException ex) { - return file.getAbsolutePath(); + path = file.getAbsolutePath(); } + + if (Option.isVerbose(options)) { + log("resolved path: " + path); + } + + return path; } // ------------------------------ Conversion ------------------------------- - - private String toSourceLine(Line line) { + private String toSourceLine(final Line line) { + final String indent = line.getIndent(); + final String text = line.getText(); return (isHidingLines()) - ? Option.isIndent(this.options) - ? line.indent + Line.HIDE_DIRECTIVE + line.text - : Line.HIDE_DIRECTIVE + line.indent + line.text - : line.indent + line.text; + ? Option.isIndent(this.options) + ? indent + Line.HIDE_DIRECTIVE + text + : Line.HIDE_DIRECTIVE + indent + text + : indent + text; } private File toCanonicalOrAbsoluteFile(String path) { File file = new File(path); if (!file.isAbsolute()) { - path = (new File(this.documentPath)).getParent() - + File.separatorChar - + path; + File parent = (new File(this.documentPath)).getParentFile(); - file = new File(path); + file = new File(parent, path); } try { return file.getCanonicalFile(); - } catch (Exception e) { + } catch (IOException e) { return file.getAbsoluteFile(); } } // ------------------------------ Translation ------------------------------ - private static String translatePath(File dir, String fileName, String ext) { return new StringBuffer(dir.getPath()).append(File.separatorChar). - append(translateFileExtension(fileName,ext)).toString(); + append(translateFileExtension(fileName, ext)).toString(); } private static String translateFileExtension(String fileName, String ext) { @@ -680,17 +723,16 @@ int pos = fileName.lastIndexOf('.'); fileName = (pos < 0) ? fileName + ext - : fileName.substring(0, pos) + ext; + : fileName.substring(0, pos) + ext; } return fileName; } // ---------------------------------- I/O ---------------------------------- - private Document loadInclude(String path) throws PreprocessorException { Document include = new Document(); - File file = toCanonicalOrAbsoluteFile(path); + File file = toCanonicalOrAbsoluteFile(path); try { return include.load(file, this.encoding); diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Tokenizer.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Tokenizer.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Tokenizer.java 2018-10-23 07:24:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Tokenizer.java 2022-04-12 08:47:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2007, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,24 +31,25 @@ package org.hsqldb.util.preprocessor; -/* $Id: Tokenizer.java 5793 2018-01-06 13:12:38Z fredt $ */ +/* $Id: Tokenizer.java 6480 2022-04-12 09:46:56Z fredt $ */ /** - * Simple preprocessor directive tokenizer. + * Simple Preprocessor directive tokenizer. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @version 1.8.1 - * @since 1.8.1 + * @since 2.7.0 */ -final class Tokenizer { +@SuppressWarnings("ClassWithoutLogger") +public class Tokenizer { private final String command; private final int commandLength; private int tokenType; private int startIndex; private int currentIndex; - Tokenizer(final String cmd) { - this.command = cmd + " "; + public Tokenizer(final String cmd) { + this.command = cmd == null || cmd.isEmpty() ? "" : cmd + " "; this.commandLength = command.length(); this.startIndex = 0; this.currentIndex = 0; @@ -58,23 +59,14 @@ void skipBlanks() { final String cmd = this.command; final int len = this.commandLength; - - top: - while (currentIndex < len) { - - switch(cmd.charAt(currentIndex)) { - case ' ' : - case '\t' : { - currentIndex++; - continue top; - } - } - - break; - } + int pos = this.currentIndex; + while(pos < len && " \t".indexOf(cmd.charAt(pos)) != -1) { + pos++; + } + this.currentIndex = pos; } - int next() throws PreprocessorException { + public int next() throws PreprocessorException { skipBlanks(); startIndex = currentIndex; @@ -145,8 +137,8 @@ case Token.XOR : case Token.NOT : { currentIndex++; - - return (tokenType = ch); + tokenType = ch; + return ch; } case Token.ASSIGN : { currentIndex++; @@ -198,7 +190,9 @@ currentIndex++; } - return (tokenType = ch); + tokenType = ch; + + return ch; } default : { throw new PreprocessorException("Syntax error: " + @@ -207,39 +201,39 @@ } } - int getTokenType() { + public int getTokenType() { return tokenType; } - boolean isToken(final int type) { + public boolean isToken(final int type) { return (this.tokenType == type); } - String getIdent() { + public String getIdent() { return isToken(Token.EOI) ? null : this.command.substring(startIndex, currentIndex); } - Number getNumber() { + public Number getNumber() { return (isToken(Token.EOI)) ? null : new Double(Double.parseDouble(this.command. substring(startIndex, currentIndex))); } - String getString() { + public String getString() { return isToken(Token.EOI) ? null : this.command.substring(startIndex + 1, currentIndex - 1); } - int getStartIndex() { + public int getStartIndex() { return this.startIndex; } - int currentIndex() { + public int currentIndex() { return this.currentIndex; } - String getSource() { + public String getSource() { return this.command; } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Token.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Token.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/preprocessor/Token.java 2018-10-23 07:24:30.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/preprocessor/Token.java 2022-03-09 18:43:38.000000000 +0000 @@ -31,39 +31,40 @@ package org.hsqldb.util.preprocessor; -/* $Id: Token.java 5793 2018-01-06 13:12:38Z fredt $ */ +/* $Id: Token.java 6434 2022-03-06 09:02:19Z campbell-burnet $ */ /** - * Static methods and constants to decode directive tokens. + * Static methods and constants to decode Preprocessor directive tokens. * * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @version 1.8.1 * @since 1.8.1 */ -final class Token { - static final int EOI = -1; - static final int UNKNOWN = 0; - static final int IDENT = 1; - static final int NUMBER = 2; - static final int STRING = 3; - static final int AND = '&'; - static final int OR = '|'; - static final int XOR = '^'; - static final int NOT = '!'; - static final int GT = '>'; - static final int GTE = '>' + '='; - static final int LT = '<'; - static final int LTE = '<' + '='; - static final int ASSIGN = '='; - static final int EQ = '=' + '='; - static final int LPAREN = '('; - static final int RPAREN = ')'; +public final class Token { + + public static final int EOI = -1; + public static final int UNKNOWN = 0; + public static final int IDENT = 1; + public static final int NUMBER = 2; + public static final int STRING = 3; + public static final int AND = '&'; + public static final int OR = '|'; + public static final int XOR = '^'; + public static final int NOT = '!'; + public static final int GT = '>'; + public static final int GTE = '>' + '='; + public static final int LT = '<'; + public static final int LTE = '<' + '='; + public static final int ASSIGN = '='; + public static final int EQ = '=' + '='; + public static final int LPAREN = '('; + public static final int RPAREN = ')'; - static boolean isAssignmentOperator(final int type) { + public static boolean isAssignmentOperator(final int type) { return (type == ASSIGN); } - static boolean isComparisonOperator(final int type) { + public static boolean isComparisonOperator(final int type) { switch(type) { case EQ : case LT : @@ -78,7 +79,7 @@ } } - static boolean isLogicalOperator(final int type) { + public static boolean isLogicalOperator(final int type) { switch(type) { case AND : case OR : @@ -92,7 +93,7 @@ } } - static boolean isValue(final int type) { + public static boolean isValue(final int type) { switch (type) { case IDENT : case STRING : @@ -104,4 +105,8 @@ } } } + + private Token() { + throw new AssertionError("Pure Utility Class"); + } } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/RCData.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/RCData.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/RCData.java 2021-02-09 16:10:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/RCData.java 2022-06-11 09:02:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,7 +45,7 @@ import java.util.StringTokenizer; import java.util.regex.Pattern; -/* $Id: RCData.java 6299 2021-02-09 17:10:48Z fredt $ */ +/* $Id: RCData.java 6555 2022-06-11 10:02:16Z fredt $ */ /** * Manages all the details we need to connect up to JDBC database(s), @@ -58,7 +58,6 @@ * @see * The RC File section of the HyperSQL Utilities Guide - * @see org.hsqldb.sample.SqlFileEmbedder * @author Blaine Simpson (blaine dot simpson at admc dot com) */ public class RCData { @@ -83,6 +82,7 @@ System.err.println("urlid: " + id + ", url: " + url + ", username: " + username + ", password: " + password); } + * @return string representation */ public String toString() { @@ -313,12 +313,11 @@ * Gets a JDBC Connection using the data of this RCData object. * * @return New JDBC Connection - * @throws ClassNotFoundException on class not found * @throws SQLException on database access error * @throws MalformedURLException on malformed URL */ public Connection getConnection() - throws ClassNotFoundException, SQLException, MalformedURLException { + throws SQLException, MalformedURLException { return getConnection(null, null); } @@ -329,7 +328,6 @@ * @param curDriverIn driver * @param curTrustStoreIn trusted store * @return New JDBC Connection - * @throws ClassNotFoundException on class not found * @throws MalformedURLException on malformed URL * @throws SQLException on database access error */ @@ -423,6 +421,9 @@ * Returns a copy of the given String with System property names in the * format ${system.property} replaced by the corresponding Java * System Properties. + * + * @param inString String + * @return formatted string */ public static String expandSysPropVars(String inString) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/TransferHelper.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/TransferHelper.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/TransferHelper.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/TransferHelper.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,7 +56,7 @@ db = null; tracer = null; - quote = "\'"; + quote = "'"; JDBCT = new JDBCTypes(); } diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/Transfer.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/Transfer.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/Transfer.java 2021-01-25 15:08:24.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/Transfer.java 2022-05-22 18:09:56.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,7 +70,6 @@ package org.hsqldb.util; -import java.applet.Applet; import java.util.Enumeration; import java.util.Vector; diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/TransferSQLText.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/TransferSQLText.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/TransferSQLText.java 2021-02-09 04:49:22.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/TransferSQLText.java 2022-04-21 16:08:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2001-2021, The HSQL Development Group +/* Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -564,17 +564,13 @@ try { while ((Token = Tokenizer.nextToken()).toUpperCase().equals( - "INDEX")) { - ; - } + "INDEX")) {} String IndexdropCommand = "DROP INDEX " + Token + " ;"; while ((Token = Tokenizer.nextToken( - " (")).toUpperCase().equals("ON")) { - ; - } + " (")).toUpperCase().equals("ON")) {} name = Token; @@ -663,9 +659,7 @@ try { Tokenizer = new StringTokenizer(statement); - while (!Tokenizer.nextToken().toUpperCase().equals("FROM")) { - ; - } + while (!Tokenizer.nextToken().toUpperCase().equals("FROM")) {} tableName = Tokenizer.nextToken(" ;"); } catch (NoSuchElementException NSE) { diff -Nru hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/TransferTable.java hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/TransferTable.java --- hsqldb-2.6.1/hsqldb/src/org/hsqldb/util/TransferTable.java 2021-02-09 04:50:08.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/src/org/hsqldb/util/TransferTable.java 2022-05-23 11:18:44.000000000 +0000 @@ -1,7 +1,7 @@ /* * For work developed by the HSQL Development Group: * - * Copyright (c) 2001-2021, The HSQL Development Group + * Copyright (c) 2001-2022, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -71,7 +71,6 @@ package org.hsqldb.util; import java.io.Serializable; -import java.sql.SQLException; import java.util.Hashtable; // fredt@users 20011220 - patch 481239 by xponsard@users - enhancements @@ -147,7 +146,7 @@ } catch (Exception e) {} } - if (Stmts.bTransfer == false) { + if (!Stmts.bTransfer) { tracer.trace("Table " + Stmts.sSourceTable + " not transfered"); return; @@ -362,7 +361,7 @@ } catch (Exception e) {} } - if (Stmts.bTransfer == false) { + if (!Stmts.bTransfer) { tracer.trace("Table " + Stmts.sSourceTable + " not transfered"); return; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelf3PartNames.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelf3PartNames.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelf3PartNames.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelf3PartNames.txt 2022-02-21 21:18:52.000000000 +0000 @@ -1,4 +1,3 @@ --- $Id: TestSelf3PartNames.txt 610 2008-12-22 15:54:18Z unsaved $ -- Test 3-part names like: schemaname.tablename.columname --SET PROPERTY "hsqldb.default_table_type" 'cached' -- Setup diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfAlterColumn.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfAlterColumn.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfAlterColumn.txt 2018-10-23 07:24:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfAlterColumn.txt 2022-02-21 21:18:18.000000000 +0000 @@ -117,13 +117,32 @@ 8,8 9,9 10,9 -*/select * from "testac"; +*/select * from "testac" order by 1; alter table "testac" drop primary key; alter table "testac" alter column "a" drop generated +/*r + 4,4 + 5,5 + 6,6 + 7,7 + 8,8 + 9,9 + 10,9 +*/select * from "testac" order by 1; insert into "testac" values (null,12); /*c8*/select * from "testac"; /*e*/alter table "testac" alter column "a" not null; +/*r + 4,4 + 5,5 + 6,6 + 7,7 + 8,8 + 9,9 + 10,9 + null,12 +*/select * from "testac" order by 1 nulls last; delete from "testac" where "a" is null delete from "testac" where "a" > 9 /*c6*/select * from "testac"; @@ -140,6 +159,15 @@ delete from "testac" where "a" is null /*c6*/select * from "testac"; +/*r + 4,4 + 5,5 + 6,6 + 7,7 + 8,8 + 9,9 +*/select * from "testac" order by 1; + -- column with a PK constraint can be added alter table "testac" add column "c" integer generated by default as identity primary key -- no second IDENTITY or PK @@ -168,7 +196,7 @@ 6,6,aa6 7,7,aa7 8,8,aa8 -*/select * from "testacc"; +*/select * from "testacc" order by 1; alter table "testacc" add primary key ("c") /*r 4,4,aa4 @@ -176,7 +204,7 @@ 6,6,aa6 7,7,aa7 8,8,aa8 -*/select * from "testacc"; +*/select * from "testacc" order by 1; /*e*/insert into "testacc" values (9,9,'aa9000000'); alter table "testacc" alter column "c" varchar(10); insert into "testacc" values (9,9,'aa9000000'); diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfRoleNesting.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfRoleNesting.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfRoleNesting.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfRoleNesting.txt 2022-02-21 14:42:06.000000000 +0000 @@ -1,5 +1,5 @@ -- First with a table grant - +SET SESSION AUTHORIZATION 'SA' /*s*/DROP USER peon1; /*s*/DROP USER peon2; /*s*/DROP USER peon3; @@ -228,7 +228,7 @@ /*s*/DROP ROLE r1 CASCADE; /*s*/DROP ROLE r2 CASCADE; /*s*/DROP ROLE r3 CASCADE; -/*U0*/ Workaround for bug where DDL will not Commit +/*d*/ Workaround for bug where DDL will not Commit /*s*/CREATE TABLE bug_workaround (i int); /*s*/INSERT INTO bug_workaround VALUES(1); /*u0*/SHUTDOWN; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSchemaCasc.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSchemaCasc.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSchemaCasc.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSchemaCasc.txt 2022-02-21 14:42:04.000000000 +0000 @@ -73,7 +73,7 @@ /*s*/DROP user sa2 CASCADE; /*s*/DROP user sa3 CASCADE; -/*U0*/ Workaround for bug where DDL will not Commit +-- Workaround for bug where DDL will not Commit /*s*/CREATE TABLE bug_workaround (i int); /*s*/INSERT INTO bug_workaround VALUES(1); /*u0*/SHUTDOWN; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSchemaQuoting.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSchemaQuoting.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSchemaQuoting.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSchemaQuoting.txt 2022-02-21 14:42:06.000000000 +0000 @@ -35,7 +35,7 @@ /*s*/DROP USER u1; /*s*/DROP SCHEMA schema1 CASCADE; -/*U0*/ Workaround for bug where DDL will not Commit +/*d*/ the following lines are workaround for old bug where DDL will not Commit /*s*/CREATE TABLE bug_workaround (i int); /*s*/INSERT INTO bug_workaround VALUES(1); /*u0*/SHUTDOWN; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSeqRightsA.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSeqRightsA.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSeqRightsA.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSeqRightsA.txt 2022-02-21 14:42:06.000000000 +0000 @@ -1,4 +1,4 @@ --- $Id: TestSelfSeqRightsA.txt 5711 2017-02-20 20:51:35Z fredt $ +-- $Id: TestSelfSeqRightsA.txt 6419 2022-02-16 12:30:15Z fredt $ -- Test Grants/Revokes for Sequences (not ALTER/CREATE/DROP rights, as -- tested in the general schema object test scripts). -- We are not testing TABLE rights here. We know that if the table of the @@ -69,7 +69,7 @@ /*e*/GRANT UPDATE ON SEQUENCE public.ps8 TO public; SET SCHEMA public; -/*U*/These two are just workarounds for a DELAY 0 BUG: +/*d*/following 2 lines are just workarounds for a DELAY 0 BUG: UPDATE public.pt SET i = 1; COMMIT; @@ -83,8 +83,9 @@ /*c1*/SELECT i, next value for ps1 FROM pt; SET SCHEMA bsch; /*c1*/SELECT i, next value for public.ps2 FROM public.pt; + -- Don't own - previously threw error but now adds a warning -/*E*/GRANT ALL ON SEQUENCE public.ps2 TO PUBLIC; +GRANT ALL ON SEQUENCE public.ps2 TO PUBLIC; /*u0*/GRANT ALL ON SEQUENCE bsch.bs5 TO PUBLIC; -- By virtue of schema ownership /*c1*/SELECT i, next value for bs2 FROM bt; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSeqRightsB.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSeqRightsB.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSeqRightsB.txt 2018-10-23 07:24:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSeqRightsB.txt 2022-02-21 14:42:04.000000000 +0000 @@ -1,4 +1,4 @@ --- $Id: TestSelfSeqRightsB.txt 5711 2017-02-20 20:51:35Z fredt $ +-- $Id: TestSelfSeqRightsB.txt 6419 2022-02-16 12:30:15Z fredt $ -- Test .log persistence of Sequence rights CONNECT USER blaine PASSWORD "b"; @@ -12,13 +12,15 @@ /*c1*/SELECT i, next value for ps1 FROM pt; SET SCHEMA bsch; /*c1*/SELECT i, next value for public.ps2 FROM public.pt; + -- Don't own - previously threw error but now adds a warning -/*E*/GRANT ALL ON SEQUENCE public.ps2 TO PUBLIC; +GRANT ALL ON SEQUENCE public.ps2 TO PUBLIC; /*u0*/GRANT ALL ON SEQUENCE bsch.bs5 TO PUBLIC; -- By virtue of schema ownership /*c1*/SELECT i, next value for bs2 FROM bt; SET SCHEMA public; /*c1*/SELECT i, next value for bsch.bs1 FROM bsch.bt; + -- Enough schema specification testing. Just use defauls Session schema for -- here on in /*c1*/SELECT i FROM pt; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSeqRightsC.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSeqRightsC.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfSeqRightsC.txt 2018-10-23 07:24:52.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfSeqRightsC.txt 2022-02-21 14:42:06.000000000 +0000 @@ -1,4 +1,4 @@ --- $Id: TestSelfSeqRightsC.txt 5711 2017-02-20 20:51:35Z fredt $ +-- $Id: TestSelfSeqRightsC.txt 6419 2022-02-16 12:30:15Z fredt $ -- Test .script persistence of Sequence rights CONNECT USER blaine PASSWORD "b"; @@ -11,13 +11,16 @@ /*c1*/SELECT i, next value for ps1 FROM pt; SET SCHEMA bsch; /*c1*/SELECT i, next value for public.ps2 FROM public.pt; + -- Don't own - previously threw error but now adds a warning -/*E*/GRANT ALL ON SEQUENCE public.ps2 TO PUBLIC; +GRANT ALL ON SEQUENCE public.ps2 TO PUBLIC; /*u0*/GRANT ALL ON SEQUENCE bsch.bs5 TO PUBLIC; + -- By virtue of schema ownership /*c1*/SELECT i, next value for bs2 FROM bt; SET SCHEMA public; /*c1*/SELECT i, next value for bsch.bs1 FROM bsch.bt; + -- Enough schema specification testing. Just use defauls Session schema for -- here on in /*c1*/SELECT i FROM pt; diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelf.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelf.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelf.txt 2020-12-07 23:50:26.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelf.txt 2022-02-21 14:42:06.000000000 +0000 @@ -11,9 +11,20 @@ -- r ResultSet expected with result in first row/column -- u Update count expected -- e Exception must occur - +-- see TestUtil code for more details on tags -- set database transaction control locks + +-- demonstration of codes used +/*d* Some demo lines +/*c1*/select * from information_schema.tables limit 1 +/*r + PUBLIC*/select table_catalog from information_schema.tables limit 1 +/*e*/select ''' +/*d* Next section dumps one line of result +/*o*/select * from information_schema.tables limit 1 +/*C1*/select * from information_schema.tables limit 1 + -- Miscelaneous tests by fredt -- bug #897591 /*rgood*/CALL CASEWHEN(CURTIME() BETWEEN CAST('00:00:00' AS TIME) AND CAST('23:59:59' AS TIME), 'good', 'bad') diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfUnions.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfUnions.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestSelfUnions.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestSelfUnions.txt 2022-02-21 14:42:06.000000000 +0000 @@ -23,6 +23,7 @@ -- limits /*c5*/SELECT * FROM A UNION SELECT * FROM C ORDER BY ID /*c4*/(SELECT * FROM A ORDER BY ID LIMIT 1 OFFSET 0) UNION SELECT * FROM C +/*c4*/(SELECT * FROM A ORDER BY ID LIMIT 1 OFFSET 0) UNION ALL SELECT * FROM C /*c4*/SELECT * FROM A UNION (SELECT * FROM C ORDER BY ID LIMIT 2 OFFSET 0) LIMIT 4 OFFSET 0 /*r 2 @@ -92,6 +93,7 @@ /*c3*/SELECT * FROM A WHERE ID IN (SELECT * FROM A UNION SELECT * FROM C INTERSECT (SELECT * FROM B EXCEPT SELECT * FROM B)) /*c3*/SELECT * FROM A WHERE EXISTS (SELECT * FROM A UNION SELECT * FROM C INTERSECT (SELECT * FROM B EXCEPT SELECT * FROM B)) /*c0*/SELECT * FROM A WHERE EXISTS (SELECT * FROM A EXCEPT SELECT * FROM C EXCEPT SELECT * FROM B) + --- correlated union create table bt1 ( id varchar(10) ); create table bt2 ( id varchar(10) ); @@ -101,18 +103,21 @@ insert into bt1( id ) values ( 'ccc' ); insert into bt2( id ) values ( 'aaa' ); insert into bt3( id ) values ( 'bbb' ); -/*U*/ the t1.id reference in the next test is not resolved in some runs - only after code changes result in failure + +-- the t1.id reference in the next test is not resolved in some runs - only after code changes result in failure /*c1*/select * from bt1 as t1 where not exists( select id from bt2 as t2 where t2.id = t1.id union all select id from bt3 as t3 where t3.id = t1.id ); + --- null as column in first select create table au (id int, b1 boolean); create table bu (id int); insert into au values(1,true); insert into bu values(2); select id, null as b1 from bu union select id, b1 from au; + -- drop table test if exists; create table test(my_col numeric(10)); @@ -122,5 +127,16 @@ union select 0 mycol2, my_col from test +SET DATABASE SQL SYNTAX ORA TRUE +/*r + 0.0E0 + 0.0E0 +*/SELECT val FROM (SELECT 0 val FROM dual) UNION ALL SELECT cast(0 AS double) FROM dual; + +/*r + 0.0E0 + 0.0E0 +*/SELECT val FROM (SELECT 0 val FROM dual) UNION ALL SELECT 0E0 FROM dual; +SET DATABASE SQL SYNTAX ORA FALSE diff -Nru hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestTriggers.txt hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestTriggers.txt --- hsqldb-2.6.1/hsqldb/testrun/hsqldb/TestTriggers.txt 2018-10-23 07:24:54.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/hsqldb/TestTriggers.txt 2022-02-21 14:42:04.000000000 +0000 @@ -1,4 +1,4 @@ -drop table testtrig if exists; +drop table testtrig if exists cascade; create cached table testtrig(c1 integer generated by default as identity, c2 varchar(40), c3 integer); create trigger tbir before insert on testtrig referencing new row as newrow for each row when (newrow.c2 is not null) diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J001_Embedded_Java; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J001_Embedded_Java/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J002_ResultSetIterator_access_to_JDBC_ResultSet; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J002_ResultSetIterator_access_to_JDBC_ResultSet/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J003_Execution_control; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J003_Execution_control/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J004_Batch_update; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J004_Batch_update/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J005_Call_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J005_Call_statement/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J006_Assignment_Function_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J006_Assignment_Function_statement/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J007_Compound_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J007_Compound_statement/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J008_Datalinks_via_SQL_language; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J008_Datalinks_via_SQL_language/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J009_Multiple_Open_ResultSets; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J009_Multiple_Open_ResultSets/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings.J010_XML_via_SQL_language; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/J010_XML_via_SQL_language/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_10_SQLOLB_Object_Language_Bindings/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.F021_Basic_information_schema; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F021_Basic_information_schema/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.F231_Privilege_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F231_Privilege_tables/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.F341_Usage_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F341_Usage_tables/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.F501_Features_and_conformance_views; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F501_Features_and_conformance_views/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.F502_Enhanced_documentation_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F502_Enhanced_documentation_tables/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.F696_Additional_translation_documentation; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/F696_Additional_translation_documentation/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/package-info.java 2022-03-27 12:38:38.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.S011_Distinct_data_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/S011_Distinct_data_types/README.md 2022-03-27 12:38:38.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.T011_Timestamp_in_Information_Schema; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T011_Timestamp_in_Information_Schema/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.T321_Basic_SQL_invoked_routines; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T321_Basic_SQL_invoked_routines/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas.T322_Declared_data_type_attributes; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_11_SQLSchemata_Information_and_Definition_Schemas/T322_Declared_data_type_attributes/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J511_Commands; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J511_Commands/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J521_JDBC_data_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J521_JDBC_data_types/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J531_Deployment; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J531_Deployment/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J541_SERIALIZABLE; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J541_SERIALIZABLE/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J551_SQLDATA; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J551_SQLDATA/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J561_JAR_privileges; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J561_JAR_privileges/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J571_NEW_operator; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J571_NEW_operator/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J581_Output_parameters; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J581_Output_parameters/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J591_Overloading; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J591_Overloading/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J601_SQL_Java_paths; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J601_SQL_Java_paths/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J611_References; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J611_References/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J621_external_Java_routines; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J621_external_Java_routines/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J622_external_Java_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J622_external_Java_types/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J631_Java_signatures; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J631_Java_signatures/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J641_Static_fields; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J641_Static_fields/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/package-info.java 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language.J651_SQLJRT_Information_Schema; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J651_SQLJRT_Information_Schema/README.md 2022-03-09 18:43:40.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J652_SQLJRT_Usage_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J652_SQLJRT_Usage_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J652_SQLJRT_Usage_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/J652_SQLJRT_Usage_tables/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_13_SQLJRT_SQL_Routines_and_Types_Using_the_Java_Programming_Language/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_14_SQLXML_Extensible_Markup_Language_Related_Specifications/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1,142 @@ +# SQL2NNN 9075-14 — Part 14: XML-Related Specifications (SQL/XML) +## Annex F (informative) Feature taxonomy +#### Table 16 — Feature taxonomy for optional features + +| Feature ID | Feature Name | +|------------|-----------------------------------------------------------------------------| +| X010 | XML type | +| X011 | Arrays of XML type | +| X012 | Multisets of XML type | +| X013 | Distinct types of XML type | +| X014 | Attributes of XML type | +| X015 | Fields of XML type | +| X016 | Persistent XML values | +| X020 | XMLConcat | | +| X025 | XMLCast | +| X030 | XMLDocument | +| X031 | XMLElement | +| X032 | XMLForest | +| X034 | XMLAgg | +| X035 | XMLAgg: ORDER BY option | +| X036 | XMLComment | +| X037 | XMLPI | +| X038 | XMLText | +| X040 | Basic table mapping | +| X041 | Basic table mapping: null absent | +| X042 | Basic table mapping: null as nil | +| X043 | Basic table mapping: table as forest | +| X044 | Basic table mapping: table as element | +| X045 | Basic table mapping: with target namespace | +| X046 | Basic table mapping: data mapping | +| X047 | Basic table mapping: metadata mapping | +| X048 | Basic table mapping: base64 encoding of binary strings | +| X049 | Basic table mapping: hex encoding of binary strings | +| X050 | Advanced table mapping | +| X051 | Advanced table mapping: null absent | +| X052 | Advanced table mapping: null as nil | +| X053 | Advanced table mapping: table as forest | +| X054 | Advanced table mapping: table as element | +| X055 | Advanced table mapping: with target namespace | +| X056 | Advanced table mapping: data mapping | +| X057 | Advanced table mapping: metadata mapping | +| X058 | Advanced table mapping: base64 encoding of binary strings | +| X059 | Advanced table mapping: hex encoding of binary strings | +| X060 | XMLParse: Character string input and CONTENT option | +| X061 | XMLParse: Character string input and DOCUMENT option | +| X065 | XMLParse: BLOB input and CONTENT option | +| X066 | XMLParse: BLOB input and DOCUMENT option | +| X068 | XMLSerialize: BOM | +| X069 | XMLSerialize: INDENT | +| X070 | XMLSerialize: Character string serialization and CONTENT option | +| X071 | XMLSerialize: Character string serialization and DOCUMENT option | +| X072 | XMLSerialize: Character string serialization | +| X073 | XMLSerialize: BLOB serialization and CONTENT option | +| X074 | XMLSerialize: BLOB serialization and DOCUMENT option | +| X075 | XMLSerialize: BLOB serialization | +| X076 | XMLSerialize: VERSION | +| X077 | XMLSerialize: explicit ENCODING option | +| X078 | XMLSerialize: explicit XML declaration | +| X080 | Namespaces in XML publishing | +| X081 | Query-level XML namespace declarations | +| X082 | XML namespace declarations in DML | +| X083 | XML namespace declarations in DDL | +| X084 | XML namespace declarations in compound statements | +| X085 | Predefined namespace prefixes59 X086 XML namespace declarations in XMLTable | +| X090 | XML document predicate | +| X091 | XML content predicate | +| X096 | XMLExists | +| X100 | Host language support for XML: CONTENT option | +| X101 | Host language support for XML: DOCUMENT option | +| X110 | Host language support for XML: VARCHAR mapping | +| X111 | Host language support for XML: CLOB mapping | +| X112 | Host language support for XML: BLOB mapping | +| X113 | Host language support for XML: STRIP WHITESPACE option | +| X114 | Host language support for XML: PRESERVE WHITESPACE option | +| X120 | XML parameters in SQL routines | +| X121 | XML parameters in external routines | +| X131 | Query-level XMLBINARY clause | +| X132 | XMLBINARY clause in DML | +| X133 | XMLBINARY clause in DDL | +| X134 | XMLBINARY clause in compound statements | +| X135 | XMLBINARY clause in subqueries | +| X141 | IS VALID predicate: data-driven case | +| X142 | IS VALID predicate: ACCORDING TO clause | +| X143 | IS VALID predicate: ELEMENT clause | +| X144 | IS VALID predicate: schema location | +| X145 | IS VALID predicate outside check constraints | +| X151 | IS VALID predicate with DOCUMENT option | +| X152 | IS VALID predicate with CONTENT option | +| X153 | IS VALID predicate with SEQUENCE option | +| X155 | IS VALID predicate: NAMESPACE without ELEMENT clause | +| X157 | IS VALID predicate: NO NAMESPACE with ELEMENT clause | +| X160 | Basic Information Schema for registered XML Schemas | +| X161 | Advanced Information Schema for registered XML Schemas | +| X170 | XML null handling options | +| X171 | NIL ON NO CONTENT option | +| X181 | XML(DOCUMENT(UNTYPED)) type | +| X182 | XML(DOCUMENT(ANY)) type | +| X190 | XML(SEQUENCE) type | +| X191 | XML(DOCUMENT(XMLSCHEMA)) type | +| X192 | XML(CONTENT(XMLSCHEMA)) type | +| X200 | XMLQuery | +| X201 | XMLQuery: RETURNING CONTENT | +| X202 | XMLQuery: RETURNING SEQUENCE | +| X203 | XMLQuery: passing a context item | +| X204 | XMLQuery: initializing an XQuery variable | +| X205 | XMLQuery: EMPTY ON EMPTY option | +| X206 | XMLQuery: NULL ON EMPTY option | +| X211 | XML 1.1 support | +| X221 | XML passing mechanism BY VALUE | +| X222 | XML passing mechanism BY REF | +| X231 | XML(CONTENT(UNTYPED)) type | +| X232 | XML(CONTENT(ANY)) type | +| X241 | RETURNING CONTENT in XML publishing | +| X242 | RETURNING SEQUENCE in XML publishing | +| X251 | Persistent XML values of XML(DOCUMENT(UNTYPED)) type | +| X252 | Persistent XML values of XML(DOCUMENT(ANY)) type | +| X253 | Persistent XML values of XML(CONTENT(UNTYPED)) type | +| X254 | Persistent XML values of XML(CONTENT(ANY)) type | +| X255 | Persistent XML values of XML(SEQUENCE) type | +| X256 | Persistent XML values of XML(DOCUMENT(XMLSCHEMA)) type | +| X257 | Persistent XML values of XML(CONTENT(XMLSCHEMA)) type | +| X260 | XML type: ELEMENT clause | +| X261 | XML type: NAMESPACE without ELEMENT clause | +| X263 | XML type: NO NAMESPACE with ELEMENT clause | +| X264 | XML type: schema location | +| X271 | XMLValidate: data-driven case | +| X272 | XMLValidate: ACCORDING TO clause | +| X273 | XMLValidate: ELEMENT clause | +| X274 | XMLValidate: schema location | +| X281 | XMLValidate: with DOCUMENT option | +| X282 | XMLValidate with CONTENT option | +| X283 | XMLValidate with SEQUENCE option | +| X284 | XMLValidate NAMESPACE without ELEMENT clause | +| X286 | XMLValidate: NO NAMESPACE with ELEMENT clause | +| X300 | XMLTable | +| X301 | XMLTable: derived column list option | +| X302 | XMLTable: ordinality column option | +| X303 | XMLTable: column default option | +| X304 | XMLTable: passing a context item | +| X305 | XMLTable: initializing an XQuery variable | +| X400 | Name and identifier mapping | +| X410 | Alter column data type: XML type | diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.B021_Direct_SQL; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B021_Direct_SQL/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.B128_Routine_language_SQL; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/B128_Routine_language_SQL/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.C011_Call_Level_Interface; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/C011_Call_Level_Interface/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E011_Numeric_data_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E011_Numeric_data_types/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E021_Character_data_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_data_types/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E021_Character_string_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E021_Character_string_types/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/E031_Identifiers_03_Trailing_underscore.sql hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/E031_Identifiers_03_Trailing_underscore.sql --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/E031_Identifiers_03_Trailing_underscore.sql 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/E031_Identifiers_03_Trailing_underscore.sql 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1,11 @@ +-- Test of SQL Feasture E03 - Identifiers, Subfeatrure 03 - Trailing underscore +/*s*/DROP TABLE IF EXISTS TEST_; +/*s*/CREATE TABLE TEST_(ID_ INT); +/*c1*/SELECT COUNT(*) AS TABLE_COUNT FROM INFORMATION_SCHEMA.TABLES T WHERE T.TABLE_SCHEMA = 'PUBLIC' AND T.TABLE_NAME = 'TEST_'; +/*s*/ALTER TABLE TEST_ ADD COLUMN VALUE_ VARCHAR(255) NOT NULL; +/*c1*/SELECT COUNT(*) AS COLUMN_COUNT FROM INFORMATION_SCHEMA.COLUMNS T WHERE T.TABLE_SCHEMA = 'PUBLIC' AND T.TABLE_NAME = 'TEST_' AND T.COLUMN_NAME = 'VALUE_'; +/*s*/ALTER TABLE TEST_ DROP COLUMN VALUE_; +/*c1*/SELECT COUNT(*) AS COLUMN_COUNT FROM INFORMATION_SCHEMA.COLUMNS T WHERE T.TABLE_SCHEMA = 'PUBLIC' AND T.TABLE_NAME = 'TEST_' AND T.COLUMN_NAME = 'VALUE_'; +/*s*/DROP TABLE TEST_; +/*c1*/SELECT COUNT(*) AS TABLE_COUNT FROM INFORMATION_SCHEMA.TABLES T WHERE T.TABLE_SCHEMA = 'PUBLIC' AND T.TABLE_NAME = 'TEST_'; + diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E031_identifiers; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E031_identifiers/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E051_Basic_query_specification; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E051_Basic_query_specification/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E061_Basic_predicates_and_search_conditions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E061_Basic_predicates_and_search_conditions/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E071_Basic_query_expressions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E071_Basic_query_expressions/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E081_Basic_Privileges; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E081_Basic_Privileges/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E091_Set_functions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E091_Set_functions/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E101_Basic_data_manipulation; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E101_Basic_data_manipulation/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E111_Single_row_SELECT_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E111_Single_row_SELECT_statement/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E121_Basic_cursor_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E121_Basic_cursor_support/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E131_Null_value_support_nulls_in_lieu_of_values; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E131_Null_value_support_nulls_in_lieu_of_values/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E141_Basic_integrity_constraints; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E141_Basic_integrity_constraints/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E151_Transaction_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E151_Transaction_support/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E152_Basic_SET_TRANSACTION_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E152_Basic_SET_TRANSACTION_statement/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E153_Updatable_queries_with_subqueries; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E153_Updatable_queries_with_subqueries/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E161_SQL_comments_using_leading_double_minus; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E161_SQL_comments_using_leading_double_minus/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E171_SQLSTATE_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E171_SQLSTATE_support/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.E182_Host_language_binding; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/E182_Host_language_binding/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F031_Basic_schema_manipulation; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F031_Basic_schema_manipulation/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F032_CASCADE_drop_behavior; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F032_CASCADE_drop_behavior/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F033_ALTER_TABLE_statement_DROP_COLUMN_clause; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F033_ALTER_TABLE_statement_DROP_COLUMN_clause/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F034_Extended_REVOKE_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F034_Extended_REVOKE_statement/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F041_Basic_joined_table; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F041_Basic_joined_table/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/package-info.java 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F051_Basic_date_and_time; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F051_Basic_date_and_time/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F052_Intervals_and_datetime_arithmetic; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F052_Intervals_and_datetime_arithmetic/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F053_OVERLAPS_predicate; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F053_OVERLAPS_predicate/README.md 2022-03-09 18:43:42.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F081_UNION_and_EXCEPT_in_views; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F081_UNION_and_EXCEPT_in_views/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F111_Isolation_levels_other_than_SERIALIZABLE; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F111_Isolation_levels_other_than_SERIALIZABLE/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F121_Basic_diagnostics_management; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F121_Basic_diagnostics_management/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F131_Grouped_operations; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F131_Grouped_operations/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F171_Multiple_schemas_per_user; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F171_Multiple_schemas_per_user/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F191_Referential_delete_actions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F191_Referential_delete_actions/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F201_CAST_function; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F201_CAST_function/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F221_Explicit_defaults; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F221_Explicit_defaults/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F222_INSERT_statement_DEFAULT_VALUES_clause; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F222_INSERT_statement_DEFAULT_VALUES_clause/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F231_Privilege_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F231_Privilege_tables/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F251_Domain_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F251_Domain_support/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F261_CASE_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F261_CASE_expression/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F262_Extended_CASE_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F262_Extended_CASE_expression/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F263_Comma_separated_predicates_in_simple_CASE_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F263_Comma_separated_predicates_in_simple_CASE_expression/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F271_Compound_character_literals; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F271_Compound_character_literals/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F281_LIKE_enhancements; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F281_LIKE_enhancements/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F291_UNIQUE_predicate; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F291_UNIQUE_predicate/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F301_CORRESPONDING_in_query_expressions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F301_CORRESPONDING_in_query_expressions/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F302_INTERSECT_table_operator; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F302_INTERSECT_table_operator/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F304_EXCEPT_ALL_table_operator; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F304_EXCEPT_ALL_table_operator/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F311_Schema_definition_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F311_Schema_definition_statement/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F312_MERGE_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F312_MERGE_statement/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F321_User_authorization; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F321_User_authorization/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F361_Subprogram_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F361_Subprogram_support/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F381_Extended_schema_manipulation; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F381_Extended_schema_manipulation/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F391_Long_identifiers; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F391_Long_identifiers/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F392_Unicode_escapes_in_identifiers; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F392_Unicode_escapes_in_identifiers/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F393_Unicode_escapes_in_literals; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F393_Unicode_escapes_in_literals/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F401_Extended_joined_table; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F401_Extended_joined_table/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F402_Named_column_joins_for_LOBs_arrays_and_multisets; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F402_Named_column_joins_for_LOBs_arrays_and_multisets/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F411_Time_zone_specification; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F411_Time_zone_specification/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F421_National_character; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F421_National_character/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F441_Extended_set_function_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F441_Extended_set_function_support/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F442_Mixed_column_references_in_set_functions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F442_Mixed_column_references_in_set_functions/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F451_Character_set_definition; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F451_Character_set_definition/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F461_Named_character_sets; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F461_Named_character_sets/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F471_Scalar_subquery_values; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F471_Scalar_subquery_values/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F481_Expanded_NULL_predicate; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F481_Expanded_NULL_predicate/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F491_Constraint_management; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F491_Constraint_management/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F531_Temporary_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F531_Temporary_tables/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F555_Enhanced_seconds_precision; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F555_Enhanced_seconds_precision/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F561_Full_value_expressions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F561_Full_value_expressions/README.md 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F571_Truth_value_tests; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F571_Truth_value_tests/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F591_Derived_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F591_Derived_tables/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F641_Row_and_table_constructors; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F641_Row_and_table_constructors/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F651_Catalog_name_qualifiers; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F651_Catalog_name_qualifiers/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F661_Simple_tables; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F661_Simple_tables/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F672_Retrospective_check_constraints; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F672_Retrospective_check_constraints/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F690_Collation_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F690_Collation_support/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F692_Enhanced_collation_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F692_Enhanced_collation_support/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F701_Referential_update_actions; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F701_Referential_update_actions/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F711_ALTER_domain; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F711_ALTER_domain/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F731_INSERT_column_privileges; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F731_INSERT_column_privileges/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/package-info.java 2022-03-09 18:43:44.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F741_Referential_MATCH_types; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F741_Referential_MATCH_types/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F751_View_CHECK_enhancements; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F751_View_CHECK_enhancements/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F762_CURRENT_CATALOG; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F762_CURRENT_CATALOG/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F763_CURRENT_SCHEMA; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F763_CURRENT_SCHEMA/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F801_Full_set_function; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F801_Full_set_function/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F821_Local_table_references; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F821_Local_table_references/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F850_Top_level_order_by_clause_in_query_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F850_Top_level_order_by_clause_in_query_expression/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/package-info.java 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F851_order_by_clause_in_subqueries; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F851_order_by_clause_in_subqueries/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F852_Top_level_order_by_clause_in_views; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F852_Top_level_order_by_clause_in_views/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/package-info.java 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F855_Nested_order_by_clause_in_query_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F855_Nested_order_by_clause_in_query_expression/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F856_Nested_fetch_first_clause_in_query_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F856_Nested_fetch_first_clause_in_query_expression/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/package-info.java 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation.F857_Top_level_fetch_first_clause_in_query_expression; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/F857_Top_level_fetch_first_clause_in_query_expression/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_2_SQL_Foundation; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_2_SQL_Foundation/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru "/tmp/tmp_0bpm_7m/9POo46eOkt/hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/C011_All_facilities_defined_by this_part_of_9075/README.md" "/tmp/tmp_0bpm_7m/lrkf8so7nm/hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/C011_All_facilities_defined_by this_part_of_9075/README.md" --- "/tmp/tmp_0bpm_7m/9POo46eOkt/hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/C011_All_facilities_defined_by this_part_of_9075/README.md" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmp_0bpm_7m/lrkf8so7nm/hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/C011_All_facilities_defined_by this_part_of_9075/README.md" 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_3_SQLCLI_Call_Level_Interface; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_3_SQLCLI_Call_Level_Interface/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P001_Stored_modules; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P001_Stored_modules/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P002_Computational_completeness; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P002_Computational_completeness/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P003_Information_Schema_views; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P003_Information_Schema_views/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P004_Extended_CASE_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P004_Extended_CASE_statement/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P005_Qualified_SQL_variable_references; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P005_Qualified_SQL_variable_references/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P006_Multiple_assignment; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P006_Multiple_assignment/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P007_Enhanced_diagnostics_management; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P007_Enhanced_diagnostics_management/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules.P008_Commas_separated_predicates_in_a_CASE_statement; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/P008_Commas_separated_predicates_in_a_CASE_statement/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_4_SQLPSM_Persistent_Stored_Modules/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M001_Datalinks; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M001_Datalinks/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M002_Datalinks_via_SQLCLI; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M002_Datalinks_via_SQLCLI/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M003_Datalinks_via_Embedded_SQL; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M003_Datalinks_via_Embedded_SQL/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M004_Foreign_data_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M004_Foreign_data_support/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M005_Foreign_schema_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M005_Foreign_schema_support/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M006_GetSQLString_routine; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M006_GetSQLString_routine/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M007_TransmitRequest; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M007_TransmitRequest/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M009_GetOpts_and_GetStatistics_routines; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M009_GetOpts_and_GetStatistics_routines/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M010_Foreign_data_wrapper_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M010_Foreign_data_wrapper_support/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M030_SQL_server_foreign_data_support; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M030_SQL_server_foreign_data_support/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data.M031_Foreign_data_wrapper_general_routines; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/M031_Foreign_data_wrapper_general_routines/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn.ISO_IEC_9075_9_SQLMED_Management_of_External_Data; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/ISO_IEC_9075_9_SQLMED_Management_of_External_Data/README.md 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/package-info.java hsqldb-2.7.0/hsqldb/testrun/sql2nnn/package-info.java --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/package-info.java 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/package-info.java 2022-03-09 18:43:46.000000000 +0000 @@ -0,0 +1 @@ +package sql2nnn; diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/README.md hsqldb-2.7.0/hsqldb/testrun/sql2nnn/README.md --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/README.md 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/README.md 2022-03-09 18:43:48.000000000 +0000 @@ -0,0 +1,3 @@ +@todo - title, description, sql and / or groovy scripts for 9075 feature compliance + ++ Contrubutions Welcome diff -Nru hsqldb-2.6.1/hsqldb/testrun/sql2nnn/title.sql hsqldb-2.7.0/hsqldb/testrun/sql2nnn/title.sql --- hsqldb-2.6.1/hsqldb/testrun/sql2nnn/title.sql 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sql2nnn/title.sql 2022-05-18 07:29:06.000000000 +0000 @@ -0,0 +1 @@ +select 'ISO IEC 9075 feature compliance test suite' as title from (values('')) dual(dummy) diff -Nru hsqldb-2.6.1/hsqldb/testrun/sqltool/build.gradle hsqldb-2.7.0/hsqldb/testrun/sqltool/build.gradle --- hsqldb-2.6.1/hsqldb/testrun/sqltool/build.gradle 2018-10-23 07:24:56.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sqltool/build.gradle 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -defaultTasks 'runTests' - -task runTests << { - def params = ['NO_JVM_EXIT'] - boolean verbose = - project.hasProperty('verbose') && project.property('verbose') - if (verbose) params << '-v' - if (project.hasProperty('norun') && project.property('norun')) - params << '-n' - if (project.hasProperty('scripts')) - params.addAll(project.property('scripts').split(',')) - if (!verbose) System.console().writer().print(' ') - run(new File('runtests.groovy'), params as String[]) -} diff -Nru hsqldb-2.6.1/hsqldb/testrun/sqltool/re.inter hsqldb-2.7.0/hsqldb/testrun/sqltool/re.inter --- hsqldb-2.6.1/hsqldb/testrun/sqltool/re.inter 1970-01-01 00:00:00.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sqltool/re.inter 2022-02-21 14:42:06.000000000 +0000 @@ -0,0 +1,4 @@ +CALL 'token'; +CALL 'other'; +:/tok/; +*if (*? != token) \q Token is not 'token' but: *{?} diff -Nru hsqldb-2.6.1/hsqldb/testrun/sqltool/runtests.bash hsqldb-2.7.0/hsqldb/testrun/sqltool/runtests.bash --- hsqldb-2.6.1/hsqldb/testrun/sqltool/runtests.bash 2018-10-23 07:24:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sqltool/runtests.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -#!/bin/bash -p -PROGNAME="${0##*/}" - -# $Id: runtests.bash 4697 2011-11-04 13:32:05Z unsaved $ -# Distribution is permitted under the terms of the HSQLDB license. -# (c) 2011 The HSQL Development Group -# -# Wrapper that serves two purposes: -# (1) Takes traditional parameters in format: command -switches... filenames... -# and converts to a Gradle command of format: Gradle -P x=y... taskname -# (2) Invokes the 'gradlew' wrapper script supplied by the HyperSQL -# distribution. -# This script automatically 'cd's to directory .../testrun/sqltool in which -# it resides, so that it may be safely executed from desktop managers, etc. -# The main work script, "runtests.groovy" does not have this limitation. -# -# author: Blaine Simpson, unsaved@users.sourceforge.net -# since: HSQLDB 1.8.0.8 / 1.9.x -# see: README.txt in this same directory. -# In November 2011 this script converted from the sole test runner script, to -# one wrapper for Gradle (w/ "build.gradle") + runtests.groovy. - -set +u -shopt -s xpg_echo # This will fail for very old implementations of Bash - -SYNTAX_MSG="$PROGNAME [-nvh] [testscript.sql...] -With -v, output from SqlTool will be shown. Otherwise, only tests and results -will be shown. -If no script names are supplied, *.sql and *.nsql from the current directory -will be executed. -Exit value is number of test failures, or 1 for other errors or if number of -test failures exceeds 255 (shell scripts can't handle exit values > 255). - -Non-verbose Result Key: - T = Testing - + = test Succeeded - - = test Failed" - -while [ $# -gt 0 ]; do case "$1" in -*) - case "$1" in *v*) VERBOSE=1;; esac - case "$1" in *n*) NORUN=1;; esac - case "$1" in *h*) - echo "$SYNTAX_MSG" - exit 0 - ;; esac - shift;; - *) break 2;; -esac; done - -case "$0" in -/*) SCRIPTDIR="${0%/*}";; */*) SCRIPTDIR="$PWD/${0%/*}";; *) SCRIPTDIR="$PWD";; -esac -case "$SCRIPTDIR" in *?/.) SCRIPTDIR="${SCRIPTDIR%/.}"; esac - -cd "$SCRIPTDIR" - -scriptsString= -while [ $# -gt 0 ]; do - scriptsString="$scriptsString$1" - shift - [ $# -gt 0 ] && scriptsString="$scriptsString," -done - -[ -n "$VERBOSE" ] && -echo ../../build/gradlew ${VERBOSE:+-Pverbose=true} ${NORUN:+-Pnorun=true} ${scriptsString:+-Pscripts=$scriptsString} -exec ../../build/gradlew ${VERBOSE:+-Pverbose=true} ${NORUN:+-Pnorun=true} ${scriptsString:+-Pscripts=$scriptsString} diff -Nru hsqldb-2.6.1/hsqldb/testrun/sqltool/runtests.groovy hsqldb-2.7.0/hsqldb/testrun/sqltool/runtests.groovy --- hsqldb-2.6.1/hsqldb/testrun/sqltool/runtests.groovy 2018-10-23 07:24:58.000000000 +0000 +++ hsqldb-2.7.0/hsqldb/testrun/sqltool/runtests.groovy 2022-02-21 14:42:08.000000000 +0000 @@ -1,6 +1,6 @@ -#!/local/groovy/bin/groovy +#!/usr/bin/env groovy /* - * $Id: runtests.groovy 4809 2011-11-20 21:12:35Z unsaved $ + * $Id: runtests.groovy 6377 2021-11-18 14:51:35Z unsaved $ * Distribution is permitted under the terms of the HSQLDB license. * (c) 2011 The HSQL Development Group */