1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Fix connect string wrongly used when zero length

modified:
  storage/connect/tabmysql.cpp
This commit is contained in:
Olivier Bertrand
2013-02-22 18:32:47 +01:00
parent b535cb9874
commit ebc8a6ef0c

View File

@@ -271,11 +271,11 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url)
/***********************************************************************/ /***********************************************************************/
bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
{ {
char *url; char *url = Cat->GetStringCatInfo(g, Name, "Connect", NULL);
Desc = "MySQL Table"; Desc = "MySQL Table";
if (!(url = Cat->GetStringCatInfo(g, Name, "Connect", NULL))) { if (!url || !*url) {
// Not using the connection URL // Not using the connection URL
Hostname = Cat->GetStringCatInfo(g, Name, "Host", "localhost"); Hostname = Cat->GetStringCatInfo(g, Name, "Host", "localhost");
Database = Cat->GetStringCatInfo(g, Name, "Database", "*"); Database = Cat->GetStringCatInfo(g, Name, "Database", "*");