Howdy all! I thought InnoDB tables enforced referential integrity? I believe I have set up MySql to use InnoDB tables and I have created tables of type InnoDB, yet I can still enter an illegal row!
Can anyone tell me what I am doing wrong? The final "insert into PET " below should not work! Rob :) :-> :-} ====== my.ini My my.ini file: [mysqld] basedir=C:/mySql/ datadir=C:/mySql/data [WinMySQLAdmin] Server=C:/mySql/bin/mysqld-MAX-nt.exe innodb_data_home_dir = C:\mySql\ibdata innodb_data_file_path=ibdata1:30M:autoextend ====== startup server - in a DOS box C:\mySql\bin>mysqld-max-nt.exe --console --standalone Cannot initialize InnoDB as 'innodb_data_file_path' is not set. If you do not want to use transactional InnoDB tables, add a line skip-innodb to the [mysqld] section of init parameters in your my.cnf or my.ini. If you want to use InnoDB tables, add to the [mysqld] section, for example, innodb_data_file_path = ibdata1:10M:autoextend But to get good performance you should adjust for your hardware the InnoDB startup options listed in section 2 at http://www.innodb.com/ibman.html mysqld-max-nt.exe: ready for connections ====== Creating and testing InnoDB tables C:\mySql\bin>mysql --local-infile -h localhost -u rob -prob menagerie Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 to server version: 3.23.55-max-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE TABLE owner ( -> name VARCHAR(20) NOT NULL, -> PRIMARY KEY (name)) -> TYPE = InnoDB; Query OK, 0 rows affected (0.06 sec) mysql> mysql> CREATE TABLE pet ( -> name VARCHAR(20) NOT NULL, -> species VARCHAR(20) NOT NULL, -> sex CHAR(1) NOT NULL, -> birth DATE, -> death DATE, -> name1 VARCHAR(20) NOT NULL, -> PRIMARY KEY (name), -> FOREIGN KEY (name1) REFERENCES owner (name) -> ON DELETE SET NULL -> ON UPDATE CASCADE) -> TYPE = InnoDB; Query OK, 0 rows affected (0.05 sec) mysql> insert into PET (name,species,sex,birth,death,name1) values ('Chicko2','Dog','m',2001/11/04,\N,'Robsdf'); Query OK, 1 row affected (0.02 sec) mysql> --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
