<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Wrong datatype &quot;?&quot; to &quot;unsigned bigint&quot; in datatree. \lib\Horde\DataTree\sql.php</title> 
  <pubDate>Fri, 10 Apr 2026 17:52:14 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8608</link> 
  <atom:link rel="self" type="application/rss+xml" title="Wrong datatype &quot;?&quot; to &quot;unsigned bigint&quot; in datatree. \lib\Horde\DataTree\sql.php" href="https://bugs.horde.org/ticket/8608/rss" /> 
  <description>Wrong datatype &quot;?&quot; to &quot;unsigned bigint&quot; in datatree. \lib\Horde\DataTree\sql.php</description> 
 
   
   
  <item> 
   <title>Sybase database with horde groupware v 1.2.4. Database attac</title> 
   <description>Sybase database with horde groupware v 1.2.4. Database attached via ODBC. (Works perfectly) 

When using the share method &quot;sql&quot; horde crashes completely because of missing MDB2_ODBC driver. 

When using the share method &quot;dataTree&quot; (as workaround) horde says &quot;HORDE [error] [kronolith] DB Error: unknown error: SELECT c.datatree_id, c.datatree_name FROM horde_datatree..................Umwandeln von Kalender von root auf unsigned bigint nicht möglich].................&quot;

As a result no shared calendars are configurable. Calendars could be created, but don&#039;t appear in calendar-settings...

I strongly believe, the dataTree issue is a real bug. Please solve it</description> 
   <pubDate>Mon, 28 Sep 2009 15:37:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t55997</link> 
  </item> 
   
  <item> 
   <title>forgot the attachment....</title> 
   <description>forgot the attachment....</description> 
   <pubDate>Mon, 28 Sep 2009 15:38:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t55998</link> 
  </item> 
   
  <item> 
   <title>&gt; When using the share method &quot;sql&quot; horde crashes completely</title> 
   <description>&gt; When using the share method &quot;sql&quot; horde crashes completely because of 

&gt; missing MDB2_ODBC driver.



Because there isn&#039;t any one.</description> 
   <pubDate>Tue, 29 Sep 2009 10:01:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56010</link> 
  </item> 
   
  <item> 
   <title>How do the datatree tables look like? Can you dump the table</title> 
   <description>How do the datatree tables look like? Can you dump the table structures?</description> 
   <pubDate>Tue, 29 Sep 2009 10:04:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56011</link> 
  </item> 
   
  <item> 
   <title>Oh, and how did you create them in the first place, since th</title> 
   <description>Oh, and how did you create them in the first place, since there is no MDB2_Driver_odbc?</description> 
   <pubDate>Tue, 29 Sep 2009 10:04:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56012</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; How do the datatree tables look like? Can you dump the ta</title> 
   <description>&gt;&gt; How do the datatree tables look like? Can you dump the table structures?

I will, tomorrow when i&#039;m back at work.



&gt;&gt; Oh, and how did you create them in the first place, since there is no  

&gt;&gt; MDB2_Driver_odbc?

I created the tables via &#039;scripts/sql/groupware.sybase.sql&#039; statement and then replaced &#039;datatree_data TEXT NOT NULL&#039; with &#039;datatree_data VARCHAR(255) NOT NULL&#039; by hand. (Did not help)</description> 
   <pubDate>Tue, 29 Sep 2009 17:56:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56024</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; Oh, and how did you create them in the first place, sinc</title> 
   <description>&gt;&gt;&gt; Oh, and how did you create them in the first place, since there is no

&gt;&gt;&gt; MDB2_Driver_odbc?

&gt; I created the tables via &#039;scripts/sql/groupware.sybase.sql&#039; statement 

&gt; and then replaced &#039;datatree_data TEXT NOT NULL&#039; with &#039;datatree_data 

&gt; VARCHAR(255) NOT NULL&#039; by hand. (Did not help)

