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:
@@ -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", "*");
|
||||||
|
Reference in New Issue
Block a user