Skip to content

Commit e917188

Browse files
committed
Merge branch 'bb-10.2-wlad' into 10.2-backup-fixes
2 parents 2129eab + 2bb1923 commit e917188

File tree

13 files changed

+82
-30
lines changed

13 files changed

+82
-30
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: build-{build}~branch-{branch}
33
before_build:
44
- md %APPVEYOR_BUILD_FOLDER%\win_build
55
- cd %APPVEYOR_BUILD_FOLDER%\win_build
6-
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0 -DBISON_EXECUTABLE=C:\cygwin\bin\bison
6+
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0
77

88
build:
99
project: win_build\MySQL.sln

cmake/bison.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
2020
SET(BISON_EXECUTABLE /opt/csw/bin/bison)
2121
ENDIF()
2222
ENDIF()
23-
FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
23+
IF(WIN32)
24+
SET(BISON_PATH_HINTS
25+
HINTS
26+
C:/gnuwin32/bin
27+
C:/cygwin64/bin
28+
C:/cygwin/bin)
29+
ENDIF()
30+
FIND_PROGRAM(BISON_EXECUTABLE bison
31+
${BISON_PATH_HINTS}
32+
DOC "path to the bison executable")
2433
MARK_AS_ADVANCED(BISON_EXECUTABLE "")
2534
IF(NOT BISON_EXECUTABLE)
2635
MESSAGE("Warning: Bison executable not found in PATH")

cmake/os/Windows.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ INCLUDE (CheckCSourceRuns)
2424
INCLUDE (CheckSymbolExists)
2525
INCLUDE (CheckTypeSize)
2626

27-
# Optionally read user configuration, generated by configure.js.
28-
# This is left for backward compatibility reasons only.
29-
INCLUDE(${CMAKE_BINARY_DIR}/win/configure.data OPTIONAL)
3027

3128
# avoid running system checks by using pre-cached check results
3229
# system checks are expensive on VS since every tiny program is to be compiled in
@@ -63,6 +60,8 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
6360
ENDIF()
6461

6562
IF(MSVC)
63+
# Disable mingw based pkg-config found in Strawberry perl
64+
SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "")
6665
SET(MSVC_CRT_TYPE /MT CACHE STRING
6766
"Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)"
6867
)
@@ -156,7 +155,11 @@ IF(MSVC)
156155
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
157156
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
158157
ENDIF()
159-
158+
IF(MSVC_VERSION LESS 1910)
159+
# Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning),
160+
# removed in VS2017
161+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800")
162+
ENDIF()
160163
ENDIF()
161164

162165
# Always link with socket library

libmariadb

mysql-test/collections/buildbot_suites.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
perl mysql-test-run.pl --verbose-restart --force --suite-timeout=120 --max-test-fail=10 --retry=3 --parallel=4 --suite=^
2+
vcol,gcol,perfschema,^
23
main,^
34
innodb,^
45
plugins,^

