diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-10-11 19:27:53 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-10-11 19:27:53 +0400 |
commit | 3e8f7c8516d643a6e6fae95596cb426082c2c7f5 (patch) | |
tree | 3e9066183086e925cdfbce4310cb1f157e631bd3 /sql/sql_insert.cc | |
parent | a1705b762e26eb86ded808d426c43eafb47193ec (diff) | |
download | mariadb-git-3e8f7c8516d643a6e6fae95596cb426082c2c7f5.tar.gz |
MDEV-5122: "Commands out of sync", "Malformed packet" or client hang up...
- When INSERT catches an error, it should not attempt to send parts of
EXPLAIN output.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 10cd8a6a7f6..56882f7798c 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -819,8 +819,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, save_insert_query_plan(thd, table_list); if (thd->lex->describe) { - retval= 0; - goto exit_without_my_ok; + retval= thd->lex->explain->send_explain(thd); + goto free_and_exit; } /* @@ -1170,15 +1170,14 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, DBUG_RETURN(FALSE); abort: -exit_without_my_ok: #ifndef EMBEDDED_LIBRARY if (lock_type == TL_WRITE_DELAYED) end_delayed_insert(thd); #endif if (table != NULL) table->file->ha_release_auto_increment(); - retval= thd->lex->explain->send_explain(thd); +free_and_exit: if (!joins_freed) free_underlaid_joins(thd, &thd->lex->select_lex); thd->abort_on_warning= 0; |