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

- Allow PROXY based tables to specify MySQL access parameters when the

object table is not a CONNECT table. This was the case in previous
  versions but was no more possible with recent changes.

modified:
  storage/connect/mycat.cc
  storage/connect/tabmysql.cpp
  storage/connect/tabutil.cpp
This commit is contained in:
Olivier Bertrand
2013-04-30 16:16:32 +02:00
parent 2a37f3e030
commit 7461d8e30c
3 changed files with 19 additions and 1 deletions

View File

@@ -65,6 +65,9 @@ void PrintResult(PGLOBAL, PSEM, PQRYRES);
extern "C" int trace;
extern MYSQL_PLUGIN_IMPORT uint mysqld_port;
// This function is located in tabutil.cpp
void Remove_tshp(PCATLG cat);
/* -------------- Implementation of the MYSQLDEF class --------------- */
/***********************************************************************/
@@ -280,6 +283,11 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Desc = "MySQL Table";
if (!stricmp(am, "MYPRX"))
// MYSQL access from a PROXY table,
// we must get parms from the calling table
Remove_tshp(Cat);
if (!url || !*url) {
// Not using the connection URL
Hostname = Cat->GetStringCatInfo(g, "Host", "localhost");