Commit 23e94150 authored by unknown's avatar unknown

Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT

This will hopefully avoiid annoying crashes when running with --debug
Fix warnings  from the above in mysqltest.c


client/mysqltest.c:
  Fix format specifier warnings in mysqltest.c
include/my_dbug.h:
  Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT
  This will hopefully avoiid annoying crashes when running with --debug
parent f371303e
......@@ -890,7 +890,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
die(NullS);
if (!eval_result && (uint) stat_info.st_size != ds->length)
{
DBUG_PRINT("info",("Size differs: result size: %u file size: %u",
DBUG_PRINT("info",("Size differs: result size: %u file size: %llu",
ds->length, stat_info.st_size));
DBUG_PRINT("info",("result: '%s'", ds->str));
DBUG_RETURN(RESULT_LENGTH_MISMATCH);
......@@ -2558,7 +2558,7 @@ void do_get_errcodes(struct st_command *command)
*to_ptr= 0;
to->type= ERR_SQLSTATE;
DBUG_PRINT("info", ("ERR_SQLSTATE: %d", to->code.sqlstate));
DBUG_PRINT("info", ("ERR_SQLSTATE: %s", to->code.sqlstate));
}
else if (*p == 's')
{
......@@ -4317,7 +4317,7 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
bind[i].is_null= &is_null[i];
bind[i].length= &length[i];
DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %d",
DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %lu",
i, bind[i].buffer_type, bind[i].buffer_length));
}
......@@ -7267,5 +7267,3 @@ void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val)
char *end= longlong10_to_str(val, buff, 10);
replace_dynstr_append_mem(ds, buff, end - buff);
}
......@@ -35,7 +35,8 @@ extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
uint *_slevel_);
extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_doprnt_ _VARARGS((const char *format,...))
ATTRIBUTE_FORMAT(printf, 1, 2);
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
uint length);
extern void _db_output_();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment