This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 1d87e020ad00246a1fa3f0e43b7da288ff3ca170
Author: Jim Jagielski <[email protected]>
AuthorDate: Fri Nov 20 07:37:17 2026 -0500

    hsqldb: report sdbc:embedded:hsqldb as the connection URL again
    
    This was lost when the JDBC bridge was ported to Java (956476d7ae), so 
AutoValue columns got no IDENTITY and would cause errors in the Build Wiz.
    
    (cherry picked from commit ed9c333b698442daf57f24eb4b9af229f2676590)
---
 .../src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java      | 5 ++++-
 main/connectivity/source/drivers/hsqldb/HDriver.cxx                  | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
 
b/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
index 8baf1d8e48..ba456617cf 100644
--- 
a/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
+++ 
b/main/connectivity/java/sdbc_jdbc/src/main/java/com/sun/star/comp/sdbc/JavaSQLConnection.java
@@ -361,6 +361,8 @@ public class JavaSQLConnection extends ComponentBase
         NamedValue[] systemProperties = new NamedValue[0];
 
         try {
+            // a wrapping driver (embedded HSQLDB) wants its own URL in 
getMetaData().getURL()
+            this.url = Tools.getOrDefault(info, "ReportedURL", url);
             driverClass = Tools.getOrDefault(info, "JavaDriverClass", 
driverClass);
             driverClassPath = Tools.getOrDefault(info, "JavaDriverClassPath", 
driverClassPath);
             if (driverClassPath.isEmpty()) {
@@ -519,7 +521,8 @@ public class JavaSQLConnection extends ComponentBase
                     !propertyValue.Name.equals("Authentication") &&
                     !propertyValue.Name.equals("PreferDosLikeLineEnds") &&
                     !propertyValue.Name.equals("PrimaryKeySupport") &&
-                    !propertyValue.Name.equals("RespectDriverResultSetType")) {
+                    !propertyValue.Name.equals("RespectDriverResultSetType") &&
+                    !propertyValue.Name.equals("ReportedURL")) {
                 properties.setProperty(propertyValue.Name, 
AnyConverter.toString(propertyValue.Value));
             }
         }
diff --git a/main/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/main/connectivity/source/drivers/hsqldb/HDriver.cxx
index 249b16075e..ee377d69bb 100644
--- a/main/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/main/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -257,6 +257,10 @@ namespace connectivity
                     ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CALL 
IDENTITY()" ) ) );
                 aProperties.put( "IgnoreDriverPrivileges", true );
 
+                // the Java JDBC bridge has no OMetaConnection to tunnel to 
(see below), so it reports this URL;
+                // without it dbaccess never finds our catalog and AutoValue 
columns get no IDENTITY
+                aProperties.put( "ReportedURL", url );
+
                 // don't want to expose HSQLDB's schema capabilities which 
exist since 1.8.0RC10
                 aProperties.put( "default_schema",
                     ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );

Reply via email to