From: dave <da...@th...> - 2005-08-31 03:37:41
|
hope this doesn't double post. email troubles.... I think i saw somewhere that the object monitor guy had done this so that he could pull the events for some other stuff he had done (i think it was some AI stuff in c). there is one interface to the DBI, through mh. if you turn it on, you get whatever someone else is using it for. i think there are a bunch of us patching mysql to gain its advantages. i would love to see a concerted effort to incorporate mysql as an alternative backend. why should we continue to write stuff that has already been written (and pretty well) in a mysql format. i think we should be concentrating on incorporating myth, aMpache, gallery, asterisk.... i am sure we could write them indivally, but i think we should go further. we should store all of mh data in mysql (or db of your choice). bruce has commented on this and said go for it, but keep it as an OPTION. users should still be able to get along without it. ( i am pseudo quoting here, jump in bruce if i got it wrong). I agree with bruce. I never would have gotten this far in mh if it was not something that i could put on windows (by itself) to start. when i started mh, i had no idea what mysql was. there are several places where mh read/writes data and all of them would have to be tracked down and changed to allow for the option of an installed db. the structure would have to be figured out/agreed upon, etc.. then we could add the interfaces to other apps and start sharing our own apps that access mysql. I would be delighted to participate in this effort. while i am up here on the soapbox, i should add: that asterisk@home iso is amazing. if we really want to make mh easy to get going and start adding mysql (and more) we should do something similar. I have no idea how to make our own distro cd. I would be delighted if someone else would participate in this effort. sorry, i get to rambling.... the suggested fix: (if you don't agree with the above one) in the 'master' base_item.pm we should add the config parm. anyone wanting to use the events table, would know to add the parm, and how to make the table. change if (defined $main::DBI) { to if ((defined $main::DBI) && $config_parms{events_table}) { dave ----- Original Message ----- From: "Clive Freedman" <sc...@fi...> To: <mis...@li...> Sent: Tuesday, August 30, 2005 7:50 PM Subject: [mh] Base_Item data added to mysql database Base_Item.pm has the following starting at line 137: if (defined $main::DBI) { if (defined $p_setby and $p_setby->isa("Generic_Item")) { $main::DBI->prepare("insert into Events (Object,ObjectType,State,Setby) values ('$$self{object_name}','" . ref($self). "','$p_state','" . $p_setby->{object_name} . "');")->execute(); I haven't been able to locate any line which creates an Events table in a Mysql database. I have Mysql enabled, but I don't have an Events table and I don't have any need for one. The result is that my console output gets clogged with multiple repetitions of the following: DBD::mysql::st execute failed: Table db.Events' doesn't exist at ../lib/Base_Item.pm line 139. I could make my own changes to Base_Item.pm, but I don't want to have my own version of this module which would not be updated by new releases. Shouldn't the following points be considered (apologies if I have missed some explanations in the documents on this): 1 How does the Events table get created? If it has to be created manually, is the required format explained anywhere? (I think that the table got created automatically during an earlier installation which I had running in 2004. It was certainly present, and I don't recall creating it manually.) 2 It would be better if Base_Item.pm didn't assume that the Events table exists. It is not satisfactory for Base_Item.pm repeatedly to try to add something to a non-existent database, and it would also not be satisfactory for it to check repeatedly whether a table in a database (which may be located elsewhere on the network) exists. Surely the existence of an Events table should be identified by a config_parm. Clive ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id65 |