1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #49130 Running mtr tests with valgrind and debug produces lots of warnings

Use safe output formats for strings that are not null terminated.


sql/item_func.cc:
  Use "%*.s" rather than "%s" format.
sql/protocol.cc:
  Use "%*.s" rather than "%s" format.
sql/sql_test.cc:
  Improve output from print_where()
   - output (nil) predicate if predicate is null
   - also output pointer value, for tracing of assignment and copying of predicates
sql/sql_view.cc:
  Use "%*.s" rather than "%s" format.
This commit is contained in:
Tor Didriksen
2009-12-02 11:00:44 +01:00
parent 987e146604
commit e22de3a3f2
4 changed files with 15 additions and 15 deletions

View File

@ -819,7 +819,8 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
thd->variables.sql_mode|= sql_mode;
}
DBUG_PRINT("info", ("View: %s", view_query.ptr()));
DBUG_PRINT("info",
("View: %*.s", (int) view_query.length(), view_query.ptr()));
/* fill structure */
view->source= thd->lex->create_view_select;