6.0.0-alpha12
6/9/25

[#5280] a fix for alarm sql scripts under MySQL
Summary a fix for alarm sql scripts under MySQL
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester vilius (at) lnk (dot) lt
Created 04/21/2007 (6624 days ago)
Due
Updated 04/25/2007 (6620 days ago)
Assigned 04/22/2007 (6623 days ago)
Resolved 04/25/2007 (6620 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/25/2007 02:07:49 PM Jan Schneider Comment #8
State ⇒ Resolved
Reply to this comment
I dropped the primary key altogether and added a key for the alarm_id 
field. We can take care of alarm_id/alarm_uid combination being unique 
in the PHP code, and two separate keys are still good enough.
04/25/2007 01:55:04 PM Jan Schneider Comment #7 Reply to this comment
Why don't we make the alarm_id be globally unique?
Because they are provided by the individual applications. They *can*
be guids but they don't have to.
This is of course crap, alarm_id *is* globally unique but still can 
appear in the table several times, once for each user of that alarm.
04/23/2007 07:46:42 AM Jan Schneider Comment #6 Reply to this comment
Why don't we make the alarm_id be globally unique?
Because they are provided by the individual applications. They *can* 
be guids but they don't have to.
04/23/2007 06:52:54 AM vilius (at) lnk (dot) lt Comment #5 Reply to this comment
Actually they shortens the key itself not the column. However this can 
lead MySQL to not use indexes if column value is bigger than the key.
04/23/2007 02:14:42 AM Matt Selsky Comment #4 Reply to this comment
Wikipedia shortens the length of the column used to make the key 
(until MySQL fixes this):



http://bugzilla.wikipedia.org/attachment.cgi?id=2478



Why don't we make the alarm_id be globally unique?
04/22/2007 05:17:01 PM Jan Schneider Comment #3 Reply to this comment
What's the "correct" way to handle such cases from a database 
perspective? Don't use a primary key? Create a pseudo column with a 
hash of both columns?
04/22/2007 12:17:44 AM Chuck Hagenbuch Assigned to Jan Schneider
State ⇒ Assigned
 
04/21/2007 07:32:26 PM vilius (at) lnk (dot) lt Comment #2 Reply to this comment
I ment *first part of the alarm_id is always fixed*
04/21/2007 07:31:01 PM vilius (at) lnk (dot) lt Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: alarm.patch Download
Queue ⇒ Horde Base
Summary ⇒ a fix for alarm sql scripts under MySQL
Type ⇒ Bug
Reply to this comment
Under MySQL installations where default charset is UTF-8 VARCHAR(250) 
+ VARCHAR(250) is 1500 bytes long. However even newest MySQL doesn't 
support more than 1000 bytes for primary keys (see 
http://bugs.mysql.com/bug.php?id=4541). I made a little bit smaller 
alarm_uid field and a lot smaller alarm_id because it is not so 
important as alarm_uid and in most extreme cases will be shorter as 
first part of the uid is always fixed.

Saved Queries