SET STORAGE_ENGINE = Falcon;
#
# Mantis bug #238: Can't create FOREIGN KEY
#
--echo *** Bug #238 ***
--disable_warnings
DROP TABLE IF EXISTS child;
DROP TABLE IF EXISTS parent;
--enable_warnings


CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id));
CREATE TABLE child (
  id INT, 
  parent_id INT,
  INDEX par_ind (parent_id),
  FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE
);

SHOW CREATE TABLE child;

# Final cleanup
DROP TABLE child;
DROP TABLE parent;
