Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-03-05 11:23:58-05:00, cmiller@stripped +1 -0
Bug#34726: open_tables() crashes server if running with --debug
The DBUG code emits the current value of the proc_info member of THD,
which may be set to NULL. It was wrong to dereference that value
with the format string %s without verifying that it was valid.
Now, insert an inline test that substitutes the string "(null)" for
NULL pointers.
sql/sql_class.cc@stripped, 2008-03-05 11:23:55-05:00, cmiller@stripped +2 -1
Dereferencing a NULL is illegal (though not fatal for %s on some
platforms), and we have no assurance that the caller didn't call us
with a valid string.
diff -Nrup a/sql/sql_class.cc b/sql/sql_class.cc
--- a/sql/sql_class.cc 2008-01-22 17:45:42 -05:00
+++ b/sql/sql_class.cc 2008-03-05 11:23:55 -05:00
@@ -253,7 +253,8 @@ const char *set_thd_proc_info(THD *thd,
const unsigned int calling_line)
{
const char *old_info= thd->proc_info;
- DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line, info));
+ DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line,
+ (info != NULL) ? info : "(null)"));
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.status_change(info, calling_function, calling_file, calling_line);
#endif
| Thread |
|---|
| • bk commit into 5.1 tree (cmiller:1.2523) BUG#34726 | Chad MILLER | 5 Mar |