Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5525

Precision for UPPER function is wrong if the returned value is longer than the literal argument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.8.2.2
    • None
    • SQL
    • Normal
    • Release Note Needed, Repro attached

    Description

      Seen in ij in a database with territory based collation and German locale:

      ==vv= COPIED FROM IJ CONSOLE =vv==
      ij> VALUES UCASE('Straßenbahn');
      1
      -----------
      STRASSENBA&

      1 Zeile ausgewählt
      ==================================

      And with JDBC calls:

      Connection c = DriverManager.getConnection(
      "jdbc:derby:memory:db;create=true;territory=de_DE;" +
      "collation=TERRITORY_BASED");
      Statement s = c.createStatement();
      ResultSet rs = s.executeQuery("values upper('Straße')");
      System.out.println(rs.getMetaData().getPrecision(1));
      rs.next();
      System.out.println(rs.getString(1));

      This prints

      6
      STRASSE

      The precision is wrong, since the returned value is 7 characters long.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: