dbTalk Databases Forums  

Getting and incorrect key file error

comp.databases.mysql comp.databases.mysql


Discuss Getting and incorrect key file error in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 02:53 AM






Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> wrote:
Quote:
And you never did answer my previous question. Your query is returning
a Cartesian result - which can quite possibly fill up your temp space.
No need to discuss. "incorrect key file" for a temporary table
file is definitely a problem with tmpdir. Most probably (99%)
it is just full, but can also be some form of corruption.


XL

Reply With Quote
  #12  
Old   
EastSideDev
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 05:21 AM






On Jun 22, 5:40*pm, spamb... (AT) milmac (DOT) com (Doug Miller) wrote:
Quote:
In article <63e2577c-4045-4fe7-a989-1cf86fa34... (AT) y4g2000yqy (DOT) googlegroups.com>, EastSideDev <eastside... (AT) gmail (DOT) com> wrote:





On Jun 22, 7:37=A0am, spamb... (AT) milmac (DOT) com (Doug Miller) wrote:
In article <56bb2d96-4e05-4722-80e2-35083c44f... (AT) j4g2000yqh (DOT) googlegroups.=
com>, EastSideDev <eastside... (AT) gmail (DOT) com> wrote:

I am trying to join 4 different tables. Here's the statement:

SELECT profile_image_url, screen_name, url, description, first, last,
coName FROM twitterProfiles, names, companies, events WHERE
twitterProfiles.coID=names.coID AND names.coID=companies.coID AND
events.RSVP='Y' AND events.eventOptOut != 'Y' AND
events.eventID='JulyEvent' ORDER BY followers_count DESC

I am getting the following error message: #126 - Incorrect key file
for table '/tmp/#sql_7ad0_0.MYI'; try to repair it

The error message and its cause are irrelevant. Your query is fundamentally
broken: nothing in the WHERE clause establishes any connection betweenthe
events table and the other three.

The tables are joined at the coID level in the WHERE clause (see my
query).

No, they are not (see your query).

Your WHERE clause joins:
- twitterProfiles to names, via coID
- names to companies, via coID
- and _absolutely nothing_ to events, whether via coID or any other column.

This used to work, until recently.

No, it did not. Not as posted, anyway. If some other, earlier version of it
used to work, and it stopped working recently, then the reason it doesn'twork
now is whatever change you made recently.- Hide quoted text -

- Show quoted text -
Yes, you're right. It looks like when I copied it, I accidentally
deleted one of the lines. My PHP query is:

$qry = "SELECT "
."profile_image_url, "
."screen_name, url, "
."description, "
."first, "
."last, "
."coName "
."FROM "
."twitterProfiles, "
."names, "
."companies, "
."events "
."WHERE "
."twitterProfiles.coID=names.coID AND "
."names.coID=companies.coID AND "
."companies.coID=events.coID AND "
."events.RSVP='Y' AND "
."events.eventOptOut != 'Y' AND "
."events.eventID='JulyEvent' "
."ORDER BY followers_count DESC";

I was trying to make the question "shorter", before posting it to this
group.

Reply With Quote
  #13  
Old   
EastSideDev
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 05:31 AM



On Jun 23, 12:53*am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Quote:
Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:

And you never did answer my previous question. *Your query is returning
a Cartesian result - which can quite possibly fill up your temp space.

No need to discuss. "incorrect key file" for a temporary table
file is definitely a problem with tmpdir. Most probably (99%)
it is just full, but can also be some form of corruption.

XL
Prior to posting here, I tried increasing the tmp file size, but that
caused the server to crash. I did the following:

stopped the mysqld_safe process (typically, this would have been /etc/
init.d/mysqld stop, but on my system there is no mysqld in that
directory, but there is a mysqld_safe in /usr/bin)

I then did a pstree -p | grep tailwatchd to get the process ID and
killed it
I then made a copy of my tmp directory: cp -prf /tmp /tmp.bak
I then tried to increase the tmp size to 4GB: dd if=/dev/zero of=/usr/
tmpDSK bs=1024k count=4096

and that's when the system crashed. I will find the proper group for
questions about this, because if I do ask the question here, someone
will tell me that this is not mysql related. Given how tightly these
issues are related, I think that some system related issues, are
directly related to mysql, and are legitimate questions, but I don't
want to upset those who get territorial about their "groups".

Reply With Quote
  #14  
Old   
EastSideDev
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 05:33 AM



