Bug #33736 mysql crash on error sql with INSERT DELAYED and ON DUPLICATE KEY UPDATE
Submitted: 8 Jan 2008 9:53 Modified: 14 Jan 2008 6:51
Reporter: Ben Li Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.1.22(5.1.19, 6.0.3) OS:Any
Assigned to: CPU Architecture:Any
Tags: ON DUPLICATE KEY;INSERT DELAYED

[8 Jan 2008 9:53] Ben Li
Description:
mysql server crash with a error sql.
on windows 6.0.3, 5.1.22, linux 5.1.22, 5.1.19

successfully report sql error on linux 5.0.21

this sql is miss two column in insert, and mysql server crashed.

with DELAYED or without ON DUPLICATE KEY, mysql server will report sql error.

How to repeat:
drop table  if exists ca_searchkeyword_detail;
CREATE TABLE ca_searchkeyword_detail (
  defid int unsigned NOT NULL,
  searchengine varchar(32) NOT NULL default '',
  searchkeyword varchar(140) NOT NULL default '',
  area varchar(32) NOT NULL default '',
  count mediumint unsigned NOT NULL,
  pv mediumint unsigned NOT NULL default '0',
  relatedhits int unsigned NOT NULL default 0,
  relatedpvs int unsigned NOT NULL default 0,
  relatedbandwidth bigint unsigned NOT NULL default 0,
  relatedvisitors int unsigned NOT NULL default 0,
  relatedsessions int unsigned NOT NULL default 0,
  relatedtime_spent bigint unsigned NOT NULL default 0,
  bouncedsessions int unsigned NOT NULL default 0,
  onepagesessions int unsigned NOT NULL default 0,
  day  int unsigned NOT NULL,
  PRIMARY KEY (defid, searchengine, day, searchkeyword, area)
) ENGINE=MyISAM;
 

insert DELAYED into ca_searchkeyword_detail(defid, day, searchengine, searchkeyword, area,
 count, pv, relatedhits, relatedpvs, relatedbandwidth, relatedvisitors, relatedsessions, relatedtime_spent) 
 values(2, 20080103, 'wreew', 'sdfadsfad', 'abc-def', 1, 1, 1, 1, 51036, 0, 1, 5, 1, 1)  
 ON DUPLICATE KEY UPDATE count=count+1, pv=pv+1, relatedhits=relatedhits+1, 
 relatedpvs=relatedpvs+1, relatedbandwidth=relatedbandwidth+51036, relatedvisitors=relatedvisitors+0, 
 relatedsessions=relatedsessions+1, relatedtime_spent=relatedtime_spent+5, 
bouncedsessions=bouncedsessions+1, onepagesessions=onepagesessions+1;
[8 Jan 2008 11:05] MySQL Verification Team
Thank you for the bug report. Could you please provide the right query for
your test case, I got the below:

ent+5,bouncedsessions=bouncedsessions+1, onepagesessions=onepagesessions+1;
ERROR 1136 (21S01): Column count doesn't match value count at row 1

Thanks in advance.
[8 Jan 2008 11:22] MySQL Verification Team
can this be related to bug #32676 ?
[14 Jan 2008 6:51] Ben Li
closed, the newest source code has solved this problem.