List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 14 2002 2:45pm
Subject:Re: InnoDB Table creation error
View as plain text  
At 11:54 +0000 9/14/02, Rajesh Kanade wrote:
>Hi All
>
>I have created a batch file which can drop tables and recreate 
>tables for my project. I am planning on using InnoDB. The script 
>looks like this

What version of MySQL are you using.  DROP DATABASE has some InnoDB-related
problems prior to MySQL 3.23.44 that might explain what you're seeing.

Reference:
http://www.innodb.com/ibman.html#Table_and_index



>
>
># Drop database if exists and recreate
>DROP TABLE IF EXISTS ADDRESS;
>DROP TABLE IF EXISTS PRIVILEGE;
>
>
>DROP DATABASE IF EXISTS ERECRUITER;
>
>CREATE DATABASE ERECRUITER;
>
>#Start using eRecruiter database
>USE ERECRUITER;
>
>CREATE TABLE ADDRESS
>(
>ID INT PRIMARY KEY AUTO_INCREMENT ,
>ADDR1 VARCHAR( 255 ) NOT NULL,
>ADDR2 VARCHAR( 255 ) NULL,
>CITY VARCHAR( 100 ) NOT NULL,
>STATE VARCHAR ( 100 ) NOT NULL,
>POSTALCODE VARCHAR ( 100 ) NOT NULL,
>PHONE1 VARCHAR ( 30 ) NOT NULL,
>PHONE2 VARCHAR ( 30 ) NULL
>
>)
>TYPE=InnoDB ;
>
>
>
>CREATE TABLE PRIVILEGE
>(
>PRIV_CODE VARCHAR(3) PRIMARY KEY,
>PRIV_DESC VARCHAR( 100 ) NOT NULL
>)
>TYPE=InnoDB ;
>
>
>
>When I run the script first time it works fine.
>
>But second time onwards I get the following error
>
>ERROR 1005 at line 17: Can't create table '.\erecruiter\address.frm' 
>(errno: 2)
>
>
>If I change the table type to BDB I can run the scripts multiple 
>number of times with out any errors.
>
>I am new to MySQL so any help would be really useful.
>
>
>
>Rajesh Kanade
>http://www.geocities.com/rrkanade
>8 Janapriya
>34/1 Erandwane
>Pune -411004
>Maharasthra, India
>Home Number : (91)(20)5438840
>

Thread
InnoDB Table creation errorRajesh Kanade14 Sep
  • Re: InnoDB Table creation errorpeter.brawley14 Sep
  • Re: InnoDB Table creation errorPaul DuBois14 Sep
Re: InnoDB Table creation errorHeikki Tuuri14 Sep
Re: InnoDB Table creation errorRajesh Kanade16 Sep
Re: InnoDB Table creation errorRajesh Kanade16 Sep