[dev.icinga.com #3870] (Oracle) Unique key missing for nsm_user_preference #1058
Comments
Updated by Tommi on 2013-03-17 14:14:20 +00:00
Pls provide an export of this table containing duplicates to remove for tests . SQL script with inserts exported from mysql is sufficient. |
Updated by Tommi on 2013-03-17 20:38:33 +00:00
new v1.8.3 update and changed creation script committed in branch tdressler/issue_3870. only syntactical tested. pls check esp. deduplication correctness |
Updated by mfrosch on 2013-03-18 12:33:43 +00:00
Hey Tommi, Here is a snippet to create a duplicated var:
Could you make a quick test? I'd like to include it in 1.8.3 ;-) I'm lacking a Oracle environment as of now. Cheers |
Updated by mfrosch on 2013-03-18 12:33:52 +00:00
|
Updated by Tommi on 2013-03-18 20:07:37 +00:00
Test done as suggested. This opens a problem with your duplication check logic. if the modified time is the same (which i have when inserting the rows in a short time) double rows are left in the table. see test_3870_1.log. I changed the logic to use the upref_id, which is based on a sequence and the last value wins. This looks fine,see test_3870_2.sql. but i am not sure: if an existing entry can be modified after insert, than this logic is wrong too. |
Updated by mfrosch on 2013-03-18 20:17:01 +00:00 You are right! I'll think over it tomorrow... The other update scripts have to be fixed as well, at least they should be as clean as possible! |
Updated by mfrosch on 2013-03-25 13:47:59 +00:00
From my thoughts the switch to upref_id should be sufficent. We are trying to cleanup the data as best as possible, I can't think of a better way to approach this. The only field that really causes that problem is the appstate, and it should be good enough like this. |
Updated by mfrosch on 2013-03-25 13:51:22 +00:00
Merged into r1.8 |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/3870
Created by mfrosch on 2013-03-17 10:29:22 +00:00
Assignee: Tommi
Status: Resolved (closed on 2013-03-25 13:51:22 +00:00)
Target Version: 1.8.3
Last Update: 2013-03-25 13:51:22 +00:00 (in Redmine)
A unique key on the table nsm_user_preference is missing connecting the fields (upref_user_id, upref_key)
This is a deferred issue for Oracle - which we can't provide a quick fix for 1.8.3
@tommi: Could you please update the oracle schemas for this:
https://git.icinga.org/?p=icinga-web.git;a=commit;h=aa24c311284e85a5fd4eba19ab3562afd34eea82
Attachments
Changesets
2013-03-17 19:51:09 +00:00 by Tommi 354ffde
2013-03-17 20:13:59 +00:00 by Tommi 139a247
2013-03-18 11:19:38 +00:00 by Tommi f155ebb
2013-03-18 19:46:45 +00:00 by Tommi 817a7587796343cbad0bd0a462f974e0e6b30ee3
2013-03-25 13:50:27 +00:00 by Tommi c2e3183
2013-03-25 13:50:27 +00:00 by Tommi 1a237b3
2013-03-25 13:50:28 +00:00 by Tommi 88cfa27
2013-03-25 13:50:28 +00:00 by Tommi 1f6681c
2013-03-25 15:17:30 +00:00 by Tommi e56097a
Relations:
The text was updated successfully, but these errors were encountered: