Skip to content

Java: DuckDBConnection#newConnection(String, boolean, Properties) accepts invalid URL #10441

@peteraisher

Description

@peteraisher

What happens?

A URL starting with "jdbc:duckdb" followed by any char other than ':' is invalid, but will be erroneously accepted and processed by org.duckdb.DuckDBConnection#newConnection as if the following char was ':'.

To Reproduce

DuckDBConnection.newConnection("jdbc:duckdb@foo", false, new Properties())

Expected behaviour: SQLException thrown with message: "DuckDB JDBC URL needs to start with 'jdbc:duckdb:'"

Actual behaviour: no SQLException is thrown, database is created.

OS:

aarch64

DuckDB Version:

v0.9.2

DuckDB Client:

Java

Full Name:

Peter Aisher

Affiliation:

mgm technology partners gmbh

Have you tried this on the latest nightly build?

I have tested with a release build (and could not test with a nightly build)

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR submittedA pull request was submitted to fix the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions