MySQL race condition.

Christopher Crowley ccrowley@tulane.edu
Fri, 7 Dec 2001 10:03:26 -0600


In my previous e-mail I made reference to a race condition that occured
using kronolith. I don't have any log information to share. I am running
MySQL 3.22, and know that I need to upgrade. I will not be able to do so for
a few weeks because of scheduling issues. While a new MySQL might throttle
the runaway consumption of resources, it wouldn't address whatever is
triggering this loop.

Please inquire about additional relevant details. I am not exactly sure what
to investigate with this problem.

I determined that this was caused by clicking "Options" in kronolith.

Lines 14-15 kronolith/templates/menu/menu.inc produce the link:

if (($conf['prefs']['driver'] != '') && ($conf['prefs']['driver'] !=
'none')) {
    Menu::printItem(Horde::applicationUrl('prefs.php'), _("Options"),
'prefs.gif', $registry->getGraphicsPath("horde"));
}

I am not logging in via horde, but rather through IMP.  Clicking on Options
in IMP doesn't cause a problem.

As always, any suggestions are appreciated.

MySQL tables:

+---------------------+
| Tables in horde     |
+---------------------+
| active_sessions     |
| horde_prefs         |
| imp_addr            |
| imp_pref            |
| kronolith_event_seq |
| kronolith_events    |
| turba_objects       |
+---------------------+


mysql> describe horde_prefs;
+------------+-------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| pref_uid   | varchar(32) |      | PRI |         |       |
| pref_scope | varchar(16) |      | PRI |         |       |
| pref_name  | varchar(32) |      | PRI |         |       |
| pref_value | text        | YES  |     | NULL    |       |
+------------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> describe kronolith_event_seq;
+-------+------------------+------+-----+---------+----------------+
| Field | Type             | Null | Key | Default | Extra          |
+-------+------------------+------+-----+---------+----------------+
| id    | int(10) unsigned |      | PRI | 0       | auto_increment |
+-------+------------------+------+-----+---------+----------------+
1 row in set (0.00 sec)

mysql> describe kronolith_events;
+---------------------+--------------+------+-----+---------------------+---
----+
| Field               | Type         | Null | Key | Default             |
Extra |
+---------------------+--------------+------+-----+---------------------+---
----+
| event_id            | bigint(20)   |      | PRI | 0                   |
|
| calendar_id         | varchar(255) |      |     |                     |
|
| event_description   | text         | YES  |     | NULL                |
|
| event_location      | text         | YES  |     | NULL                |
|
| event_keywords      | text         | YES  |     | NULL                |
|
| event_title         | varchar(80)  | YES  |     | NULL                |
|
| event_category      | varchar(80)  | YES  |     | NULL                |
|
| event_recurType     | varchar(11)  | YES  |     | 0                   |
|
| event_recurInterval | varchar(11)  | YES  |     | NULL                |
|
| event_recurDays     | varchar(11)  | YES  |     | NULL                |
|
| event_recurEnddate  | datetime     | YES  |     | NULL                |
|
| event_start         | datetime     |      |     | 0000-00-00 00:00:00 |
|
| event_end           | datetime     |      |     | 0000-00-00 00:00:00 |
|
| event_alarm         | int(11)      | YES  |     | 0                   |
|
+---------------------+--------------+------+-----+---------------------+---
----+
14 rows in set (0.00 sec)





>From marcus@riboflavin.net Date: Fri,  7 Dec 2001 09:40:08 -0600
Return-Path: <marcus@riboflavin.net>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 62329 invoked from network); 7 Dec 2001 17:22:16 -0000
Received: from dsl.75.79.networkiowa.com (HELO www.riboflavin.net) (209.234.75.79)
  by clark.horde.org with SMTP; 7 Dec 2001 17:22:16 -0000
Received: from localhost (dsl.75.91.networkiowa.com [209.234.75.91])
	by www.riboflavin.net (8.11.1/8.11.1) with ESMTP id fB7HOmt34935
	for <kronolith@lists.horde.org>; Fri, 7 Dec 2001 11:24:48 -0600 (CST)
	(envelope-from marcus@riboflavin.net)
