summaryrefslogtreecommitdiff
path: root/storage/connect/tabtbl.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2018-01-30 15:43:20 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2018-01-30 15:43:20 +0100
commit5abdd20ca99101b772f1628dbd399c99294cda8e (patch)
treef27fa0294444e0c49898cb9bad3b3a228ad96518 /storage/connect/tabtbl.cpp
parentfc2d79480971645661b7debb7d0a21f515754b8d (diff)
downloadmariadb-git-5abdd20ca99101b772f1628dbd399c99294cda8e.tar.gz
- Use delayed load for the MongoDB C Drive on Windows
modified: storage/connect/CMakeLists.txt modified: storage/connect/cmgoconn.cpp modified: storage/connect/ha_connect.cc - Add FORCE to the connect_type_conv enum values This will translate binary values to TYPE_STRING modified: storage/connect/checklvl.h modified: storage/connect/ha_connect.cc modified: storage/connect/odbconn.cpp - Change the connect_xtrace variable to from int to set modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/block.h modified: storage/connect/cmgoconn.cpp modified: storage/connect/colblk.cpp modified: storage/connect/connect.cc modified: storage/connect/filamap.cpp modified: storage/connect/filamdbf.cpp modified: storage/connect/filamfix.cpp modified: storage/connect/filamgz.cpp modified: storage/connect/filamtxt.cpp modified: storage/connect/filamvct.cpp modified: storage/connect/filamzip.cpp modified: storage/connect/filter.cpp modified: storage/connect/global.h modified: storage/connect/ha_connect.cc modified: storage/connect/javaconn.cpp modified: storage/connect/jdbconn.cpp modified: storage/connect/jmgfam.cpp modified: storage/connect/jmgoconn.cpp modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/mongo.cpp modified: storage/connect/mycat.cc modified: storage/connect/myconn.cpp modified: storage/connect/odbconn.cpp modified: storage/connect/plgdbutl.cpp modified: storage/connect/plugutil.cpp modified: storage/connect/reldef.cpp modified: storage/connect/tabcol.cpp modified: storage/connect/tabdos.cpp modified: storage/connect/tabext.cpp modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjdbc.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/table.cpp modified: storage/connect/tabmul.cpp modified: storage/connect/tabmysql.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabsys.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabutil.cpp modified: storage/connect/tabvct.cpp modified: storage/connect/tabwmi.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/user_connect.cc modified: storage/connect/valblk.cpp modified: storage/connect/value.cpp modified: storage/connect/xindex.cpp - Restore connect_enable_mongo variable (but undocumented) modified: storage/connect/ha_connect.cc modified: storage/connect/mycat.cc modified: storage/connect/mysql-test/connect/r/json_java_2.result modified: storage/connect/mysql-test/connect/r/json_java_3.result modified: storage/connect/mysql-test/connect/r/json_mongo_c.result modified: storage/connect/mysql-test/connect/r/mongo_c.result modified: storage/connect/mysql-test/connect/r/mongo_java_2.result modified: storage/connect/mysql-test/connect/r/mongo_java_3.result modified: storage/connect/mysql-test/connect/r/tbl_thread.result modified: storage/connect/mysql-test/connect/t/mongo.inc modified: storage/connect/mysql-test/connect/t/mongo_test.inc modified: storage/connect/mysql-test/connect/t/tbl_thread.test
Diffstat (limited to 'storage/connect/tabtbl.cpp')
-rw-r--r--storage/connect/tabtbl.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp
index 05bf2e33878..53af28354e7 100644
--- a/storage/connect/tabtbl.cpp
+++ b/storage/connect/tabtbl.cpp
@@ -132,7 +132,7 @@ bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR, int)
tbl = new(g) XTAB(pn, def);
tbl->SetSchema(pdb);
- if (trace)
+ if (trace(1))
htrc("TBL: Name=%s db=%s\n", tbl->GetName(), tbl->GetSchema());
// Link the blocks
@@ -436,7 +436,7 @@ int TDBTBL::RowNumber(PGLOBAL g, bool b)
/***********************************************************************/
bool TDBTBL::OpenDB(PGLOBAL g)
{
- if (trace)
+ if (trace(1))
htrc("TBL OpenDB: tdbp=%p tdb=R%d use=%d key=%p mode=%d\n",
this, Tdb_No, Use, To_Key_Col, Mode);
@@ -475,7 +475,7 @@ bool TDBTBL::OpenDB(PGLOBAL g)
else if (((PPRXCOL)cp)->Init(g, NULL) && !Accept)
return TRUE;
- if (trace)
+ if (trace(1))
htrc("Opening subtable %s\n", Tdbp->GetName());
// Now we can safely open the table
@@ -530,7 +530,7 @@ int TDBTBL::ReadDB(PGLOBAL g)
else if (((PPRXCOL)cp)->Init(g, NULL) && !Accept)
return RC_FX;
- if (trace)
+ if (trace(1))
htrc("Opening subtable %s\n", Tdbp->GetName());
// Now we can safely open the table
@@ -555,7 +555,7 @@ int TDBTBL::ReadDB(PGLOBAL g)
/***********************************************************************/
void TBTBLK::ReadColumn(PGLOBAL)
{
- if (trace)
+ if (trace(1))
htrc("TBT ReadColumn: name=%s\n", Name);
Value->SetValue_psz((char*)((PTDBTBL)To_Tdb)->Tdbp->GetName());
@@ -575,27 +575,30 @@ pthread_handler_t ThreadOpen(void *p)
if (!my_thread_init()) {
set_current_thd(cmp->Thd);
- if (trace)
+ if (trace(1))
htrc("ThreadOpen: Thd=%d\n", cmp->Thd);
// Try to open the connection
- if (!cmp->Tap->GetTo_Tdb()->OpenDB(cmp->G)) {
- pthread_mutex_lock(&tblmut);
- if (trace)
+ pthread_mutex_lock(&tblmut);
+
+ if (!cmp->Tap->GetTo_Tdb()->OpenDB(cmp->G)) {
+// pthread_mutex_lock(&tblmut);
+ if (trace(1))
htrc("Table %s ready\n", cmp->Tap->GetName());
cmp->Ready = true;
- pthread_mutex_unlock(&tblmut);
+// pthread_mutex_unlock(&tblmut);
} else {
- pthread_mutex_lock(&tblmut);
- if (trace)
+// pthread_mutex_lock(&tblmut);
+ if (trace(1))
htrc("Opening %s failed\n", cmp->Tap->GetName());
cmp->Rc = RC_FX;
- pthread_mutex_unlock(&tblmut);
+// pthread_mutex_unlock(&tblmut);
} // endif OpenDB
- my_thread_end();
+ pthread_mutex_unlock(&tblmut);
+ my_thread_end();
} else
cmp->Rc = RC_FX;
@@ -672,7 +675,7 @@ bool TDBTBM::OpenTables(PGLOBAL g)
// Remove remote table from the local list
*ptabp = tabp->Next;
- if (trace)
+ if (trace(1))
htrc("=====> New remote table %s\n", tabp->GetName());
// Make the remote table block
@@ -698,7 +701,7 @@ bool TDBTBM::OpenTables(PGLOBAL g)
ptp = &tp->Next;
Nrc++; // Number of remote connections
} else {
- if (trace)
+ if (trace(1))
htrc("=====> Local table %s\n", tabp->GetName());
ptabp = &tabp->Next;
@@ -714,7 +717,7 @@ bool TDBTBM::OpenTables(PGLOBAL g)
/***********************************************************************/
bool TDBTBM::OpenDB(PGLOBAL g)
{
- if (trace)
+ if (trace(1))
htrc("TBM OpenDB: tdbp=%p tdb=R%d use=%d key=%p mode=%d\n",
this, Tdb_No, Use, To_Key_Col, Mode);
@@ -762,7 +765,7 @@ bool TDBTBM::OpenDB(PGLOBAL g)
else if (((PPRXCOL)cp)->Init(g, NULL) && !Accept)
return TRUE;
- if (trace)
+ if (trace(1))
htrc("Opening subtable %s\n", Tdbp->GetName());
// Now we can safely open the table
@@ -863,7 +866,7 @@ int TDBTBM::ReadNextRemote(PGLOBAL g)
else if (((PPRXCOL)cp)->Init(g, NULL) && !Accept)
return RC_FX;
- if (trace)
+ if (trace(1))
htrc("Reading subtable %s\n", Tdbp->GetName());
return RC_OK;