Bug #27429 Falcon: inconsistent errors for optimize
Submitted: 25 Mar 2007 20:16 Modified: 4 Feb 2008 10:13
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.2.4-falcon-alpha-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Assigned Account CPU Architecture:Any

[25 Mar 2007 20:16] Peter Gulutzan
Description:
For unsupported operations OPTIMIZE/CHECK/REPAIR/ANALYZE
TABLE, Falcon reports -- as a note, not an error --
"The storage engine for the table doesn't support [statement]".

But if the table is partitioned, and the operation
is OPTIMIZE PARTITION, Falcon reports an error:
ERROR 1296 (HY000): Got error -1 'can't open file ...

How to repeat:
mysql> create table t (s1 int) engine=falcon
    -> partition by range (s1) (partition p1 values less than (33));
Query OK, 0 rows affected (0.40 sec)

mysql> optimize table t;
+-------+----------+----------+-----------------------------------------------------------+
| Table | Op       | Msg_type | Msg_text                                                  |
+-------+----------+----------+-----------------------------------------------------------+
| d.t   | optimize | note     | The storage engine for the table doesn't support optimize |
+-------+----------+----------+-----------------------------------------------------------+
1 row in set (0.01 sec)

mysql> alter table t optimize partition p1;
ERROR 1296 (HY000): Got error -1 'can't open file "/usr/local/mysql/var/d.fts": No such file or directory (2)' from Falcon
[26 Mar 2007 11:30] MySQL Verification Team
Thank you for the bug report. Verified as described on FC 6 32-bit.
[27 May 2007 20:09] Hakan Küçükyılmaz
Peter,

this seems to work now:

[22:05] root@test>create table t (s1 int) engine=falcon partition by range (s1) (partition p1 values less than (33));
Query OK, 0 rows affected (0.35 sec)

[22:06] root@test>optimize table t;
+--------+----------+----------+----------+
| Table  | Op       | Msg_type | Msg_text |
+--------+----------+----------+----------+
| test.t | optimize | status   | OK       |
+--------+----------+----------+----------+
1 row in set (0.00 sec)

[22:06] root@test>alter table t optimize partition p1;
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0
[28 May 2007 15:39] Peter Gulutzan
Although I described the error as
"For unsupported operations OPTIMIZE/CHECK/REPAIR/ANALYZE
TABLE", I only used OPTIMIZE for an example.
Here is an example with REPAIR:

mysql> repair table t;
+--------+--------+----------+---------------------------------------------------------+
| Table  | Op     | Msg_type | Msg_text                                                |
+--------+--------+----------+---------------------------------------------------------+
| test.t | repair | note     | The storage engine for the table doesn't support repair |
+--------+--------+----------+---------------------------------------------------------+
1 row in set (0.01 sec)

mysql> alter table t repair partition p1;
ERROR 1030 (HY000): Got error -1 from storage engine
[19 Oct 2007 20:22] Ann Harrison
Calvin,

   On requests to analyze/check/repair a table, Falcon returns a
note, saying (quite correctly) that the operation is not supported.
When the operation is done on a partition, an error of -1 is 
returned.

mysql> create table t (s1 int) engine=falcon
    -> partition by range (s1) (partition p1 values less than (33));
Query OK, 0 rows affected (0.42 sec)

mysql> repair table t;
+-------+--------+----------+---------------------------------------------------
------+
| Table | Op     | Msg_type | Msg_text
      |
+-------+--------+----------+---------------------------------------------------
------+
| awh.t | repair | note     | The storage engine for the table doesn't support r
epair |
+-------+--------+----------+---------------------------------------------------
------+
1 row in set (0.00 sec)

mysql> alter table t repair partition p1;
ERROR 1030 (HY000): Got error -1 from storage engine
[6 Dec 2007 10:07] Mattias Jonsson
Mattias/Mikael: This bug is the mother of a number of duplicate bugs (at least Bug#32932, Bug#32812), raising priority to P2
[11 Dec 2007 15:00] Sergey Vojtovich
This bug is subject of WL#4176 - Implement REPAIR PARTITION for corrupt partitions. Reassigning to the WL implementor.
[4 Feb 2008 10:13] Mattias Jonsson
Since it is dependent of WL#4176 and the proposed patch for Bug#20129 will fix this (by disable these commands for partitioned tables as well), I see this bug as a duplicate of Bug#20129.