diff options
author | unknown <jimw@mysql.com> | 2005-08-01 17:00:03 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-08-01 17:00:03 -0700 |
commit | c33f7f9f9064d95a73778c0e962e20a267bccaad (patch) | |
tree | 0a57ed1d5a816f7305b1707b5b84c935929c5328 /sql/sql_insert.cc | |
parent | e53419b45334ddcfd964dd2fd9fec0e82c3fe24a (diff) | |
download | mariadb-git-c33f7f9f9064d95a73778c0e962e20a267bccaad.tar.gz |
Fix crash in 'INSERT DELAYED' statement that failed due to a
conflict in a unique key. (Bug #12226)
mysql-test/r/delayed.result:
Add results
mysql-test/t/delayed.test:
Add new regression test
sql/sql_insert.cc:
Fix crash in error handling of 'INSERT DELAYED' statement
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 125390e4411..27342287fcd 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1088,7 +1088,9 @@ ok_or_after_trg_err: 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: |