Bug#21973610
Post push fix : Fixing i_main.mysqlshow failure.
This commit is contained in:
parent
3b6f9aac02
commit
6768f80c0b
@ -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,
|
|||||||
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,
|
|||||||
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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user