Received: from 209.234.75.79 ( [209.234.75.79])
	as user marcus@imap.riboflavin.net by horde.riboflavin.net with HTTP;
	Fri,  7 Dec 2001 09:40:08 -0600
Message-ID: <1007739608.3c10e2d88c774@horde.riboflavin.net>
Date: Fri,  7 Dec 2001 09:40:08 -0600
From: "Marcus I. Ryan" <marcus@riboflavin.net>
To: kronolith@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 209.234.75.79
Resent-Date: Fri,  7 Dec 2001 11:22:05 -0600
Resent-From: marcus@riboflavin.net
Resent-To: kronolith@lists.horde.org
Resent-Message-ID: <1007745725.3c10fabd8823a@horde.riboflavin.net>
Subject: Kronolith CVS: gregoriantojd not found

I just updated by entire horde setup through CVS.  Now when I look at
a calendar in kronolith's month view, the first date that is on the
first day of a week reports

Fatal error: Call to undefined function: gregoriantojd() in 
/usr/local/src/horde/kronolith/lib/Kronolith.php on line 193

and no more dates are displayed.

After looking around in my "PHP 4 Bible" book and configure --help, I
figured out what needs to happen is now when one installs PHP they
need to add --enable-calendar to their configure command-line.  If
this is to remain a part of the code, it would be a good idea to add
this to the appropriate install docs.

-- 
Marcus I. Ryan, marcus@riboflavin.net
-----------------------------------------------------------------------
 "Love is a snowmobile racing across the tundra and then suddenly it
 flips over, pinning you underneath.  At night, the ice weasels come."
                 -- Matt Groening
-----------------------------------------------------------------------




>From eculp@EnContacto.Net Date: Fri,  7 Dec 2001 10:41:48 -0800
Return-Path: <eculp@EnContacto.Net>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 64555 invoked from network); 7 Dec 2001 18:41:50 -0000
Received: from adsl-64-173-182-158.dsl.mtry01.pacbell.net (HELO savvyworld.net) (64.173.182.158)
  by clark.horde.org with SMTP; 7 Dec 2001 18:41:50 -0000
Received: (from root@localhost)
	by savvyworld.net (8.11.6/8.11.4) id fB7IfmE83745
	for kronolith@lists.horde.org; Fri, 7 Dec 2001 10:41:48 -0800 (PST)
	(envelope-from eculp@EnContacto.Net)
Received: from 64.173.182.155 ( [64.173.182.155])
	as user eculp@EnContacto.Net by Mail.SavvyWorld.Net with HTTP;
	Fri,  7 Dec 2001 10:41:48 -0800
Message-ID: <1007750508.3c110d6cd7e5d@Mail.SavvyWorld.Net>
Date: Fri,  7 Dec 2001 10:41:48 -0800
From: Edwin Culp <eculp@EnContacto.Net>
To: kronolith@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 64.173.182.155
Subject: I just updated my cvs and got a Gregorian Error.

I get this in the lower left hand corner of my screen.

Fatal error: Call to undefined function: gregoriantojd() in
/usr/src/horde/kronolith/lib/Kronolith.php on line 193

I'm going to be sure I haven't miss one of the dist files.

Thanks,

ed


---


>From jan@horde.org Date: Fri,  7 Dec 2001 22:12:18 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 70829 invoked from network); 7 Dec 2001 21:17:50 -0000
Received: from mailout05.sul.t-online.com (HELO mailout05.sul.t-online.de) (194.25.134.82)
  by clark.horde.org with SMTP; 7 Dec 2001 21:17:50 -0000
Received: from fwd00.sul.t-online.de 
	by mailout05.sul.t-online.de with smtp 
	id 16CSNQ-0006Qp-06; Fri, 07 Dec 2001 22:17:48 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.43.97]) by fmrl00.sul.t-online.com
	with esmtp id 16CSNK-0Y2DJYC; Fri, 7 Dec 2001 22:17:42 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB7LCIk10827
	for <kronolith@lists.horde.org>; Fri, 7 Dec 2001 22:12:18 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@linux by linux.wg.de with HTTP;
	Fri,  7 Dec 2001 22:12:18 +0100
