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

%a% and %aa% match too many rows in database with collation=TERRITORY_BASED and territory=no_NO

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4
    • 10.3.1.4
    • SQL
    • None

    Description

      On a database with territory=no_NO and collation=TERRITORY_BASED, I get these results from a query which uses the LIKE predicate:

      ij> select * from t where x like '%a%';
      X
      --------------------
      Waagan
      Wåhan
      Wanvik
      Wågan
      ekstrabetaling
      ekstra­arbeid
      ­a
      a
      -a
      a
      B
      C

      12 rows selected

      The last two rows ('B' and 'C') should not have been included in the result, since they do not match the pattern '%a%'.

      Similar wrong results are seen with '%aa%':

      ij> select * from t where x like '%aa%';
      X
      --------------------
      Waagan
      ekstraarbeid
      B

      3 rows selected

      Attachments

        1. collrepro.sql
          0.3 kB
          Knut Anders Hatlen
        2. coll.java
          1 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              mikem Mike Matrigali
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: