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

Connector misses Columns when using a turkish locale

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2, 1.7.2
    • Component/s: metadata
    • Labels:
      None

      Description

      Introduction:
      Some languages have special casing rules, most notoriously the turkish language.
      Example:

      "ID".loLowerCase(); // "id"
      Locale.setDefault(new Locale("tr")) // turkish client
      "ID".toLowerCase(); // "ıd" note the dottles i
      

      To get language independent casing one has to use something like this
      "ID".toLowerCase(Locale.ROOT)

      Connector Issue:
      ColoumnNameMap#getIndex uses getLowerCase().
      That means turkish people will not be able to access Coloumns like "ID", because mariaDb incorrectly maps them internally to "ıd" instead of "id".

      Workarounds: Dont use the letter i in your coloums or don't have turkish customers. So actually not really.

      Sugested fix: replace all Usages of toLowerCase() with toLowerCase(Locale.Root). Same technique applies to toUpperCase()

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            Gösen Thorsten Goetzke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: