Bug #10607 mysqladmin prints wrong error

Submitted: 12 May 2005 19:12 Modified: 23 Jun 2005 14:28
Reporter: Martin Mokrejs Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.11 OS:Linux (linux-2.6.11.9)
Assigned to: CPU Architecture:Any

[12 May 2005 19:12] Martin Mokrejs
Description:
I use your binary gcc distribution for linux and use InnoDB tables. I was in the process of testing some bug (reported soon) and have filled the test table called sequence. I truncated it and and wanted to restore my database from .sql dump file. It contains DROP statements and suddenly, I couldn't re-create some other table.

$ python bug.py
Traceback (most recent call last):
  File "bug.py", line 9, in ?
    _cursor.execute("INSERT into sequence (sequence_string) values ('" + _str + "')")
  File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 137, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1114, "The table 'sequence' is full")
mokrejs@aquarius$ mysql ires
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 26 to server version: 4.1.11-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> truncate table sequence;
Query OK, 6672 rows affected (3.93 sec)

mysql> Bye
$ mysql ires < ../sql/ires_data.sql 
ERROR 1005 (HY000) at line 12: Can't create table './ires/buffer_composition.frm' (errno: 135)
$ perror 135
MySQL error code 135: No more room in record file
mokrejs@aquarius$

I shut down the safe_mysqld and saw:

# ls -al /var/lib/mysql/
total 147484
drwxr-x---   5 mysql mysql       131 May 12 17:50 .
drwxr-xr-x  28 root  root        352 Apr  8 02:25 ..
-rw-rw----   1 mysql mysql     25088 May  9 14:50 ib_arch_log_0000000000
-rw-rw----   1 mysql mysql   8388608 May 12 20:53 ib_logfile0
-rw-rw----   1 mysql mysql   8388608 May 12 20:49 ib_logfile1
-rw-rw----   1 mysql mysql 134217728 May 12 20:53 ibdata1
drwx------   2 mysql mysql       518 May 12 20:50 ires
drwx------   2 mysql root       1023 May 10 19:21 mysql

/etc/my.cnf contains
innodb_data_file_path = ibdata1:10M:autoextend:max:128M
set-variable = innodb_log_file_size=8M
set-variable = innodb_log_buffer_size=1M
set-variable = innodb_log_files_in_group=2
innodb_flush_log_at_trx_commit=1

# rm /var/lib/mysql/ib*

I started safe_mysqld again and did:

# ls -al /var/lib/mysql/
total 26624
drwxr-x---   5 mysql mysql      102 May 12 20:54 .
drwxr-xr-x  28 root  root       352 Apr  8 02:25 ..
-rw-rw----   1 mysql mysql  8388608 May 12 20:54 ib_logfile0
-rw-rw----   1 mysql mysql  8388608 May 12 20:54 ib_logfile1
-rw-rw----   1 mysql mysql 10485760 May 12 20:54 ibdata1
drwx------   2 mysql mysql      518 May 12 20:50 ires
drwx------   2 mysql root      1023 May 10 19:21 mysql

# mysqladmin drop ires -u root -p
Enter password: 
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 'ires' database [y/N] y
mysqladmin: DROP DATABASE ires failed;
error: 'Unknown table '%s''
#

I think the above error message should be fixed.

I aggree what I've done is probably bad. Reading mysql.err file I see entries like the one below ... so it seems those '%s' should be replaced by all the table names.

050512 20:54:38  InnoDB: Error: table `ires/cistron` does not exist in the InnoDB internal
InnoDB: data dictionary though MySQL is trying to drop it.
InnoDB: Have you copied the .frm file of the table to the
InnoDB: MySQL database directory from another database?
InnoDB: You can look for further help from
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html
050512 20:55:21  InnoDB: Error: table `ires/cistron` does not exist in the InnoDB internal
InnoDB: data dictionary though MySQL is trying to drop it.
InnoDB: Have you copied the .frm file of the table to the
InnoDB: MySQL database directory from another database?
InnoDB: You can look for further help from
InnoDB: http://dev.mysql.com/doc/mysql/en/InnoDB_troubleshooting_datadict.html

I fixed the situation by removing also the database directory with .frm files + again the /var/lib/ib* files when mysqld was down. Just would like to pint you to that incomplete error message.

How to repeat:
See above. ;-)
[13 May 2005 16:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24871
[13 May 2005 16:30] Heikki Tuuri
Hi!

I have now fixed the InnoDB error print to 4.1.13. The mysqladmin wrong print remains. That is why I am changing this to a mysqladmin bug report.

Regards,

Heikki

http://lists.mysql.com/internals/24871
[23 Jun 2005 14:28] Aleksey Kishkin
tested mysqladmin from  4.1.12 and got appropriate table name (not %s)

 /usr/local/mysql/bin/mysqladmin drop bugtest -u root
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 'bugtest' database [y/N] y
/usr/local/mysql/bin/mysqladmin: DROP DATABASE bugtest failed;
error: 'Unknown table 'bug''

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.