Bug #3802 | mysqld crashed by complete DELETE ... (SELECT (SELECT )) | ||
---|---|---|---|
Submitted: | 17 May 2004 17:38 | Modified: | 25 May 2004 18:56 |
Reporter: | Mark Sadler | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.1-1 (alpha) | OS: | Linux (Linux (Redhat) 2.4.18 kernel) |
Assigned to: | Oleksandr Byelkin | CPU Architecture: | Any |
[17 May 2004 17:38]
Mark Sadler
[17 May 2004 19:13]
Alexander Keremidarski
Mark, Can you please post also the result of: SHOW CREATE TABLE ...; for all tables involved so we can try repeating teh crash? Thanks in advance
[18 May 2004 21:30]
Mark Sadler
CREATE TEMPORARY TABLE worktable (field1 VARCHAR(20), ownerid VARCHAR(32),listname VARCHAR(48),sourceid INTEGER(10), subscribernumber INTEGER(10),contactscore INTEGER(4), optinallowed CHAR(1),visiblefield1 VARCHAR(20), price INTEGER(10),estimatedcampaignvalue INTEGER(4), deleteme CHAR(1)) TYPE=MEMORY; Table Create Table campaign CREATE TABLE `campaign` (\n `campaignid` int(10) NOT NULL auto_increment,\n `clientid` varchar(32) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `starttime` datetime default NULL,\n `stoptime` datetime default NULL,\n `templatename` varchar(32) default NULL,\n `tagline` varchar(160) default NULL,\n `quizparseforwrong` char(1) default NULL,\n `quizinvalidresponsetext` varchar(165) default NULL,\n `quizinvalidresponsecid` int(10) default NULL,\n `priority` int(3) default NULL,\n `campaigntype` int(1) default NULL,\n `state` int(2) default NULL,\n `brokerapproved` char(1) NOT NULL default 'N',\n `startimmediately` char(1) NOT NULL default 'N',\n `erroritem` varchar(100) default NULL,\n `allocatedhost` varchar(32) default NULL,\n `quizhiscore` int(5) default '0',\n `rstarttime` datetime default NULL,\n `rstoptime` datetime default NULL,\n `owneruserid` varchar(16) NOT NULL default '',\n `queuedtime` datetime default NULL,\n `responserate` char(3) default '75',\n `setupcost` varchar(16) default '0.00',\n `revenue` varchar(16) default '0.00',\n `costperitem` varchar(16) default '0.00',\n `externalcampaigntype` int(1) NOT NULL default '0',\n PRIMARY KEY (`clientid`,`campaignname`),\n UNIQUE KEY `campaignid` (`campaignid`),\n KEY `clientid` (`clientid`,`templatename`),\n KEY `quizinvalidresponsecid` (`quizinvalidresponsecid`),\n CONSTRAINT `0_271` FOREIGN KEY (`clientid`) REFERENCES `client` (`clientid`),\n CONSTRAINT `0_272` FOREIGN KEY (`clientid`, `templatename`) REFERENCES `campaigntemplate` (`clientid`, `templatename`),\n CONSTRAINT `0_273` FOREIGN KEY (`quizinvalidresponsecid`) REFERENCES `bct` (`cid`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table responsecategory CREATE TABLE `responsecategory` (\n `clientid` varchar(48) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `categoryname` varchar(48) NOT NULL default '',\n `starttime` datetime NOT NULL default '0000-00-00 00:00:00',\n `stoptime` datetime NOT NULL default '0000-00-00 00:00:00',\n `opencategory` char(1) NOT NULL default 'N',\n `pitem` varchar(165) default NULL,\n `pcid` int(10) default NULL,\n `pacc` varchar(32) default NULL,\n `pitemscore` int(2) default NULL,\n `multipleresponses` char(1) NOT NULL default 'N',\n `overwrite` char(1) NOT NULL default 'N',\n `quizround` int(2) default NULL,\n `itemvalidity` int(7) default '7200',\n `startwithcampaign` char(1) NOT NULL default 'N',\n `rstarttime` datetime default NULL,\n `rstoptime` datetime default NULL,\n `ropencategory` char(1) NOT NULL default '',\n `istiebreaker` char(1) NOT NULL default 'N',\n PRIMARY KEY (`clientid`,`campaignname`,`categoryname`),\n KEY `pacc` (`pacc`),\n KEY `pcid` (`pcid`),\n CONSTRAINT `0_287` FOREIGN KEY (`clientid`, `campaignname`) REFERENCES `campaign` (`clientid`, `campaignname`),\n CONSTRAINT `0_288` FOREIGN KEY (`pacc`) REFERENCES `acc` (`accname`),\n CONSTRAINT `0_289` FOREIGN KEY (`pcid`) REFERENCES `bct` (`cid`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table approvallist CREATE TABLE `approvallist` (\n `clientid` varchar(48) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `ownerid` varchar(32) NOT NULL default '',\n `listname` varchar(48) NOT NULL default '',\n `campaignweighting` int(2) default NULL,\n `approved` char(1) NOT NULL default 'N',\n `jointbrandedoptinfilter` char(1) NOT NULL default 'N',\n `thirdpartyoptinfilter` char(1) NOT NULL default 'N',\n PRIMARY KEY (`clientid`,`campaignname`,`ownerid`,`listname`),\n KEY `ownerid` (`ownerid`,`listname`),\n CONSTRAINT `0_279` FOREIGN KEY (`clientid`, `campaignname`) REFERENCES `campaign` (`clientid`, `campaignname`),\n CONSTRAINT `0_280` FOREIGN KEY (`ownerid`, `listname`) REFERENCES `inventorylist` (`ownerid`, `listname`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table inventorylist CREATE TABLE `inventorylist` (\n `inventorylistid` int(10) NOT NULL auto_increment,\n `ownerid` varchar(32) NOT NULL default '',\n `listname` varchar(48) NOT NULL default '',\n `price` int(3) NOT NULL default '0',\n `tagline` varchar(160) default NULL,\n `recencylimit` int(3) NOT NULL default '0',\n `frequencycontacts` int(4) NOT NULL default '0',\n `frequencyperiod` int(3) NOT NULL default '0',\n `description` text,\n `conditionsofuse` text,\n `field1captureallowed` char(1) NOT NULL default 'N',\n PRIMARY KEY (`ownerid`,`listname`),\n UNIQUE KEY `inventorylistid` (`inventorylistid`),\n CONSTRAINT `0_235` FOREIGN KEY (`ownerid`) REFERENCES `dataowner` (`ownerid`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table templatesource CREATE TABLE `templatesource` (\n `templatename` varchar(32) NOT NULL default '',\n `clientid` varchar(32) NOT NULL default '',\n `listname` varchar(48) NOT NULL default '',\n `ownerid` varchar(32) NOT NULL default '',\n `sourceid` int(10) NOT NULL auto_increment,\n `description` text,\n PRIMARY KEY (`clientid`,`templatename`,`listname`,`ownerid`,`sourceid`),\n UNIQUE KEY `sourceid` (`sourceid`),\n KEY `ownerid` (`ownerid`,`listname`),\n CONSTRAINT `0_261` FOREIGN KEY (`clientid`, `templatename`) REFERENCES `campaigntemplate` (`clientid`, `templatename`),\n CONSTRAINT `0_262` FOREIGN KEY (`ownerid`, `listname`) REFERENCES `inventorylist` (`ownerid`, `listname`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1
[20 May 2004 12:21]
Alexander Keremidarski
Hello. I couldn't use your tables because some of tables and columns are missing. Unknown Table entry , Unknown column 'rc.pushtext' and probably others. A side comment, This expression: ... BETWEEN ('2004-05-17 12:38:00' - 1) AND ('2004-05-17 12:38:00' + 1) will evaluate as: ... BETWEEN 2003 AND 2005; because mysql> SELECT '2004-05-17 12:38:00' - 1 AS d1, '2004-05-17 12:38:00' + 1 AS d2;+------+------+ | d1 | d2 | +------+------+ | 2003 | 2005 | +------+------+ Consider +/- INTERVAL 1 <interval specifyer> as you do at the end of the query:
[20 May 2004 17:53]
Mark Sadler
Sorry about that, here is the create tables info, again. This time with the right field names and the missing tables! CREATE TEMPORARY TABLE worktable (field1 VARCHAR(20), ownerid VARCHAR(32),listname VARCHAR(48),sourceid INTEGER(10), subscribernumber INTEGER(10),contactscore INTEGER(4), optinallowed CHAR(1),visiblefield1 VARCHAR(20), price INTEGER(10),estimatedcampaignvalue INTEGER(4), deleteme CHAR(1)) TYPE=MEMORY; Table Create Table campaign CREATE TABLE `campaign` (\n `campaignid` int(10) NOT NULL auto_increment,\n `clientid` varchar(32) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `starttime` datetime default NULL,\n `stoptime` datetime default NULL,\n `templatename` varchar(32) default NULL,\n `tagline` varchar(160) default NULL,\n `quizparseforwrong` char(1) default NULL,\n `quizinvalidresponsetext` varchar(165) default NULL,\n `quizinvalidresponsecontentid` int(10) default NULL,\n `priority` int(3) default NULL,\n `campaigntype` int(1) default NULL,\n `state` int(2) default NULL,\n `brokerapproved` char(1) NOT NULL default 'N',\n `startimmediately` char(1) NOT NULL default 'N',\n `errormessage` varchar(100) default NULL,\n `allocatedhost` varchar(32) default NULL,\n `quizhiscore` int(5) default '0',\n `rstarttime` datetime default NULL,\n `rstoptime` datetime default NULL,\n `owneruserid` varchar(16) NOT NULL default '',\n `queuedtime` datetime default NULL,\n `responserate` char(3) default '75',\n `setupcost` varchar(16) default '0.00',\n `revenue` varchar(16) default '0.00',\n `costpermessage` varchar(16) default '0.00',\n `externalcampaigntype` int(1) NOT NULL default '0',\n PRIMARY KEY (`clientid`,`campaignname`),\n UNIQUE KEY `campaignid` (`campaignid`),\n KEY `clientid` (`clientid`,`templatename`),\n KEY `quizinvalidresponsecontentid` (`quizinvalidresponsecontentid`),\n CONSTRAINT `0_271` FOREIGN KEY (`clientid`) REFERENCES `client` (`clientid`),\n CONSTRAINT `0_272` FOREIGN KEY (`clientid`, `templatename`) REFERENCES `campaigntemplate` (`clientid`, `templatename`),\n CONSTRAINT `0_273` FOREIGN KEY (`quizinvalidresponsecontentid`) REFERENCES `binarycontent` (`contentid`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table responsecategory CREATE TABLE `responsecategory` (\n `clientid` varchar(48) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `categoryname` varchar(48) NOT NULL default '',\n `starttime` datetime NOT NULL default '0000-00-00 00:00:00',\n `stoptime` datetime NOT NULL default '0000-00-00 00:00:00',\n `opencategory` char(1) NOT NULL default 'N',\n `pushtext` varchar(165) default NULL,\n `pushcontentid` int(10) default NULL,\n `pushaccountname` varchar(32) default NULL,\n `pushtextscore` int(2) default NULL,\n `multipleresponses` char(1) NOT NULL default 'N',\n `overwrite` char(1) NOT NULL default 'N',\n `quizround` int(2) default NULL,\n `messagevalidity` int(7) default '7200',\n `startwithcampaign` char(1) NOT NULL default 'N',\n `rstarttime` datetime default NULL,\n `rstoptime` datetime default NULL,\n `ropencategory` char(1) NOT NULL default '',\n `istiebreaker` char(1) NOT NULL default 'N',\n PRIMARY KEY (`clientid`,`campaignname`,`categoryname`),\n KEY `pushaccountname` (`pushaccountname`),\n KEY `pushcontentid` (`pushcontentid`),\n CONSTRAINT `0_287` FOREIGN KEY (`clientid`, `campaignname`) REFERENCES `campaign` (`clientid`, `campaignname`),\n CONSTRAINT `0_288` FOREIGN KEY (`pushaccountname`) REFERENCES `account` (`accountname`),\n CONSTRAINT `0_289` FOREIGN KEY (`pushcontentid`) REFERENCES `binarycontent` (`contentid`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table approvallist CREATE TABLE `approvallist` (\n `clientid` varchar(48) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `ownerid` varchar(32) NOT NULL default '',\n `listname` varchar(48) NOT NULL default '',\n `campaignweighting` int(2) default NULL,\n `approved` char(1) NOT NULL default 'N',\n `jointbrandedoptinfilter` char(1) NOT NULL default 'N',\n `thirdpartyoptinfilter` char(1) NOT NULL default 'N',\n PRIMARY KEY (`clientid`,`campaignname`,`ownerid`,`listname`),\n KEY `ownerid` (`ownerid`,`listname`),\n CONSTRAINT `0_279` FOREIGN KEY (`clientid`, `campaignname`) REFERENCES `campaign` (`clientid`, `campaignname`),\n CONSTRAINT `0_280` FOREIGN KEY (`ownerid`, `listname`) REFERENCES `inventorylist` (`ownerid`, `listname`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table inventorylist CREATE TABLE `inventorylist` (\n `inventorylistid` int(10) NOT NULL auto_increment,\n `ownerid` varchar(32) NOT NULL default '',\n `listname` varchar(48) NOT NULL default '',\n `price` int(3) NOT NULL default '0',\n `tagline` varchar(160) default NULL,\n `recencylimit` int(3) NOT NULL default '0',\n `frequencycontacts` int(4) NOT NULL default '0',\n `frequencyperiod` int(3) NOT NULL default '0',\n `description` text,\n `conditionsofuse` text,\n `msisdncaptureallowed` char(1) NOT NULL default 'N',\n PRIMARY KEY (`ownerid`,`listname`),\n UNIQUE KEY `inventorylistid` (`inventorylistid`),\n CONSTRAINT `0_235` FOREIGN KEY (`ownerid`) REFERENCES `dataowner` (`ownerid`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table templatesource CREATE TABLE `templatesource` (\n `templatename` varchar(32) NOT NULL default '',\n `clientid` varchar(32) NOT NULL default '',\n `listname` varchar(48) NOT NULL default '',\n `ownerid` varchar(32) NOT NULL default '',\n `sourceid` int(10) NOT NULL auto_increment,\n `description` text,\n PRIMARY KEY (`clientid`,`templatename`,`listname`,`ownerid`,`sourceid`),\n UNIQUE KEY `sourceid` (`sourceid`),\n KEY `ownerid` (`ownerid`,`listname`),\n CONSTRAINT `0_261` FOREIGN KEY (`clientid`, `templatename`) REFERENCES `campaigntemplate` (`clientid`, `templatename`),\n CONSTRAINT `0_262` FOREIGN KEY (`ownerid`, `listname`) REFERENCES `inventorylist` (`ownerid`, `listname`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1 Table Create Table entry CREATE TABLE `entry` (\n `clientid` varchar(32) NOT NULL default '',\n `campaignname` varchar(48) NOT NULL default '',\n `msisdn` varchar(20) NOT NULL default '',\n `visiblemsisdn` varchar(20) default NULL,\n `optinallowed` char(1) NOT NULL default 'N',\n `subscribernumber` int(10) default NULL,\n `ownerid` varchar(32) default NULL,\n `listname` varchar(48) default NULL,\n `campaignvalue` int(4) default NULL,\n `cost` int(5) default NULL,\n `deleted` char(1) NOT NULL default 'N',\n `quizattempt` int(4) default '0',\n `currentround` int(2) default '1',\n `quizterminated` char(1) NOT NULL default 'N',\n `quizscore` int(5) default '0',\n PRIMARY KEY (`clientid`,`campaignname`,`msisdn`),\n KEY `ownerid` (`ownerid`,`listname`),\n KEY `subscribernumber` (`subscribernumber`),\n CONSTRAINT `0_306` FOREIGN KEY (`clientid`, `campaignname`) REFERENCES `campaignlist` (`clientid`, `campaignname`),\n CONSTRAINT `0_307` FOREIGN KEY (`ownerid`, `listname`) REFERENCES `inventorylist` (`ownerid`, `listname`),\n CONSTRAINT `0_308` FOREIGN KEY (`subscribernumber`) REFERENCES `subscriber` (`subscribernumber`)\n) TYPE=InnoDB DEFAULT CHARSET=latin1
[21 May 2004 17:09]
Oleksandr Byelkin
I tested your example and it go well, but I add following tables: CREATE TABLE `client` (`clientid` varchar(32) NOT NULL, primary key (`clientid`)) TYPE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `campaigntemplate` (`clientid` varchar(32) NOT NULL, `templatename`varchar(32) NOT NULL, primary key(`clientid`, `templatename`)) TYPE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `binarycontent` (`contentid` int(10) NOT NULL, primary key(`contentid`)) TYPE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `account` (`accountname` varchar(32) NOT NULL, primary key(`accountname`)) TYPE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `dataowner` (`ownerid` varchar(32) NOT NULL, primary key(`ownerid`)) TYPE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `subscriber` (`subscribernumber` int(10) NOT NULL, primary key(`subscribernumber`)) TYPE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `campaignlist` (`clientid` varchar(32) NOT NULL, `campaignname` varchar(48) NOT NULL, primary key(`clientid`,`campaignname`)) TYPE=InnoDB DEFAULT CHARSET=latin1; and all tables was empty. can you provide full schema and some data on which bug is repeatable?
[21 May 2004 17:13]
Oleksandr Byelkin
sorry, I accidentally change status to wrong type
[25 May 2004 18:56]
Oleksandr Byelkin
Thank you for bugreport and especially for time you spent for creating test suite and sending it to me. This bug is not present in current 4.1 bk repository, it looks like fixed since last release.