Re: Fake interval data type

2002-02-21 Thread Tod Harter
: Heikki Tuuri [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 21, 2002 9:27 AM Subject: Re: Fake interval data type Hi! Its kind of a subtle point, but innodb's locking not only locks rows, it locks the ABSENCE of rows. If I understand correctly this means

Re: Fake interval data type

2002-02-20 Thread Sasa Babic
On Wed, Feb 20, 2002 at 11:38:31AM +0100, [EMAIL PROTECTED] wrote: sql,query The above is for antispam filter. I have a need for an interval data type. It would contain start and end of a certain time event. Since it is not possible to have two different events at the same place and at the

Re: Fake interval data type

2002-02-20 Thread Tod Harter
On Wednesday 20 February 2002 05:51, Sasa Babic wrote: On Wed, Feb 20, 2002 at 11:38:31AM +0100, [EMAIL PROTECTED] wrote: sql,query The above is for antispam filter. I have a need for an interval data type. It would contain start and end of a certain time event. Since it is not possible

Re: Fake interval data type

2002-02-20 Thread Heikki Tuuri
Hi! Its kind of a subtle point, but innodb's locking not only locks rows, it locks the ABSENCE of rows. If I understand correctly this means that something like: BEGIN WORK SELECT COUNT(*) FROM table WHERE starttime? AND endtime? (check the count) INSERT INTO table (if count is zero)

Re: Fake interval data type

2002-02-20 Thread Heikki Tuuri
Oops, the syntax is SELECT ... FROM ... WHERE .. LOCK IN SHARE MODE; Heikki -Original Message- From: Heikki Tuuri [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 21, 2002 9:27 AM Subject: Re: Fake interval data type Hi! Its kind of a subtle point