From ebc8a6ef0c5e6bcd3ab6d26ea1657773f12e20a1 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Fri, 22 Feb 2013 18:32:47 +0100 Subject: [PATCH] - Fix connect string wrongly used when zero length modified: storage/connect/tabmysql.cpp --- storage/connect/tabmysql.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index 35a584938ad..8111bc95265 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -271,11 +271,11 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url) /***********************************************************************/ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) { - char *url; + char *url = Cat->GetStringCatInfo(g, Name, "Connect", NULL); Desc = "MySQL Table"; - if (!(url = Cat->GetStringCatInfo(g, Name, "Connect", NULL))) { + if (!url || !*url) { // Not using the connection URL Hostname = Cat->GetStringCatInfo(g, Name, "Host", "localhost"); Database = Cat->GetStringCatInfo(g, Name, "Database", "*");