Temp file issues on Ubuntu 9.10

2009-11-08 Thread Sebastiaan van Erk
Hi all, I just recently upgraded to Ubuntu 9.10, but now I'm having all sorts of temp file problems. For example, when I try to delete a row and violate a contraint I get: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (temp file operation failed)

Find neighboring rows

2009-11-08 Thread Andrew Tran
Let's say I have a single column table like this: Name -- Sam Daniel Artur Andrew Mark Thomas Ross Andrew Michelle Adrian Diane I want to find the first occurrence of Andrew, but also the neighboring rows (like the two rows above the first Andrew and the two rows below the first Andrew).

Re: Find neighboring rows

2009-11-08 Thread Jaime Crespo Rincón
2009/11/8 Andrew Tran aochi...@gmail.com: I want to find the first occurrence of Andrew, but also the neighboring rows (like the two rows above the first Andrew and the There is a conceptual issue with what you are trying to accomplish. What are the rows above and below? According to relational

Finding users who haven't posted in a week

2009-11-08 Thread John Meyer
I want to get a list of all users who haven't posted in a week. But when I use the following function. select user_id, max(tweet_createdat) from tweets where datediff(now(),max(tweet_createdat)) 7; Is producing the error: Invalid use of group function

Re: Temp file issues on Ubuntu 9.10

2009-11-08 Thread John List
Sebastiaan van Erk wrote: Hi all, I just recently upgraded to Ubuntu 9.10, but now I'm having all sorts of temp file problems. For example, when I try to delete a row and violate a contraint I get: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails

Re: Finding users who haven't posted in a week

2009-11-08 Thread Michael Dykman
the function max(), among others, makes no sense in the absence of a GROUP BY clause. try adding GROUP BY user_id - michael dykman On Sun, Nov 8, 2009 at 9:40 AM, John Meyer johnme...@pueblocomputing.com wrote: I want to get a list of all users who haven't posted in a week. But when I use

RE: Finding users who haven't posted in a week

2009-11-08 Thread John Meyer
Thanks, morning coffee hasn't kicked in. This worked out well. select user_id, max(tweet_createdat) from tweets group by user_id having datediff(now(),max(tweet_createdat)) 7; I forgot when to use the where and when to use the having clause. -Original Message- From: Michael Dykman

Re: Temp file issues on Ubuntu 9.10

2009-11-08 Thread Sebastiaan van Erk
Hi, $ ls -ld /tmp/mysql drwxr-xr-x 2 mysql mysql 4096 2009-11-08 10:14 /tmp/mysql $ ls -ld /tmpfs/mysql drwxr-xr-x 2 mysql mysql 40 2009-11-08 10:12 /tmpfs/mysql So I don't see the difference Has anyone encountered similar problems, or know what's going on here? Best regards, Sebastiaan

RE: Finding users who haven't posted in a week

2009-11-08 Thread John Meyer
Now I'm wondering if I can use this query in an update to set a variable in a second table Users -- User_id VARCHAR(50) . . . User_active BITINT(1) I want to set user_active to 0 where the user_id is in the query below. select user_id, max(tweet_createdat) from tweets group by user_id

How to enable partition in MySQL version 5.0.81-community

2009-11-08 Thread Jeetendra Ranjan
Hi, We are using MySQL version 5.0.81-community.We need to partition few tables but the have_partition option is not available that means this version doesn't support partition feature. Does MySQL provide any patch to enable the feature of partition in the same version of MySQL or how to

DROP TABLE TOOK 39MIN

2009-11-08 Thread Krishna Chandra Prajapati
Hi Experts, I have a crm(customer resource management) table which contains 654 million records. Dropping table took 39min. In addition to this other queries become very slow and they are not associated with bkp_mtlog any way. why? mysql show table status like 'bkp_mtlog';