# echo MDEV-34953 tablename of CONSTRAINT FOREIGN KEY REFERENCES
--source include/have_lowercase0.inc
--source include/have_innodb.inc
CREATE TABLE `FAMILY_PARENT` (
  `PARENT_ID` char(36) NOT NULL,
  `PARENT_NAME` varchar(200) NOT NULL,
  PRIMARY KEY (`PARENT_ID`)
) ENGINE=InnoDB  CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

CREATE TABLE `FAMILY_CHILD` (
  `PARENT_ID` char(36) NOT NULL,
  `CHILD_NAME` varchar(200) NOT NULL,
  PRIMARY KEY (`PARENT_ID`,`CHILD_NAME`),
  CONSTRAINT `CHILD_FK` FOREIGN KEY (`PARENT_ID`) REFERENCES `FAMILY_PARENT` (`PARENT_ID`) ON DELETE CASCADE
) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

# check that foreign key constraint name
SHOW CREATE TABLE FAMILY_CHILD;

DROP TABLE FAMILY_CHILD;
DROP TABLE FAMILY_PARENT;

