Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #6061 problem creating root node with Oracle
Submitted: 2005-11-24 19:41 UTC
From: omansour at gmail dot com Assigned: datenpunk
Status: Bogus Package: DB_NestedSet
PHP Version: 4.3.11 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-24 19:41 UTC] omansour at gmail dot com
Description: ------------ wrong SQL is generated while creating a root node Test script: --------------- line 975 replace : $parent['norder'] = is_null($tmp_order) ? 0 : $tmp_order; by : $parent['norder'] = (is_null($tmp_order) or empty($tmp_order)) ? 0 : $tmp_order; Expected result: ---------------- $tmp_order should'nt be empty Actual result: -------------- $tmp_order is empty with Oracle - DB - DB_PORTABILITY_ALL

Comments

 [2005-11-24 21:19 UTC] datenpunk at php dot net
Could you please provide a little more info what you are trying to do. I don't understand your test script. Please use some lines of code which lead to this problem. Thanks for your help -- Daniel Khan
 [2005-11-25 08:48 UTC] omansour at gmail dot com
The test-scrip is just the hack written in your package to make the create root node work with Oracle. Maybe adding a is_empty test is not the good solution but before the code commented // Let's open a gap for a new node was generated a SQL like that : UPDATE (ok) SET (ok) WHERE (ok) AND streh > without the last variable whis $parent['norder'] maybe it's because I have actived portablity options in my DB configuration but I need them. (I have also an other problem, see bug #6060, maybe related to Nestedset)
 [2005-12-18 17:06 UTC] dv at allyoucanthink dot de
in function createRootNode() with DB::oci8 driver (DB_PORTABILITY_ALL): following call ´$tmp_order = $this->_getOne($qry)´ returns empty string and not NULL as expected ...
 [2006-01-11 17:38 UTC] omansour at gmail dot com
The proposed patch need to be applied to each version of Nestedset I use. Is it possible to think to a further integration and another release of DB_Nestedset ?
 [2006-01-13 09:59 UTC] datenpunk at php dot net
yes - I will roll out a new release including your fix within this weekend. Thanks for your patch & patience -- Daniel Khan
 [2006-01-15 20:55 UTC] datenpunk at php dot net
Looking closely at this issue I am not sure if this has anything to do with DB_NestedSet. I will talk to some ppl - maybe anyone could explain this to me.
 [2006-01-16 16:25 UTC] omansour at gmail dot com
Hey I have noticed this problem on several plateforms, with Oracle and MySQL. You right, I am not sure if this bug is directly coming from DB_Nestedset but , at least, it's bullet proofing the code ;-) and it's not dangerous for the rest of the class. So, for me, I would be cool to patch the code. greetings Olivier
 [2006-02-26 13:45 UTC] datenpunk at php dot net
I won't work around a bug inside another package within my package. Especially because I don't want to risk breaking BC. Sorry. Maybe I will take this into account for a new major version.