On Jun 23, 3:21*am, EastSideDev <eastside... (AT) gmail (DOT) com> wrote:
Quote:
On Jun 22, 5:40*pm, spamb... (AT) milmac (DOT) com (Doug Miller) wrote:





In article <63e2577c-4045-4fe7-a989-1cf86fa34... (AT) y4g2000yqy (DOT) googlegroups.com>, EastSideDev <eastside... (AT) gmail (DOT) com> wrote:

On Jun 22, 7:37=A0am, spamb... (AT) milmac (DOT) com (Doug Miller) wrote:
In article <56bb2d96-4e05-4722-80e2-35083c44f... (AT) j4g2000yqh (DOT) googlegroups.=
com>, EastSideDev <eastside... (AT) gmail (DOT) com> wrote:

I am trying to join 4 different tables. Here's the statement:

SELECT profile_image_url, screen_name, url, description, first, last,
coName FROM twitterProfiles, names, companies, events WHERE
twitterProfiles.coID=names.coID AND names.coID=companies.coID AND
events.RSVP='Y' AND events.eventOptOut != 'Y' AND
events.eventID='JulyEvent' ORDER BY followers_count DESC

I am getting the following error message: #126 - Incorrect key file
for table '/tmp/#sql_7ad0_0.MYI'; try to repair it

The error message and its cause are irrelevant. Your query is fundamentally
broken: nothing in the WHERE clause establishes any connection between the
events table and the other three.

The tables are joined at the coID level in the WHERE clause (see my
query).

No, they are not (see your query).

Your WHERE clause joins:
- twitterProfiles to names, via coID
- names to companies, via coID
- and _absolutely nothing_ to events, whether via coID or any other column.

This used to work, until recently.

No, it did not. Not as posted, anyway. If some other, earlier version of it
used to work, and it stopped working recently, then the reason it doesn't work
now is whatever change you made recently.- Hide quoted text -

- Show quoted text -

Yes, you're right. It looks like when I copied it, I accidentally
deleted one of the lines. My PHP query is:

$qry = "SELECT "
* * * * ."profile_image_url, "
* * * * ."screen_name, url, "
* * * * ."description, "
* * * * ."first, "
* * * * ."last, "
* * * * ."coName "
* * * * ."FROM "
* * * * ."twitterProfiles, "
* * * * ."names, "
* * * * ."companies, "
* * * * ."events "
* * * * ."WHERE "
* * * * ."twitterProfiles.coID=names.coID AND "
* * * * ."names.coID=companies.coID AND "
* * * * ."companies.coID=events.coID AND "
* * * * ."events.RSVP='Y' AND "
* * * * ."events.eventOptOut != 'Y' AND "
* * * * ."events.eventID='JulyEvent' "
* * * * ."ORDER BY followers_count DESC";

I was trying to make the question "shorter", before posting it to this
group.- Hide quoted text -

- Show quoted text -
and of course I deleted one other line: followers_count

Reply With Quote
  #15  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 05:57 AM



EastSideDev <eastsidedev (AT) gmail (DOT) com> wrote:
Quote:
On Jun 23, 12:53=A0am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:

No need to discuss. "incorrect key file" for a temporary table
file is definitely a problem with tmpdir. Most probably (99%)
it is just full, but can also be some form of corruption.

Prior to posting here, I tried increasing the tmp file size, but that
caused the server to crash. I did the following:
<cut>

Quote:
and that's when the system crashed.
I have no idea what you have actually done, but "tmp file" sounds
just wrong. MySQL puts temporary files (sort files, tmp tables etc)
below tmpdir. That's a MySQL server variable that can be set in
my.cnf and defaults to system tmpdir (= /tmp on UNIX). See:

http://dev.mysql.com/doc/refman/5.1/...variables.html

It it preferrable to use a real disk for the MySQL tmpdir. However
some UNICES (incl. Linux) now use tmpfs for /tmp which is RAM based.
In such cases it is preferrable to create a MySQL tmpdir somewhere
on a real disk (i.e. somewhere below /var) and point tmpdir there.


XL

Reply With Quote
  #16  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 07:52 AM



EastSideDev wrote:
Quote:
On Jun 23, 12:53 am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:

And you never did answer my previous question. Your query is returning
a Cartesian result - which can quite possibly fill up your temp space.
No need to discuss. "incorrect key file" for a temporary table
file is definitely a problem with tmpdir. Most probably (99%)
it is just full, but can also be some form of corruption.

XL

Prior to posting here, I tried increasing the tmp file size, but that
caused the server to crash. I did the following:

