Skip to content

Commit 2ddea60

Browse files
committed
Merge branch '10.2' into 10.3
2 parents 1203b65 + b3cdf41 commit 2ddea60

File tree

7 files changed

+35
-19
lines changed

7 files changed

+35
-19
lines changed

sql/threadpool_generic.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,9 +1787,9 @@ static void print_pool_blocked_message(bool max_threads_reached)
17871787
if (now > pool_block_start + BLOCK_MSG_DELAY && !msg_written)
17881788
{
17891789
if (max_threads_reached)
1790-
sql_print_error(MAX_THREADS_REACHED_MSG);
1790+
sql_print_warning(MAX_THREADS_REACHED_MSG);
17911791
else
1792-
sql_print_error(CREATE_THREAD_ERROR_MSG, my_errno);
1792+
sql_print_warning(CREATE_THREAD_ERROR_MSG, my_errno);
17931793

17941794
sql_print_information("Threadpool has been blocked for %u seconds\n",
17951795
(uint)((now- pool_block_start)/1000000));

storage/connect/colblk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*************** Colblk H Declares Source Code File (.H) ***************/
22
/* Name: COLBLK.H Version 1.7 */
33
/* */
4-
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
4+
/* (C) Copyright to the author Olivier BERTRAND 2005-2019 */
55
/* */
66
/* This file contains the COLBLK and derived classes declares. */
77
/***********************************************************************/
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
let $MONGO= C:/Applic/MongoDB/Server/3.6/bin/mongo;
2-
let $MONGOIMPORT= C:/Applic/MongoDB/Server/3.6/bin/mongoimport;
1+
#let $MONGO= C:/Applic/MongoDB/Server/3.6/bin/mongo;
2+
#let $MONGOIMPORT= C:/Applic/MongoDB/Server/3.6/bin/mongoimport;
3+
let $MONGO= mongo;
4+
let $MONGOIMPORT= mongoimport;
5+
6+
7+
8+
9+
10+
311

storage/connect/odbconn.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/***********************************************************************/
2-
/* Name: ODBCONN.CPP Version 2.3 */
2+
/* Name: ODBCONN.CPP Version 2.4 */
33
/* */
4-
/* (C) Copyright to the author Olivier BERTRAND 1998-2017 */
4+
/* (C) Copyright to the author Olivier BERTRAND 1998-2021 */
55
/* */
66
/* This file contains the ODBC connection classes functions. */
77
/***********************************************************************/
@@ -1509,7 +1509,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
15091509
ThrowDBX(MSG(COL_NUM_MISM));
15101510

15111511
// Now bind the column buffers
1512-
for (n = 1, colp = tocols; colp; colp = (PODBCCOL)colp->GetNext())
1512+
for (colp = tocols; colp; colp = (PODBCCOL)colp->GetNext())
15131513
if (!colp->IsSpecial()) {
15141514
buffer = colp->GetBuffer(m_RowsetSize);
15151515
len = colp->GetBuflen();
@@ -1525,12 +1525,11 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
15251525
htrc("Binding col=%u type=%d buf=%p len=%d slen=%p\n",
15261526
n, tp, buffer, len, colp->GetStrLen());
15271527

1528-
rc = SQLBindCol(hstmt, n, tp, buffer, len, colp->GetStrLen());
1528+
rc = SQLBindCol(hstmt, colp->GetIndex(), tp, buffer, len, colp->GetStrLen());
15291529

15301530
if (!Check(rc))
15311531
ThrowDBX(rc, "SQLBindCol", hstmt);
15321532

1533-
n++;
15341533
} // endif pcol
15351534

15361535
} catch(DBX *x) {

storage/connect/tabbson.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ int BSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
376376
} // endswitch ReadDB
377377

378378
} else
379-
jsp = bp->GetArrayValue(bdp, i);
379+
jsp = bp->GetNext(jsp);
380380

381381
if (!(row = (jsp) ? bp->GetObject(jsp) : NULL))
382382
break;
@@ -2185,15 +2185,19 @@ void BSONCOL::WriteColumn(PGLOBAL g)
21852185
TDBBSON::TDBBSON(PGLOBAL g, PBDEF tdp, PTXF txfp) : TDBBSN(g, tdp, txfp)
21862186
{
21872187
Docp = NULL;
2188+
Docrow = NULL;
21882189
Multiple = tdp->Multiple;
2190+
Docsize = 0;
21892191
Done = Changed = false;
21902192
Bp->SetPretty(2);
21912193
} // end of TDBBSON standard constructor
21922194

21932195
TDBBSON::TDBBSON(PBTDB tdbp) : TDBBSN(tdbp)
21942196
{
21952197
Docp = tdbp->Docp;
2198+
Docrow = tdbp->Docrow;
21962199
Multiple = tdbp->Multiple;
2200+
Docsize = tdbp->Docsize;
21972201
Done = tdbp->Done;
21982202
Changed = tdbp->Changed;
21992203
} // end of TDBBSON copy constructor
@@ -2374,6 +2378,7 @@ int TDBBSON::MakeDocument(PGLOBAL g)
23742378

23752379
} // endif jsp
23762380

2381+
Docsize = Bp->GetSize(Docp);
23772382
Done = true;
23782383
return RC_OK;
23792384
} // end of MakeDocument
@@ -2388,7 +2393,7 @@ int TDBBSON::Cardinality(PGLOBAL g)
23882393
else if (Cardinal < 0) {
23892394
if (!Multiple) {
23902395
if (MakeDocument(g) == RC_OK)
2391-
Cardinal = Bp->GetSize(Docp);
2396+
Cardinal = Docsize;
23922397

23932398
} else
23942399
return 10;
@@ -2417,6 +2422,7 @@ void TDBBSON::ResetSize(void)
24172422
MaxSize = Cardinal = -1;
24182423
Fpos = -1;
24192424
N = 0;
2425+
Docrow = NULL;
24202426
Done = false;
24212427
} // end of ResetSize
24222428

@@ -2475,6 +2481,7 @@ bool TDBBSON::SetRecpos(PGLOBAL, int recpos)
24752481
#endif // 0
24762482

24772483
Fpos = recpos - 1;
2484+
Docrow = NULL;
24782485
return false;
24792486
} // end of SetRecpos
24802487

@@ -2490,6 +2497,7 @@ bool TDBBSON::OpenDB(PGLOBAL g)
24902497
Fpos = -1;
24912498
NextSame = false;
24922499
SameRow = 0;
2500+
Docrow = NULL;
24932501
return false;
24942502
} // endif use
24952503

@@ -2530,12 +2538,9 @@ int TDBBSON::ReadDB(PGLOBAL)
25302538
NextSame = false;
25312539
M++;
25322540
rc = RC_OK;
2533-
} else if (++Fpos < (signed)Bp->GetSize(Docp)) {
2534-
Row = Bp->GetArrayValue(Docp, Fpos);
2535-
2536-
if (Row->Type == TYPE_JVAL)
2537-
Row = Bp->GetBson(Row);
2538-
2541+
} else if (++Fpos < Docsize) {
2542+
Docrow = (Docrow) ? Bp->GetNext(Docrow) : Bp->GetArrayValue(Docp, Fpos);
2543+
Row = (Docrow->Type == TYPE_JVAL) ? Bp->GetBson(Docrow) : Docrow;
25392544
SameRow = 0;
25402545
M = 1;
25412546
rc = RC_OK;

storage/connect/tabbson.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ class DllExport TDBBSON : public TDBBSN {
318318

319319
// Members
320320
PBVAL Docp; // The document array
321+
PBVAL Docrow; // Document row
321322
int Multiple; // 0: No 1: DIR 2: Section 3: filelist
323+
int Docsize; // The document size
322324
bool Done; // True when document parsing is done
323325
bool Changed; // After Update, Insert or Delete
324326
}; // end of class TDBBSON

storage/tokudb/PerconaFT/portability/toku_pthread.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
5555
#include <toku_pthread.h>
5656

5757
int toku_pthread_yield(void) {
58-
#if defined(HAVE_PTHREAD_YIELD)
58+
#if defined(HAVE_SCHED_YIELD)
59+
return sched_yield();
60+
#elif defined(HAVE_PTHREAD_YIELD)
5961
# if defined(PTHREAD_YIELD_RETURNS_INT)
6062
return pthread_yield();
6163
# elif defined(PTHREAD_YIELD_RETURNS_VOID)

0 commit comments

Comments
 (0)