List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:July 28 2005 11:44pm
Subject:bk commit into 5.0 tree (jimw:1.1915) BUG#12226
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1915 05/07/28 14:44:16 jimw@stripped +3 -0
  Fix crash in 'INSERT DELAYED' statement that failed due to a
  conflict in a unique key. (Bug #12226)

  sql/sql_insert.cc
    1.167 05/07/28 14:44:12 jimw@stripped +2 -1
    Fix crash in error handling of 'INSERT DELAYED' statement.

  mysql-test/t/delayed.test
    1.10 05/07/28 14:44:12 jimw@stripped +9 -0
    Add new test

  mysql-test/r/delayed.result
    1.10 05/07/28 14:44:12 jimw@stripped +7 -0
    New results

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-12226

--- 1.166/sql/sql_insert.cc	2005-07-14 08:42:51 -07:00
+++ 1.167/sql/sql_insert.cc	2005-07-28 14:44:12 -07:00
@@ -1088,7 +1088,8 @@
 
 err:
   info->last_errno= error;
-  thd->lex->current_select->no_error= 0;        // Give error
+  if (thd->lex->current_select)
+    thd->lex->current_select->no_error= 0;        // Give error
   table->file->print_error(error,MYF(0));
 
 before_trg_err:

--- 1.9/mysql-test/r/delayed.result	2005-01-06 06:59:19 -08:00
+++ 1.10/mysql-test/r/delayed.result	2005-07-28 14:44:12 -07:00
@@ -32,3 +32,10 @@
 3	d
 4	e
 drop table t1;
+create table t1 (a int not null primary key);
+insert into t1 values (1);
+insert delayed into t1 values (1);
+select * from t1;
+a
+1
+drop table t1;

--- 1.9/mysql-test/t/delayed.test	2005-01-06 06:59:19 -08:00
+++ 1.10/mysql-test/t/delayed.test	2005-07-28 14:44:12 -07:00
@@ -36,3 +36,12 @@
 show status like 'not_flushed_delayed_rows';
 select * from t1;
 drop table t1;
+
+#
+# Bug #12226: Crash when a delayed insert fails due to a duplicate key
+#
+create table t1 (a int not null primary key);
+insert into t1 values (1);
+insert delayed into t1 values (1);
+select * from t1;
+drop table t1;
Thread
bk commit into 5.0 tree (jimw:1.1915) BUG#12226Jim Winstead28 Jul