netbeans-netcat mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Efrem Mc <>
Subject Fwd: [jira] [Work logged] (NETBEANS-673) Add support for MariaDB JDBC driver in Add Connection dialog
Date Tue, 17 Apr 2018 23:48:48 GMT
Hi Dev:

Please let know when this is added in the code base.  I have tested it
by installing it manually and it works.


Efrem McCrimon

---------- Forwarded message ----------
From: ASF GitHub Bot (JIRA) <>
Date: Tue, Apr 17, 2018 at 2:45 PM
Subject: [jira] [Work logged] (NETBEANS-673) Add support for MariaDB
JDBC driver in Add Connection dialog


ASF GitHub Bot logged work on NETBEANS-673:

                Author: ASF GitHub Bot
            Created on: 17/Apr/18 18:44
            Start Date: 17/Apr/18 18:44
    Worklog Time Spent: 10m
      Work Description: matthiasblaesing closed pull request #506:
[NETBEANS-673] Add support for MariaDB JDBC driver in Add Connection

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/db/src/org/netbeans/modules/db/util/
index 792b49bcd..c1067b45e 100644
--- a/db/src/org/netbeans/modules/db/util/
+++ b/db/src/org/netbeans/modules/db/util/
@@ -28,6 +28,7 @@ TYPE_Cloudscape=Cloudscape Server
 ERR_InvalidURL=Invalid URL, should be of the form \n{0}

 DRIVERNAME_MySQL=MySQL (Connector/J driver)
+DRIVERNAME_MariaDB=MariaDB (MySQL-compatible)
 DRIVERNAME_JavaDbEmbedded=Java DB (Embedded)
 DRIVERNAME_JavaDbNetwork=Java DB (Network)
diff --git a/db/src/org/netbeans/modules/db/util/
index e11f44284..1c9279e25 100644
--- a/db/src/org/netbeans/modules/db/util/
+++ b/db/src/org/netbeans/modules/db/util/
@@ -223,7 +223,17 @@ private static JdbcUrl add(String name, String
driverClassName, String urlTempla
+        url = add(NbBundle.getMessage(DriverListUtil.class,
+                "org.mariadb.jdbc.Driver",
"jdbc:mariadb://[<HOST>[:<PORT>]][/<DB>][?<ADDITIONAL>]", true); //
+        /* The zeroDateTimeBehavior property is not supported by the
MariaDB driver, so drop it from
+        the sample URL ( ).
The system database seems to
+        still be called "mysql" ( ). */
+        url.setSampleUrl("jdbc:mariadb://localhost:3306/mysql");
+        url.setSampleUser("root");
+        url.setSamplePassword("");
         add("MySQL (MM.MySQL driver)",
diff --git a/db/test/unit/src/org/netbeans/modules/db/util/
index e1ea17c61..61cc7b24d 100644
--- a/db/test/unit/src/org/netbeans/modules/db/util/
+++ b/db/test/unit/src/org/netbeans/modules/db/util/
@@ -207,6 +207,26 @@ public void testMySQL() throws Exception {
         testUrlString(url, propValues, "jdbc:mysql:///" + DB);
+    public void testMariaDB() throws Exception {
+        ArrayList<String> requiredProps = new ArrayList<String>();
+        JdbcUrl url = checkUrl(getDriverName("DRIVERNAME_MariaDB"),
null, "org.mariadb.jdbc.Driver",
+                "jdbc:mariadb://[<HOST>[:<PORT>]][/<DB>][?<ADDITIONAL>]",
+                STD_SUPPORTED_PROPS, requiredProps);
+        HashMap<String, String> propValues =
+        testUrlString(url, propValues, "jdbc:mariadb://" + HOST + ":"
+ PORT + "/" + DB + "?" + ADDITIONAL);
+        propValues.remove(JdbcUrl.TOKEN_ADDITIONAL);
+        testUrlString(url, propValues, "jdbc:mariadb://" + HOST + ":"
+ PORT + "/" + DB);
+        propValues.remove(JdbcUrl.TOKEN_PORT);
+        testUrlString(url, propValues, "jdbc:mariadb://" + HOST + "/" + DB);
+        propValues.remove(JdbcUrl.TOKEN_HOST);
+        testUrlString(url, propValues, "jdbc:mariadb:///" + DB);
+    }

     enum DB2Types { DB2, IDS, CLOUDSCAPE };

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 91875)
    Time Spent: 50m  (was: 40m)

> Add support for MariaDB JDBC driver in Add Connection dialog
> ------------------------------------------------------------
>                 Key: NETBEANS-673
>                 URL:
>             Project: NetBeans
>          Issue Type: Bug
>          Components: db - Code
>    Affects Versions: 9.0
>            Reporter: Eirik Bakke
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: NETBEANS-673 Patch Screenshot Updated.png
>          Time Spent: 50m
>  Remaining Estimate: 0h
> The "Add Connection" wizard does not currently recognize the MariaDB JDBC driver; this
means that the "host", "port", and "database" fields do not end up being shown in the connection
panel. Instead, the user has to manually construct the JDBC URL to insert this information.
> The fix is simple; a new entry needs to be added in org.netbeans.modules.db.util.DriverListUtil
, recognizing the driver class "org.mariadb.jdbc.Driver" (instead of "com.mysql.jdbc.Driver"
for MySQL). The MariaDB driver uses the exact same format for its JDBC URLs as MySQL, except
allows the protocol name "mariadb" to be used instead of "mysql".
> (MariaDB and its driver aims to be completely compatible with MySQL--either driver can
be used to connect to either database. The MariaDB JDBC driver is LGPL while MySQL's driver
is GPL, however, making only the MariaDB one suitable for bundling with commercial software.)
> See also, which deals with simplifying
the JDBC driver download process.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

For further information about the NetBeans mailing lists, visit:

View raw message