Case-insensitive objects in NDOutils

Michael Friedrich michael.friedrich at univie.ac.at
Thu Oct 22 09:38:08 CEST 2009


Hi,

Hendrik Baecker wrote the following on 22.10.2009 08:25:
> Yes it looks nicer and will keep the code cleaner. Also I like the fact
> to keep the work on the database.
Yep because this is a MySQL only "feature" of case insensitive 
comparison. Oracle and Postgres do case sensitive comparison by default. 
So considering the fact that NDOUtils will catch on more rdbms some time 
in the future you have to consider that this could lead into possible 
errors if you do not prepare the code for that.
That is one of the highly MySQL dependant "features" of NDOUtils and 
then changing to e.g. Postgres and wondering why queries are failing. 
Just as a thought as I have been through all of this already.
>
> I would prefer a database way to do this, but I wouldn't like to force
> the user to use a charset which he doesn't know/like/can't use.
It's not only this fix there are also several other statements and 
queries which need to be adapted to hand the work over to the database. 
many of those ideas would have to break up the code completely but well 
time will tell.
> Yeah - I regarded the ticket some days ago and wasn't sure if it would
> be good to break the historical refs to other tables.
> Renaming a host in Nagios will loose all history and is a little pain
> but regarding the "feature" to keep the object_id within ndoutils after
> a nagios object renaming will cause a dangerous mix up between two
> different nagios objects into one ndoutils object. That was the point
> where I was sure to do it like nagios ;)
afaik there are some complaints about nagios doing it that way. maybe 
we'll go into the other direction and handle "services" as "SERVICES" 
and reversed. Therefore a core modification would be necessary and 
having MySQL, there wouldn't have been the need of a query change. For 
Postgres and Oracle, to_lower on the param value will to the same trick.
> Bad news - Since many month there is a "read Ton's Blog to see what they
> have done" on my ToDo list. This task often felt of because less time.
If I told you that I won't commit patches for NDOUtils until you rewrite 
the code to libdbi and giving me the opportunity to diff with Icinga and 
also the repository changes finally to GIT what would you do... kill me 
instantly next week on OSMC or relax and read Ton's blog? ;-)

Kind regards,
Michael

-- 
DI (FH) Michael Friedrich
michael.friedrich at univie.ac.at
Tel: +43 1 4277 14359

Vienna University Computer Center
Universitaetsstrasse 7 
A-1010 Vienna, Austria  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20091022/68632630/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list