1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -56,6 +56,15 @@
extern "C" int trace;
/************************************************************************/
/* Used by MYSQL tables to get MySQL parameters from the calling proxy */
/* table (PROXY, TBL, XCL, or OCCUR) when used by one of these. */
/************************************************************************/
void Remove_tshp(PCATLG cat)
{
((MYCAT*)cat)->GetHandler()->tshp = NULL;
} // end of Remove_thsp
/************************************************************************/
/* GetTableShare: allocates and open a table share. */
/************************************************************************/
@ -315,7 +324,7 @@ PTDB TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp)
if (mysql) {
#if defined(MYSQL_SUPPORT)
// Access sub-table via MySQL API
if (!(tdbp= cat->GetTable(g, tabp, MODE_READ, "MYSQL"))) {
if (!(tdbp= cat->GetTable(g, tabp, MODE_READ, "MYPRX"))) {
sprintf(g->Message, "Cannot access %s.%s", db, name);
goto err;
} // endif Define