Thanks,
but I think the lik you provided won't help. I know how to create pk/fk
contraints, and do in our schema, when the foreign key is completely
specified. for example, if my original table was instead:
create table Example (
id int not null auto_increment primary key,
fk_id int
Jeff,
We faced a similar challenge in an application: Each child record must have
a parent in one of two tables, TabA or TabB, but not both. We solved it
by adding a foreign-key field for each possible parent in the child
table. Each column can have the FK constraint. We were using Sybase,
thanks for the advice Stephen. I'll admit though I am somewhat loathe to
adding an artifical row in the other tables, but it may not be a bad way
to go. In the past, I've written triggers to do this kind of check, but
mysql doesn't yet support triggers.
what I ended up doing is carefully
Jeff,
I'm wondering if its somehow possible to create a pk/fk constraint for
the table below
create table Example (
id int not null auto_increment primary key,
table_name enum('TabA','TabB') not null,
table_id int not null
) type = InnoDB;
if table_name is
]
#
===
# Incorrect handling of foreign key constraints in InnoDB tables in
MySQL 3.23.55-max
# run on Windows ME
#
===
# EXAMPLE
#
# Table: zbozi_skupina
://www.mysql.com
sql query
- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, March 13, 2003 11:13 AM
Subject: Incorrect handling of foreign key constraints in InnoDB tables in
MySQL 3.23.55-max run on Windows ME
Hi,
If a parent table has
Hi ! :D
I would like you help me to solve the following problem:
Suppose the tables below:
create table book
(
Bk_Id integer(4) unsigned not null auto_increment primary key,
Bk_Name varchar(20)
) type = innoDb;
create table page
(
Pg_Id integer(4) unsigned not
Is there a way to create constraints that implements the rules I
need?
Not really. You would have to use deferrable constraints (checked at commit,
not after statement) like in Oracle. For now Innodb doesn't support it.
P.S. query,sql
--
_/_/ _/_/_/ - Rafa Jank
Dyego,
- Original Message -
From: Dyego Souza do Carmo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Mysql maillist [EMAIL PROTECTED]
Sent: Wednesday, November 27, 2002 2:44 PM
Subject: constraints and InnoDB
Hi ! :D
I would like you help me to solve the following problem
Chuck,
- Original Message -
From: Chuck Simmons [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, July 09, 2002 4:29 AM
Subject: possible bug: alter table trashed foreign key constraints in innodb
sql query
In version 3.23.49a when using an innodb table, alter
Chuck,
Tuesday, July 09, 2002, 4:26:31 AM, you wrote:
CS In version 3.23.49a when using an innodb table, alter table appears to
CS corrupt foreign key constraints. Try the following test case:
It's described in the MySQL manual:
http://www.mysql.com/doc/S/E/SEC446.html
and fixed since
for the online manual and latest news on InnoDB
-Original Message-
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Thursday, March 14, 2002 8:57 AM
Subject: Re: constraints in InnoDB, or is 3.23.43b _really_ 4.0.1?
Tomasz,
are you sure you are running 4.0.1
At 01:57 2002-03-14, Heikki Tuuri wrote:
Tomasz,
are you sure you are running 4.0.1? In the rpm of 4.0.0 there were no
foreign keys.
I tested this on mysql-max-4.0.1, and it worked.
Well...
[root@flow11 httpd]# mysqladmin -p version
Enter password:
mysqladmin Ver 8.23 Distrib 4.0.1-alpha, for
At 07:22 2002-03-14, Heikki Tuuri wrote:
Tomasz,
are you using a non-latin1 character set?
No, didn't change the charset. As You can see from my reply to Victoria
yesterday, will need to, eventually (for different reasons, though, not
books), but right now I am in a proof-of-concept stage:
Subject: Re: constraints in InnoDB, or is 3.23.43b _really_ 4.0.1?
At 01:57 2002-03-14, Heikki Tuuri wrote:
Tomasz,
are you sure you are running 4.0.1? In the rpm of 4.0.0 there were no
foreign keys.
I tested this on mysql-max-4.0.1, and it worked.
Well...
[root@flow11 httpd]# mysqladmin -p
in InnoDB, or is 3.23.43b _really_ 4.0.1?
Here is an excerpt from http://www.innodb.com/ibman.html#InnoDB_distros,
section 4.2:
Starting from version 3.23.43b InnoDB features foreign key constraints.
InnoDB is the first MySQL table type which allows you to define foreign key
constraints
to MySQL/InnoDB through support contracts
See http://www.innodb.com for the online manual and latest news on InnoDB
-Original Message-
From: Tomasz Korycki [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Date: Wednesday, March 13, 2002 1:05 AM
Subject: constraints in InnoDB
Tomasz writes:
From section 16 of http://www.innodb.com/ibman.html you find detailed
information about every InnoDB version. For example, 4.0.1 == 3.23.47.
Foreign keys should work in 4.0.1.
Hmmm... That's what I read, too. And after several unsuccesful
attempts
to create my own tables,
At 16:57 2002-03-13, Rick Flower wrote:
Tomasz writes:
From section 16 of http://www.innodb.com/ibman.html you find detailed
information about every InnoDB version. For example, 4.0.1 == 3.23.47.
Foreign keys should work in 4.0.1.
Hmmm... That's what I read, too. And after several
|
++++--++-+--
---+--+---++-+--
---+
++--
-+
2 rows in set (0.03 sec)
mysql
-Original Message-
From: Tomasz Korycki [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Date: Thursday, March 14, 2002 6:53 AM
Subject: Re: constraints in InnoDB, or is 3.23.43b _really_ 4.0.1?
At 16:57 2002
Here is an excerpt from http://www.innodb.com/ibman.html#InnoDB_distros,
section 4.2:
Starting from version 3.23.43b InnoDB features foreign key constraints.
InnoDB is the first MySQL table type which allows you to define foreign key
constraints...
Now, I assumed the version number
21 matches
Mail list logo