ERROR 1005

ERROR 1005

am 27.04.2005 04:45:27 von Jason Lim

--Boundary_(ID_b4mr06y3PTNPr+jwN3NH+A)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Greetings,

'----------------------------------------------------------- ------------------------------------------------------------ ----------------------------------------
mysql> CREATE DATABASE demo40;
mysql> USE demo40
mysql> CREATE TABLE employee (pkey INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(pkey));

ERROR 1005: Can't create table '.\demo40\employee.frm' (errno: 150)
'----------------------------------------------------------- ------------------------------------------------------------ --------

I get the above error message when I tried to create the 'employee' table. I understand this error is due to bad constraints and foreign key references, but this is the first table I'm creating and there's no constraint field involved.

However. when I create a database and name it other than 'demo40', the table creation works perfectly.

Please advise. Thank you.



Jason

--Boundary_(ID_b4mr06y3PTNPr+jwN3NH+A)--

RE: ERROR 1005

am 29.04.2005 01:08:52 von jbonnett

You probably need a ";" after USE demo40 but that may not be the
problem.

I can't see this problem being related to bad constraints and foreign
key references since you have only just created the database. I assume
you do not get any errors on the CREATE DATABASE statement?

Your sequence of commands (even without the semi-colon) works fine on my
test database server.

John Bonnett

-----Original Message-----
From: Jason Lim [mailto:jasonlsm@tm.net.my]=20
Sent: Wednesday, 27 April 2005 12:15 PM
To: WinMySQL Lists
Subject: ERROR 1005

Greetings,

'----------------------------------------------------------- ------------
------------------------------------------------------------ ------------
----------------
mysql> CREATE DATABASE demo40;
mysql> USE demo40
mysql> CREATE TABLE employee (pkey INT NOT NULL AUTO_INCREMENT, PRIMARY
KEY(pkey));

ERROR 1005: Can't create table '.\demo40\employee.frm' (errno: 150)
'----------------------------------------------------------- ------------
--------------------------------------------------------

I get the above error message when I tried to create the 'employee'
table. I understand this error is due to bad constraints and foreign key
references, but this is the first table I'm creating and there's no
constraint field involved.

However. when I create a database and name it other than 'demo40', the
table creation works perfectly.

Please advise. Thank you.



Jason

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: ERROR 1005

am 29.04.2005 04:16:31 von Jason Lim

--Boundary_(ID_aM+ku3EW6m7WZCee0TB3GA)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Hi John,

Thanks for your views.

I tried USE; but to no avail.

That's what I meant - by just creating a primary key field doesn't involve any constraints.at all and yet I can't create the 'employee' table. It seems there's some indexing files I failed to remove during my last DROP DATABASE demo40. What do you think?

Like I said, there's no problem at all creating a database with names other than 'demo40'.

I did not get any errors using the CREATE DATABASE statement.



Jason





----- Original Message -----
From: jbonnett@sola.com.au
To: jasonlsm@tm.net.my ; win32@lists.mysql.com
Sent: Friday, April 29, 2005 07:08
Subject: RE: ERROR 1005


You probably need a ";" after USE demo40 but that may not be the
problem.

I can't see this problem being related to bad constraints and foreign
key references since you have only just created the database. I assume
you do not get any errors on the CREATE DATABASE statement?

Your sequence of commands (even without the semi-colon) works fine on my
test database server.

John Bonnett

--Boundary_(ID_aM+ku3EW6m7WZCee0TB3GA)--