summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-10-04 08:24:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-10-04 08:24:06 +0300
commit2c1067166d7e8a9541578220b408f1e553e23916 (patch)
tree2ba0932f92d88e01d51393de63dda842f6daf320 /extra
parent2cf3e2ea2fca3d3613309de94d55c88dedb3831a (diff)
parent61b2618d3aae78950f1b8dbe8d4482573c77875d (diff)
downloadmariadb-git-2c1067166d7e8a9541578220b408f1e553e23916.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'extra')
-rw-r--r--extra/innochecksum.cc8
-rw-r--r--extra/mariabackup/xbstream.c6
-rw-r--r--extra/mariabackup/xtrabackup.cc8
-rw-r--r--extra/yassl/taocrypt/src/algebra.cpp4
4 files changed, 13 insertions, 13 deletions
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc
index a0976970db7..b937cc6fa1a 100644
--- a/extra/innochecksum.cc
+++ b/extra/innochecksum.cc
@@ -93,7 +93,7 @@ static bool use_end_page;
static bool do_one_page;
static my_bool do_leaf;
static my_bool per_page_details;
-static ulong n_merge;
+static ulint n_merge;
extern ulong srv_checksum_algorithm;
static ulong physical_page_size; /* Page size in bytes on disk. */
static ulong logical_page_size; /* Page size when uncompressed. */
@@ -524,7 +524,7 @@ is_page_corrupted(
normal method. */
if (is_encrypted && key_version != 0) {
is_corrupted = !fil_space_verify_crypt_checksum(buf,
- page_size, space_id, cur_page_num);
+ page_size, space_id, (ulint)cur_page_num);
} else {
is_corrupted = true;
}
@@ -1538,7 +1538,7 @@ int main(
byte* buf = NULL;
byte* xdes = NULL;
/* bytes read count */
- ulong bytes;
+ ulint bytes;
/* current time */
time_t now;
/* last time */
@@ -1675,7 +1675,7 @@ int main(
}
/* Read the minimum page size. */
- bytes = ulong(fread(buf, 1, UNIV_ZIP_SIZE_MIN, fil_in));
+ bytes = fread(buf, 1, UNIV_ZIP_SIZE_MIN, fil_in);
partial_page_read = true;
if (bytes != UNIV_ZIP_SIZE_MIN) {
diff --git a/extra/mariabackup/xbstream.c b/extra/mariabackup/xbstream.c
index 65257664e54..03bd2fda646 100644
--- a/extra/mariabackup/xbstream.c
+++ b/extra/mariabackup/xbstream.c
@@ -531,8 +531,8 @@ mode_extract(int n_threads, int argc __attribute__((unused)),
ctxt.ds_ctxt = ds_ctxt;
ctxt.mutex = &mutex;
- tids = malloc(sizeof(pthread_t) * n_threads);
- retvals = malloc(sizeof(void*) * n_threads);
+ tids = calloc(n_threads, sizeof(pthread_t));
+ retvals = calloc(n_threads, sizeof(void*));
for (i = 0; i < n_threads; i++)
pthread_create(tids + i, NULL, extract_worker_thread_func,
@@ -542,7 +542,7 @@ mode_extract(int n_threads, int argc __attribute__((unused)),
pthread_join(tids[i], retvals + i);
for (i = 0; i < n_threads; i++) {
- if ((ulong)retvals[i] == XB_STREAM_READ_ERROR) {
+ if ((size_t)retvals[i] == XB_STREAM_READ_ERROR) {
ret = 1;
goto exit;
}
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 5c1584d0a86..c6009fc7014 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -1857,9 +1857,9 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
MY_STAT mystat;
snprintf(buf, sizeof(buf),
- "page_size = %lu\n"
- "zip_size = %lu\n"
- "space_id = %lu\n",
+ "page_size = " ULINTPF "\n"
+ "zip_size = " ULINTPF " \n"
+ "space_id = " ULINTPF "\n",
info->page_size.logical(),
info->page_size.is_compressed()
? info->page_size.physical() : 0,
@@ -4172,7 +4172,7 @@ exit:
char tmpname[FN_REFLEN];
- snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%lu",
+ snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#" ULINTPF,
dbname, fil_space->id);
msg("xtrabackup: Renaming %s to %s.ibd\n",
diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp
index 7dae7d6a917..892de25587e 100644
--- a/extra/yassl/taocrypt/src/algebra.cpp
+++ b/extra/yassl/taocrypt/src/algebra.cpp
@@ -218,7 +218,7 @@ struct WindowSlider
exp >>= skipCount;
windowBegin += skipCount;
- expWindow = exp % (1 << windowSize);
+ expWindow = (unsigned int)(exp % (1LL << windowSize));
if (fastNegate && exp.GetBit(windowSize))
{
@@ -248,7 +248,7 @@ void AbstractGroup::SimultaneousMultiply(Integer *results, const Integer &base,
{
exponents.push_back(WindowSlider(*expBegin++, InversionIsFast(), 0));
exponents[i].FindNextWindow();
- buckets[i].resize(1<<(exponents[i].windowSize-1), Identity());
+ buckets[i].resize(size_t(1)<<(exponents[i].windowSize-1), Identity());
}
unsigned int expBitPosition = 0;