stopped the mysqld_safe process (typically, this would have been /etc/
init.d/mysqld stop, but on my system there is no mysqld in that
directory, but there is a mysqld_safe in /usr/bin)

I then did a pstree -p | grep tailwatchd to get the process ID and
killed it
I then made a copy of my tmp directory: cp -prf /tmp /tmp.bak
I then tried to increase the tmp size to 4GB: dd if=/dev/zero of=/usr/
tmpDSK bs=1024k count=4096

and that's when the system crashed. I will find the proper group for
questions about this, because if I do ask the question here, someone
will tell me that this is not mysql related. Given how tightly these
issues are related, I think that some system related issues, are
directly related to mysql, and are legitimate questions, but I don't
want to upset those who get territorial about their "groups".
Questions about mysql are on topic here. Questions about how to change
the tmp directory size are OS-related, and belong in an OS newsgroup.
It's not a territory issue - it's where you will get the best help.

So what crashed - the OS or MySQL? If it was MySQL, what did you get
for an error?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #17  
Old   
EastSideDev
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 10:53 AM



On Jun 23, 5:52*am, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
EastSideDev wrote:
On Jun 23, 12:53 am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:

And you never did answer my previous question. *Your query is returning
a Cartesian result - which can quite possibly fill up your temp space..
No need to discuss. "incorrect key file" for a temporary table
file is definitely a problem with tmpdir. Most probably (99%)
it is just full, but can also be some form of corruption.

XL

Prior to posting here, I tried increasing the tmp file size, but that
caused the server to crash. I did the following:

stopped the mysqld_safe process (typically, this would have been /etc/
init.d/mysqld stop, but on my system there is no mysqld in that
directory, but there is a mysqld_safe in /usr/bin)

I then did a pstree -p | grep tailwatchd to get the process ID and
killed it
I then made a copy of my tmp directory: cp -prf /tmp /tmp.bak
I then tried to increase the tmp size to 4GB: dd if=/dev/zero of=/usr/
tmpDSK bs=1024k count=4096

and that's when the system crashed. I will find the proper group for
questions about this, because if I do ask the question here, someone
will tell me that this is not mysql related. Given how tightly these
issues are related, I think that some system related issues, are
directly related to mysql, and are legitimate questions, but I don't
want to upset those who get territorial about their "groups".

Questions about mysql are on topic here. *Questions about how to change
the tmp directory size are OS-related, and belong in an OS newsgroup.
It's not a territory issue - it's where you will get the best help.

So what crashed - the OS or MySQL? *If it was MySQL, what did you get
for an error?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================- Hide quoted text -

- Show quoted text -
The OS crashed

Reply With Quote
  #18  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Getting and incorrect key file error - 06-23-2010 , 11:21 AM



EastSideDev wrote:
Quote:
On Jun 23, 5:52 am, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
EastSideDev wrote:
On Jun 23, 12:53 am, Axel Schwenke <axel.schwe... (AT) gmx (DOT) de> wrote:
Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
And you never did answer my previous question. Your query is returning
a Cartesian result - which can quite possibly fill up your temp space.
No need to discuss. "incorrect key file" for a temporary table
file is definitely a problem with tmpdir. Most probably (99%)
it is just full, but can also be some form of corruption.
XL
Prior to posting here, I tried increasing the tmp file size, but that
caused the server to crash. I did the following:
stopped the mysqld_safe process (typically, this would have been /etc/
init.d/mysqld stop, but on my system there is no mysqld in that
directory, but there is a mysqld_safe in /usr/bin)
I then did a pstree -p | grep tailwatchd to get the process ID and
killed it
I then made a copy of my tmp directory: cp -prf /tmp /tmp.bak
I then tried to increase the tmp size to 4GB: dd if=/dev/zero of=/usr/
tmpDSK bs=1024k count=4096
and that's when the system crashed. I will find the proper group for
questions about this, because if I do ask the question here, someone
will tell me that this is not mysql related. Given how tightly these
issues are related, I think that some system related issues, are
directly related to mysql, and are legitimate questions, but I don't
want to upset those who get territorial about their "groups".
Questions about mysql are on topic here. Questions about how to change
the tmp directory size are OS-related, and belong in an OS newsgroup.
It's not a territory issue - it's where you will get the best help.

So what crashed - the OS or MySQL? If it was MySQL, what did you get
for an error?

- Show quoted text -

The OS crashed
Then you should find out why the OS crashed. That would be an
OS-related newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.