Re: [h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-27 Thread Filipp Zhinkin
great, thank you! среда, 26 октября 2016 г., 17:23:37 UTC+3 пользователь Noel Grandin написал: > > thanks for the good test cases, this has been fixed on master > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group

Re: [h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-26 Thread Noel Grandin
thanks for the good test cases, this has been fixed on master -- 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

Re: [h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-26 Thread Filipp Zhinkin
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,

Re: [h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-25 Thread 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

Re: [h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-24 Thread Filipp Zhinkin
четверг, 20 октября 2016 г., 17:30:39 UTC+3 пользователь Noel Grandin написал: > > > > On 2016/10/19 2:24 PM, Filipp Zhinkin wrote: > > > > Suppose we have following table: > > > > CREATE TABLE test_table ( > > id INT, > > dup INT, > > counter INT, > > UNIQUE(dup), > >

Re: [h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-20 Thread Noel Grandin
On 2016/10/19 2:24 PM, Filipp Zhinkin wrote: Suppose we have following table: CREATE TABLE test_table ( id INT, dup INT, counter INT, UNIQUE(dup), PRIMARY KEY(id) ); I'm expecting to observe counter == 2 after following statements being executed: INSERT INTO test_table (id, dup,

[h2] INSERT .. ON DUPLICATE KEY UPDATE may not work depending on table indexes order and columns participating in statement

2016-10-19 Thread Filipp Zhinkin
Hello, I've tried to use H2 1.4.192 for unit tests using MYSQL compatibility mode and found that in some cases INSERT ... ON DUPLICATE KEY UPDATE statement is not updating rows. If there are primary key and unique constrains and both constrained columns are participating in insert statement