[Tickets #8608] Re: Wrong datatype "?" to "unsigned bigint" in datatree. \lib\Horde\DataTree\sql.php

bugs at horde.org bugs at horde.org
Fri Oct 2 14:08:43 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8608
------------------------------------------------------------------------------
  Ticket             | 8608
  Updated By         | c-master at freenet.de
  Summary            | Wrong datatype "?" to "unsigned bigint" in datatree.
                     | \lib\Horde\DataTree\sql.php
  Queue              | Horde Framework Packages
  Version            | FRAMEWORK_3
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


c-master at freenet.de (2009-10-02 10:08) wrote:

Half success!
First problem is solved, but there's another (same) one.
This statement now works:
SELECT c.datatree_id, c.datatree_name FROM horde_datatree c LEFT JOIN  
horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id LEFT  
JOIN horde_datatree_attributes a2 ON a2.datatree_id = c.datatree_id  
WHERE c.group_uid = 'horde.shares.kronolith' AND (a1.attribute_name =  
'perm_groups' AND a1.attribute_key IN ('1', '2') AND  
(a1.attribute_value & 2) = 2)  AND a2.attribute_name = 'name'  GROUP  
BY c.datatree_id, c.datatree_name, c.datatree_order,  
a2.attribute_value ORDER BY a2.attribute_value ASC

...after I changed the following values (Sybase Database Options):
Blocking = Off
Optimization_Goal = First-Row
Optimization_Level = 0
Optimization_Logging = On
Prefetch = Off

Now the same problem on a even more complex statement. (It can be  
found in the already attached file horde.log) Error code again -157.  
Message 'conversion from "Kalender von root" to unsigned bigint not  
possible'.

SELECT c.datatree_id, c.datatree_name FROM horde_datatree c
LEFT JOIN horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id
LEFT JOIN horde_datatree_attributes a2 ON a2.datatree_id = c.datatree_id
LEFT JOIN horde_datatree_attributes a3 ON a3.datatree_id = c.datatree_id
WHERE c.group_uid = 'horde.shares.kronolith' AND
(
   (

     (a1.attribute_name = 'owner' AND a1.attribute_value = 'root') OR

     (a1.attribute_name = 'perm_users' AND a1.attribute_key = 'root'  
AND (a1.attribute_value & 2) = 2) OR
     (a1.attribute_name = 'perm_creator' AND (a1.attribute_value & 2) = 2) OR
     (a1.attribute_name = 'perm_default' AND (a1.attribute_value & 2) = 2) OR
     (a1.attribute_name = 'perm_groups' AND a1.attribute_key IN ('1',  
'2') AND (a1.attribute_value & 2) = 2)
   ) AND a2.attribute_name = 'owner' AND a2.attribute_value = 'root')
AND a1.datatree_id = a2.datatree_id AND a3.attribute_name = 'name'

GROUP BY c.datatree_id, c.datatree_name, c.datatree_order,  
a3.attribute_value ORDER BY a3.attribute_value ASC

-------
But when I remove the line
     (a1.attribute_name = 'owner' AND a1.attribute_value = 'root') OR
it runs perfectly!






More information about the bugs mailing list