6.0.0-beta1
11/9/25

[#6136] SQL Error
Summary SQL Error
Queue Turba
Queue Version 2.2-RC1
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester f.rust (at) tu-bs (dot) de
Created 01/23/2008 (6500 days ago)
Due
Updated 01/23/2008 (6500 days ago)
Assigned 01/23/2008 (6500 days ago)
Resolved 01/23/2008 (6500 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/23/2008 04:53:29 PM Michael Rubinsky Comment #6
State ⇒ Resolved
Reply to this comment
Committed a change that ensures we fall back to the default 
listTimeObjects() behaviour, which is basically returning all the 
objects in a source and then checking them for the proper date range.   
  But, like chuck said, we don't really support mySQL 3 and you'll get 
much better performance from this part of the code (especially with 
large address books) with newer versions of MySQL.
01/23/2008 04:37:07 PM Chuck Hagenbuch Comment #5
Assigned to Michael Rubinsky
State ⇒ Assigned
Reply to this comment
Assigning to Michael for double checking catching this error. But in 
general we don't support MySQL 3.
01/23/2008 04:12:56 PM Jan Schneider Comment #4 Reply to this comment
SUBSTR() is actually the only substring function that works the same 
across all major RDBMs. There are really still people running MySQL 3? 
:-)
01/23/2008 03:45:32 PM f (dot) rust (at) tu-bs (dot) de Comment #3 Reply to this comment
@Jan Schneider:



I use mysql 3.23.58.



From mysql Documentation:

`SUBSTR()' is a synonym for `SUBSTRING()', added in MySQL 4.1.1.



Since everything seems to run fine with V3.23 I suggest to simply 
change the SUBSTR to SUBSTRING to get more backwards compatibility.
01/23/2008 03:33:37 PM Jan Schneider Comment #2
State ⇒ Feedback
Priority ⇒ 2. Medium
Reply to this comment
Which RDBMS do you use?
01/23/2008 02:39:27 PM f (dot) rust (at) tu-bs (dot) de Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Queue ⇒ Turba
Summary ⇒ SQL Error
Type ⇒ Bug
Reply to this comment
Wrong SQL detected:

turba/lib/Driver/sql.php:508:



$where = array('sql' => $bday . ' IS NOT NULL AND SUBSTR(' . $bday



should be:



$where = array('sql' => $bday . ' IS NOT NULL AND SUBSTRING(' . $bday






Saved Queries