Re: Can not add foreign key constraints

2017-04-24 Thread Peter Brawley
On 4/24/2017 9:18, David Mehler wrote: Hello, I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL

Re: Can not add foreign key constraints

2017-04-24 Thread Reindl Harald
Am 24.04.2017 um 16:18 schrieb David Mehler: I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL

Can not add foreign key constraints

2017-04-24 Thread David Mehler
Hello, I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL auto_increment, `domain_id` int(11) NOT NULL,

MySQL ignores foreign key constraints

2011-05-20 Thread Mimi Cafe
Hi An ideas why MySQL silently ignores any foreign key constraints I define for the following tables? mysql desc book; +--+---+--+-+-+- --+ | Field| Type | Null | Key | Default | Extra

Re: MySQL ignores foreign key constraints

2011-05-20 Thread Andrew Moore
Try show create table ... ; A On Fri, May 20, 2011 at 12:07 PM, Mimi Cafe mimic...@googlemail.com wrote: Hi An ideas why MySQL silently ignores any foreign key constraints I define for the following tables? mysql desc book

Re: MySQL ignores foreign key constraints

2011-05-20 Thread Suresh Kuna
WHat are the table engine types ? On Fri, May 20, 2011 at 4:37 PM, Mimi Cafe mimic...@googlemail.com wrote: Hi An ideas why MySQL silently ignores any foreign key constraints I define for the following tables? mysql desc book

RE: MySQL ignores foreign key constraints

2011-05-20 Thread Mimi Cafe
| +-+-- Thanks From: Suresh Kuna [mailto:sureshkumar...@gmail.com] Sent: 20 May 2011 12:15 To: Mimi Cafe Cc: mysql@lists.mysql.com Subject: Re: MySQL ignores foreign key constraints WHat are the table engine types ? On Fri, May 20, 2011 at 4

Falcon and Foreign Key Constraints

2007-09-20 Thread Martijn Tonies
Hi, I thought that Falcon supported FKs, but in my test, it doesn't? Can someone confirm this? Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/

Re: Falcon and Foreign Key Constraints

2007-09-20 Thread Jim Winstead
On Thu, Sep 20, 2007 at 11:20:19AM +0200, Martijn Tonies wrote: I thought that Falcon supported FKs, but in my test, it doesn't? Can someone confirm this? The Falcon storage engine does not currently support foreign keys. (The underlying engine does have support for them, but this

Re: Falcon and Foreign Key Constraints

2007-09-20 Thread Martijn Tonies
On Thu, Sep 20, 2007 at 11:20:19AM +0200, Martijn Tonies wrote: I thought that Falcon supported FKs, but in my test, it doesn't? Can someone confirm this? The Falcon storage engine does not currently support foreign keys. (The underlying engine does have support for them, but this

Foreign key constraints - Known issues ?

2007-07-19 Thread Ratheesh K J
Hello All, I just wanted to know whether there are any known issues in defining and using Foreign key constraints in MySQL 4 and MySQL 5. To be specific, are there any issues on using ON DELETE CASCADE and ON UPDATE CASCADE? Would there be any performance issues when we define Foreign key

Re: Foreign key constraints - Known issues ?

2007-07-19 Thread Martijn Tonies
I just wanted to know whether there are any known issues in defining and using Foreign key constraints in MySQL 4 and MySQL 5. To be specific, are there any issues on using ON DELETE CASCADE and ON UPDATE CASCADE? Would there be any performance issues when we define Foreign key constraints? We

RE: Copy some datasets including the foreign key constraints

2006-11-27 Thread Jerry Schwartz
I am not an expert in this, but it looks as though you are trying to define foreign keys on your parent table. I thought you had to define the parent table without foreign keys, and then define a child table with foreign key constraints. I'm also not sure if you are trying to redefine the key

AW: Copy some datasets including the foreign key constraints

2006-11-23 Thread Eidner, Fabian
@lists.mysql.com Betreff: RE: Copy some datasets including the foreign key constraints Do you know what your query looks like after variable substitution? That always helps me a lot. If you can't dump it to the screen because it breaks too much of your system, look into syslog(). That's what I use when

