Author: gk Date: Thu Jun 22 08:56:04 2023 New Revision: 1910554 URL: http://svn.apache.org/viewvc?rev=1910554&view=rev Log: - remove xerces dependency as package org.xml.sax conflicts with default java 11 (9) system module packages - add test for another constructor call in CriterionTest.java - fix options in mysql, which hast to be set _after_ (create_definitions) (round brackets) - reorder and add some more options for mysql "table create options" outlets (groovy/vm).
Modified: db/torque/trunk/torque-generator/pom.xml db/torque/trunk/torque-maven-plugin/pom.xml db/torque/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/table.groovy db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.groovy db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm Modified: db/torque/trunk/torque-generator/pom.xml URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-generator/pom.xml?rev=1910554&r1=1910553&r2=1910554&view=diff ============================================================================== --- db/torque/trunk/torque-generator/pom.xml (original) +++ db/torque/trunk/torque-generator/pom.xml Thu Jun 22 08:56:04 2023 @@ -162,16 +162,13 @@ </exclusions> </dependency> <!-- - We do not depend on any xerces features. However, the standard - xml parser packaged in java is sometimes buggy (e.g.1.6.0_20 on windows) - so better explicitly use a working parser + java 11 has org.xml packages, which conflicts without expicit settings: removed xerces --> - <!-- upgrading to 2.12. due to https://nvd.nist.gov/vuln/detail/CVE-2012-0881 --> - <dependency> + <!--dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.12.1</version> - </dependency> + </dependency--> <dependency> <groupId>org.xmlunit</groupId> Modified: db/torque/trunk/torque-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-maven-plugin/pom.xml?rev=1910554&r1=1910553&r2=1910554&view=diff ============================================================================== --- db/torque/trunk/torque-maven-plugin/pom.xml (original) +++ db/torque/trunk/torque-maven-plugin/pom.xml Thu Jun 22 08:56:04 2023 @@ -68,17 +68,14 @@ </exclusion> </exclusions> </dependency> - <dependency> - <!-- - We do not depend on any xerces features. However, the standard - xml parser packaged in java is sometimes buggy (e.g.1.6.0_20 on windows) - so better explicitly use a working parser + <!-- + java 11 has org.xml packages, removed xerces --> - <!-- upgrading to 2.12. due to https://nvd.nist.gov/vuln/detail/CVE-2012-0881 --> + <!--dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.12.1</version> - </dependency> + </dependency--> <dependency> <groupId>commons-io</groupId> Modified: db/torque/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java?rev=1910554&r1=1910553&r2=1910554&view=diff ============================================================================== --- db/torque/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java (original) +++ db/torque/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java Thu Jun 22 08:56:04 2023 @@ -95,12 +95,17 @@ public class CriterionTest extends BaseT new ColumnImpl("myTable", "myColumn"), null, Criteria.ISNULL); assertEquals("myTable.myColumn IS NULL", criterion1.toString()); - - // using new constructor without need to define second value + Criterion criterion2 = new Criterion( - new ColumnImpl("myTable", "myColumn"), Criteria.ISNULL); + new ColumnImpl("myTable", "myColumn"), SqlEnum.ISNULL); assertEquals("myTable.myColumn IS NULL", criterion2.toString()); + + // using new constructor without need to define second value + Criterion criterion3 = new Criterion( + new ColumnImpl("myTable", "myColumn"), Criteria.ISNULL); + assertEquals("myTable.myColumn IS NULL", + criterion3.toString()); } Modified: db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/table.groovy URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/table.groovy?rev=1910554&r1=1910553&r2=1910554&view=diff ============================================================================== --- db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/table.groovy (original) +++ db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/table.groovy Thu Jun 22 08:56:04 2023 @@ -36,8 +36,8 @@ def result = """ # ----------------------------------------------------------------------- CREATE TABLE $table.name ( -${createTableSql}${torqueGenGroovy.mergepoint("createOptions")} -); +${createTableSql} +)${torqueGenGroovy.mergepoint("createOptions")}; """ Modified: db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.groovy URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.groovy?rev=1910554&r1=1910553&r2=1910554&view=diff ============================================================================== --- db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.groovy (original) +++ db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.groovy Thu Jun 22 08:56:04 2023 @@ -27,13 +27,15 @@ for (org.apache.torque.templates.model.O if (option.key == "ENGINE" || option.key == "AVG_ROW_LENGTH" || option.key == "CHARACTER SET" - || option.key == "DEFAULT CHARACTER SET" || option.key == "CHECKSUM" || option.key == "COLLATE" - || option.key == "DEFAULT COLLATE" + || option.key == "COMMENT" || option.key == "CONNECTION" || option.key == "DATA DIRECTORY" + || option.key == "DEFAULT CHARACTER SET" + || option.key == "DEFAULT COLLATE" || option.key == "DELAY_KEY_WRITE" + || option.key == "ENGINE" || option.key == "INDEX DIRECTORY" || option.key == "INSERT_METHOD" || option.key == "KEY_BLOCK_SIZE" Modified: db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm?rev=1910554&r1=1910553&r2=1910554&view=diff ============================================================================== --- db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm (original) +++ db/torque/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/mysql/tableCreateOptions.vm Thu Jun 22 08:56:04 2023 @@ -28,12 +28,14 @@ #if ($key == "ENGINE" || $key == "AVG_ROW_LENGTH" || $key == "CHARACTER SET" - || $key == "DEFAULT CHARACTER SET" || $key == "CHECKSUM" || $key == "COLLATE" - || $key == "DEFAULT COLLATE" + || $key == "COMMENT" || $key == "CONNECTION" + || $key == "ENGINE" || $key == "DATA DIRECTORY" + || $key == "DEFAULT CHARACTER SET" + || $key == "DEFAULT COLLATE" || $key == "DELAY_KEY_WRITE" || $key == "INDEX DIRECTORY" || $key == "INSERT_METHOD" --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org