Bug #6540 error on delete of ARCHIVE engine type table
Submitted: 10 Nov 2004 8:15 Modified: 11 Nov 2004 23:19
Reporter: Alexey Zilber Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Administrator Severity:S1 (Critical)
Version:4.1.7 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[10 Nov 2004 8:15] Alexey Zilber
Description:
Using:
CREATE TABLE viewers (
  ref_id BIGINT UNSIGNED NOT NULL,
  type VARCHAR(20) NOT NULL,
  username VARCHAR(25) NOT NULL,
  ip VARCHAR(15) NOT NULL,
  timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  views BIGINT UNSIGNED NOT NULL DEFAULT 1
)ENGINE=ARCHIVE DEFAULT CHARSET=utf8;

[root@air508 schema]# /opt/mysql/bin/mysqladmin create crap
[root@air508 schema]# /opt/mysql/bin/mysql crap <viewers.sql
[root@air508 schema]# /opt/mysql/bin/mysqladmin drop crap
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.

Do you really want to drop the 'crap' database [y/N] y
/opt/mysql/bin/mysqladmin: DROP DATABASE crap failed;
error: 'Error on delete of './crap/viewers.ARN' (Errcode: 2)'

doing the drop 2x seems to work.

How to repeat:
easy.  create a table using the above sql, in a new db, then drop the db.
[11 Nov 2004 4:15] MySQL Verification Team
I wasn't able to repeat:

miguel@hegel:~/dbs/4.1$ bin/mysqladmin create crap -uroot
miguel@hegel:~/dbs/4.1$ bin/mysql crap < viewers.sql -uroot
miguel@hegel:~/dbs/4.1$ bin/mysqladmin drop crap -uroot
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.

Do you really want to drop the 'crap' database [y/N] y
Database "crap" dropped
[11 Nov 2004 17:53] MySQL Verification Team
Sorry I will test it again enabling ARCHIVE table.
[11 Nov 2004 23:19] MySQL Verification Team
miguel@hegel:~/dbs/4.1$ bin/mysql -e "show variables like '%have_archive%'" -uroot
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_archive  | YES   |
+---------------+-------+
miguel@hegel:~/dbs/4.1$ bin/mysqladmin create crap -uroot
miguel@hegel:~/dbs/4.1$ bin/mysql crap < viewers.sql -uroot
miguel@hegel:~/dbs/4.1$ bin/mysqladmin drop crap -uroot
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.

Do you really want to drop the 'crap' database [y/N] y
Database "crap" dropped
miguel@hegel:~/dbs/4.1$