Message-ID: <1007759538.3c1130b214faa@linux.wg.de>
Date: Fri,  7 Dec 2001 22:12:18 +0100
From: Jan Schneider <jan@horde.org>
To: kronolith@lists.horde.org
References: <1007739608.3c10e2d88c774@horde.riboflavin.net>
In-Reply-To: <1007739608.3c10e2d88c774@horde.riboflavin.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [kronolith] Kronolith CVS: gregoriantojd not found

Zitat von "Marcus I. Ryan" <marcus@riboflavin.net>:

> I just updated by entire horde setup through CVS.  Now when I look at
> a calendar in kronolith's month view, the first date that is on the
> first day of a week reports
> 
> Fatal error: Call to undefined function: gregoriantojd() in 
> /usr/local/src/horde/kronolith/lib/Kronolith.php on line 193
> 
> and no more dates are displayed.
> 
> After looking around in my "PHP 4 Bible" book and configure --help, I
> figured out what needs to happen is now when one installs PHP they
> need to add --enable-calendar to their configure command-line.  If
> this is to remain a part of the code, it would be a good idea to add
> this to the appropriate install docs.

Hm, we changed the way to calculate the week number because the old way 
didn't work with windows. But we can change the code to not depend on the 
Gregorian functions from the calendar library.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From chuck@horde.org Date: Fri,  7 Dec 2001 16:27:14 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 71158 invoked from network); 7 Dec 2001 21:27:56 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 7 Dec 2001 21:27:56 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 85CA639D4; Fri,  7 Dec 2001 16:27:14 -0500 (EST)
Received: from 137.165.110.192 ( [137.165.110.192])
	as user chuck@localhost by marina.horde.org with HTTP;
	Fri,  7 Dec 2001 16:27:14 -0500
Message-ID: <1007760434.3c1134325b5c5@marina.horde.org>
Date: Fri,  7 Dec 2001 16:27:14 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: kronolith@lists.horde.org
References: <1007739608.3c10e2d88c774@horde.riboflavin.net> <1007759538.3c1130b214faa@linux.wg.de>
In-Reply-To: <1007759538.3c1130b214faa@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [kronolith] Kronolith CVS: gregoriantojd not found

Quoting Jan Schneider <jan@horde.org>:

> Hm, we changed the way to calculate the week number because the old way 
> didn't work with windows. But we can change the code to not depend on the 
> Gregorian functions from the calendar library.

I think this would be a good thing.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From eculp@EnContacto.Net Date: Fri,  7 Dec 2001 13:36:22 -0800
Return-Path: <eculp@EnContacto.Net>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 74052 invoked from network); 7 Dec 2001 21:37:44 -0000
Received: from softdnserror (HELO savvyworld.net) (64.173.182.158)
  by clark.horde.org with SMTP; 7 Dec 2001 21:37:44 -0000
Received: (from root@localhost)
	by savvyworld.net (8.11.6/8.11.4) id fB7LaME59172;
	Fri, 7 Dec 2001 13:36:22 -0800 (PST)
	(envelope-from eculp@EnContacto.Net)
Received: from 64.173.182.155 ( [64.173.182.155])
	as user eculp@EnContacto.Net by Mail.SavvyWorld.Net with HTTP;
	Fri,  7 Dec 2001 13:36:22 -0800
Message-ID: <1007760982.3c1136563a31b@Mail.SavvyWorld.Net>
Date: Fri,  7 Dec 2001 13:36:22 -0800
From: Edwin Culp <eculp@EnContacto.Net>
To: kronolith@lists.horde.org, Jan Schneider <jan@horde.org>
References: <1007739608.3c10e2d88c774@horde.riboflavin.net> <1007759538.3c1130b214faa@linux.wg.de>
In-Reply-To: <1007759538.3c1130b214faa@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 64.173.182.155
Subject: Re: [kronolith] Kronolith CVS: gregoriantojd not found

Quoting Jan Schneider <jan@horde.org>:

> Zitat von "Marcus I. Ryan" <marcus@riboflavin.net>:
> 
> > I just updated by entire horde setup through CVS.  Now when I look at
> > a calendar in kronolith's month view, the first date that is on the
> > first day of a week reports
> > 
> > Fatal error: Call to undefined function: gregoriantojd() in 
> > /usr/local/src/horde/kronolith/lib/Kronolith.php on line 193
> > 
> > and no more dates are displayed.
> > 
> > After looking around in my "PHP 4 Bible" book and configure --help, I
> > figured out what needs to happen is now when one installs PHP they
> > need to add --enable-calendar to their configure command-line.  If
> > this is to remain a part of the code, it would be a good idea to add
> > this to the appropriate install docs.

