[dev.icinga.com #3965] SELECT DISTINCT on CLOBs breaks Oracle support #1097
Comments
Updated by mfriedrich on 2013-04-13 20:17:08 +00:00
we need to discuss a proper solution here. |
Updated by mfriedrich on 2013-04-13 20:24:32 +00:00 https://blogs.oracle.com/rammenon/entry/dbadapter\_javasqlsqlexception
|
Updated by mhein on 2013-04-15 13:16:12 +00:00
Applied in changeset f0a306a. |
Updated by mhein on 2013-04-15 13:17:43 +00:00 Add php distinct system, please test if everything works as expected. |
Updated by mfriedrich on 2013-04-15 14:55:15 +00:00
the status and history grids are fixed, but there's more to do here - when clicking on e.g. 'service details' you will get a generic query where output/long_output/perfdata gets selected with DISTINCT and then breaks again. So basically the PHP-ish distinct maker should be applied here as well (if this is not already the case). best would be to entirely wipe DISTINCT to stay safe for future fixes. and to update web dev guidelines to forbid to use DISTINCT queries in regards of Oracle CLOBs.
|
Updated by mhein on 2013-04-16 08:09:00 +00:00
Applied in changeset f6876e7. |
Updated by mfriedrich on 2013-04-16 09:10:53 +00:00
Ok finally, removing the default DISTINCT solves the common queries, especially the generic info popup. thanks for fixing. the conclusion to that - never use DISTINCT again, but make sure that a) the application knows how to handle duplicates b) the joins are correct |
Updated by mfrosch on 2013-04-21 21:05:49 +00:00
As discussed on Friday this causes different problems... New plan is:
|
Updated by mfrosch on 2013-04-22 07:30:12 +00:00
The latest changes should not cause any DISTINCT query including a CLOB field on Oracle. dnsmichi: Could you please test this? |
Updated by mfriedrich on 2013-04-22 07:47:41 +00:00
with all the reverts, there's still the issue with the dynamic status information you will query when clicking on "host details" or "service details" popup with the expander. afaik this is somehwat dynamic collected data and not directly based on a data view template. please ask marius, he already debugged the issue last week. the error is the exact same as described here: https://dev.icinga.org/issues/3965#note-5 the grids for status and history seem to be fixed. |
Updated by mfriedrich on 2013-04-22 16:20:58 +00:00
current next fixes the object info popup with the disabled select. so once and for all, this can be resolved fow now. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/3965
Created by mfriedrich on 2013-04-13 20:09:33 +00:00
Assignee: mfrosch
Status: Resolved (closed on 2013-04-22 16:20:58 +00:00)
Target Version: 1.9
Last Update: 2013-04-22 16:20:58 +00:00 (in Redmine)
Like evaluated in https://dev.icinga.org/issues/3855#note-13
Possible solutions:
rsim/oracle-enhanced#112
http://www.dbforums.com/oracle/1683783-how-retrieve-clob-data-when-using-distinct-keyword-other-columns-sql.html
columns included will be output, longoutput, perfdata causing the problems.
So this can be isolated into the following queries
Proposed fix: select the clobs seperatedly, and do not use distinct there at all cost.
and before you ask - #3855 is only partly related to this, as it only adds output column as clob, long_output is already there. long_output has been added to statehistory in #3918
Attachments
Changesets
2013-04-15 13:15:45 +00:00 by mhein 0f0b310
2013-04-15 13:15:46 +00:00 by mhein f0a306a
2013-04-15 13:15:46 +00:00 by mhein b195821
2013-04-16 08:01:10 +00:00 by mhein f6876e7
2013-04-21 21:07:09 +00:00 by mfrosch 95beee9
2013-04-21 21:07:33 +00:00 by mfrosch db11592
2013-04-21 21:07:56 +00:00 by mfrosch 4991c66
2013-04-21 21:09:20 +00:00 by mfrosch 116ad9d
2013-04-22 07:25:42 +00:00 by mfrosch 041e5d9
2013-04-22 12:14:13 +00:00 by mfrosch c460f00
Relations:
The text was updated successfully, but these errors were encountered: