Derby
  1. Derby
  2. DERBY-728

Unable to create databases whose name containg Chinese characters through the client driver

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.2.1
    • Fix Version/s: 10.7.1.1
    • Component/s: Network Client
    • Labels:
    • Environment:
      Debian unstable, LInux 2.6.14.2, libc 2.3.5-6
    • Urgency:
      Normal
    • Issue & fix info:
      High Value Fix, Repro attached
    • Bug behavior facts:
      Embedded/Client difference

      Description

      Trying to create a database with the following URL (note the Chinese character in the database name):

      jdbc:derby://localhost:1527/\u4e10;create=true

      throws the following exception:

      ----%<----
      Exception in thread "main" org.apache.derby.client.am.SqlException: Unicode string can't convert to Ebcdic string
      at org.apache.derby.client.net.EbcdicCcsidManager.convertFromUCS2(Unknown Source)
      at org.apache.derby.client.net.Request.writeScalarPaddedString(Unknown Source)
      at org.apache.derby.client.net.NetConnectionRequest.buildRDBNAM(Unknown Source)
      at org.apache.derby.client.net.NetConnectionRequest.buildACCSEC(Unknown Source)
      at org.apache.derby.client.net.NetConnectionRequest.writeAccessSecurity(Unknown Source)
      at org.apache.derby.client.net.NetConnection.writeServerAttributesAndKeyExchange(Unknown Source)
      at org.apache.derby.client.net.NetConnection.flowServerAttributesAndKeyExchange(Unknown Source)
      at org.apache.derby.client.net.NetConnection.flowUSRIDONLconnect(Unknown Source)
      at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source)
      at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
      at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:193)
      at jdbctest.Main.main(Main.java:33)
      ----%<----

      It's possible, however, to create databases using the embedded driver, using an URL like:

      jdbc:derby:\u4e10;create=true

      Tested with both 10.1.1.0 and 10.1.2.1 with the same result.

      Complete code to reproduce the bug:

      ----%<----
      public static void main(String[] args) throws Exception

      { Class.forName("org.apache.derby.jdbc.ClientDriver"); Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/\u4e10;create=true"); }

      ----%<----

      1. ACR7007.pdf
        863 kB
        Kathey Marsden
      2. BigTableName.java
        4 kB
        Rick Hillegas
      3. DERBY_728_p2_sanity.diff
        2 kB
        Tiago R. Espinha
      4. DERBY_728_p3.diff
        4 kB
        Tiago R. Espinha
      5. DERBY-728_p1.diff
        12 kB
        Tiago R. Espinha
      6. DERBY-728_p2.diff
        18 kB
        Tiago R. Espinha
      7. DERBY-728_p2.diff
        16 kB
        Tiago R. Espinha
      8. DERBY-728_p2.diff
        14 kB
        Tiago R. Espinha
      9. DERBY-728_p2.diff
        13 kB
        Tiago R. Espinha
      10. DERBY-728_p2-test.diff
        1 kB
        Tiago R. Espinha
      11. DERBY-728_p2-test.diff
        5 kB
        Tiago R. Espinha
      12. DERBY-728_p2-test.diff
        6 kB
        Tiago R. Espinha
      13. DERBY-728_p2-test.diff
        6 kB
        Tiago R. Espinha
      14. derby-728_proto_diff.txt
        34 kB
        Kathey Marsden
      15. derby-728-startingpoint.diff
        186 kB
        Dyre Tjeldvoll

        Issue Links

          Activity

          Andrei Badea created issue -
          Rick Hillegas made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-708 [ DERBY-708 ]
          Bernt M. Johnsen made changes -
          Link This issue relates to DERBY-708 [ DERBY-708 ]
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-2251 [ DERBY-2251 ]
          Dag H. Wanvik made changes -
          Link This issue is part of DERBY-310 [ DERBY-310 ]
          Kathey Marsden made changes -
          Derby Categories [High Value Fix]
          Dyre Tjeldvoll made changes -
          Attachment derby-728-startingpoint.diff [ 12395740 ]
          Kathey Marsden made changes -
          Attachment derby-728_proto_diff.txt [ 12397333 ]
          Kathey Marsden made changes -
          Assignee Kathey Marsden [ kmarsden ]
          Kathey Marsden made changes -
          Attachment ACR7007.pdf [ 12405588 ]
          Rick Hillegas made changes -
          Attachment BigTableName.java [ 12405796 ]
          Dag H. Wanvik made changes -
          Issue & fix info [High Value Fix]
          Kathey Marsden made changes -
          Assignee Kathey Marsden [ kmarsden ]
          Knut Anders Hatlen made changes -
          Bug behavior facts [Embedded/Client difference]
          Urgency Normal
          Issue & fix info [High Value Fix] [High Value Fix, Repro attached]
          Kathey Marsden made changes -
          Labels mentor
          Kathey Marsden made changes -
          Labels mentor gsoc mentor
          Tiago R. Espinha made changes -
          Assignee Tiago R. Espinha [ espinha ]
          Kathey Marsden made changes -
          Link This issue is related to DERBY-4584 [ DERBY-4584 ]
          Tiago R. Espinha made changes -
          Attachment DERBY-728_p1.diff [ 12446508 ]
          Tiago R. Espinha made changes -
          Attachment DERBY-728_p2.diff [ 12447081 ]
          Tiago R. Espinha made changes -
          Attachment DERBY-728_p2.diff [ 12447277 ]
          Attachment DERBY-728_p2-test.diff [ 12447278 ]
          Tiago R. Espinha made changes -
          Attachment DERBY-728_p2.diff [ 12447504 ]
          Attachment DERBY-728_p2-test.diff [ 12447505 ]
          Tiago R. Espinha made changes -
          Attachment DERBY-728_p2.diff [ 12447879 ]
          Attachment DERBY-728_p2-test.diff [ 12447880 ]
          Tiago R. Espinha made changes -
          Attachment DERBY-728_p2-test.diff [ 12447975 ]
          Tiago R. Espinha made changes -
          Attachment DERBY_728_p2_sanity.diff [ 12448252 ]
          Attachment DERBY_728_p3.diff [ 12448253 ]
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-4799 [ DERBY-4799 ]
          Tiago R. Espinha made changes -
          Link This issue blocks DERBY-4805 [ DERBY-4805 ]
          Tiago R. Espinha made changes -
          Link This issue blocks DERBY-4827 [ DERBY-4827 ]
          Tiago R. Espinha made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Kathey Marsden made changes -
          Fix Version/s 10.7.1.1 [ 12315564 ]
          Gavin made changes -
          Link This issue blocks DERBY-4805 [ DERBY-4805 ]
          Gavin made changes -
          Link This issue is depended upon by DERBY-4805 [ DERBY-4805 ]
          Gavin made changes -
          Workflow jira [ 12344101 ] Default workflow, editable Closed status [ 12802437 ]

            People

            • Assignee:
              Tiago R. Espinha
              Reporter:
              Andrei Badea
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development