I did the --enable-calendar and it didn't change anything for me.
phpinfo shows --with-calendar.  I'm using sql rather that mcal.

ed
> 
> Hm, we changed the way to calculate the week number because the old way 
> didn't work with windows. But we can change the code to not depend on the 
> Gregorian functions from the calendar library.
> 
> Jan.
> 
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax  +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
> 
> -- 
> Kronolith mailing list: http://horde.org/kronolith/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org
> 
> 




---


>From chuck@horde.org Date: Fri,  7 Dec 2001 17:35:33 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 75059 invoked from network); 7 Dec 2001 22:36:14 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 7 Dec 2001 22:36:14 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id ED77F3972; Fri,  7 Dec 2001 17:35:33 -0500 (EST)
Received: from 137.165.110.192 ( [137.165.110.192])
	as user chuck@localhost by marina.horde.org with HTTP;
	Fri,  7 Dec 2001 17:35:33 -0500
Message-ID: <1007764533.3c114435c7df0@marina.horde.org>
Date: Fri,  7 Dec 2001 17:35:33 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: kronolith@lists.horde.org
References: <00e701c17f18$e0407d70$0a0aa8c0@ewddk.dk>
In-Reply-To: <00e701c17f18$e0407d70$0a0aa8c0@ewddk.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [kronolith] Kronolith sql driver not using table-param 

Quoting Martin List-Petersen <martin@list-petersen.dk>:

> it seems like kronolith is ignoring the 'table' field. I've trying to use
> another table-name ..... 

Committed (after being modified to match CODING_STANDARDS), thanks.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From mike@graftonhall.co.nz Date: Sat,  8 Dec 2001 02:26:13 +0000
Return-Path: <mike@graftonhall.co.nz>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 82863 invoked from network); 8 Dec 2001 02:25:32 -0000
Received: from unknown (HELO graftonhall.co.nz) (210.54.179.59)
  by clark.horde.org with SMTP; 8 Dec 2001 02:25:32 -0000
Received: from localhost [127.0.0.1]
	by graftonhall.co.nz [10.0.0.4]
	with SMTP (MDaemon.PRO.v5.0.1.R)
	for <kronolith@lists.horde.org>; Sat, 08 Dec 2001 15:26:13 +1300
Received: from 10.0.0.4 ( [10.0.0.4])
	as user mike@10.0.0.4 by webmail.graftonhall.co.nz with HTTP;
	Sat,  8 Dec 2001 02:26:13 +0000
Message-ID: <1007778373.3c117a4564517@webmail.graftonhall.co.nz>
Date: Sat,  8 Dec 2001 02:26:13 +0000
From: Michael Cochrane <mike@graftonhall.co.nz>
To: kronolith@lists.horde.org
References: <1007739608.3c10e2d88c774@horde.riboflavin.net> <1007759538.3c1130b214faa@linux.wg.de>
In-Reply-To: <1007759538.3c1130b214faa@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 10.0.0.4
X-MDRemoteIP: 127.0.0.1
X-Return-Path: mike@graftonhall.co.nz
X-MDaemon-Deliver-To: kronolith@lists.horde.org
Subject: Re: [kronolith] Kronolith CVS: gregoriantojd not found

Yes we can :-) He's a different algorithm... a bit slower as more comparisons 
and calculations involved but gives the same result...

