Sequence ID generation transaction-safe?

2006-12-16 Thread Frederic Wenzel
Hi, I am using a sequence table as suggested in http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#id2887015 in order to generate new, unique IDs for a table where I have a primary key spanning multiple columns and still need a unique numeric part without being able to use an

database design help

2006-12-16 Thread ppywriw
Hiya, Real easy quick question. I need to design a database which holds users with email, name and some other details. I also want each user to be able to create one or more groups of users, owned by themselves. What would be the best design approach? So far i have a table for the users which

Re: phpmysql don't answer

2006-12-16 Thread Thibaud Hulin
Curiously, now, I can access to phpmysql, but I don't know why... So, I have an error 1064 when I try install a base with a python script. This is the error message : ERROR 1064 (42000) at line 772: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

Re: Innodb log sequence error - urgent

2006-12-16 Thread Heikki Tuuri
Ratheesh, if the database otherwise looks ok (no crashes, no corrupt tables), then the easiest way to fix the wrong log sequence number (lsn) is to artificially inflate the log sequence number. If your log sequence number is 4 GB too small, then inserting and deleting 4 GB worth of rows will

Re: Sequence ID generation transaction-safe?

2006-12-16 Thread Eric Bergen
Hi Frederic, Update then select on a single row table is transaction safe. If two users start a transaction and issue update queries the first query to execute will set a lock on that row. The second query will then block on the update waiting to obtain the same lock. In innodb row locks are not

Re: database design help

2006-12-16 Thread Miles Thompson
At 12:54 PM 12/16/2006, you wrote: Hiya, Real easy quick question. I need to design a database which holds users with email, name and some other details. I also want each user to be able to create one or more groups of users, owned by themselves. What would be the best design approach? So

Sort Select by List

2006-12-16 Thread Keith Spiller
Hello, RE: Sort Select by List I'm wondering how I would turn three different queries: SELECT * FROM team WHERE office = 'Exec' SELECT * FROM team WHERE office = 'VP' SELECT * FROM team WHERE office = 'Dir' Into one query with the sort order of office = 'Exec', 'VP', 'Dir'...

Re: Sort Select by List

2006-12-16 Thread Keith Spiller
Hi Hal, I appreciate your help, but the order can not be alphabetical. It must be explicitly Exec, VP, Dir... Keith - Original Message - From: Hal Wigoda [EMAIL PROTECTED] To: Keith Spiller [EMAIL PROTECTED] Sent: Saturday, December 16, 2006 2:28 PM Subject: Re: Sort Select by List

Re: Sort Select by List

2006-12-16 Thread Pintér Tibor
Keith Spiller írta: Hello, RE: Sort Select by List I'm wondering how I would turn three different queries: SELECT * FROM team WHERE office = 'Exec' SELECT * FROM team WHERE office = 'VP' SELECT * FROM team WHERE office = 'Dir' Into one query with the sort order of office =

Re: Sort Select by List

2006-12-16 Thread Mark Leith
Pintér Tibor wrote: Keith Spiller írta: I'm wondering how I would turn three different queries: SELECT * FROM team WHERE office = 'Exec' SELECT * FROM team WHERE office = 'VP' SELECT * FROM team WHERE office = 'Dir' Into one query with the sort order of office = 'Exec', 'VP',

Re: Why innodb can give the same X gap lock to two transactions?

2006-12-16 Thread Eric Bergen
Which version of mysql is this? In 5.1.12 when I run your test the section transaction blocks waiting for the lock (as it should). My show innodb status output is: TRANSACTIONS Trx id counter 0 1300 Purge done for trx's n:o 0 1288 undo n:o 0 0 History list length 1

Re: Sort Select by List

2006-12-16 Thread Dan Nelson
In the last episode (Dec 16), Mark Leith said: Pintér Tibor wrote: Keith Spiller írta: I'm wondering how I would turn three different queries: SELECT * FROM team WHERE office = 'Exec' SELECT * FROM team WHERE office = 'VP' SELECT * FROM team WHERE office = 'Dir' Into one

Re: Sort Select by List

2006-12-16 Thread Dan Nelson
In the last episode (Dec 16), Dan Nelson said: In the last episode (Dec 16), Mark Leith said: Pintér Tibor wrote: Keith Spiller írta: I'm wondering how I would turn three different queries: SELECT * FROM team WHERE office = 'Exec' SELECT * FROM team WHERE office = 'VP'