Hello

I use Linux Red Hat 7.3 and MySQL-max version 2.23.51. And I have one problem.

I created table:

CREATE TABLE t_Folders (
FOLDER_ID integer NOT NULL,
FOLDER_NAME varchar(50) NOT NULL,
PARENT integer NULL,
PRIMARY KEY (FOLDER_ID),
KEY XIE1t_Folders (PARENT),
FOREIGN KEY (PARENT) REFERENCES t_Folders (FOLDER_ID) ON DELETE CASCADE
) TYPE=INNODB;

And when I try to execute this statement:
INSERT INTO t_Folders VALUES (1, 'Notes', NULL);
I get error message:
'ERROR 1216: Cannot add a child row: a foreign key constraint fails'.

On Windows all is ok in this case.

Can you advise?

Thank you
Eduard