summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 14c51a0de91..7b67a07d9a6 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -312,7 +312,8 @@ LEX_CUSTRING build_frm_image(THD *thd, const char *table,
pos+= reclength;
int2store(pos, create_info->connect_string.length);
pos+= 2;
- memcpy(pos, create_info->connect_string.str, create_info->connect_string.length);
+ if (create_info->connect_string.length)
+ memcpy(pos, create_info->connect_string.str, create_info->connect_string.length);
pos+= create_info->connect_string.length;
int2store(pos, str_db_type.length);
pos+= 2;