Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-558

JDBC driver adds extra .0 to DOUBLEs that MySQL driver doesn't

    XMLWordPrintable

    Details

      Description

      I have a table that stores DOUBLE values. Frequently these are non-decimal values.

      When I issue the following query via Workbench:

      select Order_Total from Orders
      

      Workbench gives me the expected results (importantly, so does the MySQL JDBC driver when connecting to a MySQL 5.6 database):

      1031
      20
      558
      1600
      626
      

      When I do the same via Connector/J to a MariaDB 10.1.29 database the string representation of the number via getString() adds a trailing .0 as follows:

      1031.0
      20.0
      558.0
      1600.0
      626.0
      

      I thought at first it might be a Connector/J or Mariadb server setting, but I can't find anything, so looks like incompatible behavior.

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration