title: Foreign keys on create table doesn't get created
body: <p>Executing my code didn't cause errors and didn't create the expected keys on this server:</p>
  
  <pre><code>create table table1 (
      id int not null auto_increment primary key,
      name varchar(10) not null default ''   
  ) engine=innodb;
  
  create table table2 (
      id int not null auto_increment primary key,
      idTable1 int null references table1(id) on delete cascade
  ) engine=innodb;
  </code></pre>
  
  <p>I've seen some declaring the constraints as:</p>
  
  <pre><code>columnName int not null, foreign key (columnName) references table1(id) on delete cascade
  </code></pre>
  
  <p>but I think I've already used the previous syntax before and it worked on a different server. I just can't remember for sure.</p>
  
  <p>Have you seen this before? Am I wrong in assuming my syntax would work as it works on MSSQL? If so, why this doesn't cause an error to be thrown?</p>
  
  <p><strong>Edit.:</strong></p>
  
  <p>InnoDB is enabled and set to default with <code>SET storage_engine=INNODB;</code> before running the queries to make sure.</p>
  
  <p>Keys added with the second syntax example work. Keys added with alter table work also.</p>