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.1920 05/08/01 17:00:03 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/08/01 17:00:00 jimw@stripped +3 -1
Fix crash in error handling of 'INSERT DELAYED' statement
mysql-test/t/delayed.test
1.11 05/08/01 17:00:00 jimw@stripped +9 -0
Add new regression test
mysql-test/r/delayed.result
1.10 05/08/01 17:00:00 jimw@stripped +7 -0
Add 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-clean
--- 1.166/sql/sql_insert.cc 2005-07-14 08:42:51 -07:00
+++ 1.167/sql/sql_insert.cc 2005-08-01 17:00:00 -07:00
@@ -1088,7 +1088,9 @@
err:
info->last_errno= error;
- thd->lex->current_select->no_error= 0; // Give error
+ /* current_select is NULL if this is a delayed insert */
+ 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-08-01 17:00:00 -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.10/mysql-test/t/delayed.test 2005-07-28 06:12:32 -07:00
+++ 1.11/mysql-test/t/delayed.test 2005-08-01 17:00:00 -07:00
@@ -38,3 +38,12 @@
drop table t1;
# End of 4.1 tests
+
+#
+# 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.1920) BUG#12226 | Jim Winstead | 2 Aug |