Just reordered primary key and unique constraint declarations and it 
stopped working:

DROP TABLE test_table IF EXISTS;
CREATE TABLE test_table (id INT, dup INT, counter INT, PRIMARY KEY(id), 
UNIQUE(dup));
INSERT INTO test_table (id, dup, counter) VALUES (1, 1, 1);
INSERT INTO test_table (id, dup, counter) VALUES (2, 1, 1) ON DUPLICATE KEY 
UPDATE counter = counter + VALUES(counter);
SELECT * FROM test_table;

ID          DUP          COUNTER 
1        1        1 

вторник, 25 октября 2016 г., 10:04:09 UTC+3 пользователь Noel Grandin 
написал:
>
> If I execute your new test, my result is 
>
> select * from test_table; 
> ID          DUP          COUNTER 
> 1        1        2 
>
>
> ??? 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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