Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6c8627de
Commit
6c8627de
authored
Oct 02, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a valgrind warning with the fix for bug 28702.
parent
a9030325
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
sql/sql_select.cc
sql/sql_select.cc
+10
-2
No files found.
sql/sql_select.cc
View file @
6c8627de
...
@@ -15493,6 +15493,7 @@ TABLE_LIST::print_index_hint(THD *thd, String *str,
...
@@ -15493,6 +15493,7 @@ TABLE_LIST::print_index_hint(THD *thd, String *str,
List_iterator_fast
<
String
>
li
(
indexes
);
List_iterator_fast
<
String
>
li
(
indexes
);
String
*
idx
;
String
*
idx
;
bool
first
=
1
;
bool
first
=
1
;
int
find_length
=
strlen
(
primary_key_name
);
str
->
append
(
' '
);
str
->
append
(
' '
);
str
->
append
(
hint
,
hint_length
);
str
->
append
(
hint
,
hint_length
);
...
@@ -15503,8 +15504,15 @@ TABLE_LIST::print_index_hint(THD *thd, String *str,
...
@@ -15503,8 +15504,15 @@ TABLE_LIST::print_index_hint(THD *thd, String *str,
first
=
0
;
first
=
0
;
else
else
str
->
append
(
','
);
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
);
str
->
append
(
primary_key_name
);
else
else
append_identifier
(
thd
,
str
,
idx
->
ptr
(),
idx
->
length
());
append_identifier
(
thd
,
str
,
idx
->
ptr
(),
idx
->
length
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment