Bug #35385 Mysql-5.1.23-rc-community MySQL Community Server,PARTITION
Submitted: 18 Mar 2008 9:35 Modified: 22 Mar 2008 9:10
Reporter: Satish Varma Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:Mysql-5.1.23 OS:Microsoft Windows (Xp,service Pack 2)
Assigned to: Assigned Account CPU Architecture:Any
Tags: Mysql-5.1.23-rc-community||PARTITION||Kills Mysqld
Triage: D3 (Medium)

[18 Mar 2008 9:35] Satish Varma
Description:
i am using Mysql-5.1.23-rc-community MySQL Community Server on windows xp service pack 2 and tried to

create a table with PARTITION using a List partition
and create table executed successfully and when i tried to drop the table 
there was a message saying mysqld has encountered a problem and need to close

How to repeat:
create a database with the below command :

create database db_test;

then create a table in the database with the below command :

CREATE TABLE `audit_log` (
  `LOG_KEY` int(10) NOT NULL auto_increment,
  `TFLR_ID` int(10) default '0',
  `TYPE` int(1) default '0',
  `DATETIME` datetime default NULL,
  `dr_id` varchar(15) default NULL,
  `TABLE_CHANGED` varchar(40) default '',
  `FIELD_CHANGED` varchar(40) default '',
  `VALUE_FROM` varchar(100) default '',
  `VALUE_TO` varchar(100) default '',
  `installation_id` varchar(60) default NULL,
  PRIMARY KEY  (`LOG_KEY`,`DATETIME`)
) ENGINE=MyISAM AUTO_INCREMENT=445143 DEFAULT CHARSET=utf8
PARTITION BY LIST (YEAR(`DATETIME`))
(
   PARTITION p1999_2003 VALUES IN (1999,2000,2001,2002,2003)
    DATA DIRECTORY = 'E:/Mysql_Data/DB_FILES'
    INDEX DIRECTORY = 'E:/Mysql_Data/INDEX_FILES',
  PARTITION p2004_2006 VALUES IN (2004,2005,2006)
    DATA DIRECTORY = 'E:/Mysql_Data/DB_FILES'
    INDEX DIRECTORY = 'E:/Mysql_Data/INDEX_FILES',
  PARTITION p2007_2009 VALUES IN (2007,2008,2009)
    DATA DIRECTORY = 'E:/Mysql_Data/DB_FILES'
    INDEX DIRECTORY = 'E:/Mysql_Data/INDEX_FILES',
  PARTITION p2010_2012 VALUES IN (2010,2011,2012)
    DATA DIRECTORY = 'E:/Mysql_Data/DB_FILES'
    INDEX DIRECTORY = 'E:/Mysql_Data/INDEX_FILES'
);

and then try to drop the table with :

drop table audit_log

Suggested fix:
Not Sure
[18 Mar 2008 10:10] Valeriy Kravchuk
Thank you for a problem report. Please, upload your entire error log (or last part of it that corresponds to this test).
[18 Mar 2008 10:17] Mattias Jonsson
This is probably a duplicate of Bug#30459, which is waiting on Bug#33687.
[18 Mar 2008 11:44] Satish Varma
Error Message

Attachment: Error.JPG (image/jpeg, text), 17.45 KiB.

[18 Mar 2008 11:46] Satish Varma
Valeriy Thank you for the reply

Strangely Nothing is getting logged in Error File
I tried by starting mysql in console mode but that too didn't show any thing

all i am getting is a message saying Mysqld has encountered a problem and need to close

i attached a screen shot of that

let me if i can provide any more info
[18 Mar 2008 12:06] Miguel Solorzano
Thank you for the feedback. Have you noticed that the server remains running
after the drop command?. On my side I got a server crash:

mysql> drop table audit_log;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

I will test with latest source.
[18 Mar 2008 12:28] Satish Varma
Hi Miguel,

Yes the Mysql command Line Client is loosing connection after the error.
Its getting strange here i started Mysql in debug mode and reproduced the error 
that too didn't write any error,its existing mysql

E:\Mysql_Data\Mysql Server 5.1.23\bin>mysqld-debug --console
080318 17:42:02  InnoDB: Started; log sequence number 0 2618767
080318 17:42:05 [Note] Event Scheduler: Loaded 0 events
080318 17:42:05 [Note] mysqld-debug: ready for connections.
Version: '5.1.23-rc-community-debug'  socket: ''  port: 3306  MySQL Community Se
rver - Debug (GPL)

E:\Mysql_Data\Mysql Server 5.1.23\bin>
[18 Mar 2008 12:32] Satish Varma
Miguel

can u find any thing written to Error Logs when you have this error?
[18 Mar 2008 14:27] Miguel Solorzano
Thank you for the feedback. With latest source I am not able to repeat the
crash but I got an error message, this behavior is only present on Windows
server:

    ->     DATA DIRECTORY = 'C:/Mysql_Data/DB_FILES'
    ->     INDEX DIRECTORY = 'C:/Mysql_Data/INDEX_FILES'
    -> );
Query OK, 0 rows affected (0.09 sec)

mysql> drop table audit_log;
ERROR 6 (HY000): Error on delete of '.\test\audit_log#P#p1999_2003.MYI' (Errcode: 2)
mysql>

Linux:

mysql> drop table audit_log;
Query OK, 0 rows affected (0.01 sec)

mysql> select version();
+-----------------+
| version()       |
+-----------------+
| 5.1.24-rc-debug | 
+-----------------+
1 row in set (0.00 sec)

mysql>
[20 Mar 2008 10:38] Mattias Jonsson
I will try this on the latest mysql-5.1-engines tree on 32-bit Vista. Since MySQL does not support DATA/INDEX DIR on windows, it should warn about that, and that warning was added in the patch for bug#30459. That patch will be pushed into the main tree soon.
[22 Mar 2008 9:10] Mattias Jonsson
I have verified that it crashed before the fix of Bug#30459 and after that patch (which is queued) it will issue warnings for every DATA/INDEX DIRECTORY clause ("DATA DIRECTORY option ignored" or "INDEX DIRECTORY option ignored").

That a patch is queued, means that it will soon be in the main tree and after it is in the main tree, it will be a part of the next release of that main tree.