Looks like scripts/sql/create.sybase.sql (on which the groupware script is based) is not really up-to-date. The datatree_order column is missing and the horde_datatree_attributes is missing completely.</description> 
   <pubDate>Tue, 29 Sep 2009 22:33:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56028</link> 
  </item> 
   
  <item> 
   <title>&gt; Looks like scripts/sql/create.sybase.sql (on which the gro</title> 
   <description>&gt; Looks like scripts/sql/create.sybase.sql (on which the groupware 

&gt; script is based) is not really up-to-date. The datatree_order column 

&gt; is missing and the horde_datatree_attributes is missing completely.



I created the missing and invalid tables on my own, by analyzing horde-error-logs and using the datatree-create statements.



My tables look like this (sql form)



CREATE TABLE &quot;php&quot;.&quot;horde_datatree&quot; (

	&quot;datatree_id&quot; integer NOT NULL,

	&quot;group_uid&quot; varchar(255) NOT NULL,

	&quot;user_uid&quot; varchar(255) NOT NULL,

	&quot;datatree_name&quot; varchar(255) NOT NULL,

	&quot;datatree_parents&quot; varchar(255) NOT NULL,

	&quot;datatree_order&quot; integer NULL,

	&quot;datatree_data&quot; varchar(255) NULL,

	&quot;datatree_serialized&quot; smallint NOT NULL DEFAULT 0,

	PRIMARY KEY ( &quot;datatree_id&quot; )

);



CREATE TABLE &quot;php&quot;.&quot;horde_datatree_attributes&quot; (

	&quot;datatree_id&quot; integer NOT NULL,

	&quot;attribute_name&quot; varchar(255) NOT NULL,

	&quot;attribute_key&quot; varchar(255) NULL,

	&quot;attribute_value&quot; varchar(255) NULL

);



Table Data visible in attachment. The Problem is attribute_value which can not be converted to bigint (because it is a string)</description> 
   <pubDate>Wed, 30 Sep 2009 09:28:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56037</link> 
  </item> 
   
  <item> 
   <title>&gt; Table Data visible in attachment. The Problem is attribute</title> 
   <description>&gt; Table Data visible in attachment. The Problem is attribute_value 

&gt; which can not be converted to bigint (because it is a string)

I&#039;m not sure what you mean with that. Why should attribute_value be converted to bigint? The column is a string, and from your screenshot it save both string and integer values just fine, like expected.</description> 
   <pubDate>Wed, 30 Sep 2009 10:14:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56038</link> 
  </item> 
   
  <item> 
   <title>&gt; I&#039;m not sure what you mean with that. Why should attribute</title> 
   <description>&gt; I&#039;m not sure what you mean with that. Why should attribute_value be 

&gt; converted to bigint? The column is a string, and from your screenshot 

&gt; it save both string and integer values just fine, like expected.



That is correct. The values are saved fine. But horde attempts to convert the varchar to bigint for some reason and fails. I don&#039;t know why this conversion is needed, or if it is needed at all. Anyway it fails with error: &quot;Umwandeln von Kalender von root auf unsigned bigint nicht möglich&quot; [pid 1052 on line 1252 of &quot;\lib\Horde\DataTree\sql.php&quot;] 

-&gt; I translated it to english: &quot;Conversion from &#039;Kalender von root&#039; to unsigned bigint not possible&quot;

</description> 
   <pubDate>Wed, 30 Sep 2009 13:23:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56047</link> 
  </item> 
   
  <item> 
   <title>&gt; That is correct. The values are saved fine. But horde atte</title> 
   <description>&gt; That is correct. The values are saved fine. But horde attempts to convert the varchar to bigint for some reason and fails. I don&#039;t know why this conversion is needed, or if it is needed at all. Anyway it fails with error: &quot;Umwandeln von Kalender von root auf unsigned bigint nicht möglich&quot; [pid 1052 on line 1252 of &quot;\lib\Horde\DataTree\sql.php&quot;]

&gt; -&gt; I translated it to english: &quot;Conversion from &#039;Kalender von root&#039; 

&gt; to unsigned bigint not possible&quot;

No, it&#039;s not Horde that is converting. The error message comes from Sybase. And I don&#039;t know either why this conversion would be needed, or when Sybase is trying to do the conversion.</description> 
   <pubDate>Wed, 30 Sep 2009 13:52:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56048</link> 
  </item> 
   
  <item> 
   <title>I guess Sybase has some kind of problem with this part of th</title> 
   <description>I guess Sybase has some kind of problem with this part of the sql-statement:

&quot;... AND a1.attribute_key IN (&#039;1&#039;, &#039;2&#039;) AND (a1.attribute_value &amp; 8) = 8)  AND a2.attribute_name = &#039;name&#039; ...&quot;. 

Because attribute_value is varchar(255) and not an integer sybase seems not to refer to the actual VALUE of attribute_value but instead to the TYPE of attribute_value. Maybe it needs some explicit conversation at this time.

OR (my 2nd guess)

The mapping between attribute_name and attribute_value somehow fails and horde (or sybase?) just takes a wrong value from attribute_value.</description> 
   <pubDate>Wed, 30 Sep 2009 18:11:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56053</link> 
  </item> 
   
  <item> 
   <title>I found something interesting! When I change this statement:</title> 
   <description>I found something interesting! When I change this statement:



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 = &#039;horde.shares.kronolith&#039;) AND 

 (a1.attribute_name = &#039;perm_groups&#039; AND a1.attribute_key IN (&#039;1&#039;, &#039;2&#039;) 

AND (a1.attribute_value &amp; 2) = 2) AND a2.attribute_name = &#039;name&#039;  

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



to this statement



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  

 (a1.attribute_name = &#039;perm_groups&#039; AND a1.attribute_key IN (&#039;1&#039;, &#039;2&#039;) 

AND (a1.attribute_value &amp; 2) = 2) AND a2.attribute_name = &#039;name&#039;  

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



the execution works and returns the values:

datatree_id = 2     and    datatree_name = &#039;root&#039;



if I put &quot;... where (c.group_uid = &#039;horde.shares.kronolith&#039;) AND ...&quot; back in, the same error appeares... See attachment &#039;hordeStatements.JPG&#039;</description> 
   <pubDate>Thu, 01 Oct 2009 07:59:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56058</link> 
  </item> 
   
  <item> 
   <title>It sounds to me as if Sybase is doing some bad query optimiz</title> 
   <description>It sounds to me as if Sybase is doing some bad query optimization. From the error message it looks like it is doing the (a1.attribute_value &amp; 2) = 2 comparison on rows where attribute_value contains &#039;Kalender von root&#039;. This is an expected value for rows that have attribute_name = &#039;name&#039;. But we explicitly ask for attribute_name = &#039;perm_groups&#039; in the query *first*. No idea, why it gets the order correct without the group_uid part. And I don&#039;t know how to tell Sybase to get its optimization correctly done either.</description> 
   <pubDate>Thu, 01 Oct 2009 09:45:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56061</link> 
  </item> 
   
  <item> 
   <title>When I get a workaround for that running, I&#039;ll post it here!</title> 
   <description>When I get a workaround for that running, I&#039;ll post it here!! 

At this moment I also don&#039;t know what is wrong with sybase. I will try several database-settings and report back. Is there any possibility for you to do some testing with a Sybase-DB?</description> 
   <pubDate>Thu, 01 Oct 2009 16:32:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56115</link> 
  </item> 
   
  <item> 
   <title>&gt; Is there any 

&gt; possibility for you to do some testing wi</title> 
   <description>&gt; Is there any 

&gt; possibility for you to do some testing with a Sybase-DB?

No</description> 
   <pubDate>Thu, 01 Oct 2009 16:42:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56116</link> 
  </item> 
   
  <item> 
   <title>Half success!

First problem is solved, but there&#039;s another </title> 
   <description>Half success!

First problem is solved, but there&#039;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 = &#039;horde.shares.kronolith&#039; AND (a1.attribute_name = &#039;perm_groups&#039; AND a1.attribute_key IN (&#039;1&#039;, &#039;2&#039;) AND (a1.attribute_value &amp; 2) = 2)  AND a2.attribute_name = &#039;name&#039;  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 &#039;conversion from &quot;Kalender von root&quot; to unsigned bigint not possible&#039;.



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 = &#039;horde.shares.kronolith&#039; AND 

( 

  ( 

    

    (a1.attribute_name = &#039;owner&#039; AND a1.attribute_value = &#039;root&#039;) OR 



    (a1.attribute_name = &#039;perm_users&#039; AND a1.attribute_key = &#039;root&#039; AND (a1.attribute_value &amp; 2) = 2) OR 

    (a1.attribute_name = &#039;perm_creator&#039; AND (a1.attribute_value &amp; 2) = 2) OR 

    (a1.attribute_name = &#039;perm_default&#039; AND (a1.attribute_value &amp; 2) = 2) OR 

    (a1.attribute_name = &#039;perm_groups&#039; AND a1.attribute_key IN (&#039;1&#039;, &#039;2&#039;) AND (a1.attribute_value &amp; 2) = 2)

  ) AND a2.attribute_name = &#039;owner&#039; AND a2.attribute_value = &#039;root&#039;)  

AND a1.datatree_id = a2.datatree_id AND a3.attribute_name = &#039;name&#039;  



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 = &#039;owner&#039; AND a1.attribute_value = &#039;root&#039;) OR 

it runs perfectly!</description> 
   <pubDate>Fri, 02 Oct 2009 14:08:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56146</link> 
  </item> 
   
  <item> 
   <title>Another interesting fact in statment number 2:



When I cha</title> 
   <description>Another interesting fact in statment number 2:



When I change this line

(a1.attribute_name = &#039;owner&#039; AND a1.attribute_value = &#039;root&#039;) OR



to this line

(a1.attribute_name = &#039;owner&#039; AND a1.attribute_value = &#039;root&#039;) AND



it works! But maybe it won&#039;t in certain circumstances, because the logic is changed.</description> 
   <pubDate>Fri, 02 Oct 2009 14:17:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56147</link> 
  </item> 
   
  <item> 
   <title>The problem is that we can&#039;t use any of the casts that we al</title> 
   <description>The problem is that we can&#039;t use any of the casts that we already apply when using pgsql or mssql. There might be a syntax that works for Sybase, but since we have a single driver for ODBC it might break other ODBC-driven databases.</description> 
   <pubDate>Mon, 05 Oct 2009 12:20:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56152</link> 
  </item> 
   
  <item> 
   <title>&gt; The problem is that we can&#039;t use any of the casts that we </title> 
   <description>&gt; The problem is that we can&#039;t use any of the casts that we already 

&gt; apply when using pgsql or mssql. There might be a syntax that works 

&gt; for Sybase, but since we have a single driver for ODBC it might break 

&gt; other ODBC-driven databases.



If there is a solution, might it be possible to have 2 ODBC-drivers? One for Sybase, another for all other ODBC-driven databases?</description> 
   <pubDate>Mon, 05 Oct 2009 13:34:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56153</link> 
  </item> 
   
  <item> 
   <title>I would rather like to avoid that.</title> 
   <description>I would rather like to avoid that.</description> 
   <pubDate>Mon, 05 Oct 2009 14:00:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56154</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve just created a case in the sybase-bugtracker with No. 1</title> 
   <description>I&#039;ve just created a case in the sybase-bugtracker with No. 11561634 ... See what happens next.</description> 
   <pubDate>Wed, 07 Oct 2009 14:17:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56189</link> 
  </item> 
   
  <item> 
   <title>Any update yet?</title> 
   <description>Any update yet?</description> 
   <pubDate>Thu, 05 Nov 2009 12:56:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56527</link> 
  </item> 
   
  <item> 
   <title>...no. Nothing yet :(
I&#039;ll check the sybase ticket tomorrow</title> 
   <description>...no. Nothing yet :(
I&#039;ll check the sybase ticket tomorrow.
If sybase won&#039;t answer: Is there any kind of workaround for my problem?

regards</description> 
   <pubDate>Thu, 05 Nov 2009 19:41:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56532</link> 
  </item> 
   
  <item> 
   <title>Still nothing from sybase. I&#039;m almost about to give up :( Th</title> 
   <description>Still nothing from sybase. I&#039;m almost about to give up :( They obviously don&#039;t care about their customers.</description> 
   <pubDate>Thu, 12 Nov 2009 14:09:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56695</link> 
  </item> 
   
  <item> 
   <title>Without any feedback from Sybase, there&#039;s not much we can do</title> 
   <description>Without any feedback from Sybase, there&#039;s not much we can do at the current state.</description> 
   <pubDate>Fri, 04 Dec 2009 15:43:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t56998</link> 
  </item> 
   
  <item> 
   <title>Sybase is doing nothing. The case isn&#039;t even assigned to som</title> 
   <description>Sybase is doing nothing. The case isn&#039;t even assigned to someone. Thats it: I&#039;m giving up. When there is a new Version of Sybase (I think it is 11 at the moment) I&#039;ll try again.
Anyway: many many thanks for your help!</description> 
   <pubDate>Mon, 07 Dec 2009 08:00:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8608#t57022</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
