Bug #15561 Partitions: no warning if no support
Submitted: 7 Dec 2005 21:17 Modified: 12 Apr 2006 0:42
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.4-alpha-debug OS:Linux (linux)
Assigned to: Mikael Ronström CPU Architecture:Any

[7 Dec 2005 21:17] Peter Gulutzan
Description:
I  built from source, using only "BUILD/compile-pentium-debug".
Partitions are a "max" feature, so there's no partition support.
But I can create a partition table, and there's no warning.
Then I can do things that are impossible with partitions,
and there's no warning.
I can even drop a nonexistent partition, and there's no warning.

How to repeat:
mysql> select version();
+-------------------+
| version()         |
+-------------------+
| 5.1.4-alpha-debug |
+-------------------+
1 row in set (0.00 sec)

mysql> show engines;
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
| Engine     | Support | Comment                                                   | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables | NO           | NO | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance    | NO           | NO | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                     | NO           | NO | NO         |
+------------+---------+-----------------------------------------------------------+--------------+----+------------+
3 rows in set (0.00 sec)

mysql> create table t3 (s1 int) partition by list (s1) (partition p1 values in (1), partition p2 values in (2));
Query OK, 0 rows affected (0.06 sec)

mysql> insert into t3 values (1),(2),(3);
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> alter table t3 drop partition p1;
Query OK, 0 rows affected (0.06 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table t3 drop partition p2;
Query OK, 0 rows affected (0.68 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table t3 drop partition p3;
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0
[10 Apr 2006 8:15] Mikael Ronström
Someone had removed an #ifdef from lex.h to ensure no statement involving
PARTITION* is allowed when partitioning support isn't compiled in.
Added it back
[12 Apr 2006 0:42] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix, assuming 5.1.10. Closed.