Skip to content

Commit 64dd396

Browse files
committed
remove redundant info on rpl test failure
these three SHOW statements (and more) are issued from include/analyze-sync_with_master.test too. no need to do it twice.
1 parent 328edf8 commit 64dd396

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

client/mysqltest.cc

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,71 +1102,6 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query,
11021102
}
11031103

11041104

1105-
/*
1106-
Run query and dump the result to stderr in vertical format
1107-
1108-
NOTE! This function should be safe to call when an error
1109-
has occurred and thus any further errors will be ignored (although logged)
1110-
1111-
SYNOPSIS
1112-
show_query
1113-
mysql - connection to use
1114-
query - query to run
1115-
1116-
*/
1117-
1118-
static void show_query(MYSQL* mysql, const char* query)
1119-
{
1120-
MYSQL_RES* res;
1121-
DBUG_ENTER("show_query");
1122-
1123-
if (!mysql)
1124-
DBUG_VOID_RETURN;
1125-
1126-
if (mysql_query(mysql, query))
1127-
{
1128-
log_msg("Error running query '%s': %d %s",
1129-
query, mysql_errno(mysql), mysql_error(mysql));
1130-
DBUG_VOID_RETURN;
1131-
}
1132-
1133-
if ((res= mysql_store_result(mysql)) == NULL)
1134-
{
1135-
/* No result set returned */
1136-
DBUG_VOID_RETURN;
1137-
}
1138-
1139-
{
1140-
MYSQL_ROW row;
1141-
unsigned int i;
1142-
unsigned int row_num= 0;
1143-
unsigned int num_fields= mysql_num_fields(res);
1144-
MYSQL_FIELD *fields= mysql_fetch_fields(res);
1145-
1146-
fprintf(stderr, "=== %s ===\n", query);
1147-
while ((row= mysql_fetch_row(res)))
1148-
{
1149-
unsigned long *lengths= mysql_fetch_lengths(res);
1150-
row_num++;
1151-
1152-
fprintf(stderr, "---- %d. ----\n", row_num);
1153-
for(i= 0; i < num_fields; i++)
1154-
{
1155-
fprintf(stderr, "%s\t%.*s\n",
1156-
fields[i].name,
1157-
(int)lengths[i], row[i] ? row[i] : "NULL");
1158-
}
1159-
}
1160-
for (i= 0; i < strlen(query)+8; i++)
1161-
fprintf(stderr, "=");
1162-
fprintf(stderr, "\n\n");
1163-
}
1164-
mysql_free_result(res);
1165-
1166-
DBUG_VOID_RETURN;
1167-
}
1168-
1169-
11701105
/*
11711106
Show any warnings just before the error. Since the last error
11721107
is added to the warning stack, only print @@warning_count-1 warnings.
@@ -4829,9 +4764,6 @@ void do_sync_with_master2(struct st_command *command, long offset,
48294764
if (!result_str || result < 0)
48304765
{
48314766
/* master_pos_wait returned NULL or < 0 */
4832-
show_query(mysql, "SHOW MASTER STATUS");
4833-
show_query(mysql, "SHOW SLAVE STATUS");
4834-
show_query(mysql, "SHOW PROCESSLIST");
48354767
fprintf(stderr, "analyze: sync_with_master\n");
48364768

48374769
if (!result_str)

0 commit comments

Comments
 (0)