Commit 6768f80c authored by Harin Vadodaria's avatar Harin Vadodaria

Bug#21973610

Post push fix : Fixing i_main.mysqlshow failure.
parent 3b6f9aac
...@@ -655,7 +655,7 @@ list_table_status(MYSQL *mysql,const char *db,const char *wild) ...@@ -655,7 +655,7 @@ list_table_status(MYSQL *mysql,const char *db,const char *wild)
len= sizeof(query); len= sizeof(query);
len-= my_snprintf(query, len, "show table status from `%s`", db); len-= my_snprintf(query, len, "show table status from `%s`", db);
if (wild && wild[0] && len) if (wild && wild[0] && len)
strxnmov(query + strlen(query), len, " like '", wild, "'", NullS); strxnmov(query + strlen(query), len - 1, " like '", wild, "'", NullS);
if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql))) if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
{ {
fprintf(stderr,"%s: Cannot get status for db: %s, table: %s: %s\n", fprintf(stderr,"%s: Cannot get status for db: %s, table: %s: %s\n",
...@@ -688,7 +688,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, ...@@ -688,7 +688,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
const char *wild) const char *wild)
{ {
char query[NAME_LEN + 100]; char query[NAME_LEN + 100];
int len; size_t len;
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW row; MYSQL_ROW row;
ulong UNINIT_VAR(rows); ulong UNINIT_VAR(rows);
...@@ -718,7 +718,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, ...@@ -718,7 +718,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
len-= my_snprintf(query, len, "show /*!32332 FULL */ columns from `%s`", len-= my_snprintf(query, len, "show /*!32332 FULL */ columns from `%s`",
table); table);
if (wild && wild[0] && len) if (wild && wild[0] && len)
strxnmov(query + strlen(query), len, " like '", wild, "'", NullS); strxnmov(query + strlen(query), len - 1, " like '", wild, "'", NullS);
if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql))) if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql)))
{ {
fprintf(stderr,"%s: Cannot list columns in db: %s, table: %s: %s\n", fprintf(stderr,"%s: Cannot list columns in db: %s, table: %s: %s\n",
......
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