Re: [PATCH] implement MSIMODIFY_MERGE function in TABLE_modify
26 Mar
2012
26 Mar
'12
11:25 a.m.
Andoni Morales <ylatuya(a)gmail.com> wrote:
- case MSIMODIFY_REPLACE: case MSIMODIFY_MERGE: + /* check for a duplicated key */ + r = msi_table_find_row( tv, rec, &row, column ); + if (r == ERROR_SUCCESS) { + /* check that both are identical */ + r = compare_record (tv, row, rec); + if (r != ERROR_SUCCESS) + break; + } else { + r = table_validate_new( tv, rec, NULL ); + if (r != ERROR_SUCCESS) + break; + r = TABLE_insert_row( view, rec, -1, FALSE ); + break; + } + + case MSIMODIFY_REPLACE: case MSIMODIFY_VALIDATE:
Please get rid of redundant 'break' statements, and add one at the end of case processing. -- Dmitry.
5099
Age (days ago)
5099
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov