~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

  • Committer: Monty Taylor
  • Date: 2011-02-20 10:23:17 UTC
  • mto: This revision was merged to the branch mainline in revision 2190.
  • Revision ID: mordred@inaugust.com-20110220102317-ycs07rugu0xzfe6w
Make boolean return as tinyint through the mysql_protocol, so that php and
python connectors don't break.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4697
4697
    for (i = 0; i < num_fields; i++)
4698
4698
    {
4699
4699
      column= drizzle_column_next(res);
4700
 
      append_field(ds, i, column,
4701
 
                   (const char*)row[i], lengths[i], !row[i]);
 
4700
      if (row[i] && (drizzle_column_type(column) == DRIZZLE_COLUMN_TYPE_TINY))
 
4701
      {
 
4702
        if (boost::lexical_cast<uint32_t>(row[i]))
 
4703
        {
 
4704
          append_field(ds, i, column, "YES", 3, false);
 
4705
        }
 
4706
        else
 
4707
        {
 
4708
          append_field(ds, i, column, "NO", 2, false);
 
4709
        }
 
4710
      }
 
4711
      else
 
4712
      {
 
4713
        append_field(ds, i, column,
 
4714
                     (const char*)row[i], lengths[i], !row[i]);
 
4715
      }
4702
4716
    }
4703
4717
    if (!display_result_vertically)
4704
4718
      ds->append("\n");