Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge 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, 2007-10-02 14:57:10+03:00, gkodinov@stripped +1 -0
Fixed a valgrind warning with the fix for bug 28702.
sql/sql_select.cc@stripped, 2007-10-02 14:57:09+03:00, gkodinov@stripped +10 -2
Fixed a valgrind warning with the fix for bug 28702.
diff -Nrup a/sql/sql_select.cc b/sql/sql_select.cc
--- a/sql/sql_select.cc 2007-09-29 02:27:18 +03:00
+++ b/sql/sql_select.cc 2007-10-02 14:57:09 +03:00
@@ -15493,6 +15493,7 @@ TABLE_LIST::print_index_hint(THD *thd, S
List_iterator_fast<String> li(indexes);
String *idx;
bool first= 1;
+ int find_length= strlen(primary_key_name);
str->append (' ');
str->append (hint, hint_length);
@@ -15503,8 +15504,15 @@ TABLE_LIST::print_index_hint(THD *thd, S
first= 0;
else
str->append(',');
- if (!my_strcasecmp (system_charset_info, idx->c_ptr_safe(),
- primary_key_name))
+ /*
+ It's safe to use ptr() here because we compare the length first
+ and we rely that my_strcasecmp will not access more than length()
+ chars from the string. See test_if_string_in_list() for similar
+ implementation.
+ */
+ if (find_length == idx->length() &&
+ !my_strcasecmp (system_charset_info, primary_key_name,
+ idx->ptr()))
str->append(primary_key_name);
else
append_identifier (thd, str, idx->ptr(), idx->length());
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2545) | kgeorge | 2 Oct |