6.0.0-alpha14
6/25/25

[#10902] MySQL syntax wrong in initial install
Summary MySQL syntax wrong in initial install
Queue Kronolith
Queue Version 3.0.14
Type Bug
State Resolved
Priority 3. High
Owners jan (at) horde (dot) org
Requester chandleg (at) wizardsworks (dot) org
Created 01/05/2012 (4920 days ago)
Due
Updated 01/25/2012 (4900 days ago)
Assigned 01/25/2012 (4900 days ago)
Resolved 01/25/2012 (4900 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/25/2012 11:07:17 AM Git Commit Comment #10 Reply to this comment
Changes have been made in Git for this ticket:

[jan] Fix syntax error in migration script (Bug #10902).

  3 files changed, 4 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/921ebf3b4adb961d21d638531664c892286c6fdc
01/25/2012 11:07:11 AM Git Commit Comment #9 Reply to this comment
Changes have been made in Git for this ticket:

Throw exception on invalid modifyDate() parameters (Bug #10902).

  3 files changed, 27 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/b59f930cfe4983eac4b98da197061833ffdeebed
01/25/2012 10:08:28 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
01/25/2012 09:31:14 AM Jan Schneider State ⇒ Assigned
Queue ⇒ Kronolith
Version ⇒ 3.0.14
 
01/22/2012 06:41:50 AM johnphilips42 (at) yahoo (dot) com Comment #8 Reply to this comment
Try this patch.
It worked for me.
01/18/2012 09:21:49 AM vilius (at) lnk (dot) lt Comment #7
New Attachment: 0001-Fix-query-syntax.patch Download
Reply to this comment
Try this patch.
01/11/2012 09:35:37 PM wojciech (dot) myszka (at) pwr (dot) wroc (dot) pl Comment #6
New Attachment: h.log Download
Reply to this comment
Same situation here.
mysql  Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (x86_64) using 
readline 6.2

PHP 5.3.5-1ubuntu7.4 with Suhosin-Patch (cli) (built: Dec 13 2011 18:30:11)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

ubuntu 11.04
During installation of Horde Webmail Edition during running the script 
webmail-install I got error:
....
Writing main configuration file... done
Fatal Error:
SQLSTATE[42000]: Syntax error or access violation: 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 '1 = event_end' 
at line 1
1. Horde_Core_Bundle->migrateDb() /usr/bin/webmail-install:32
2. Horde_Db_Migration_Migrator->up() /usr/share/php/Horde/Core/Bundle.php:107
3. Horde_Db_Migration_Migrator->_doMigrate() 
/usr/share/php/Horde/Db/Migration/Migrator.php:102
4. Horde_Db_Migration_Base->migrate() 
/usr/share/php/Horde/Db/Migration/Migrator.php:182
5. KronolithUpgradeAddAllDay->up() 
/usr/share/php/Horde/Db/Migration/Base.php:121
6. KronolithUpgradeAddAllDay->execute() 
/var/www/webmail/kronolith/migration/3_kronolith_upgrade_addallday.php:24
7. Horde_Db_Migration_Base->__call() 
/var/www/webmail/kronolith/migration/3_kronolith_upgrade_addallday.php:24
8. call_user_func_array() /usr/share/php/Horde/Db/Migration/Base.php:86
9. Horde_Db_Adapter_Base->execute()


01/11/2012 01:23:17 PM d (dot) mikhailov (at) infocommunications (dot) ru Comment #5 Reply to this comment
Hi everyone,

Fresh install of kronolith-3.0.13 as a part of groupware-4.0.5. Installation
fails:

<QUOTE>
Creating and updating database tables...
====================

Fatal Error:
QUERY FAILED: 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 '1
= event_end' at line 1

UPDATE kronolith_events SET event_allday = 1 WHERE event_start +
INTERVAL 'DAY' 1 = event_end

1. Horde_Core_Bundle->migrateDb() /usr/bin/groupware-install:32
2. Horde_Db_Migration_Migrator->up() /usr/share/pear/Horde/Core/Bundle.php:107
3.
Horde_Db_Migration_Migrator->_doMigrate() 
/usr/share/pear/Horde/Db/Migration/Migrator.php:102
4.
Horde_Db_Migration_Base->migrate() 
/usr/share/pear/Horde/Db/Migration/Migrator.php:182
5.
KronolithUpgradeAddAllDay->up() 
/usr/share/pear/Horde/Db/Migration/Base.php:121
6.
KronolithUpgradeAddAllDay->execute() 
/var/www/horde/kronolith/migration/3_kronolith_upgrade_addallday.php:24
7.
Horde_Db_Migration_Base->__call() 
/var/www/horde/kronolith/migration/3_kronolith_upgrade_addallday.php:24
8. call_user_func_array() /usr/share/pear/Horde/Db/Migration/Base.php:86
9. Horde_Db_Adapter_Mysqli->execute()

====================
</QUOTE>

If I comment out line 24 in the
offending 'kronolith/migration/3_kronolith_upgrade_addallday.php',
installation is completed successfully.

Subsequent 'upgrade-install' has no such problem.

Is there an error in the upgrade script?

Best regards,
        Dmitry Mikhailov.


Full install procedure follows. (tried both mysql and mysqli drivers)

# pear install horde/groupware
Did not download optional dependencies: horde/Horde_Test, pear/Date_Holidays,
use --alldeps to download automatically
Did not download optional dependencies: horde/Horde_Test, use --alldeps to
download automatically
Did not download optional dependencies: horde/Horde_Test, use --alldeps to
download automatically
horde/kronolith can optionally use package "horde/Horde_Test" (version >=
1.3.0, version <= 2.0.0, excluded versions: 2.0.0)
horde/kronolith can optionally use package "pear/Date_Holidays" (version >=
0.21.0)
horde/mnemo can optionally use package "horde/Horde_Test" (version >= 1.2.0,
version <= 2.0.0, excluded versions: 2.0.0)
horde/nag can optionally use package "horde/Horde_Test" (version >= 1.2.0,
version <= 2.0.0, excluded versions: 2.0.0)
downloading groupware-4.0.5.tgz ...
Starting to download groupware-4.0.5.tgz (57,815 bytes)
..............done: 57,815 bytes
downloading kronolith-3.0.13.tgz ...
Starting to download kronolith-3.0.13.tgz (2,594,730 bytes)
...done: 2,594,730 bytes
downloading mnemo-3.0.4.tgz ...
Starting to download mnemo-3.0.4.tgz (1,353,512 bytes)
...done: 1,353,512 bytes
downloading nag-3.0.7.tgz ...
Starting to download nag-3.0.7.tgz (1,757,062 bytes)
....done: 1,757,062 bytes
install ok: channel://pear.horde.org/kronolith-3.0.13
install ok: channel://pear.horde.org/mnemo-3.0.4
install ok: channel://pear.horde.org/nag-3.0.7
install ok: channel://pear.horde.org/groupware-4.0.5
[root@infocoms config]# groupware-install

Installing Horde Groupware

Configuring database settings

What database backend should we use?
    (false) [None]
    (mysql) MySQL / PDO
    (mysqli) MySQL (mysqli)
    (pgsql) PostgreSQL
    (sqlite) SQLite

Type your choice []: mysqli

Username to connect to the database as* [] horde
Password to connect with
How should we connect to the database?
    (unix) UNIX Sockets
    (tcp) TCP/IP

Type your choice [unix]: tcp

Database server/host* [] 10.100.10.3

Port the DB is running on, if non-standard [3306]

Database name to use* []
This field is required.

Database name to use* [] infocs_horde

Internally used charset* [utf-8]
Use SSL to connect to the server?
    (1) Yes
    (0) No

Type your choice [0]:

Certification Authority to use for SSL connections []
Split reads to a different server?
    (false) Disabled
    (true) Enabled

Type your choice [false]:

Writing main configuration file... done.

Creating and updating database tables...
====================

Fatal Error:
QUERY FAILED: 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 '1
= event_end' at line 1

UPDATE kronolith_events SET event_allday = 1 WHERE event_start +
INTERVAL 'DAY' 1 = event_end

1. Horde_Core_Bundle->migrateDb() /usr/bin/groupware-install:32
2. Horde_Db_Migration_Migrator->up() /usr/share/pear/Horde/Core/Bundle.php:107
3.
Horde_Db_Migration_Migrator->_doMigrate() 
/usr/share/pear/Horde/Db/Migration/Migrator.php:102
4.
Horde_Db_Migration_Base->migrate() 
/usr/share/pear/Horde/Db/Migration/Migrator.php:182
5.
KronolithUpgradeAddAllDay->up() 
/usr/share/pear/Horde/Db/Migration/Base.php:121
6.
KronolithUpgradeAddAllDay->execute() 
/var/www/horde/kronolith/migration/3_kronolith_upgrade_addallday.php:24
7.
Horde_Db_Migration_Base->__call() 
/var/www/horde/kronolith/migration/3_kronolith_upgrade_addallday.php:24
8. call_user_func_array() /usr/share/pear/Horde/Db/Migration/Base.php:86
9. Horde_Db_Adapter_Mysqli->execute()

====================
01/11/2012 12:30:26 PM kaczorek (at) gmail (dot) com Comment #4 Reply to this comment
Horde says that Kronolith DB schema is out of date and when i try to 
update it, i get this error:

SQLSTATE[42000]: Syntax error or access violation: 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 '1 = event_end' 
at line 1

mysqld is Ver 5.1.51 for pc-linux-gnu on x86_64 (Gentoo Linux mysql-5.1.51)
01/10/2012 02:16:58 AM chandleg (at) wizardsworks (dot) org Comment #3 Reply to this comment
What is your mysql binary version?
mysql Ver 14.14 Distrib 5.1.56, for slackware-linux-gnu (x86_64) using 
readline 5.1

I thought this was the same as the other server which is 5.2 
something... let me upgrade the mysql and make sure that wasn't the 
problem.
01/09/2012 08:58:08 PM Ralf Lang Comment #2 Reply to this comment
What is your mysql binary version?
01/05/2012 02:58:17 AM chandleg (at) wizardsworks (dot) org Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ MySQL syntax wrong in initial install
Type ⇒ Bug
Priority ⇒ 3. High
Reply to this comment
root@binary:/usr/local/apache2/htdocs/horde# webmail-install

Installing Horde Groupware Webmail Edition

Configuring database settings

What database backend should we use?
     (false) [None]
     (mysql) MySQL / PDO
     (mysqli) MySQL (mysqli)
     (pgsql) PostgreSQL
     (sqlite) SQLite

Type your choice []: mysql
Request persistent connections?
     (1) Yes
     (0) No

Type your choice [0]:

Username to connect to the database as* [] {removed}
Password to connect with
How should we connect to the database?
     (unix) UNIX Sockets
     (tcp) TCP/IP

Type your choice [unix]: tcp

Database server/host* [] localhost

Port the DB is running on, if non-standard [3306]

Database name to use* [] Horde-Mail

Internally used charset* [utf-8]
Use SSL to connect to the server?
     (1) Yes
     (0) No

Type your choice [0]:

Certification Authority to use for SSL connections []
Split reads to a different server?
     (false) Disabled
     (true) Enabled

Type your choice [false]:

Writing main configuration file... done.

Creating and updating database tables...
====================

Fatal Error:
SQLSTATE[42000]: Syntax error or access violation: 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 '1 = event_end' 
at line 1

1. Horde_Core_Bundle->migrateDb() /usr/local/bin/webmail-install:32
2. Horde_Db_Migration_Migrator->up() 
/usr/local/lib/php/Horde/Core/Bundle.php:107
3. Horde_Db_Migration_Migrator->_doMigrate() 
/usr/local/lib/php/Horde/Db/Migration/Migrator.php:102
4. Horde_Db_Migration_Base->migrate() 
/usr/local/lib/php/Horde/Db/Migration/Migrator.php:182
5. KronolithUpgradeAddAllDay->up() 
/usr/local/lib/php/Horde/Db/Migration/Base.php:121
6. KronolithUpgradeAddAllDay->execute() 
/usr/local/apache2/htdocs/wizardsworks.org/horde/kronolith/migration/3_kronolith_upgrade_addallday.php:24
7. Horde_Db_Migration_Base->__call() 
/usr/local/apache2/htdocs/wizardsworks.org/horde/kronolith/migration/3_kronolith_upgrade_addallday.php:24
8. call_user_func_array() /usr/local/lib/php/Horde/Db/Migration/Base.php:86
9. Horde_Db_Adapter_Base->execute()

====================

Saved Queries