Hi All,

I'm encountering missed updates by H2. For example,

CREATE TABLE test (
  id   INT NOT NULL,
  seq  INT NOT NULL,
  str  TEXT
  PRIMARY KEY (id, seq)
)


INSERT INTO test (id, seq, str) VALUES
  (1, 0, 'Old Value'),
  (2, 1, 'first'),
  (2, 2, 'second');


After these steps, the database contains all the inserted values as expected. 
However, after executing

INSERT INTO test (id, seq, str) VALUES
  (1, 0, 'New Value'),
  (2, 1, 'third'),
  (2, 2, 'fourth')
 ON DUPLICATE KEY UPDATE str = VALUES(str)


I get


  1, 0, New Value

  2, 1, first

  2, 2, second


So it seems the value for (2, 1) and (2, 2) was neither updated nor inserted as 
a new row.

Is this an expected result?

Thanks,
Jan

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to