6.0.0-beta1
7/28/25

[#10171] SQL-Problems during sync
Summary SQL-Problems during sync
Queue Kronolith
Queue Version 3.0.2
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org, mrubinsk (at) horde (dot) org
Requester uli-ho (at) uli-eckhardt (dot) de
Created 06/01/2011 (5171 days ago)
Due
Updated 08/05/2011 (5106 days ago)
Assigned 06/02/2011 (5170 days ago)
Resolved 06/16/2011 (5156 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/05/2011 03:09:58 PM Michael Rubinsky Comment #13 Reply to this comment
There is a new content release that was pushed today. You should be 
able to update via pear now.
08/03/2011 02:41:41 PM cne (at) ruhrverband (dot) de Comment #12 Reply to this comment
Can you see if what I committed fixed this for you?
Yes, these changes do the trick. It's now working ok.

Thanks a lot,
Andreas
Yes! Working fine for me, too!!

But .. why is that patch not in 4.0.2?

Thanks, Christopher
06/16/2011 01:37:16 PM Michael Rubinsky Deleted Original Message
 
06/16/2011 01:34:56 PM Michael Rubinsky State ⇒ Resolved
 
06/16/2011 07:02:49 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #11 Reply to this comment
Can you see if what I committed fixed this for you?
Yes, these changes do the trick. It's now working ok.

Thanks a lot,
Andreas
06/15/2011 02:31:07 PM Michael Rubinsky Comment #10
Assigned to Michael Rubinsky
Assigned to Jan Schneider
Reply to this comment
Can you see if what I committed fixed this for you?
06/15/2011 02:29:13 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git for this ticket:

Always treat these values as strings.
We have already filtered out the actual integer ids, these values
will always represent object/type names, not ids.

Should fix bug: 10171

  2 files changed, 18 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/fdb8a263980a6d768dd07987417152bcb302e80a
06/15/2011 10:34:04 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #8
New Attachment: content_lib_Objects_Manager.patch
Reply to this comment
I observe the same error (Horde 4.0.6, kronolith 3.0.4, postgresql 
8.4) when upgrading from  kronolith-H3 with event-uid-entrys of all 
numbers (mis-interpreted as integer). The reason seems to be a missing 
quotation of $objectName (here the event_uid) in line 116 to 118 in 
/var/www/horde/content/lib/Objects/Manager.php:

foreach ($this->_db->selectAll('SELECT object_id, object_name FROM ' . 
$this->_t('objects')
. ' WHERE object_name IN (' . implode(',', array_map(array($this->_db, 
'quote'), array_keys($objectName)))
. ') AND type_id = ' . $type) as $row) {

If I leave out the mapping to array($this->_db, 'quote') and 
hard-encode the quotes, it solves the problem for me:

foreach ($this->_db->selectAll("SELECT object_id, object_name FROM " . 
$this->_t('objects')
. " WHERE object_name IN ('" . implode("','", array_keys($objectName))
. "') AND type_id = " . $type) as $row) {

(see also appended patch).

I have no idea if this does work with other DB-backends too, though, 
as I don't really understand the use of the 'quote'-mapping in the 
first place.

Andreas

06/03/2011 12:00:43 PM uli-ho (at) uli-eckhardt (dot) de Comment #7 Reply to this comment
The same problem as before.

06/03/2011 10:49:27 AM Jan Schneider Comment #6 Reply to this comment
How about now?
06/03/2011 10:48:40 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

More UID casting to string (Bug #10171).

  1 files changed, 4 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/737b1dfab0273170e1af77853cd8d1437e2aec9b
06/03/2011 10:28:38 AM uli-ho (at) uli-eckhardt (dot) de Comment #4 Reply to this comment
Does that fix it?
Seem there are problems on other parts too. To retest this problem i 
tried to convert my old backup of the last horde version to the 
current version and get an similar error:

SQLSTATE[42883]: Undefined function: 7 FEHLER: Operator existiert 
nicht: character varying = integer ZEILE 1: ...ect_name FROM 
"rampage_objects" WHERE object_name IN (941282... ^ TIP: Kein Operator 
stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie 
müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.

HORDE: HORDE [horde] SQL QUERY FAILED: SQLSTATE[42883]: Undefined 
function: 7 FEHLER:  Operator existiert nicht: character varying = 
integer ZEILE 1: ...ect_name FROM "rampage_objects" WHERE object_name 
IN (941282...                                                           
      ^ TIP:  Kein Operator stimmt mit dem angegebenen Namen und den 
Argumenttypen überein. Sie müssen möglicherweise ausdrückliche 
Typumwandlungen hinzufügen.   ^ISELECT object_id, object_name FROM 
"rampage_objects" WHERE object_name ^I  IN (941282435) AND type_id = 2 
[pid 1948 on line 792 of "/usr/share/php/Horde/Db/Adapter/Base.php"]


06/02/2011 10:13:25 PM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
Does that fix it?
06/02/2011 10:12:46 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

Cast UID to string (Bug #10171).

  1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/ab440a607223e9e46b0af022f1a1158d71584ca1
06/01/2011 06:35:51 PM uli-ho (at) uli-eckhardt (dot) de Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ SQL-Problems during sync
Type ⇒ Bug
Queue ⇒ Kronolith
Reply to this comment
With Horde 4.0.2/Kronolith 3.0.2 and postgresql 8.4. I always get the 
following SQL-Error when i try to sync the calendar data from my 
mobile phone to the server:

h1690828 HORDE: HORDE [horde] SQLSTATE[42883]: Undefined function: 7
FEHLER:  Operator existiert nicht: character varying = integer LINE 1:
  ...riginaldate FROM kronolith_events WHERE event_uid = 96437035 ...
                                                            ^ HINT:  Kein
Operator stimmt mit dem angegebenen Namen und den Argumenttypen überein.
Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen. [pid
14062 on line 481 of "/var/apache/mail/kronolith/lib/Driver/Sql.php"]

Since event_uid is of type character, this error message is correct. I 
had equal problems when i tried to convert the old Horde 3.x 
installation. Several conversion scripts complained about the numeric
event_uid.

This happens always when the event_uid for some reasons contains only 
numbers. Deleting this one event with the numeric uid solved at  least 
my sync problem, but it looks like the framework or database driver 
does some guesswork on the type. Whenever the event_uid is  only 
numeric the wrong type integer instead of character is guessed,   
leading to this error message.

The horde installation runs on Debian 6.0.1 with postgresql 8.4.

Saved Queries