Commit 0b01f9ef authored by Will DeVries's avatar Will DeVries Committed by Sergei Petrunia

Fix direct_update error handling.

parent 14c34d96
......@@ -731,13 +731,12 @@ int clustrix_connection::update_query(String &stmt, LEX_CSTRING &dbname,
if ((error_code = send_command()))
return error_code;
if ((error_code = read_query_response()))
return error_code;
error_code = read_query_response();
auto_commit_closed();
*affected_rows = clustrix_net.affected_rows;
if (!error_code)
*affected_rows = clustrix_net.affected_rows;
return 0;
return error_code;
}
......
......@@ -573,10 +573,7 @@ int ha_clustrixdb::direct_update_rows(ha_rows *update_rows)
if (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
trx->auto_commit_next();
trx->update_query(update_stmt, table->s->db, update_rows);
thd->get_stmt_da()->set_overwrite_status(true);
error_code = trx->update_query(update_stmt, table->s->db, update_rows);
DBUG_RETURN(error_code);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment