List:General Discussion« Previous MessageNext Message »
From:Shawn Green (MySQL) Date:January 15 2011 8:32pm
Subject:Re: Incorrect key file for table
View as plain text  
On 1/15/2011 02:07, Jørn Dahl-Stamnes wrote:
> On Saturday 15 January 2011 00:28, Johnny Withers wrote:
>> The result of your query without the join
>> probably exceeded your tmp_table_size variable. When this
>> occurs, MySQL quit writing the temp table to disk thus producing an
>> incorrect table file. (I think).
>
> Yes, part of this was my fault (the missing join) but I still wonder why the
> server processed the query. Would it not be more appropriate with an error
> message saying that this query contain an error?
>

The error was only logical. The SQL syntax was fine. The MySQL server 
has no other way to gauge the accuracy of what you intended the query to 
be.

for example, this is perfectly legal SQL:

SELECT * FROM table1, table2;

Even if you had used explicit JOIN operators, the use of an ON clause is 
still optional. Here is my same example rewritten to use the JOIN operator.

SELECT * FROM table1 INNER JOIN table2;

Again, this is a perfectly legal statement, even if it may not make 
logical sense in the context of your application or data to leave out 
the joining criteria.

-- 
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc.
Office: Blountville, TN
Thread
Incorrect key file for tableJørn Dahl-Stamnes14 Jan
  • Re: Incorrect key file for tableJohan De Meersman14 Jan
    • Re: Incorrect key file for tableJørn Dahl-Stamnes14 Jan
      • Re: Incorrect key file for tableJohnny Withers15 Jan
        • Re: Incorrect key file for tableJørn Dahl-Stamnes15 Jan
          • Re: Incorrect key file for tableJohan De Meersman15 Jan
          • Re: Incorrect key file for tableMySQL)15 Jan
  • RE: Incorrect key file for tableJerry Schwartz14 Jan