Commit cd2da606 authored by Michael Erickson's avatar Michael Erickson Committed by Sergei Petrunia

remove my_error and my_printf_error

parent 4c308dd2
...@@ -112,7 +112,7 @@ static void update_hosts(MYSQL_THD thd, struct st_mysql_sys_var *var, ...@@ -112,7 +112,7 @@ static void update_hosts(MYSQL_THD thd, struct st_mysql_sys_var *var,
int error_code = list->fill(from_save); int error_code = list->fill(from_save);
if (error_code) { if (error_code) {
my_free(list); my_free(list);
my_printf_error(error_code, "Unhandled error setting xpand hostlist", MYF(0)); sql_print_error("Unhandled error %d setting xpand hostlist", error_code);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
...@@ -149,9 +149,6 @@ int xpand_connection::connect() ...@@ -149,9 +149,6 @@ int xpand_connection::connect()
break; break;
} }
mysql_rwlock_unlock(&xpand_hosts_lock); mysql_rwlock_unlock(&xpand_hosts_lock);
if (error_code)
my_error(error_code, MYF(0), "clustrix");
DBUG_RETURN(error_code); DBUG_RETURN(error_code);
} }
...@@ -272,8 +269,6 @@ int xpand_connection::begin_command(uchar command) ...@@ -272,8 +269,6 @@ int xpand_connection::begin_command(uchar command)
int xpand_connection::send_command() int xpand_connection::send_command()
{ {
my_bool com_error;
/* /*
Please note: Please note:
* The transaction state is set before the command is sent because rolling * The transaction state is set before the command is sent because rolling
...@@ -289,32 +284,18 @@ int xpand_connection::send_command() ...@@ -289,32 +284,18 @@ int xpand_connection::send_command()
*/ */
trans_state = XPAND_TRANS_STARTED; trans_state = XPAND_TRANS_STARTED;
com_error = simple_command(&xpand_net, if (simple_command(&xpand_net,
(enum_server_command)XPAND_SERVER_REQUEST, (enum_server_command)XPAND_SERVER_REQUEST,
command_buffer, command_length, TRUE); command_buffer, command_length, TRUE))
return mysql_errno(&xpand_net);
if (com_error)
{
int error_code = mysql_errno(&xpand_net);
my_printf_error(error_code, "Xpand error: %s", MYF(0),
mysql_error(&xpand_net));
return error_code;
}
return 0; return 0;
} }
int xpand_connection::read_query_response() int xpand_connection::read_query_response()
{ {
my_bool comerr = xpand_net.methods->read_query_result(&xpand_net);
int error_code = 0; int error_code = 0;
if (comerr) if (xpand_net.methods->read_query_result(&xpand_net))
{
error_code = mysql_errno(&xpand_net); error_code = mysql_errno(&xpand_net);
my_printf_error(error_code, "Xpand error: %s", MYF(0),
mysql_error(&xpand_net));
}
auto_commit_closed(); auto_commit_closed();
return error_code; 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