diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-24 10:56:13 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-24 10:56:13 +0300 |
commit | 7917f0852f57ff0fecb80f561eccd674a4e1866d (patch) | |
tree | 27d736b66dbef96f0119023bc78b639f7a59faaa /client | |
parent | e446a244e0125841d00511ab150db8275c81b0f8 (diff) | |
parent | 6bb8cd842981f3ccdfc08e3cbd0d702fc956c314 (diff) | |
download | mariadb-git-7917f0852f57ff0fecb80f561eccd674a4e1866d.tar.gz |
Auto-merge from mysql-trunk-merge.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 3 | ||||
-rw-r--r-- | client/mysqldump.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index be3c13bf362..0842afb85e4 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3612,7 +3612,8 @@ print_table_data_vertically(MYSQL_RES *result) for (uint off=0; off < mysql_num_fields(result); off++) { field= mysql_fetch_field(result); - tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name); + if (column_names) + tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name); if (cur[off]) { unsigned int i; diff --git a/client/mysqldump.c b/client/mysqldump.c index 9c665e6d76a..c50f2de5e7d 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -840,7 +840,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), &err_ptr, &err_len); if (err_len) { - strmake(buff, err_ptr, min(sizeof(buff), err_len)); + strmake(buff, err_ptr, min(sizeof(buff) - 1, err_len)); fprintf(stderr, "Invalid mode to --compatible: %s\n", buff); exit(1); } @@ -4630,7 +4630,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length, for (; pos != end && *pos != ','; pos++) ; var_len= (uint) (pos - start); - strmake(buff, start, min(sizeof(buff), var_len)); + strmake(buff, start, min(sizeof(buff) - 1, var_len)); find= find_type(buff, lib, var_len); if (!find) { |