~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_error.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
  {
75
75
    thd->warn_id= thd->query_id;
76
76
    free_root(&thd->warn_root,MYF(0));
77
 
    bzero((char*) thd->warn_count, sizeof(thd->warn_count));
 
77
    memset((char*) thd->warn_count, 0, sizeof(thd->warn_count));
78
78
    if (force)
79
79
      thd->total_warn_count= 0;
80
80
    thd->warn_list.empty();
196
196
  List<Item> field_list;
197
197
 
198
198
  field_list.push_back(new Item_empty_string("Level", 7));
199
 
  field_list.push_back(new Item_return_int("Code",4, MYSQL_TYPE_LONG));
 
199
  field_list.push_back(new Item_return_int("Code",4, DRIZZLE_TYPE_LONG));
200
200
  field_list.push_back(new Item_empty_string("Message",MYSQL_ERRMSG_SIZE));
201
201
 
202
202
  if (thd->protocol->send_fields(&field_list,
224
224
    protocol->prepare_for_resend();
225
225
    protocol->store(warning_level_names[err->level].str,
226
226
                    warning_level_names[err->level].length, system_charset_info);
227
 
    protocol->store((uint32) err->code);
 
227
    protocol->store((uint32_t) err->code);
228
228
    protocol->store(err->msg, strlen(err->msg), system_charset_info);
229
229
    if (protocol->write())
230
230
      return(true);