Copy some datasets including the foreign key constraints

2006-11-22 Thread Eidner, Fabian
Hello list, I'm pretty new here. But i already got an problem. I'm working a while with mysql currently i'm trying to duplicate some entries in my tables. The problem is, i'm using foreign key constraints between those tables and i also would like to duplicate the childs. So i got one big parent

RE: Copy some datasets including the foreign key constraints

2006-11-22 Thread Jerry Schwartz
@lists.mysql.com Subject: Copy some datasets including the foreign key constraints Hello list, I'm pretty new here. But i already got an problem. I'm working a while with mysql currently i'm trying to duplicate some entries in my tables. The problem is, i'm using foreign key constraints between those

Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
I'm trying to create foreign key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max. I used Mysql WorkBench to create the database schema and had it generate the sql

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Michael Stassen
Lola J. Lee Beno wrote: I'm trying to create foreign key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max. I used Mysql WorkBench to create the database schema

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Michael Stassen wrote: 1) I'm not sure what you are intending with (`(not null)`) in the middle of your foreign key definition, but that isn't valid mysql syntax. See the manual for the correct syntax http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html. This is from

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Peter Brawley
key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max.  I used Mysql WorkBench to create the database schema and had it generate the sql script. I created a table

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Peter Brawley wrote: Lola, /And got this following error message: ERROR 1072 (42000): Key column '(not null)' doesn't exist in table / Yes, it's telling you what;s wrong: to define a constraint on a key, the table def must first define the key. Looking over the script again, RatingID is

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Gleb Paharenko
Hello. The query which is works is: CREATE TABLE `Films` ( `FilmID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `MovieTitle` TEXT NULL ,`PitchText` TEXT NULL, `AmountBudgeted` DECIMAL(11, 0) NULL, `RatingID` INT(11) unsigned , `Summary`

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Gleb Paharenko wrote: Hello. The query which is works is: Thanks - just what I needed. Looks like I'll need to be extra careful with sql scripts generated from Mysql Workbench, which is still alpha right now. -- Lola - mailto:[EMAIL PROTECTED] http://www.lolajl.net | Blog at

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Gleb Paharenko
Hello. You can post a bug: http://dev.mysql.com/doc/refman/5.0/en/bug-reports.html Lola J. Lee Beno wrote: Gleb Paharenko wrote: Hello. The query which is works is: Thanks - just what I needed. Looks like I'll need to be extra careful with sql scripts generated from Mysql

MyISAM and foreign key constraints?

2005-04-29 Thread Jacek Becla
Hi, MySQL docs claim at: http://dev.mysql.com/doc/mysql/en/ansi-diff-foreign-keys.html that At a later stage, foreign key constraints will be implemented for MyISAM tables as well. Does anyone know what the timescale is? Thanks, Jacek -- MySQL General Mailing List For list archives: http

change a column type and innodb foreign key constraints

2005-03-16 Thread rich
default '', `pmid` int(15) default NULL, `project` varchar(35) default NULL, `abstract` text, `datasource` smallint(5) unsigned default NULL, PRIMARY KEY (`id`), KEY `id` (`id`) ) TYPE=InnoDB that i need to change from smallint to int There are a number of foreign key constraints from other

Re: change a column type and innodb foreign key constraints

2005-03-16 Thread Gabriel PREDA
It looks from googling as though I need to drop all foreign key constraints on this column, perform the change and then reestablish the foreign keys. Could anyone confirm or advise of a better solution? That is the way ! :) You need to drop the constrains... Alter `reference` and make `id` INT

Re: change a column type and innodb foreign key constraints

2005-03-16 Thread SGreen
Gabriel PREDA [EMAIL PROTECTED] wrote on 03/16/2005 06:12:14 AM: It looks from googling as though I need to drop all foreign key constraints on this column, perform the change and then reestablish the foreign keys. Could anyone confirm or advise of a better solution? That is the way

RE: INSERT IGNORE like feature for rows failing foreign key constraints?

2004-08-31 Thread John McCaskey
for rows failing foreign key constraints? I have a logging table where I insert a large number of rows every 5 minutes. For performance reasons this occurs in bulk inserts of about 5000 rows at a time. (ie. INSERT INTO table VALUES(...), (...), (...)) One of the fields in the table is an id

Re: Data loading and foreign key constraints - help please

2004-08-30 Thread Todd Cranston-Cuebas
, but was hoping someone could answer a question regarding adding a record into a database that has foreign key constraints. Remember, I'm a total newbie so I'm hoping I'm using the right words to express this. I'm taking a class that required us to use an ER diagramming tool. This tool generates SQL

Data loading and foreign key constraints - help please

2004-08-29 Thread Todd Cranston-Cuebas
I'm a total newbie to mySQL, but was hoping someone could answer a question regarding adding a record into a database that has foreign key constraints. Remember, I'm a total newbie so I'm hoping I'm using the right words to express this. I'm taking a class that required us to use an ER

INSERT IGNORE like feature for rows failing foreign key constraints?

2004-08-25 Thread John McCaskey
I have a logging table where I insert a large number of rows every 5 minutes. For performance reasons this occurs in bulk inserts of about 5000 rows at a time. (ie. INSERT INTO table VALUES(...), (...), (...)) One of the fields in the table is an id that connects it to another table. It is

foreign key constraints

2004-07-22 Thread Sergei Skarupo
Hi everyone, I'd like to learn more about foreign key constraints... I read this section of the manual... http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html Where can I find a more detailed description with some examples? Thanks, Sergei

Re: foreign key constraints

2004-07-22 Thread Brian Mansell
Sergei, Check out Paul DuBois' book MySQL - The Definitive Guide (2nd edition). It has a few good chapters that discuss foreign key constraints. --bmansell Brian E. Mansell MySQL Professional On Thu, 22 Jul 2004 13:06:07 -0700, Sergei Skarupo [EMAIL PROTECTED] wrote: Hi everyone, I'd

InnoDB foreign key constraints

2004-07-15 Thread Glenn Sequeira
Hello, Are there any plans to implement foreign keys with deferred integrity constraint checking in the InnoDB storage engine in a future release of the MySQL Server? Many thanks, - glenn -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Foreign Key Constraints

2004-05-28 Thread Martijn Tonies
Hi, ok - I've checked. Why not? What's wrong with this: BORROWER BorrowerID BOOKS BookID BorrowerID (nullable) FK from Books.BorrowerID to Borrower.BorrowerID I haven't checked, but this _should_ be possible. With regards, Its a foreign key, you can

Re: Foreign Key Constraints

2004-05-28 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 28 May 2004 02:57 am, Martijn Tonies wrote: Hi, ok - I've checked. Why not? What's wrong with this: BORROWER BorrowerID BOOKS BookID BorrowerID (nullable) FK from Books.BorrowerID to

Re: Foreign Key Constraints

2004-05-28 Thread Martijn Tonies
Hi Jeff, ok - I've checked. Why not? What's wrong with this: BORROWER BorrowerID BOOKS BookID BorrowerID (nullable) FK from Books.BorrowerID to Borrower.BorrowerID I haven't checked, but this _should_ be possible. With

Re: Foreign Key Constraints

2004-05-28 Thread Michael Stassen
Martijn Tonies wrote: Hi Jeff, snip CREATE TABLE inno2 ( PK_Col Integer NOT NULL DEFAULT 0, Child_Col Integer, PRIMARY KEY (PK_Col) ) TYPE=InnoDB ; CREATE INDEX I_Inno2_ChildCol ON inno2(Child_Col); CREATE TABLE inno3 ( PK_Col Integer NOT NULL DEFAULT 0, Child_Col Integer, PRIMARY KEY (PK_Col) )

Re: Foreign Key Constraints

2004-05-28 Thread Michael Stassen
Michael Stassen wrote: Martijn Tonies wrote: Hi Jeff, snip In this example, inno3.PK_Col references inno2.Child_Col, so the 2nd and 3rd statements are failing because they try to set inno3.PK_Col to values not present in inno2.Child_Col. The NULLs are irrelevant. Michael Perhaps this is

Re: Foreign Key Constraints

2004-05-28 Thread Martijn Tonies
Hi, Martijn Tonies wrote: Hi Jeff, snip In this example, inno3.PK_Col references inno2.Child_Col, so the 2nd and 3rd statements are failing because they try to set inno3.PK_Col to values not present in inno2.Child_Col. The NULLs are irrelevant. Woops, right Michael - got that

Re: Foreign Key Constraints

2004-05-28 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 28 May 2004 11:50 am, Martijn Tonies wrote: This makes perfectly sense. So, once again I dare to ask: what's the problem with NULLable Foreign Keys? It works fine :-) (now, who was it that said that FKs should be entered/exist

Re: Foreign Key Constraints

2004-05-28 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 28 May 2004 11:50 am, Martijn Tonies wrote: This makes perfectly sense. So, once again I dare to ask: what's the problem with NULLable Foreign Keys? It works fine :-) (now, who was it that said that FKs should be entered/exist

Re: Foreign Key Constraints

2004-05-28 Thread Martijn Tonies
This makes perfectly sense. So, once again I dare to ask: what's the problem with NULLable Foreign Keys? It works fine :-) (now, who was it that said that FKs should be entered/exist always?) With regards, Here is the issue... If you go back to what he was doing this insert

Re: Foreign Key Constraints

2004-05-27 Thread Robert J Taylor
[EMAIL PROTECTED] wrote: Hi, I am trying to use the foreign key constraints from InnoDB and creating indexes is a requirement for foreign key. The problem is that by creating index for my foreign key, it does not allow my foreign key to have null or blank values which my records will have. For eg

Re: Foreign Key Constraints

2004-05-27 Thread Colin Bull
[EMAIL PROTECTED] wrote: Hi, I am trying to use the foreign key constraints from InnoDB and creating indexes is a requirement for foreign key. The problem is that by creating index for my foreign key, it does not allow my foreign key to have null or blank values which my records will have. For eg

Re: Foreign Key Constraints

2004-05-27 Thread Martijn Tonies
Hi, On Wednesday 26 May 2004 11:22 pm, [EMAIL PROTECTED] wrote: Hi, I am trying to use the foreign key constraints from InnoDB and creating indexes is a requirement for foreign key. The problem is that by creating index for my foreign key, it does not allow my foreign key to have null

Re: Foreign Key Constraints

2004-05-27 Thread SGreen
: 05/27/2004 12:22 Fax to: AM Subject: Foreign Key Constraints Please respond

Re: Foreign Key Constraints

2004-05-27 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 27 May 2004 03:00 am, Martijn Tonies wrote: Why not? What's wrong with this: BORROWER BorrowerID BOOKS BookID BorrowerID (nullable) FK from Books.BorrowerID to Borrower.BorrowerID I haven't checked, but this _should_ be

Re: Foreign Key Constraints

2004-05-27 Thread Martijn Tonies
Hi, Why not? What's wrong with this: BORROWER BorrowerID BOOKS BookID BorrowerID (nullable) FK from Books.BorrowerID to Borrower.BorrowerID I haven't checked, but this _should_ be possible. With regards, Its a foreign key, you can not null foreign keys.. Thats the

Foreign Key Constraints

2004-05-26 Thread kyuubi
Hi, I am trying to use the foreign key constraints from InnoDB and creating indexes is a requirement for foreign key. The problem is that by creating index for my foreign key, it does not allow my foreign key to have null or blank values which my records will have. For eg. a BorrowerID

Re: Foreign Key Constraints

2004-05-26 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 26 May 2004 11:22 pm, [EMAIL PROTECTED] wrote: Hi, I am trying to use the foreign key constraints from InnoDB and creating indexes is a requirement for foreign key. The problem is that by creating index for my foreign key, it does

foreign key constraints are driving me crazy!

2004-03-04 Thread Cere Davis
So I have made a table called 'uid' where on uid is the only field in the table. Then I make another table called 'users' where there are two fields, 'uid1' and 'uid2' and both uid values have foreign key constraints referencing the 'uid' field in the uid table. No problem, tables are created

Re: foreign key constraints are driving me crazy!

2004-03-04 Thread daniel
called 'users' where there are two fields, 'uid1' and 'uid2' and both uid values have foreign key constraints referencing the 'uid' field in the uid table. No problem, tables are created and are all empty. Then I try inserting a uid varchar value of 'test' into the uid table... ok works

Re: foreign key constraints are driving me crazy!

2004-03-04 Thread Cere M. Davis
had issues when importing data from a dump so i've had to do a FORIEGN_KEY_CHECKS=0 So I have made a table called 'uid' where on uid is the only field in the table. Then I make another table called 'users' where there are two fields, 'uid1' and 'uid2' and both uid values have foreign key

foreign key constraints

2003-10-08 Thread Croniser Brian Contr AFRL/IFGB
Here is the script that creates the database. create table object_attrib (obj_record_id INTEGER(7) AUTO_INCREMENT NOT NULL, PRIMARY KEY (obj_record_id), INDEX (rel_obj_int_id), FOREIGN KEY (rel_obj_int_id) REFERENCES obj_id_internals (obj_int_id) ON DELETE RESTRICT ON

Re: foreign key constraints

2003-10-08 Thread Paul DuBois
At 18:22 + 10/8/03, Croniser Brian Contr AFRL/IFGB wrote: Here is the script that creates the database. create table object_attrib (obj_record_id INTEGER(7) AUTO_INCREMENT NOT NULL, PRIMARY KEY (obj_record_id), INDEX (rel_obj_int_id), FOREIGN KEY (rel_obj_int_id)

Re: key constraints

2003-09-05 Thread Victoria Reznichenko
Daniel Rossi [EMAIL PROTECTED] wrote: Hi there i am having another issue with key constraints now, i emptied the tables and made the foreign keys fine although now when i try and insert a row into the table i get this ERROR 1216: Cannot add or update a child row: a foreign key constraint

Re: key constraints

2003-09-05 Thread daniel
and is returning error unless i add it into the query, is there a way around this ? Hi there i am having another issue with key constraints now, i emptied the tables and made the foreign keys fine although now when i try and insert a row into the table i get this ERROR 1216: Cannot add or update a child

Re: key constraints

2003-09-05 Thread daniel
here is part of the create table CREATE TABLE `assets` ( `assetID` int(11) NOT NULL auto_increment, `barcode_number` varchar(20) NOT NULL default '', `asset_code` varchar(20) NOT NULL default '', `serial_number` varchar(100) NOT NULL default '', `asset_user` varchar(100) NOT NULL

key constraints

2003-09-04 Thread Daniel Rossi
Hi there i am having another issue with key constraints now, i emptied the tables and made the foreign keys fine although now when i try and insert a row into the table i get this ERROR 1216: Cannot add or update a child row: a foreign key constraint fails What could be the problem

Foreign Key Constraints

2003-08-14 Thread John Towell
We are trying to load a set of data using Hibernate (O/R mapping tool). Hibernate creates foreign key constraints when it is creating our DB (mysql 4.0.14). The process for loading data requires us to break these constraints at certain points, however they will all be satisfied at the end

Re: primary key/foreign key constraints with InnoDB

2003-04-02 Thread Jeff Mathis
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

Re: primary key/foreign key constraints with InnoDB

2003-04-02 Thread Stephen Giese
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,

Re: primary key/foreign key constraints with InnoDB

2003-04-02 Thread Jeff Mathis
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

Re: primary key/foreign key constraints with InnoDB

2003-04-01 Thread Stefan Hinz
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

2003-03-13 Thread mazanek
] # === # Incorrect handling of foreign key constraints in InnoDB tables in MySQL 3.23.55-max # run on Windows ME # === # EXAMPLE # # Table: zbozi_skupina

Re: Incorrect handling of foreign key constraints in InnoDB tables in MySQL 3.23.55-max run on Windows ME

2003-03-13 Thread Heikki Tuuri
://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

Re: Re: Altering table which has FOREIGN KEY constraints

2003-03-13 Thread Heikki Tuuri
PROTECTED] Newsgroups: mailing.database.mysql Sent: Wednesday, March 12, 2003 7:32 PM Subject: re: Re: Altering table which has FOREIGN KEY constraints On Wednesday 12 March 2003 02:30, Heo Jungsu wrote: What do you mean could not execute a query on those tables? Could you be more detailed

re: Re: Altering table which has FOREIGN KEY constraints

2003-03-12 Thread Victoria Reznichenko
On Wednesday 12 March 2003 02:30, Heo Jungsu wrote: What do you mean could not execute a query on those tables? Could you be more detailed? Ok. let me explain. When I was using MySQL 4.0.10, After I add columns with ALTER TABLE on foreign key referencing table so many times, when I

Re: Altering table which has FOREIGN KEY constraints

2003-03-11 Thread Heo, Jungsu
Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:32 PM Subject: re: Altering table which has FOREIGN KEY constraints On Saturday 08 March 2003 09:09, Heo Jungsu wrote: I have a question about altering table which has foreign key constraints. MySQL manual says

re: Altering table which has FOREIGN KEY constraints

2003-03-10 Thread Victoria Reznichenko
On Saturday 08 March 2003 09:09, Heo Jungsu wrote: I have a question about altering table which has foreign key constraints. MySQL manual says that : In InnoDB versions 3.23.50 ALTER TABLE or CREATE INDEX should not be used in connection with tables which have foreign key constraints

Altering table which has FOREIGN KEY constraints

2003-03-07 Thread Heo, Jungsu
Hello, there. I have a question about altering table which has foreign key constraints. MySQL manual says that : In InnoDB versions 3.23.50 ALTER TABLE or CREATE INDEX should not be used in connection with tables which have foreign key constraints or which are referenced in foreign key

Re: possible bug: alter table trashed foreign key constraints in innodb

2002-07-09 Thread Heikki Tuuri
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

Re: possible bug: alter table trashed foreign key constraints in innodb

2002-07-09 Thread Victoria Reznichenko
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

possible bug: alter table trashed foreign key constraints in innodbtables

2002-07-08 Thread Chuck Simmons
sql query In version 3.23.49a when using an innodb table, alter table appears to corrupt foreign key constraints. Try the following test case: create table test_base ( base_id int not null, primary key (base_id) ) type = innodb; create table test_ref ( base_id int

InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik
Hello list! I'm having a bit of trouble getting foreign key constraints to work. I'm running MySQL 2.23.50-Max. Here's what I got: mysql SHOW CREATE TABLE conn\G *** 1. row *** Table: conn Create Table: CREATE TABLE `conn` ( `id` int(10

Re: InnoDB foreign key constraints

2002-06-10 Thread Kiss Dániel
` (`comp_name`), KEY `conn_idx` (`name_id`) - AND THIS IS THE SECOND ONE ... At 10:59 2002.06.10. +0300, you wrote: Hello list! I'm having a bit of trouble getting foreign key constraints to work. I'm running MySQL 2.23.50-Max. Here's what I got: mysql SHOW CREATE TABLE conn\G

Re: InnoDB foreign key constraints

2002-06-10 Thread Me
Heya! You need an INDEX. Try doing this first : alter table ip_name_tbl add INDEX(name_id); And add then your constraint. EG mysql SHOW CREATE TABLE ip_name_tbl\G *** 1. row *** Table: ip_name_tbl Create Table: CREATE TABLE

Re: InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik
On Monday 10 Jun 2002 11:17 am, you wrote: First of all the referenced key must be on PRIMARY KEY. ...which means my 'id' -field can't be a primary key, right? But I've seen in your table definition a quite strange thing. You have a UNIQUE and an ORDINARY key definition on the same field.

Re: InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik
On Monday 10 Jun 2002 11:44 am, Markus Lervik wrote: mysql show create table ip_name_tbl\G *** 1. row *** Table: ip_name_tbl Create Table: CREATE TABLE `ip_name_tbl` ( [snip] `name_id` int(11) NOT NULL default '0', [snip] mysql show

RE: InnoDB foreign key constraints

2002-06-10 Thread Wouter van Vliet
: Markus Lervik [mailto:[EMAIL PROTECTED]] Verzonden: maandag 10 juni 2002 10:45 Aan: Kiss Dániel CC: [EMAIL PROTECTED] Onderwerp: Re: InnoDB foreign key constraints On Monday 10 Jun 2002 11:17 am, you wrote: First of all the referenced key must be on PRIMARY KEY. ...which means my 'id' -field

- Foreign key constraints

2002-05-28 Thread maxim
Hi all! Question. I try to understand with 4.3 Foreign key constraints InnoDB Engine in MySQL-Max-3.23.50/MySQL-4.0.1. I use MySQL Max (InnoDB) 3.23.49 for Win2000 I have created two tables: CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE

Re: - Foreign key constraints

2002-05-28 Thread Egor Egorov
maxim, Tuesday, May 28, 2002, 4:47:13 PM, you wrote: m Question. I try to understand with 4.3 Foreign key constraints m InnoDB Engine in MySQL-Max-3.23.50/MySQL-4.0.1. m I use MySQL Max (InnoDB) 3.23.49 for Win2000 m I have created two tables: m CREATE TABLE parent (id INT NOT NULL, m

- HELP Foreign key constraints

2002-05-28 Thread maxim
Hi all! Question. I try to understand with 4.3 Foreign key constraints InnoDB Engine in MySQL-Max-3.23.50/MySQL-4.0.1. I use MySQL Max (InnoDB) 3.23.49 for Win2000 I have created two tables: CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE

Re: InnoDB Foreign Key Constraints

2002-05-13 Thread Heikki Tuuri
Daniel, - Original Message - From: Daniel Rand [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Monday, May 13, 2002 5:24 PM Subject: InnoDB Foreign Key Constraints Hi, Does anyone know if it's possible to set up a foreign key constraint where one table references

Re: FOREIGN KEY Constraints

2002-04-08 Thread Victoria Reznichenko
Carl, Monday, April 08, 2002, 3:16:26 AM, you wrote: CS From the mysql docs, it looks like you can only use foreign keys if your CS tables are type InnoDB. Is this correct? Yes, you are right. In MyISAM tables you can use REFERENCE clause, but it does nothing. CS Carl -- For

RE: FOREIGN KEY Constraints

2002-04-08 Thread Juan Maunel
Hi, Yes, you are right but be aware with the delete cascade feature, maybe in the way?. Regards - Original Message - From: Carl Schmidt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 07, 2002 7:16 PM Subject: FOREIGN KEY Constraints From the mysql docs, it looks like you

FOREIGN KEY Constraints

2002-04-07 Thread Carl Schmidt
From the mysql docs, it looks like you can only use foreign keys if your tables are type InnoDB. Is this correct? Carl - Before posting, please check: http://www.mysql.com/manual.php (the manual)

RE: Creating and dropping foreign key constraints

2001-06-28 Thread Chris Bolt
MySQL doesn't support foreign keys. Did you bother checking the manual? http://www.mysql.com/doc/M/i/Missing_Foreign_Keys.html Hello Does mysql support creating and dropping of foreign key constraints? i tried it.While creating foreign key constraints it doesn't dive any error but while

Creating and dropping foreign key constraints

2001-06-27 Thread Divakar
Hello Does mysql support creating and dropping of foreign key constraints? i tried it.While creating foreign key constraints it doesn't dive any error but while dropping i do get some syntax errors. what is the reason? any suggetions? regards Div