急急急,求助:Error Code 1100.Table ‘collection’was not locked with LOCK TALBLES
mysql workbench中执行.sql脚本后出错
代码如下:
--
-- Table structure for table `collection`
--
DROP TABLE IF EXISTS `collection`;
/*!40101 SET @saved_cs_client ==@@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `collection` (
`collectionId` int(11) NOT NULL AUTO_INCREMENT, `userId` int(11) NOT NULL,
`songId` int(11) NOT NULL,
PRIMARY KEY (`collectionId`),
KEY `fk_collection_1_idx` (`userId`),
KEY `fk_collection_2_idx` (`songId`),
CONSTRAINT `fk_collection_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE CASCADE ON UPDATE NO ACTION,
CONSTRAINT `fk_collection_2` FOREIGN KEY (`songId`) REFERENCES `song` (`songId`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=204 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `collection`
--
LOCK TABLES `collection` WRITE;
/*!40000 ALTER TABLE `collection` DISABLE KEYS */;
INSERT INTO `collection` VALUES (176,2,3),(180,5,207),(181,5,192),(182,5,230),(183,5,224),(184,5,1),(185,5,239),(186,5,234),(187,5,228),(188,5,220),(189,5,198),(190,5,212),(193,7,1),(194,7,198),(195,7,239),(203,1,2);
/*!40000 ALTER TABLE `collection` ENABLE KEYS */;
UNLOCK TABLES;