6.0.0-alpha14
7/3/25

[#7092] Query's from Drivers/SQl.php incompatibility with Mysql 5
Summary Query's from Drivers/SQl.php incompatibility with Mysql 5
Queue Kronolith
Queue Version 2.2
Type Bug
State Not A Bug
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester lauren (at) servicom2000 (dot) com
Created 07/22/2008 (6190 days ago)
Due 07/22/2008 (6190 days ago)
Updated 07/23/2008 (6189 days ago)
Assigned 07/22/2008 (6190 days ago)
Resolved 07/23/2008 (6189 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/23/2008 01:10:29 PM Michael Rubinsky State ⇒ Not A Bug
 
07/23/2008 01:10:10 PM Michael Rubinsky Comment #7 Reply to this comment
I attach you my sql.php file
Patched with sql.php.patch and sql.php.2.patch. (I patched it after
the error),
...and what patches are these? I have no idea what these patches are.
http://bugs.horde.org/ticket/6946
http://bugs.horde.org/ticket/6966
Well, if you look at those tickets, you'll see that those patches were 
never applied to HEAD code, but other changes *were* made in those 
tickets.  Further, once again, at least one of the the log entries   
you show in your most recent comment do *not* match the line numbers 
even in the sql.php file you uploaded here. We can't help you if your 
not running official Horde code.



My advise would be to get fresh checkout of Kronolith from either HEAD 
or a snapshot and then retest as those tickets look like they *might* 
solve your syncing problem.



Please take further comments to the mailing list, or if after getting 
a fresh checkout you still encounter sync problems, please open a new 
ticket with an appropriate title.


07/23/2008 08:29:39 AM lauren (at) servicom2000 (dot) com Comment #6 Reply to this comment
I have configured horde logging in debug mode an get this:



Jul 23 10:02:03 HORDE [debug] [kronolith] 
Kronolith_Driver_sql::getByUID(): user = "a00ah001"; query = "SELECT 
event_id, event_uid, calendar_id, event_descri

ption, event_location, event_private, event_status, event_attendees, 
event_keywords, event_title, event_category, event_recurcount, 
event_recurtype, event_re

curenddate, event_recurinterval, event_recurdays, event_start, 
event_end, event_alarm, event_modified, event_exceptions, 
event_creator_id FROM kronolith_even

ts WHERE event_uid = ? AND calendar_id IN (?)"; values = "" [pid 1636 
on line 427 of "/var/www/horde/kronolith/lib/Driver/sql.php"]



Jul 23 10:02:03 HORDE [error] [kronolith] DB Error: syntax error: 
SELECT event_id, event_uid, calendar_id, event_description, 
event_location, event_private, event_status, event_attendees, 
event_keywords, event_title, event_category, event_recurcount, 
event_recurtype, event_recurenddate, event_recurinterval, 
event_recurdays, event_start, event_end, event_alarm, event_modified, 
event_exceptions, event_creator_id FROM kronolith_events WHERE 
event_uid = ? AND calendar_id IN (?) [nativecode=1064 ** You have an 
error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near '? AND 
calendar_id IN (?)' at line 1] [pid 1636 on line 431 of 
"/var/www/horde/kronolith/lib/Driver/sql.php"]



I thiks this is that the values for the variables are unset.



This occurs on calendar sync process from Funambul 6.5.8/Outlook2007 to Horde.



I can send you horde.log and sync logs if you wish.






07/23/2008 07:04:50 AM lauren (at) servicom2000 (dot) com Comment #5
New Attachment: sql.php Download
Reply to this comment
I test de SELECT command executing it directly with mysql-client. I
found the same error.
Well, if all you did was paste that query into the client, then of
course it won't work. The '?' is a placeholder that gets replaced
with the real values when the actual query is done.
Ok, I undestand it, but if it must be replaced, wich is the value must 
be registered in the log, the placeholder '?' or the real value?.



I have checked the mydql.log and foungd this:



                    1048 Query       SELECT event_id, event_uid, 
calendar_id, eve

nt_description, event_location, event_private, event_status, 
event_attendees, ev

ent_keywords, event_title, event_category, event_recurcount, 
event_recurtype, ev

ent_recurenddate, event_recurinterval, event_recurdays, event_start, 
event_end,

event_alarm, event_modified, event_exceptions, event_creator_id FROM 
kronolith_e

vents WHERE event_uid = ? AND calendar_id IN (?)



I think in any case the placeholder '?' is not replaced and it makes 
the error.

[Show Quoted Text - 9 lines]
I attach you my sql.php file
Patched with sql.php.patch and sql.php.2.patch. (I patched it after
the error),
...and what patches are these? I have no idea what these patches are.
http://bugs.horde.org/ticket/6946

http://bugs.horde.org/ticket/6966



I'll try to make more intensive test, change the origin calendar, 
create new calendars, etc.








07/22/2008 09:18:52 PM Michael Rubinsky Comment #4 Reply to this comment
I test de SELECT command executing it directly with mysql-client. I
found the same error.
Well, if all you did was paste that query into the client, then of 
course it won't work. The '?' is a placeholder that gets replaced with 
the real values when the actual query is done.
The version of sql.php I have installed is

$Horde: kronolith/lib/Driver/sql.php,v 1.136.2.36 2008/05/14 19:41:02
chuck Exp $
Again, line 435 in this version of the file would not output that 
error...are you 100% positive that you have not made local changes to 
this file?
Patched with sql.php.patch and sql.php.2.patch. (I patched it after
the error),
...and what patches are these? I have no idea what these patches are.
Can be it is a problem of backward compatibility of Mysql 5, and I
need to set any parameter on my.cnf, I'm checking it.
Not likely.


07/22/2008 04:34:30 PM lauren (at) servicom2000 (dot) com Comment #3 Reply to this comment
I'm not sure I understand your issue.  That query uses bind
parameters and goes through the DB abstraction layer before going to
mysql.  Also, your report states this is from version 2.2 of
Kronolith, but the line number given in the error message does not
correspond to any line in 2.2 that would produce such a message.
Lastly, this works fine for me on 3 different boxes using various
flavors of mysql 5.0.x
Hi Michael,



I will try to clarify you the question.



I find the error reported to you on horde.log.



I test de SELECT command executing it directly with mysql-client. I 
found the same error.



I think is a problem with the use of  the character '?' on the select. 
I think you are using it on some places in sql.php i.e.:



line 502: "WHERE event_id = ?'"



The version of sql.php I have installed is



$Horde: kronolith/lib/Driver/sql.php,v 1.136.2.36 2008/05/14 19:41:02 
chuck Exp $



Patched with sql.php.patch and sql.php.2.patch. (I patched it after 
the error),



Can be it is a problem of backward compatibility of Mysql 5, and I 
need to set any parameter on my.cnf, I'm checking it.



If you consider this is not a bug I can to continue this discussion on 
the mailing list.



Thanks in advance.














07/22/2008 01:38:51 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Assigned to Michael Rubinsky
Reply to this comment
I'm not sure I understand your issue.  That query uses bind parameters 
and goes through the DB abstraction layer before going to mysql.   
Also, your report states this is from version 2.2 of Kronolith, but 
the line number given in the error message does not correspond to any 
line in 2.2 that would produce such a message. Lastly, this works fine 
for me on 3 different boxes using various flavors of mysql 5.0.x


07/22/2008 01:04:48 PM lauren (at) servicom2000 (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Query's from Drivers/SQl.php incompatibility with Mysql 5
Due ⇒ 07/22/2008
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
We have errors like thi on horde.log;

Jul 22 14:39:54 HORDE [error] [kronolith] DB Error: syntax error: 
SELECT event_id, event_uid, calendar_id, event_description, 
event_location, event_private, event_status, event_attendees, 
event_keywords, event_title, event_category, event_recurcount, 
event_recurtype, event_recurenddate, event_recurinterval, 
event_recurdays, event_start, event_end, event_alarm, event_modified, 
event_exceptions, event_creator_id FROM kronolith_events WHERE 
event_uid = ? AND calendar_id IN (?) [nativecode=1064 ** You have an 
error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near '? AND 
calendar_id IN (?)' at line 1] [pid 29998 on line 435 of 
"/var/www/horde/kronolith/lib/Driver/sql.php"]



when we sync calendar, the enevnts are inserted in the database, but 
you have error on server.



We have made simple querys like:



SELECT event_uid FROM kronolith_events WHERE event_uid = ?;

ERROR 1064 (42000): You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near '?' at line 1



and have the same error.



This is our Mysql version



MYSQL VERSION: mysql  Ver 14.12 Distrib 5.0.51a






Saved Queries