What is your default storage ?

Do this : SHOW ENGINES;

You should see something like this:

mysql> show engines;
+------------+---------+----------------------------------------------------------------+
| Engine     | Support | Comment                                                
        |
+------------+---------+----------------------------------------------------------------+
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance 
        |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary 
tables      |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign 
keys     |
| BerkeleyDB | NO      | Supports transactions and page-level locking           
        |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it 
disappears) |
| EXAMPLE    | NO      | Example storage engine                                 
        |
| ARCHIVE    | YES     | Archive storage engine                                 
        |
| CSV        | YES     | CSV storage engine                                     
        |
| ndbcluster | NO      | Clustered, fault-tolerant, memory-based tables         
        |
| FEDERATED  | YES     | Federated MySQL storage engine                         
        |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                  
        |
| ISAM       | NO      | Obsolete storage engine                                
        |
+------------+---------+----------------------------------------------------------------+
12 rows in set (0.48 sec)

In my system, the default is MyISAM.

References only work with Transaction-based like InnoDB.
When you create table with a storage engine other than InnoDB,
the syntax for REFERENCE and CASCASE DELETE is parsed but nothing is actually 
implemented.

This URL explains that : 
http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-foreign-keys.html

Make sure those tables are InnoDB.

-----Original Message-----
From: smriti Sebastian [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2008 4:52 AM
To: mysql@lists.mysql.com
Subject: reg: on delete cascade

I created two tables like this:
create table customer(SID int,name varchar(20),primary key(SID));
create table orders(OID int,O_Date date,customer_SID int,primary
key(OID),Foreign key(customer_SID) references customer(SID) on delete
cascade on update cascade);

And inserted values into it.but when i deleted a row from customer which has
reference in orders it didn't showed any error..it deleted the value in
customer table while it's reference in orders remain unchanged.Plz help me
in solving this.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to