6.0.0-RC7
6/22/26

[#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 9/16/04 (7949 days ago)
Due
Updated 9/17/04 (7948 days ago)
Assigned 9/17/04 (7948 days ago)
Resolved 9/17/04 (7948 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
77 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.
87 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 :-)
207 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?
467 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.


23 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.
05 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