CIMEN [EMAIL PROTECTED] ha scritto:
There are no other way
you have to create the index first
- Original Message -
From: Natale Babbo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 5:41 PM
Subject: innofb foreign keys problem
# - 3rd post
HI all,
I've read the following text in a book:
ANSI SQL supports a special kind of key called a foreign key. Foreign keys
help protect database integrity by enabling the database to manage things
such as the deletion of rows with dependent relationships in other tables.
Though MySQL supports
On Tue, Jan 14, 2003 at 12:20:06PM +0200, Octavian Rasnita wrote:
I've read the following text in a book:
ANSI SQL supports a special kind of key called a foreign key. Foreign keys
help protect database integrity by enabling the database to manage things
such as the deletion of rows
Use table type =Innodb for foreing keys and transacionts...etc
and type =myisam for speed
Yes, but do the foreign keys in InnoDB honor the constraints? I
think that was the original question. What's the poing of using
foreign keys if it's not going to maintain the integrity of your data
Does MySQL allow using foreign keys or not?
It does. Try it by yourself with version 4.0.8 +.
Adolfo
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com
To: Okan CIMEN; [EMAIL PROTECTED]
Subject: Re: innofb foreign keys problem
many thanks for your reply.
then i ask me: why mysql needs explicit creation
instead of create itself what it needs?
manually creating the index seems to be a big
complication (for big databases) and a waste of time.
don't you
then i ask me: why mysql needs explicit creation
instead of create itself what it needs?
manually creating the index seems to be a big
complication (for big databases) and a waste of time.
don't you think so?
it's a bug or a wanted feature? why?
I agree with you 100%.
A foreign key,as its
yes -- you need to create indexes on foreign key colums.
it would be better if one of the following 2 things happened instead.
1. foreign key creation failed if no index existed.
2. indexes were created automatically
it's more dangerous than actually not having foreign keys as it stands since
# - PLEASE HELP -- #
hi to all,
is it still true that mysql/innodb needs explicit
index creation on foreign keys?
why can't i use a standard syntax for foreign keys
creations?
i have a database schema (ddl) with over 50 tables and
i was trying to create the database on mysql when
At 18:45 +1100 1/10/03, Ben Mooney wrote:
i have been using the following sql to try and get foreign keys
working, the table creation works fine but when i try and delete
data from the parent table it deletes as would normally happen in
mysql, also the desired results do not happen if i use
i have been using the following sql to try and get foreign keys
working, the table creation works fine but when i try and delete data
from the parent table it deletes as would normally happen in mysql,
also the desired results do not happen if i use RESTRICT.
is this a problem to do
MySQL = 4.0.1 but 4.0.5. I had these
kind of problems with ALTER TABLE with 4.0.1 and 4.0.4, but not with
4.0.7 anymore (hey, this rhymes :). I guess it has nothing to do with
the foreign keys, but with the temporary form table MySQL creates when
you do an ALTER TABLE. Anyway, the problem
- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 11:04 PM
Subject: Re: Bug in foreign keys
Rafal,
- Original Message -
From: Rafal Jank [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday
Dear Ben,
i have been using the following sql to try and get foreign keys
working, the table creation works fine but when i try and delete data
from the parent table it deletes as would normally happen in mysql,
also the desired results do not happen if i use RESTRICT.
is this a problem
MySQL-Max from http://www.mysql.com
sql query
.
Subject: Re: Bug in foreign keys
From: Rafal Jank
Date: Fri, 10 Jan 2003 11:10:35 +0100
On Thu, 09 Jan 2003 23:41:46 +0200
Heikki Tuuri
for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com
sql query
.
Subject: Re: Bug in foreign keys
From: Rafal Jank
Date: Fri, 10 Jan 2003 11:10:35 +0100
Hi!
I have two tables:
CREATE TABLE `pokoje` (
`nrpok_p` char(10) NOT NULL default '',
`nip_h` int(10) NOT NULL default '0',
`lozka_p` char(2) default NULL,
`tv_p` char(1) default NULL,
`lazienka_p` char(1) default NULL,
`cena_p` int(10) default NULL,
`zaliczka_p` int(10) default
At 16:11 +0100 1/9/03, Rafal Jank wrote:
Hi!
I have two tables:
CREATE TABLE `pokoje` (
`nrpok_p` char(10) NOT NULL default '',
`nip_h` int(10) NOT NULL default '0',
`lozka_p` char(2) default NULL,
`tv_p` char(1) default NULL,
`lazienka_p` char(1) default NULL,
`cena_p` int(10)
At 16:11 +0100 1/9/03, Rafal Jank wrote:
Hi!
I have two tables:
CREATE TABLE `pokoje` (
`nrpok_p` char(10) NOT NULL default '',
`nip_h` int(10) NOT NULL default '0',
`lozka_p` char(2) default NULL,
`tv_p` char(1) default NULL,
`lazienka_p` char(1) default NULL,
Rafal,
- Original Message -
From: Rafal Jank [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, January 09, 2003 6:18 PM
Subject: Bug in foreign keys
Hi!
I have two tables:
CREATE TABLE `pokoje` (
`nrpok_p` char(10) NOT NULL default '',
`nip_h` int(10
affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 11:04 PM
Subject: Re: Bug in foreign keys
Rafal,
- Original Message -
From: Rafal Jank [EMAIL PROTECTED
Paul,
- Original Message -
From: Paul Vincent Craven [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Saturday, November 30, 2002 6:32 AM
Subject: Enforcement of foreign keys
Shouldn't the following be illegal?
drop database registry;
create database registry;
use
Michael,
- Original Message -
From: Michael Imari [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Saturday, November 23, 2002 11:17 AM
Subject: Debugging foreign keys in InnoDB
Hallo,
is it possible to get some infos about what foreign key relation
failed when this error
) on delete
cascade.
José Ceferino Ortega
-Mensaje original-
De: Bruce Lee [mailto:itnobita;hotmail.com]
Enviado el: viernes, 15 de noviembre de 2002 4:35
Para: [EMAIL PROTECTED]
Asunto: Foreign Keys and InnoDb in MySQL
Hello,
I have a problem about foreign key in using MySQL.com manual
foreign keys, I have the following errors.
BL Case 1:
BL mysql create table customerTb (
BL customerId int not null,
BL primary key (customerId)
BL ) type = innodb;
BL mysql insert into customerTb values (1), (2), (3), (4), (5);
BL mysql create table carTb (
BL carId int not null,
BL primary key
Hello,
I have a problem about foreign key in using MySQL.com manual. According to
the example in MySQL.com manual, one foreign key is ok. However, I have 3
tables (ie. 2 for parent tables and 1 for child table). When I use 2 or more
foreign keys, I have the following errors.
Case 1:
mysql
Christos,
Monday, October 21, 2002, 5:46:07 AM, you wrote:
CS Hello I am a brand new user of MySql, and have some questions about
CS using InnoDB tables.
CS I noticed in the manual that you can only specify
CS - ON DELETE SET NULL
CS Or
CS - ON DELETE CASCADE
CS What is the default
Hello I am a brand new user of MySql, and have some questions about
using InnoDB tables.
I noticed in the manual that you can only specify
- ON DELETE SET NULL
Or
- ON DELETE CASCADE
What is the default behaviour if nothing is specified?
Also, does anyone know if there are any plans to
Hello I am a brand new user of MySql, and have some questions about
using InnoDB tables.
I noticed in the manual that you can only specify
- ON DELETE SET NULL
Or
- ON DELETE CASCADE
What is the default behaviour if nothing is specified?
Also, does anyone know if there are any plans to
Hi all:
I'm seeing a strange problem updating a field if
that field is referenced as a FK in another table.
Consider:
CREATE TABLE A (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR(20),
PRIMARY KEY (id)
);
CREATE TABLE B (
id INTEGER
At 12:10 -0700 9/23/02, j.random.programmer wrote:
Hi all:
I'm seeing a strange problem updating a field if
that field is referenced as a FK in another table.
Consider:
CREATE TABLE A (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR(20),
PRIMARY KEY
Hi all:
I'm seeing a strange problem updating a field if
that field is referenced as a FK in another table.
Consider:
CREATE TABLE A (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR(20),
PRIMARY KEY (id)
);
CREATE TABLE B (
id INTEGER
Is it in Mysql 4 possible to use foreign keys?
If yes, how can I create two tables with foreign keys and use them?
Thanks
ilyas
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
Ilyas,
Wednesday, September 04, 2002, 2:27:27 PM, you wrote:
IK Is it in Mysql 4 possible to use foreign keys?
Foreign key constarints are supported in InnoDB tables (3.23 and
4.0)
IK If yes, how can I create two tables with foreign keys and use them?
Take a look at:
http://www.mysql.com
-
De : Heikki Tuuri [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi, 8. août 2002 08:17
À : [EMAIL PROTECTED]
Objet : Re: Foreign keys vont delete on cascade
Alexandre,
ON DELETE CASCADE only works starting from 3.23.50 and 4.0.2. The version
numbers are misleading because for the InnoDB subsystem
. août 2002 19:53
À : Heikki Tuuri; [EMAIL PROTECTED]
Objet : RE: Foreign keys vont delete on cascade
OK thanks a lot for your help ! :)
I just downloaded the latest version ( 4.0.2) and installed it .
I hoped I could keep the settings of my ini file ( my.ini) but I got the
following error when
Hello,
I am working on MySQL database. I have come across a 'problem' but don't know
how to get around that. The problem is the following:
I have a table, say TABLE1, with primary key being called as table1_id.
Now there are other tables, like TABLE1A, TABLE1B, TABLE1C etc.. where I want to
-
From: Aamer Rauf [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 12:55 PM
To: [EMAIL PROTECTED]
Subject: Primary and Foreign Keys in MySQL
Hello,
I am working on MySQL database. I have come across a 'problem'
but don't know
how to get around that. The problem
Archbold,
Thursday, July 18, 2002, 12:18:09 AM, you wrote:
A I'm having a problem dropping a foreign key constraint from an Innodb table. I am
using MySQL 3.23.51 for Win32. Any help would be greatly appreciated
A I have a simple set up like the one below:
A CREATE TABLE mastertable
A (
On Thu, Jul 18, 2002 at 03:41:01PM +0300, Victoria Reznichenko wrote:
: Archbold,
: Thursday, July 18, 2002, 12:18:09 AM, you wrote:
:
: A I'm having a problem dropping a foreign key constraint from an Innodb table. I am
:using MySQL 3.23.51 for Win32. Any help would be greatly appreciated
Philip,
- Original Message -
From: Philip Molter [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, July 18, 2002 6:23 PM
Subject: Re: Deleting foreign keys with Innodb tables
On Thu, Jul 18, 2002 at 03:41:01PM +0300, Victoria Reznichenko wrote:
: Archbold
Hi,
I'm having a problem dropping a foreign key constraint from an Innodb table. I am
using MySQL 3.23.51 for Win32. Any help would be greatly appreciated
I have a simple set up like the one below:
CREATE TABLE mastertable
(
masterkey INT NOT NULL PRIMARY KEY AUTO_INCREMENT
)
Hi,
In the MySQL documentation, it is stated that
foreign keys in SQL are not used to join tables, but are used mostly for
checking referential integrity (foreign key constraints).
Does it mean that constraints are not supported? I need to have Update and
perhaps Delete Referential Integrity
* Hanxue Lee
In the MySQL documentation, it is stated that
foreign keys in SQL are not used to join tables, but are used mostly for
checking referential integrity (foreign key constraints).
This could have been formulated in a better way, IMHO. I would even say the
statement is wrong
Below is an example of a problem I'm having when issuing an alter table
command to create a foreign key in mysql version 3.23.51. I am running the
max version and the tables exist in the innodb table space.
Thoughts? Comments? Criticism?
Carl McNamee
Systems Administrator
Billing Concepts
Carl,
Tuesday, June 18, 2002, 5:30:31 PM, you wrote:
CM Below is an example of a problem I'm having when issuing an alter table
CM command to create a foreign key in mysql version 3.23.51. I am running the
CM max version and the tables exist in the innodb table space.
CM Thoughts? Comments?
I studied the MySQL and InnoDB manual, but I did not find anything about
the internal usage of foreign keys.
I mean that I would like to know if foreign keys are used for query
optimizations or functions like that.
Because I think foreign keys should be used not only for keeping the data
Kiss Dániel wrote:
I studied the MySQL and InnoDB manual, but I did not find anything
about the internal usage of foreign keys.
MySQL does not support foreign keys at the moment. This will be
implemented in version 4.1.
For more info see:
http://www.mysql.com/products/mysql-4.0
If you create in index on your FK then it will be used to optimize the
query.
=C=
*
* Cal Evans
* Techno-Mage
* http://www.calevans.com
*
- Original Message -
From: Kiss Dániel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 9:19 AM
Subject: Foreign keys in query
InnoDB supports foreign keys. And, an index must be created on the foreign
key; this would help from an optimization point of view.
--Walt Weaver
Bozeman, Montana
-Original Message-
From: harm de laat [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 8:43 AM
To: Kiss Dániel
Cc
Kiss,
Monday, June 10, 2002, 5:19:17 PM, you wrote:
KD I studied the MySQL and InnoDB manual, but I did not find anything about
KD the internal usage of foreign keys.
KD I mean that I would like to know if foreign keys are used for query
KD optimizations or functions like that.
KD Because I
Hi,
I use MySQL-Max-4.0.1 and i am wantering if
is true that the information about the foreign keys are stored at
comment properties of table with maximum length 60 characters?
I need to use innodb tables with many f.keys.What I have to do?
Thank you
Hi,
I use MySQL-Max-4.0.1 and i am wantering if
the information about the foreign keys are stored at
comment properties of table with maximum length 60 characters?
I need to use innodb tables with many f.keys.What I have to do?
Thank you
-Original Message-
From: victoria papazoi [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 11:58 AM
To: [EMAIL PROTECTED]
Subject: foreign keys in MySQL-Max-4.0.1
Hi,
I use MySQL-Max-4.0.1 and i am wantering if
the information about the foreign keys are stored at
comment
Hi,
I use MySQL-Max-4.0.1 and i am wantering if
the information about the foreign keys are stored at
comment properties of table with maximum length 60 characters?
I need to use innodb tables with many f.keys.What I have to do?
Thank you
I studied the MySQL and InnoDB manual, but I did not find anything about
the internal usage of foreign keys.
I mean if I define a foreign key it is good for me, because the InnoDB
engine does not let the database to get integrity errors. But I think the
foreign key definitions could be used
)
ON DELETE CASCADE) TYPE=INNODB;
CK OI!!! I'm going to sound like a complete ass now (I know) But since
CK when does MySQL support FOREIGN keys?? *gasp* MAN this is going to
CK make my life S much easier *curses at phpMyAdmin for not having the
CK option*
Yes, MySQL has
Hello all,
I am testing MySql Max 4.0.1 alpha. I have configured innodb tablespace and created
the two manual tables example.
But when I try to do a mysqldump to re-create the tables on another DB or 'SHOW CREATE
TABLE child', NO-FOREIGN key information is gathered on results.
However 'SHOW
Hi,
I am evaluating InnoDB's Foreign Keys and am stuck.
Using the sample tables I want to add records in the Child table with a NULL
parent_id (this being referenced to the Parent table) as follows:
CREATE TABLE parent(id INT NOT NULL,
PRIMARY KEY (id)) TYPE=INNODB;
CREATE
to sound like a complete ass now (I know) But since
when does MySQL support FOREIGN keys?? *gasp* MAN this is going to
make my life S much easier *curses at phpMyAdmin for not having the
option*
*lick* *bounce* *all happy now* *goes to redo all his DBs*
Now, I like MySQL 10 times
snip tables
OI!!! I'm going to sound like a complete ass now (I know) But since
when does MySQL support FOREIGN keys?? *gasp* MAN this is going to
make my life S much easier *curses at phpMyAdmin for not having the
option*
Do remember that this is only valid for mysql
sql,query
Hello,
i've tried the foreign key-example out of the documentation(3.5.6 Using
Foreign Keys) on W2K (3.23.49 + 3.23.50) and LINUX (3.23.49). The tables
persons and shirts are created as innodb-tables.
I could insert a shirt for a non-existing person. Also i could delete
Hi
Nothing is wrong! The behaviour of your example is correct, because
MySQL does not support the concept of foreign keys. See section 1.4.4.5
of the MySQL manual. In other words data integrity between two tables is
not ensured by MySQL. Your application code must solve this.
Regards
Rene
This example is in InnoDB though, which should support foreign key
constraints.
Chris Book
In other words data integrity between two tables is not ensured by MySQL.
Your application code must solve this.
-
Before posting,
]
Betreff: Re: Foreign Keys with MySQL 3.23.49 and 3.23.50
In article [EMAIL PROTECTED],
Jostkleigrewe, Heiner [EMAIL PROTECTED] writes:
sql,query
Hello,
i've tried the foreign key-example out of the documentation(3.5.6 Using
Foreign Keys) on W2K (3.23.49 + 3.23.50) and LINUX
Hello,
I'm trying to apply my limited SQL knowledge to my newly acquired MySql
database and am running into the following problem:
In the (very good) manual on the mysql website, this example is given
CREATE TABLE persons (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
name CHAR(60) NOT
At 18:22 +0200 4/20/02, Robert Douglass wrote:
Hello,
I'm trying to apply my limited SQL knowledge to my newly acquired MySql
database and am running into the following problem:
In the (very good) manual on the mysql website, this example is given
CREATE TABLE persons (
id SMALLINT UNSIGNED
Hello!
I have a problem: How can I find the FOREIGN KEY definitions for a table?
I'm using MySQL 4.0.1 MAX, and I define the table as a InnoDB-table.
Someone, pleace help me!
Marius
-
Before posting, please check:
-
From: Marius Røstad [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, April 18, 2002 11:44 AM
Subject: Foreign keys
Hello!
I have a problem: How can I find the FOREIGN KEY definitions for a table?
I'm using MySQL 4.0.1 MAX, and I define the table as a InnoDB-table
Marius,
Thursday, April 18, 2002, 11:43:38 AM, you wrote:
MR I have a problem: How can I find the FOREIGN KEY definitions for a table?
MR I'm using MySQL 4.0.1 MAX, and I define the table as a InnoDB-table.
SHOW TABLE STATUS statement shows you foreign key constraints
for a table, look at:
i tried to use the foreign key feature in mysql 4.0.1 using innodb tables .
then i have tried the delete cascade feature but it didn't work . I don't
know why ? have you any suggestions ? .
-
Before posting, please check:
root,
Monday, April 08, 2002, 12:24:42 PM, you wrote:
r i tried to use the foreign key feature in mysql 4.0.1 using innodb tables .
r then i have tried the delete cascade feature but it didn't work . I don't
r know why ? have you any suggestions ? .
InnoDB does not yet support ON DELETE
on InnoDB
-Original Message-
From: Rick Flower [EMAIL PROTECTED]
To: MySQL Mailing List [EMAIL PROTECTED]
Cc: Heikki Tuuri [EMAIL PROTECTED]
Date: Wednesday, March 20, 2002 10:56 PM
Subject: Inserting records with null foreign keys?
Hi all..
I noticed that the current version of InnoDB
Hi all..
I noticed that the current version of InnoDB that is part of MySQL 3.23.47
does not allow using null foreign keys when doing inserts.. Is this
intentional or a bug? This is allowed by SQL Server as a minimum (a test
is being done by a co-worker currently against Oracle 8i to see
PROTECTED]]
Sent: Wednesday, March 20, 2002 9:35 PM
To: Chetan Lavti
Subject: Re: mysqldump and foreign keys (possible Bug ??)
No, not working,
When I run the command
SHOW TABLE STATUS FROM yourdatabasename LIKE 'T';
shown in the manual (7.5.4.2 Foreign Key Constraints)
I will see the foreign key
Hi,
I just installed the MySQL max 4.0.1 and created a database with two
INNODB and FOREIGN KEY tables as described in the Docs.
When I run the mysqldump -a -B -c test I don't get the foreign key
information.
Any hint?
Adib.
the
mysqldesc tablename
(at mysql command prompt) it shows the foreign keys..
am i right..?? Actually, I also wanted to know !! I am telling u what i
have done and seen. Please, u also try for the same and see if it works
fine.
please, tell me also regarding this...
Thanks and regards,
Chetan Lavti
]
Newsgroups: mailing.database.mysql
Date: Tuesday, March 12, 2002 7:18 PM
Subject: Re: Foreign keys in mysqldump?
InnoDB Hot Backup-0.33 beta is now available for Windows NT/2000/XP and
Linux.
Any plans for Solaris by the May 2002 release date?
From: Heikki Tuuri [EMAIL PROTECTED]
The beta testing
://www.innodb.com for the online manual and latest news on InnoDB
-Original Message-
From: Bob McLaughlin [EMAIL PROTECTED]
To: MySQL Mailing List [EMAIL PROTECTED]
Cc: Heikki Tuuri [EMAIL PROTECTED]
Date: Monday, March 11, 2002 8:11 PM
Subject: Foreign keys in mysqldump?
When I do a mysqldump
to MySQL/InnoDB through support contracts
See http://www.innodb.com for the online manual and latest news on InnoDB
-Original Message-
From: van den Heuvel, Frank [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Date: Tuesday, March 12, 2002 10:16 AM
Subject: foreign keys for relation
in production work?
Thanks much,
-Bob
-Original Message-
From: Heikki Tuuri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 4:50 AM
To: Bob McLaughlin; MySQL Mailing List
Subject: Re: Foreign keys in mysqldump?
Bob,
I have now improved foreign key support so that version
Bob,
thank you!
I believe 3.23.50 will be out in two weeks. It is a stable version. The
changes in foreign keys were actually rather small. I hope they do not
degrade .50 to the beta category.
Best regards,
Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https
On Tue, Mar 12, 2002 at 11:50:12AM +0200, Heikki Tuuri wrote:
: Bob,
:
: I have now improved foreign key support so that version 3.23.50 does
:
: 1. show the FOREIGN KEY definitions when you call SHOW CREATE TABLE; this
: should also show them in mysqldumps;
: 2. preserve FOREIGN KEY
Philip,
-Original Message-
From: Philip Molter [EMAIL PROTECTED]
To: Heikki Tuuri [EMAIL PROTECTED]
Cc: Bob McLaughlin [EMAIL PROTECTED]; MySQL Mailing List
[EMAIL PROTECTED]
Date: Tuesday, March 12, 2002 4:21 PM
Subject: Re: Foreign keys in mysqldump?
On Tue, Mar 12, 2002 at 11:50
InnoDB Hot Backup-0.33 beta is now available for Windows NT/2000/XP and
Linux.
Any plans for Solaris by the May 2002 release date?
From: Heikki Tuuri [EMAIL PROTECTED]
The beta testing of InnoDB Hot Backup (a non-free add-on tool) started on
Monday. If you want to take part in the beta
When I do a mysqldump and include table creation, it does not seem to
include the foreign key constraints in the create table statements of the
InnoDB tables.
Is there a command line switch or other way to make this happen?
Thanks,
-Bob
Hello,
I am creating tables within MySql 3.23.49. I want to add relation ships
between different tables. I tried to do this with foreign key statements.
For example:
CREATE TABLE domains (
domain varchar(100) NOT NULL,
registrarid int(10) NOT NULL,
foreign key (registrarid) REFERENCES
Hi,
On Thu, 2002-03-07 at 08:20, bin cai wrote:
I am encountering one problem. I am using mysql as the
dabase for my application.
I create a table like takeexam as following:create
table takelabexam( sid varchar(10) not null,
cid varchar(20) not null,
Hi!
-Original Message-
From: j.random.programmer [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Date: Saturday, March 02, 2002 5:21 AM
Subject: Re: Innodb tables lose foreign keys after creating an index...
--- Heikki Tuuri [EMAIL PROTECTED] wrote:
Heikki:
Is there a fix
keys after creating an index...
Hi all..
Are any of you aware of a way to get indexes to work at all with Innodb
tables containing foreign keys? I'm finding that after doing a create
index on a table which *had* foreign keys, after the create, the foreign
keys are gone.. I've included a simple test
--- Heikki Tuuri [EMAIL PROTECTED] wrote:
Rick,
sorry, it is not mentioned in the manual that MySQL
performs a CREATE INDEX
by doing an ALTER TABLE. And ALTER TABLE has the
feature (= documented bug)
that it removes foreign key definitions.
Heikki:
Is there a fix planned for the alter
Well, honestly, by deleting the record in the parent, you're already
defeating the purpose of the foreign key by corrupting the referential
integrity of the parent to child relationship. The basic reasoning behind
foreign keys is to maintain this integrity and prevent this type of
corruption. So
Hi all..
Are any of you aware of a way to get indexes to work at all with Innodb
tables containing foreign keys? I'm finding that after doing a create
index on a table which *had* foreign keys, after the create, the foreign
keys are gone.. I've included a simple test below which shows off
InnoDB doesn't support the CASCADE functionality of foreign keys, so it's
possible deleting the key from the parent table won't have any effect on
existing transactions in the child. It may only prevent new records from
being inserted with that key -- which is essentially what you want. Most DBs
, Jeff Kilbride wrote:
InnoDB doesn't support the CASCADE functionality of foreign keys, so it's
possible deleting the key from the parent table won't have any effect on
existing transactions in the child. It may only prevent new records from
being inserted with that key -- which is essentially
: flexible foreign keys?
When I try to delete a row from the parent table and the key is in use in
the child table, I get:
ERROR 1217: Cannot delete a parent row: a foreign key constraint fails
So it doesn't cascade and delete rows in the child table (assuming I am
interpreting cascade
such as
innodb_fail_alter_table_with_fk that would warn or fail the alter table
statement if the table type was InnoDB and foreign keys were going to be
dropped. If this latter option was implemented, it would prevent RI from
being quietly lost.
Thanks much,
-Bob
that describe the customer type, transaction type, etc. or have
valid values for routing number, status, etc. Should all of these be set up
as foreign keys, or should some of referential integrity be done
programmatically? How do you draw the line between how many foreign keys
are too many
Using foreign keys is a really, really good idea. Programs can't be
trusted (and what about running sql queries ad hoc). Even with a really
big database I wouldn't get rid of the keys, just time to move to a
bigger better machine/configuration.
-Original Message-
From: David Felio
Martin,
-Original Message-
From: Martin Bratbo [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Date: Saturday, February 16, 2002 4:46 PM
Subject: Re: Re: Foreign keys in InnoDB tables
Heikki
here is the statements that i cant get to work:
first I create one innoDB table: fk1
301 - 400 of 445 matches
Mail list logo