~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Monty Taylor
  • Date: 2008-08-10 06:11:44 UTC
  • mto: (312.1.3 translations)
  • mto: This revision was merged to the branch mainline in revision 295.
  • Revision ID: monty@inaugust.com-20080810061144-llnyqeju5zckd6pw
Oy. Replaced max and min macros with std::max and std::min so that we get
strong typing. And, then, cast things in the right direction...

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
const char *VER= "14.14";
58
58
 
59
59
/* Don't try to make a nice table if the data is too big */
60
 
#define MAX_COLUMN_LENGTH       1024
 
60
#define MAX_COLUMN_LENGTH       (uint32_t)1024
61
61
 
62
62
/* Buffer to hold 'version' and 'version_comment' */
63
63
#define MAX_SERVER_VERSION_LENGTH     128
2979
2979
  separator.append("+");
2980
2980
  while ((field = drizzle_fetch_field(result)))
2981
2981
  {
2982
 
    uint length= column_names ? field->name_length : 0;
 
2982
    uint32_t length= column_names ? field->name_length : 0;
2983
2983
    if (quick)
2984
2984
      length=max(length,field->length);
2985
2985
    else
3005
3005
      uint numcells= charset_info->cset->numcells(charset_info,
3006
3006
                                                  field->name,
3007
3007
                                                  field->name + name_length);
3008
 
      uint display_length= field->max_length + name_length - numcells;
 
3008
      uint32_t display_length= field->max_length + name_length - numcells;
3009
3009
      tee_fprintf(PAGER, " %-*s |",(int) min(display_length,
3010
3010
                                             MAX_COLUMN_LENGTH),
3011
3011
                  field->name);