Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4700

Google translator inconsistent behavior for DELETE and SELECT for null values

XMLWordPrintable

    • Hide

      insert into smalla (intnum, intkey) values (10, 1), (null, 2), (30,3)
      select intnum, intkey from smalla where intnum > -10 AND intnum < 20 #returns (10,1)
      delete from smalla where intnum > -10 AND intnum < 20 #deletes (10,1), (null,2)

      Show
      insert into smalla (intnum, intkey) values (10, 1), (null, 2), (30,3) select intnum, intkey from smalla where intnum > -10 AND intnum < 20 #returns (10,1) delete from smalla where intnum > -10 AND intnum < 20 #deletes (10,1), (null,2)

      In teiid I observed following inconsistent behavior:
      Q1: select intnum, intkey from smalla where intnum > -10 AND intnum < 20
      Q2: delete from smalla where intnum > -10 AND intnum < 20

      Q1 returns rows without null values for intnum, but Q2 deletes also rows with null values for intnum.

      I observed that if I remove the lower boundary (ie. Q3: select intnum, intkey from smalla where intnum < 20 and similarly for delete), both selected and deleted rows contain null values, so the result is consistent.

      The server.log is empty, so I didn't attach it...

              rhn-engineering-shawkins Steven Hawkins
              lfabriko@redhat.com Lucie Krejcirova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: