Skip to content

Commit 8345597

Browse files
committed
- Fix MDEV-9844, MDEV-10179, MDEV-14214
This is done by removing the tbl table type THREAD option that causes a multiple of sporadic bugs. This may be temporary depending on whether a real fix is found. modified: storage/connect/mysql-test/connect/disabled.def modified: storage/connect/tabtbl.cpp modified: storage/connect/tabtbl.h
1 parent 341a360 commit 8345597

File tree

3 files changed

+41
-30
lines changed

3 files changed

+41
-30
lines changed

storage/connect/mysql-test/connect/disabled.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ json_java_3 : Need MongoDB running and its Java Driver installed
1919
mongo_c : Need MongoDB running and its C Driver installed
2020
mongo_java_2 : Need MongoDB running and its Java Driver installed
2121
mongo_java_3 : Need MongoDB running and its Java Driver installed
22+
tbl_thread : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed

storage/connect/tabtbl.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
/************* TabTbl C++ Program Source Code File (.CPP) **************/
22
/* PROGRAM NAME: TABTBL */
33
/* ------------- */
4-
/* Version 1.8 */
4+
/* Version 1.9 */
55
/* */
6-
/* COPYRIGHT: */
7-
/* ---------- */
8-
/* (C) Copyright to PlugDB Software Development 2008-2017 */
9-
/* Author: Olivier BERTRAND */
6+
/* Author: Olivier BERTRAND 2008-2018 */
107
/* */
118
/* WHAT THIS PROGRAM DOES: */
129
/* ----------------------- */
@@ -168,9 +165,14 @@ PTDB TBLDEF::GetTable(PGLOBAL g, MODE)
168165
{
169166
if (Catfunc == FNC_COL)
170167
return new(g) TDBTBC(this);
171-
else if (Thread)
172-
return new(g) TDBTBM(this);
173-
else
168+
else if (Thread) {
169+
#if defined(DEVELOPMENT)
170+
return new(g) TDBTBM(this);
171+
#else
172+
strcpy(g->Message, "Option THREAD is no more supported");
173+
return NULL;
174+
#endif // DEVELOPMENT
175+
} else
174176
return new(g) TDBTBL(this);
175177

176178
} // end of GetTable
@@ -560,6 +562,7 @@ void TBTBLK::ReadColumn(PGLOBAL)
560562

561563
} // end of ReadColumn
562564

565+
#if defined(DEVELOPMENT)
563566
/* ------------------------- Class TDBTBM ---------------------------- */
564567

565568
/***********************************************************************/
@@ -865,5 +868,6 @@ int TDBTBM::ReadNextRemote(PGLOBAL g)
865868

866869
return RC_OK;
867870
} // end of ReadNextRemote
871+
#endif // DEVELOPMENT
868872

869873
/* ------------------------------------------------------------------- */

storage/connect/tabtbl.h

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,8 @@
1111

1212
typedef class TBLDEF *PTBLDEF;
1313
typedef class TDBTBL *PTDBTBL;
14-
typedef class TDBTBM *PTDBTBM;
1514
typedef class MYSQLC *PMYC;
1615

17-
/***********************************************************************/
18-
/* Defines the structures used for distributed TBM tables. */
19-
/***********************************************************************/
20-
typedef struct _TBMtable *PTBMT;
21-
22-
typedef struct _TBMtable {
23-
PTBMT Next; // Points to next data table struct
24-
PTABLE Tap; // Points to the sub table
25-
PGLOBAL G; // Needed in thread routine
26-
bool Complete; // TRUE when all results are read
27-
bool Ready; // TRUE when results are there
28-
int Rows; // Total number of rows read so far
29-
int ProgCur; // Current pos
30-
int ProgMax; // Max pos
31-
int Rc; // Return code
32-
THD *Thd;
33-
pthread_attr_t attr; // ???
34-
pthread_t Tid; // CheckOpen thread ID
35-
} TBMT;
36-
3716
/***********************************************************************/
3817
/* TBL table. */
3918
/***********************************************************************/
@@ -123,7 +102,33 @@ class TBTBLK : public TIDBLK {
123102

124103
protected:
125104
// Must not have additional members
126-
}; // end of class TBTBLK
105+
}; // end of class TBTBLK
106+
107+
#if defined(DEVELOPMENT)
108+
/***********************************************************************/
109+
/* This table type is buggy and removed until a fix is found. */
110+
/***********************************************************************/
111+
typedef class TDBTBM *PTDBTBM;
112+
113+
/***********************************************************************/
114+
/* Defines the structures used for distributed TBM tables. */
115+
/***********************************************************************/
116+
typedef struct _TBMtable *PTBMT;
117+
118+
typedef struct _TBMtable {
119+
PTBMT Next; // Points to next data table struct
120+
PTABLE Tap; // Points to the sub table
121+
PGLOBAL G; // Needed in thread routine
122+
bool Complete; // TRUE when all results are read
123+
bool Ready; // TRUE when results are there
124+
int Rows; // Total number of rows read so far
125+
int ProgCur; // Current pos
126+
int ProgMax; // Max pos
127+
int Rc; // Return code
128+
THD *Thd;
129+
pthread_attr_t attr; // ???
130+
pthread_t Tid; // CheckOpen thread ID
131+
} TBMT;
127132

128133
/***********************************************************************/
129134
/* This is the TBM Access Method class declaration. */
@@ -160,3 +165,4 @@ class DllExport TDBTBM : public TDBTBL {
160165
}; // end of class TDBTBM
161166

162167
pthread_handler_t ThreadOpen(void *p);
168+
#endif // DEVELOPMENT

0 commit comments

Comments
 (0)