Matthias, what have you done? Below you create table 'foo' but mysql answers that it cannot create 'stundenliste.frm'.
" mysql> create table foo (id int auto_increment,unique key (id)) type=innodb; ERROR 1005: Can't create table './test_smurf/stundenliste.frm' (errno: 121) mysql> create table stundenliste (id int auto_increment) type=innodb; ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key mysql> create table stundenliste (id int auto_increment) type=myisam; *SUCCESS* " I guess you have the table stundenliste in the internal data dictionary of InnoDB, but have somehow managed to delete the .frm file. Look to the file yourhostname.err in the datadir of MySQL. You should find there: " heikki@hundin:~/mysql-standard-4.0.6-gamma-pc-linux-i686/bin> mysqld 030130 14:15:17 InnoDB: Started mysqld: ready for connections 030130 14:15:48 InnoDB: Error: table test/stundenliste already exists in InnoDB internal InnoDB: data dictionary. Have you deleted the .frm file InnoDB: and not used DROP TABLE? Have you used DROP DATABASE InnoDB: for InnoDB tables in MySQL version <= 3.23.43? InnoDB: See the Restrictions section of the InnoDB manual. InnoDB: You can drop the orphaned table inside InnoDB by InnoDB: creating an InnoDB table with the same name in another InnoDB: database and moving the .frm file to the current database. InnoDB: Then MySQL thinks the table exists, and DROP TABLE will InnoDB: succeed. InnoDB: You can look further help from section 15.1 of InnoDB: http://www.innodb.com/ibman.html " I tested deleting the .frm file manually and indeed I got: " heikki@hundin:~/mysql-standard-4.0.6-gamma-pc-linux-i686/bin> mysql test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.6-gamma-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create table stundenliste (id int auto_increment,unique key (id)) type=in nodb; ERROR 1005: Can't create table './test/stundenliste.frm' (errno: 121) mysql> " Regards, Heikki Innobase Oy sql query ................ Subject: Innodb table with auto-increment column doesn't create (err 1005) From: Smurf Date: Thu, 30 Jan 2003 11:04:18 +0100 ---------------------------------------------------------------------------- ---- >Description: Table not creatable >How-To-Repeat: mysql> create table foo (id int auto_increment,unique key (id)) type=innodb; ERROR 1005: Can't create table './test_smurf/stundenliste.frm' (errno: 121) mysql> create table stundenliste (id int auto_increment) type=innodb; ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key mysql> create table stundenliste (id int auto_increment) type=myisam; *SUCCESS* >Fix: Unknown. >Submitter-Id: [EMAIL PROTECTED] >Originator: Matthias Urlichs >Organization: noris network AG >MySQL support: licence >Synopsis: auto_increment innodb tables don't >Severity: serious >Priority: high >Category: mysql >Class: sw-bug >Release: mysql-4.0.6-gamma (Bitkeeper source) >Environment: System: Linux play.smurf.noris.de 2.4.19-586tsc #1 Sun Oct 6 18:00:21 EST 2002 i686 unknown unknown GNU/Linux Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-i nclude-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext - -enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20030124 (Debian prerelease) Compilation info: CC='gcc' CFLAGS='-O2 -fomit-frame-pointer -g ' CXX='g++' CXXFLAGS='-O2 -fomit-frame-pointer -g -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 2003-01-30 01:26 /lib/libc.so.6 -> libc-2.3.1.so -rwxr-xr-x 1 root root 1102984 2003-01-21 23:15 /lib/libc-2.3.1.so -rw-r--r-- 1 root root 2337952 2003-01-21 23:15 /usr/lib/libc.a -rw-r--r-- 1 root root 178 2003-01-21 23:15 /usr/lib/libc.so Configure command: ./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--sysconfdir=/etc/mysql' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-shared' '--with-libwrap' '--enable-assembler' '--with-innodb' '--enable-static' '--enable-shared' '--enable-local-infile' '--with-raid' '--enable-thread-safe-client' '--without-readline' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--without-bench' '--with-client-ldflags=-lstdc++' '--with-extra-charsets=all' 'CC=gcc' 'CFLAGS=-O2 -fomit-frame-pointer -g ' 'CXXFLAGS=-O2 -fomit-frame-pointer -g -felide-constructors -fno-exceptions -fno-rtti' 'CXX=g++' --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php