diff options
author | Harin Vadodaria <harin.vadodaria@oracle.com> | 2016-04-29 11:06:41 +0530 |
---|---|---|
committer | Harin Vadodaria <harin.vadodaria@oracle.com> | 2016-04-29 11:06:41 +0530 |
commit | 6768f80c0b1f0b82c5addbe47ce712ded14d0d8c (patch) | |
tree | c1022d82c00ad2727f8408a5731b69a6aaa0f78c /client/mysqlshow.c | |
parent | 3b6f9aac02b126db57fa3e3f1873713438d0a950 (diff) | |
download | mariadb-git-6768f80c0b1f0b82c5addbe47ce712ded14d0d8c.tar.gz |
Bug#21973610
Post push fix : Fixing i_main.mysqlshow failure.
Diffstat (limited to 'client/mysqlshow.c')
-rw-r--r-- | client/mysqlshow.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 4d1df00c8fd..f1f8bdaf54b 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -655,7 +655,7 @@ list_table_status(MYSQL *mysql,const char *db,const char *wild) len= sizeof(query); len-= my_snprintf(query, len, "show table status from `%s`", db); 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))) { 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) { char query[NAME_LEN + 100]; - int len; + size_t len; MYSQL_RES *result; MYSQL_ROW row; 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`", table); 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))) { fprintf(stderr,"%s: Cannot list columns in db: %s, table: %s: %s\n", |