mysql-test/mysql-test-run.pl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,16 +431,21 @@ sub main {
431431
my $num_tests= @$tests;
432432
if ( $opt_parallel eq "auto" ) {
433433
# Try to find a suitable value for number of workers
434-
my $sys_info= My::SysInfo->new();
435-
436-
$opt_parallel= $sys_info->num_cpus();
437-
for my $limit (2000, 1500, 1000, 500){
438-
$opt_parallel-- if ($sys_info->min_bogomips() < $limit);
434+
if (IS_WINDOWS)
435+
{
436+
$opt_parallel= $ENV{NUMBER_OF_PROCESSORS} || 1;
437+
}
438+
else
439+
{
440+
my $sys_info= My::SysInfo->new();
441+
$opt_parallel= $sys_info->num_cpus();
442+
for my $limit (2000, 1500, 1000, 500){
443+
$opt_parallel-- if ($sys_info->min_bogomips() < $limit);
444+
}
439445
}
440446
my $max_par= $ENV{MTR_MAX_PARALLEL} || 8;
441447
$opt_parallel= $max_par if ($opt_parallel > $max_par);
442448
$opt_parallel= $num_tests if ($opt_parallel > $num_tests);
443-
$opt_parallel= 1 if (IS_WINDOWS and $sys_info->isvm());
444449
$opt_parallel= 1 if ($opt_parallel < 1);
445450
mtr_report("Using parallel: $opt_parallel");
446451
}

mysql-test/suite/unit/suite.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ sub start_test {
4040
my $bin=$ENV{MTR_BINDIR} || '..';
4141
return "Not run for embedded server" if $::opt_embedded_server;
4242
return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake";
43-
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : "";
44-
my (@ctest_list)= `cd "$bin" && ctest $opt_vs_config --show-only --verbose`;
43+
my ($ctest_vs)= $opt_vs_config ? "-C $opt_vs_config" : "";
44+
my (@ctest_list)= `cd "$bin" && ctest $ctest_vs --show-only --verbose`;
4545
return "No ctest" if $?;
4646

4747
my ($command, %tests, $prefix);
@@ -51,7 +51,9 @@ sub start_test {
5151
$command= $';
5252
$prefix= /libmariadb/ ? 'conc_' : '';
5353
} elsif (/^ +Test +#\d+: +/) {
54-
$tests{$prefix.$'}=$command;
54+
if ($command ne "NOT_AVAILABLE") {
55+
$tests{$prefix.$'}=$command;
56+
}
5557
}
5658
}
5759
bless { ctests => { %tests } };

storage/innobase/handler/ha_innodb.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15046,7 +15046,7 @@ ha_innobase::check(
1504615046
&& !dict_index_is_corrupted(index)) {
1504715047
/* Enlarge the fatal lock wait timeout during
1504815048
CHECK TABLE. */
15049-
my_atomic_addlint(
15049+
my_atomic_addlong(
1505015050
&srv_fatal_semaphore_wait_threshold,
1505115051
SRV_SEMAPHORE_WAIT_EXTENSION);
1505215052

@@ -15055,7 +15055,7 @@ ha_innobase::check(
1505515055

1505615056
/* Restore the fatal lock wait timeout after
1505715057
CHECK TABLE. */
15058-
my_atomic_addlint(
15058+
my_atomic_addlong(
1505915059
&srv_fatal_semaphore_wait_threshold,
1506015060
-SRV_SEMAPHORE_WAIT_EXTENSION);
1506115061

storage/innobase/include/buf0buf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ struct buf_block_t{
18271827
} while (0)
18281828
# define assert_block_ahi_valid(block) \
18291829
ut_a((block)->index \
1830-
|| my_atomic_addlint(&(block)->n_pointers, 0) == 0)
1830+
|| my_atomic_loadlint(&(block)->n_pointers) == 0)
18311831
# else /* UNIV_AHI_DEBUG || UNIV_DEBUG */
18321832
# define assert_block_ahi_empty(block) /* nothing */
18331833
# define assert_block_ahi_empty_on_init(block) /* nothing */

storage/innobase/include/sync0types.h

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,9 +1156,41 @@ enum rw_lock_flag_t {
11561156
#endif /* UNIV_INNOCHECKSUM */
11571157

11581158
#ifdef _WIN64
1159-
#define my_atomic_addlint(A,B) my_atomic_add64((int64*) (A), (B))
1160-
#define my_atomic_loadlint(A) my_atomic_load64((int64*) (A))
1161-
#define my_atomic_caslint(A,B,C) my_atomic_cas64((int64*) (A), (int64*) (B), (C))
1159+
static inline ulint my_atomic_addlint(ulint *A, ulint B)
1160+
{
1161+
return ulint(my_atomic_add64((volatile int64*)A, B));
1162+
}
1163+
1164+
static inline ulint my_atomic_loadlint(const ulint *A)
1165+
{
1166+
return ulint(my_atomic_load64((volatile int64*)A));
1167+
}
1168+
1169+
static inline lint my_atomic_addlint(volatile lint *A, lint B)
1170+
{
1171+
return my_atomic_add64((volatile int64*)A, B);
1172+
}
1173+
1174+
static inline lint my_atomic_loadlint(const lint *A)
1175+
{
1176+
return lint(my_atomic_load64((volatile int64*)A));
1177+
}
1178+
1179+
static inline void my_atomic_storelint(ulint *A, ulint B)
1180+
{
1181+
my_atomic_store64((volatile int64*)A, B);
1182+
}
1183+
1184+
static inline lint my_atomic_caslint(volatile lint *A, lint *B, lint C)
1185+
{
1186+
return my_atomic_cas64((volatile int64*)A, (int64 *)B, C);
1187+
}
1188+
1189+
static inline ulint my_atomic_caslint(ulint *A, ulint *B, ulint C)
1190+
{
1191+
return my_atomic_cas64((volatile int64*)A, (int64 *)B, (int64)C);
1192+
}
1193+
11621194
#else
11631195
#define my_atomic_addlint my_atomic_addlong
11641196
#define my_atomic_loadlint my_atomic_loadlong
@@ -1188,7 +1220,7 @@ struct MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) simple_counter
11881220
#pragma warning (push)
11891221
#pragma warning (disable : 4244)
11901222
#endif
1191-
return Type(my_atomic_addlint(reinterpret_cast<lint*>
1223+
return Type(my_atomic_addlint(reinterpret_cast<ulint*>
11921224
(&m_counter), i));
11931225
#ifdef _MSC_VER
11941226
#pragma warning (pop)

storage/innobase/include/trx0purge.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,9 @@ class purge_sys_t
514514
parallelized purge operation */
515515
ReadView view; /*!< The purge will not remove undo logs
516516
which are >= this view (purge view) */
517-
volatile ulint n_submitted; /*!< Count of total tasks submitted
517+
ulint n_submitted; /*!< Count of total tasks submitted
518518
to the task queue */
519-
volatile ulint n_completed; /*!< Count of total tasks completed */
519+
ulint n_completed; /*!< Count of total tasks completed */
520520

521521
/*------------------------------*/
522522
/* The following two fields form the 'purge pointer' which advances

storage/innobase/srv/srv0conc.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ struct srv_conc_t {
7878
This is no longer true. We'll, however, keep the lint datatype to add
7979
assertions to catch any corner cases that we may have missed. */
8080

81-
volatile lint n_active;
81+
ulint n_active;
8282

8383
/** Number of OS threads waiting in the FIFO for permission to
8484
enter InnoDB */
85-
volatile lint n_waiting;
85+
ulint n_waiting;
8686
};
8787

8888
/* Control variables for tracking concurrency. */
@@ -152,7 +152,7 @@ srv_conc_enter_innodb_with_atomics(
152152
return;
153153
}
154154

155-
if (srv_conc.n_active < (lint) srv_thread_concurrency) {
155+
if (srv_conc.n_active < srv_thread_concurrency) {
156156
ulint n_active;
157157

158158
/* Check if there are any free tickets. */

storage/innobase/srv/srv0srv.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2588,8 +2588,8 @@ DECLARE_THREAD(srv_worker_thread)(
25882588
slot = srv_reserve_slot(SRV_WORKER);
25892589

25902590
ut_a(srv_n_purge_threads > 1);
2591-
ut_a(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER])
2592-
< static_cast<lint>(srv_n_purge_threads));
2591+
ut_a(ulong(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER]))
2592+
< srv_n_purge_threads);
25932593

25942594
/* We need to ensure that the worker threads exit after the
25952595
purge coordinator thread. Otherwise the purge coordinator can

0 commit comments

Comments
 (0)