summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2014-05-27 12:50:52 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2014-05-27 12:50:52 +0200
commitcd185c1468805a297056e4124ec581eac0bc858e (patch)
tree3df96e375b3043a7f8e8ca75b1ea1ebb2c18dcfc /storage
parent8b7c7b9280a9d9a16cf7b97fb36e73cdc41c3759 (diff)
downloadmariadb-git-cd185c1468805a297056e4124ec581eac0bc858e.tar.gz
- Fix a bug causing the tabname option to be ignored when the connection
string was not an URL but a server name. Also make the dbname option to be recignized in create (was only seached in option_list) modified: storage/connect/ha_connect.cc storage/connect/tabmysql.cpp
Diffstat (limited to 'storage')
-rw-r--r--storage/connect/ha_connect.cc6
-rw-r--r--storage/connect/tabmysql.cpp3
2 files changed, 2 insertions, 7 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 9425e3a2727..76cb0c5c62a 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -4238,7 +4238,6 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
strncpy(dsn, create_info->connect_string.str, len);
dsn[len]= 0;
mydef->SetName(create_info->alias);
- mydef->SetCat(cat);
if (!mydef->ParseURL(g, dsn, false)) {
if (mydef->GetHostname())
@@ -4695,21 +4694,18 @@ int ha_connect::create(const char *name, TABLE *table_arg,
int port;
host= GetListOption(g, "host", options->oplist, NULL);
- db= GetListOption(g, "database", options->oplist, NULL);
+ db= GetStringOption("database", NULL);
port= atoi(GetListOption(g, "port", options->oplist, "0"));
if (create_info->connect_string.str) {
char *dsn;
int len= create_info->connect_string.length;
PMYDEF mydef= new(g) MYSQLDEF();
- PDBUSER dup= PlgGetUser(g);
- PCATLG cat= (dup) ? dup->Catalog : NULL;
dsn= (char*)PlugSubAlloc(g, NULL, len + 1);
strncpy(dsn, create_info->connect_string.str, len);
dsn[len]= 0;
mydef->SetName(create_info->alias);
- mydef->SetCat(cat);
if (!mydef->ParseURL(g, dsn, false)) {
if (mydef->GetHostname())
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp
index dea6978f73e..37c72501840 100644
--- a/storage/connect/tabmysql.cpp
+++ b/storage/connect/tabmysql.cpp
@@ -191,8 +191,7 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url, bool b)
} else
// Otherwise, straight server name,
- // use tablename of federatedx table as remote table name
- Tabname= Name;
+ Tabname = (b) ? GetStringCatInfo(g, "Tabname", Name) : NULL;
if (trace)
htrc("server: %s Tabname: %s", url, Tabname);