From 0b20b9e91173141edda2cd5649b91bd63b61c127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 15 Aug 2019 12:53:08 +0300 Subject: [PATCH 1/4] Disable galera.query_cache as it still fails on bb and azure. --- mysql-test/suite/galera/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 90b13bd7aa4..017d8ec1380 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -30,3 +30,4 @@ galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade galera_sst_mariabackup_encrypt_with_key : MDEV-19926 Galera SST tests fail galera_wan : MDEV-17259: Test failure on galera.galera_wan partition : MDEV-19958 Galera test failure on galera.partition +query_cache: MDEV-15805 Test failure on galera.query_cache \ No newline at end of file From ec28f9532e92820f59fc7298465407069e289a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 15 Aug 2019 15:06:27 +0300 Subject: [PATCH 2/4] MDEV-19740: Fix C++11 violations caught by GCC 9.2.1 --- sql/item.h | 3 +-- sql/sql_list.h | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/sql/item.h b/sql/item.h index 49762d3326f..1229f271790 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2,7 +2,7 @@ #define SQL_ITEM_INCLUDED /* Copyright (c) 2000, 2017, Oracle and/or its affiliates. - Copyright (c) 2009, 2018, MariaDB Corporation + Copyright (c) 2009, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -651,7 +651,6 @@ class Item: public Value_source, public Type_std_attributes, public Type_handler { - void operator=(Item &); /** The index in the JOIN::join_tab array of the JOIN_TAB this Item is attached to. Items are attached (or 'pushed') to JOIN_TABs during optimization by the diff --git a/sql/sql_list.h b/sql/sql_list.h index c14ebfc00f7..a7ece69acb6 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -1,6 +1,7 @@ #ifndef INCLUDES_MYSQL_SQL_LIST_H #define INCLUDES_MYSQL_SQL_LIST_H /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -86,6 +87,14 @@ public: next= elements ? tmp.next : &first; } + SQL_I_List& operator=(const SQL_I_List &tmp) + { + elements= tmp.elements; + first= tmp.first; + next= tmp.next; + return *this; + } + inline void empty() { elements= 0; @@ -176,6 +185,13 @@ public: first == rhs.first && last == rhs.last; } + base_list& operator=(const base_list &rhs) + { + elements= rhs.elements; + first= rhs.first; + last= elements ? rhs.last : &first; + return *this; + } inline void empty() { elements=0; first= &end_of_list; last=&first;} inline base_list() { empty(); } @@ -190,9 +206,7 @@ public: */ inline base_list(const base_list &tmp) :Sql_alloc() { - elements= tmp.elements; - first= tmp.first; - last= elements ? tmp.last : &first; + *this= tmp; } /** Construct a deep copy of the argument in memory root mem_root. @@ -202,7 +216,7 @@ public: */ bool copy(const base_list *rhs, MEM_ROOT *mem_root); base_list(const base_list &rhs, MEM_ROOT *mem_root) { copy(&rhs, mem_root); } - inline base_list(bool error) { } + inline base_list(bool) {} inline bool push_back(void *info) { if (((*last)=new list_node(info, &end_of_list))) @@ -523,7 +537,6 @@ template class List :public base_list { public: inline List() :base_list() {} - inline List(const List &tmp) :base_list(tmp) {} inline List(const List &tmp, MEM_ROOT *mem_root) : base_list(tmp, mem_root) {} inline bool push_back(T *a) { return base_list::push_back(a); } From d07936aabadc99be885d6fed24d309e4611887c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 15 Aug 2019 15:29:03 +0300 Subject: [PATCH 3/4] MDEV-19740: Silence a bogus "may be uninitialized" warning --- extra/innochecksum.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index a1ec663ee1a..4dca6572434 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -1590,10 +1590,8 @@ int main( byte* xdes = NULL; /* bytes read count */ ulint bytes; - /* current time */ - time_t now; /* last time */ - time_t lastt; + time_t lastt = 0; /* stat, to get file size. */ #ifdef _WIN32 struct _stat64 st; @@ -1946,7 +1944,6 @@ int main( /* main checksumming loop */ cur_page_num = start_page ? start_page : cur_page_num + 1; - lastt = 0; while (!feof(fil_in)) { bytes = read_file(buf, partial_page_read, @@ -2026,12 +2023,10 @@ first_non_zero: if (verbose && !read_from_stdin) { if ((cur_page_num % 64) == 0) { - now = time(0); + time_t now = time(0); if (!lastt) { lastt= now; - } - if (now - lastt >= 1 - && is_log_enabled) { + } else if (now - lastt >= 1 && is_log_enabled) { fprintf(log_file, "page::%llu " "okay: %.3f%% done\n", (cur_page_num - 1), From 112589cdeda90b20e015e495912fe7d4dd85c0d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 15 Aug 2019 15:29:32 +0300 Subject: [PATCH 4/4] MDEV-19740: Remove a bogus condition This triggered a "may be uninitialized" warning from GCC 9.2.1. The bogus-looking condition was added in 7e916bb86f512ff79f30d809b813608a625ec5ba --- storage/innobase/row/row0sel.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index d5b1a596f01..6b3542e7aa3 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -5726,9 +5726,7 @@ lock_wait_or_error: /*-------------------------------------------------------------*/ if (!dict_index_is_spatial(index)) { - if (rec) { - btr_pcur_store_position(pcur, &mtr); - } + btr_pcur_store_position(pcur, &mtr); } lock_table_wait: