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. ;-)
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. ;-)