6.0.0-beta1
8/12/25

[#597] Broken SQL constraint when initializing permissions
Summary Broken SQL constraint when initializing permissions
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester rvs (at) angara (dot) ru
Created 09/16/2004 (7635 days ago)
Due
Updated 09/17/2004 (7634 days ago)
Assigned 09/17/2004 (7634 days ago)
Resolved 09/17/2004 (7634 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/17/2004 07:09:07 PM Chuck Hagenbuch Comment #6
State ⇒ Resolved
Reply to this comment
Okay, thanks. Done in oracle_create.sql as mentioned, and I'm 
resolving this now.
09/17/2004 07:04:08 PM rvs (at) angara (dot) ru Comment #5 Reply to this comment
Well if this constraint is useful for other dbs,

it should be relaxed only for Oracle, of course :-)
09/17/2004 07:01:20 PM Chuck Hagenbuch Comment #4 Reply to this comment
It's still a useful constraint for dbs that support the notion of '' 
being different from NULL (which is all of the others that I know). Do 
you really think the constraint should be removed from the general 
scripts, not just the oracle creation script?
09/17/2004 07:57:46 AM rvs (at) angara (dot) ru Comment #3 Reply to this comment
Yes there is no distinction on Oracle if you send '' or NULL into VARCHAR.

So removal of the constraint NOT NULL will be necessary for Oracle and 
harmless for other databases.


09/17/2004 03:45:02 AM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Well, you can see from that error that we're not sending NULl for that 
column, we're sending ''. I seem to remember something about Oracle 
not having that distinction somehow? I've removed the NOT NULL from 
the oracle_create.sql script, but I'm not sure what else we can do 
about this.
09/16/2004 05:59:00 PM rvs (at) angara (dot) ru Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Broken SQL constraint when initializing permissions
Queue ⇒ Horde Base
Reply to this comment
Platform: Apache1.3.31+php4.3.8+Oracle9.2.1



After creating SQL tables and initial configuring HORDE,

the DataTree is empty. If I try to add a permission the following

error occurs (see log entry below). The permission can be added

only after removal of the constraint NOT NULL for column DATATREE_PARENTS.



Sep 17 02:52:45 HORDE [error] [horde] DB Error: null value violates 
not-null constraint: INSERT INTO horde_datatree (datatree_id, 
group_uid, datatree_name, datatree_order, datatree_data, user_uid, 
datatree_serialized, datatree_parents) VALUES (2, 'horde.perms', 
'whups', NULL, 'a:0:{}', 's.rozinov@sibron.ru', 15, '') 
[nativecode=ORA-01400: cannot insert NULL into 
("HORDE3"."HORDE_DATATREE"."DATATREE_PARENTS")] [on line 367 of 
"/var/optpart/local/apache/http/beta.sibron.ru/htdocs/rvs/framework/Horde/DataTree/sql.php"]


Saved Queries