summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-08-14 12:42:14 -0700
committerIgor Babaev <igor@askmonty.org>2012-08-14 12:42:14 -0700
commit822e5da0d069e6567713464e7492097fab33e55d (patch)
treeacfd13bd545ee4d5fe2209922827588be09b6e42 /sql/sql_show.cc
parent3116e3ad6164c96edc2a27c3438f325c4dc464f3 (diff)
parent7cc2f8decabe83fb304458748ba907f011848309 (diff)
downloadmariadb-git-822e5da0d069e6567713464e7492097fab33e55d.tar.gz
Merge 5.5->5.5-mwl248
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index ad3c3b1c303..38ff07e0204 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3225,9 +3225,12 @@ int make_db_list(THD *thd, List<LEX_STRING> *files,
/*
If we have db lookup vaule we just add it to list and
- exit from the function
+ exit from the function.
+ We don't do this for database names longer than the maximum
+ path length.
*/
- if (lookup_field_vals->db_value.str)
+ if (lookup_field_vals->db_value.str &&
+ lookup_field_vals->db_value.length < FN_REFLEN)
{
if (is_infoschema_db(lookup_field_vals->db_value.str,
lookup_field_vals->db_value.length))