Index: kronolith/lib/Kronolith.php
===================================================================
RCS file: /repository/kronolith/lib/Kronolith.php,v
retrieving revision 1.44
diff -r1.44 Kronolith.php
192,197c192,214
<         
<         $J = gregoriantojd($month, $day, $year);
<         $d = ($J + 31741 - ($J % 7)) % 146097 % 36524 % 1461;
<         $L = floor($d / 1460); 
<         $correctedDayInYear = (($d - $L) % 365) + $L;
<         return floor($correctedDayInYear / 7) + 1;   
---
> 
>         $dayOfYear = Kronolith::dayOfYear($year,$month,$day);
>         $dayOfWeek = Kronolith::dayOfWeek($year,$month,$day);
>         $dayOfWeekJan1 = Kronolith::dayOfWeek($year,1,1);
> 
>         if ($dayOfYear <= 7-$dayOfWeekJan1 && $dayOfWeekJan1 > 3 ) {
>              if ($dayOfWeekJan1 == 4 || ($dayOfWeekJan1 == 5 && 
Kronolith::isLeapYear($year-1)))
>                   return "53";
>              else
>                   return "52";
>         }
> 
>         if (Kronolith::isLeapYear($year))
>             $daysInYear = 366;
>         else
>             $daysInYear = 365;
> 
>         if ($daysInYear - $dayOfYear < 3 - $dayOfWeek) return "1";
> 
>         $WeekNumber = floor(($dayOfYear + (6 - $dayOfWeek) + 
$dayOfWeekJan1) / 7);
>         if ($dayOfWeekJan1 > 3) { $WeekNumber -= 1; }
> 
>         return $WeekNumber;

Quoting Jan Schneider <jan@horde.org>:

> 
> Hm, we changed the way to calculate the week number because the old way 
> didn't work with windows. But we can change the code to not depend on the 
> Gregorian functions from the calendar library.
> 
> Jan.
> 
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax  +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
> 
> -- 
> Kronolith mailing list: http://horde.org/kronolith/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org
> 
> 




>From paja@asp.ogi.edu Date: Sun,  9 Dec 2001 16:03:40 -0800
Return-Path: <paja@asp.ogi.edu>
Mailing-List: contact kronolith-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list kronolith@lists.horde.org
Received: (qmail 23523 invoked from network); 10 Dec 2001 00:03:40 -0000
Received: from asp.ogi.edu (129.95.94.10)
  by clark.horde.org with SMTP; 10 Dec 2001 00:03:40 -0000
Received: from asp.ogi.edu (localhost [127.0.0.1])
	by asp.ogi.edu (8.12.1/8.12.1) with ESMTP id fBA03eEW024628
	for <kronolith@lists.horde.org>; Sun, 9 Dec 2001 16:03:40 -0800
Received: (from nobody@localhost)
	by asp.ogi.edu (8.12.1/8.12.1/Submit) id fBA03eVq024627
	for kronolith@lists.horde.org; Sun, 9 Dec 2001 16:03:40 -0800
X-Authentication-Warning: asp.ogi.edu: nobody set sender to paja@asp.ogi.edu using -f
Received: from 129.95.94.10 ( [129.95.94.10])
	as user pchytil@asp.ogi.edu by mail.asp.ogi.edu with HTTP;
	Sun,  9 Dec 2001 16:03:40 -0800
Message-ID: <1007942620.3c13fbdc291e9@mail.asp.ogi.edu>
Date: Sun,  9 Dec 2001 16:03:40 -0800
From: Pavel Chytil <paja@asp.ogi.edu>
To: kronolith@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: error in your SQL syntax near 'NOW() NOT NULL

 Hello,

 I have tried to create table for kronolith (using kronolith/docs/kronolith.sql
 from cvs) in mysql and get following error:

 mysql> CREATE TABLE kronolith_events (
     ->     event_id bigint DEFAULT 0 NOT NULL,
     ->     calendar_id varchar(255) NOT NULL,
     ->     event_description text,
     ->     event_location text,
     ->     event_keywords text,
     ->     event_title varchar(80),
     ->     event_category varchar(80),
     ->     event_recurtype varchar(11) DEFAULT '0',
     ->     event_recurinterval varchar(11),
     ->     event_recurdays varchar(11),
     ->     event_recurenddate datetime,
     ->     event_start datetime DEFAULT NOW() NOT NULL,
     ->     event_end datetime DEFAULT NOW() NOT NULL,
     ->     event_alarm int DEFAULT 0,
     ->     PRIMARY KEY (event_id)
     -> );
 ERROR 1064: You have an error in your SQL syntax near 'NOW() NOT NULL,
     event_end datetime DEFAULT NOW() NOT NULL,
     event_alarm i' at line 13
 mysql>

 Any advice?
 Thanks,
         Pavel