From 1f7f533144d5b78427622c8f3dd51bfc276dd12e Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sat, 30 Nov 2019 19:03:29 +0100 Subject: [PATCH 01/49] Add include in tabrest.cpp --- storage/connect/tabrest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index f9acbc28ddc..db8611eec02 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -9,7 +9,10 @@ /* Definitions needed by the included files. */ /***********************************************************************/ #if defined(MARIADB) -#include // All MariaDB stuff +#include // All MariaDB stuff +#if !defined(__WIN__) && !defined(REST_SOURCE) +#include // dlopen(), dlclose(), dlsym() ... +#endif #else // !MARIADB OEM module #include "mini-global.h" #define _MAX_PATH 260 From 65310f5855924251a5a06247bbea82cce768f834 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sun, 1 Dec 2019 00:14:24 +0100 Subject: [PATCH 02/49] in tabrest.cpp and redef.cpp --- storage/connect/reldef.cpp | 2 +- storage/connect/tabrest.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index ffe5f77661d..ebbd4d76029 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -20,7 +20,7 @@ #if defined(__WIN__) #include #else -#include // dlopen(), dlclose(), dlsym() ... +//#include // dlopen(), dlclose(), dlsym() ... #include "osutil.h" //#include "sqlext.h" #endif diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index db8611eec02..7e0d736f4e7 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -10,14 +10,14 @@ /***********************************************************************/ #if defined(MARIADB) #include // All MariaDB stuff -#if !defined(__WIN__) && !defined(REST_SOURCE) -#include // dlopen(), dlclose(), dlsym() ... -#endif #else // !MARIADB OEM module #include "mini-global.h" #define _MAX_PATH 260 #if !defined(__WIN__) #define __stdcall +#if !defined(REST_SOURCE) +#include // dlopen(), dlclose(), dlsym() ... +#endif #endif // !__WIN__ #define _OS_H_INCLUDED // Prevent os.h to be called #endif // !MARIADB From 64b1b959f15ee00daf06ffc80cc64de13b1aae53 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sun, 1 Dec 2019 01:16:23 +0100 Subject: [PATCH 03/49] comment out in tabrest.cppc --- storage/connect/tabrest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index 7e0d736f4e7..f6d21139ab0 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -15,9 +15,9 @@ #define _MAX_PATH 260 #if !defined(__WIN__) #define __stdcall -#if !defined(REST_SOURCE) -#include // dlopen(), dlclose(), dlsym() ... -#endif +//#if !defined(REST_SOURCE) +//#include // dlopen(), dlclose(), dlsym() ... +//#endif #endif // !__WIN__ #define _OS_H_INCLUDED // Prevent os.h to be called #endif // !MARIADB From 579d572d25f75d51e9ac779d8dfed5da3600b7c3 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 3 Dec 2019 18:06:05 +0100 Subject: [PATCH 04/49] Make restGetFile extern C --- storage/connect/restget.cpp | 2 ++ storage/connect/tabrest.cpp | 6 +++--- storage/connect/tabrest.h | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/storage/connect/restget.cpp b/storage/connect/restget.cpp index d85ec6ae693..29dae230780 100644 --- a/storage/connect/restget.cpp +++ b/storage/connect/restget.cpp @@ -13,6 +13,8 @@ using namespace concurrency::streams; // Asynchronous streams typedef const char* PCSZ; +extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn); + /***********************************************************************/ /* Make a local copy of the requested file. */ /***********************************************************************/ diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index f6d21139ab0..7e0d736f4e7 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -15,9 +15,9 @@ #define _MAX_PATH 260 #if !defined(__WIN__) #define __stdcall -//#if !defined(REST_SOURCE) -//#include // dlopen(), dlclose(), dlsym() ... -//#endif +#if !defined(REST_SOURCE) +#include // dlopen(), dlclose(), dlsym() ... +#endif #endif // !__WIN__ #define _OS_H_INCLUDED // Prevent os.h to be called #endif // !MARIADB diff --git a/storage/connect/tabrest.h b/storage/connect/tabrest.h index d945c97e5f1..9cf2d10a6b8 100644 --- a/storage/connect/tabrest.h +++ b/storage/connect/tabrest.h @@ -18,7 +18,9 @@ typedef int(__stdcall* XGETREST) (char*, bool, PCSZ, PCSZ, PCSZ); /* Functions used by REST. */ /***********************************************************************/ XGETREST GetRestFunction(PGLOBAL g); -int restGetFile(char* m, bool x, PCSZ http, PCSZ uri, PCSZ fn); +#if defined(REST_SOURCE) +extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn); +#endif // REST_SOURCE #if defined(MARIADB) PQRYRES RESTColumns(PGLOBAL g, PTOS tp, char* tab, char* db, bool info); #endif // !MARIADB From 817675459ace163a4cbffa7eeab06670f2942da3 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 3 Dec 2019 19:20:26 +0100 Subject: [PATCH 05/49] Fix tabrest.cpp when used for OEM --- storage/connect/tabrest.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index 7e0d736f4e7..4f12caad52e 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -1,5 +1,5 @@ -/*************** Rest C++ Program Source Code File (.CPP) **************/ -/* PROGRAM NAME: Rest Version 1.6 */ +/************** tabrest C++ Program Source Code File (.CPP) ************/ +/* PROGRAM NAME: tabrest Version 1.7 */ /* (C) Copyright to the author Olivier BERTRAND 2018 - 2019 */ /* This program is the REST Web API support for MariaDB. */ /* When compiled without MARIADB defined, it is the EOM module code. */ @@ -13,12 +13,14 @@ #else // !MARIADB OEM module #include "mini-global.h" #define _MAX_PATH 260 -#if !defined(__WIN__) -#define __stdcall #if !defined(REST_SOURCE) +#if defined(__WIN__) || defined(_WINDOWS) +#include +#else // !__WIN__ +#define __stdcall #include // dlopen(), dlclose(), dlsym() ... -#endif #endif // !__WIN__ +#endif // !REST_SOURCE #define _OS_H_INCLUDED // Prevent os.h to be called #endif // !MARIADB @@ -26,7 +28,6 @@ /* Include application header files: */ /* global.h is header containing all global declarations. */ /* plgdbsem.h is header containing the DB application declarations. */ -/* (x)table.h is header containing the TDBASE declarations. */ /***********************************************************************/ #include "global.h" #include "plgdbsem.h" @@ -76,11 +77,11 @@ XGETREST GetRestFunction(PGLOBAL g) if (getRestFnc) return getRestFnc; -#if !defined(REST_SOURCE) +#if !defined(MARIADB) || !defined(REST_SOURCE) if (trace(515)) htrc("Looking for GetRest library\n"); -#if defined(__WIN__) +#if defined(__WIN__) || defined(_WINDOWS) HANDLE Hdll; const char* soname = "GetRest.dll"; // Module name From 4692094de70031de1efbb2a354a41694f7fbbd90 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Wed, 4 Dec 2019 15:20:04 +0100 Subject: [PATCH 06/49] Fix reldef.cpp (wrong flag for catalog columns) --- storage/connect/reldef.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index ebbd4d76029..2d3c6a6aacd 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -324,11 +324,11 @@ RECFM TABDEF::GetTableFormat(const char* type) { RECFM recfm = Recfm; - if (recfm == RECFM_DFLT) { + if (Catfunc != FNC_NO) + recfm = RECFM_NAF; + else if (recfm == RECFM_DFLT) // Default format depends on the table type - TABTYPE tc = (Catfunc == FNC_NO) ? GetTypeID(type) : TAB_PRX; - - switch (tc) { + switch (GetTypeID(type)) { case TAB_DOS: recfm = RECFM_VAR; break; case TAB_CSV: recfm = RECFM_CSV; break; case TAB_FMT: recfm = RECFM_FMT; break; @@ -341,8 +341,6 @@ RECFM TABDEF::GetTableFormat(const char* type) default: recfm = RECFM_NAF; break; } // endswitch type - } // endif recfm - return recfm; } // end of GetTableFormat From b1c8bf464b91a34ca98ea667d49e3062e996d7ff Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 10 Dec 2019 16:46:32 +0100 Subject: [PATCH 07/49] Make LIKE_FUNC only for version >= 10.2 in ha_connect.cc --- storage/connect/ha_connect.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index cc9e7d1b55c..0620fd78cc2 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -2966,10 +2966,12 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GT_FUNC: vop= OP_GT; break; +#if MYSQL_VERSION_ID > 100200 case Item_func::LIKE_FUNC: vop = OP_LIKE; neg= ((Item_func_like*)condf)->negated; break; +#endif // VERSION_ID > 100200 case Item_func::ISNOTNULL_FUNC: neg= true; // fall through From 0b624debdfe465dfb36f637ef50022ec50a10d71 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Thu, 9 Jan 2020 16:10:25 +0100 Subject: [PATCH 08/49] Update to version 1.07 (as for MariaDB 10.2) --- storage/connect/CMakeLists.txt | 53 +-- storage/connect/array.cpp | 4 +- storage/connect/connect.cc | 69 ++-- storage/connect/connect.h | 2 + storage/connect/csort.cpp | 22 +- storage/connect/ha_connect.cc | 74 ++--- storage/connect/jdbconn.cpp | 11 +- storage/connect/mycat.cc | 111 +------ storage/connect/mycat.h | 4 +- storage/connect/myconn.cpp | 12 +- storage/connect/odbconn.cpp | 2 +- storage/connect/plgdbsem.h | 29 +- storage/connect/reldef.cpp | 278 +++++++++++----- storage/connect/reldef.h | 9 +- storage/connect/restget.cpp | 42 ++- storage/connect/tabcmg.cpp | 23 +- storage/connect/tabdos.cpp | 23 +- storage/connect/tabdos.h | 1 - storage/connect/tabfix.cpp | 2 +- storage/connect/tabfmt.cpp | 5 +- storage/connect/tabjson.cpp | 40 ++- storage/connect/tabmysql.cpp | 9 +- storage/connect/tabodbc.cpp | 6 +- storage/connect/tabrest.cpp | 124 +++++-- storage/connect/tabrest.h | 21 ++ storage/connect/tabutil.cpp | 16 +- storage/connect/tabutil.h | 3 +- storage/connect/tabvct.cpp | 3 + storage/connect/tabxml.cpp | 4 +- storage/connect/valblk.cpp | 8 +- storage/connect/value.cpp | 583 +++++++++++++++++---------------- storage/connect/xindex.cpp | 32 +- storage/connect/xtable.h | 5 +- 33 files changed, 911 insertions(+), 719 deletions(-) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index fd006e104c1..92e2e53a61b 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -40,6 +40,10 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h) add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS) add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT ) +macro(DISABLE_WARNING W) + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=${W}") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-${W}" DEBUG) +endmacro() # # OS specific C flags, definitions and source files. @@ -47,14 +51,15 @@ add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT ) IF(UNIX) MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations") if(NOT WITH_WARNINGS) - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") + DISABLE_WARNING("unused-function") + DISABLE_WARNING("unused-variable") + DISABLE_WARNING("unused-value") + DISABLE_WARNING("parentheses") + DISABLE_WARNING("strict-aliasing") + DISABLE_WARNING("misleading-indentation") + DISABLE_WARNING("format-truncation") + DISABLE_WARNING("implicit-fallthrough") + DISABLE_WARNING("type-limits") endif(NOT WITH_WARNINGS) add_definitions( -DUNIX -DLINUX -DUBUNTU ) @@ -68,10 +73,6 @@ ELSE(NOT UNIX) tabwmi.cpp tabwmi.h tabmac.cpp tabmac.h macutil.cpp macutil.h) # Add exception handling to the CONNECT project) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD") SET(IPHLPAPI_LIBRARY iphlpapi.lib) IF(MSVC AND (CMAKE_CXX_COMPILER_ID MATCHES Clang)) # Connect does not work with clang-cl @@ -171,7 +172,8 @@ IF(CONNECT_WITH_ODBC) # the library 'libiodbc' gets compiled with 'sql'h. # This will also need changes in the sources (e.g. #include ). - find_path(ODBC_INCLUDE_DIR sql.h + find_file(ODBC_INCLUDES sql.h + PATHS /usr/include /usr/include/odbc /usr/local/include @@ -181,7 +183,7 @@ IF(CONNECT_WITH_ODBC) #"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include" #"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include" #"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/include" - DOC "Specify the directory containing sql.h." + DOC "Specify the path to sql.h." ) find_library(ODBC_LIBRARY @@ -200,9 +202,10 @@ IF(CONNECT_WITH_ODBC) DOC "Specify the ODBC driver manager library here." ) - mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDE_DIR) + mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDES) - IF(ODBC_INCLUDE_DIR AND ODBC_LIBRARY) + IF(ODBC_INCLUDES AND ODBC_LIBRARY) + get_filename_component(ODBC_INCLUDE_DIR "${ODBC_INCLUDES}" PATH) set(CMAKE_REQUIRED_LIBRARIES ${ODBC_LIBRARY}) set(CMAKE_REQUIRED_INCLUDES ${ODBC_INCLUDE_DIR}) CHECK_CXX_SOURCE_COMPILES( @@ -316,19 +319,27 @@ OPTION(CONNECT_WITH_REST "Compile CONNECT storage engine with REST support" ON) IF(CONNECT_WITH_REST) MESSAGE(STATUS "=====> REST support is ON") - FIND_PACKAGE(cpprestsdk) + SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp tabrest.h) + add_definitions(-DREST_SUPPORT) + FIND_PACKAGE(cpprestsdk QUIET) IF (cpprestsdk_FOUND) - MESSAGE(STATUS "=====> cpprestsdk found") IF(UNIX) # INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR}) # If needed edit next line to set the path to libcpprest.so SET(REST_LIBRARY -lcpprest) MESSAGE (STATUS ${REST_LIBRARY}) + ELSE(NOT UNIX) +# Next line sets debug compile mode matching cpprest_2_10d.dll +# when it was binary installed (can be change later in Visual Studio) +# Comment it out if not needed depending on your cpprestsdk installation. + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") ENDIF(UNIX) - SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp restget.cpp tabrest.h) - add_definitions(-DREST_SUPPORT) +# IF(REST_LIBRARY) why this? how about Windows + SET(CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp) + add_definitions(-DREST_SOURCE) +# ENDIF() ELSE(NOT cpprestsdk_FOUND) - MESSAGE(STATUS "=====> cpprestsdk package not found") +# MESSAGE(STATUS "=====> cpprestsdk package not found") ENDIF (cpprestsdk_FOUND) ENDIF(CONNECT_WITH_REST) diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index 3478342a788..84a686cc145 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -438,7 +438,7 @@ char *ARRAY::GetStringValue(int n) /***********************************************************************/ bool ARRAY::Find(PVAL valp) { - register int n; + int n; PVAL vp; if (Type != valp->GetType()) { @@ -1042,7 +1042,7 @@ MULAR::MULAR(PGLOBAL g, int n) : CSORT(false) /***********************************************************************/ int MULAR::Qcompare(int *i1, int *i2) { - register int i, n = 0; + int i, n = 0; for (i = 0; i < Narray; i++) if ((n = Pars[i]->Qcompare(i1, i2))) diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index b1078de8eaa..dfc619cf4af 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -16,7 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ /***********************************************************************/ -/* Author Olivier BERTRAND bertrandop@gmail.com 2004-2017 */ +/* Author Olivier BERTRAND bertrandop@gmail.com 2004-2019 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -389,6 +389,9 @@ RCODE EvalColumns(PGLOBAL g, PTDB tdbp, bool reset, bool mrr) try { for (colp = tdbp->GetColumns(); rc == RC_OK && colp; colp = colp->GetNext()) { + xtrc(2, "Going to read column %s of table %s\n", + colp->GetName(), tdbp->GetName()); + if (reset) colp->Reset(); @@ -563,7 +566,7 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort) rc = tdbp->DeleteDB(g, RC_EF); // Specific A.M. delete routine } else if (tdbp->GetMode() == MODE_UPDATE && tdbp->IsIndexed()) - rc = ((PTDBDOX)tdbp)->Txfp->UpdateSortedRows(g); + rc = ((PTDBDOS)tdbp)->GetTxfp()->UpdateSortedRows(g); switch (rc) { case RC_FX: @@ -590,7 +593,7 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort) if (!tdbp->IsRemote()) { // Make all the eventual indexes - PTDBDOX tbxp = (PTDBDOX)tdbp; + PTDBDOS tbxp = (PTDBDOS)tdbp; tbxp->ResetKindex(g, NULL); tbxp->SetKey_Col(NULL); rc = tbxp->ResetTableOpt(g, true, tbxp->GetDef()->Indexable() == 1); @@ -619,8 +622,8 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort) int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) { PIXDEF xdp; - PTDBDOX tdbp; - DOXDEF *dfp; + PTDBDOS tdbp; + DOSDEF *dfp; if (!ptdb) return -1; @@ -630,9 +633,9 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) } else if (ptdb->GetDef()->Indexable() == 3) { return 1; } else - tdbp= (PTDBDOX)ptdb; + tdbp= (PTDBDOS)ptdb; - dfp= (DOXDEF*)tdbp->To_Def; + dfp= (DOSDEF*)tdbp->GetDef(); //if (!(k= colp->GetKey())) // if (colp->GetOpt() >= 2) { @@ -642,16 +645,16 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) // This is a pseudo indexed sorted block optimized column // return 0; - if (tdbp->To_Kindex) - if (((XXBASE*)tdbp->To_Kindex)->GetID() == id) { - tdbp->To_Kindex->Reset(); // Same index - return (tdbp->To_Kindex->IsMul()) ? 2 : 1; + if (tdbp->GetKindex()) + if (((XXBASE*)tdbp->GetKindex())->GetID() == id) { + tdbp->GetKindex()->Reset(); // Same index + return (tdbp->GetKindex()->IsMul()) ? 2 : 1; } else { - tdbp->To_Kindex->Close(); - tdbp->To_Kindex= NULL; + tdbp->GetKindex()->Close(); + tdbp->SetKindex(NULL); } // endif colp - for (xdp= dfp->To_Indx; xdp; xdp= xdp->GetNext()) + for (xdp= dfp->GetIndx(); xdp; xdp= xdp->GetNext()) if (xdp->GetID() == id) break; @@ -673,7 +676,7 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) if (tdbp->InitialyzeIndex(g, xdp, sorted)) return 0; - return (tdbp->To_Kindex->IsMul()) ? 2 : 1; + return (tdbp->GetKindex()->IsMul()) ? 2 : 1; } // end of CntIndexInit #if defined(WORDS_BIGENDIAN) @@ -707,7 +710,7 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, int n, x; RCODE rc; XXBASE *xbp; - PTDBDOX tdbp; + PTDBDOS tdbp; if (!ptdb) return RC_FX; @@ -733,12 +736,12 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, goto rnd; } else - tdbp= (PTDBDOX)ptdb; + tdbp= (PTDBDOS)ptdb; // Set reference values and index operator - if (!tdbp->To_Link || !tdbp->To_Kindex) { + if (!tdbp->GetLink() || !tdbp->GetKindex()) { // if (!tdbp->To_Xdp) { - sprintf(g->Message, "Index not initialized for table %s", tdbp->Name); + sprintf(g->Message, "Index not initialized for table %s", tdbp->GetName()); return RC_FX; #if 0 } // endif !To_Xdp @@ -751,7 +754,7 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, #endif // 0 } // endif !To_Kindex - xbp= (XXBASE*)tdbp->To_Kindex; + xbp= (XXBASE*)tdbp->GetKindex(); if (kr) { char *kp= (char*)kr->key; @@ -761,13 +764,13 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, PVAL valp; PCOL colp; - for (n= 0; n < tdbp->Knum; n++) { - colp= (PCOL)tdbp->To_Key_Col[n]; + for (n= 0; n < tdbp->GetKnum(); n++) { + colp= (PCOL)tdbp->Key(n); if (colp->GetColUse(U_NULLS)) kp++; // Skip null byte - valp= tdbp->To_Link[n]->GetValue(); + valp= tdbp->Link(n)->GetValue(); if (!valp->IsTypeNum()) { if (colp->GetColUse(U_VAR)) { @@ -837,7 +840,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, bool b, rcb; PVAL valp; PCOL colp; - PTDBDOX tdbp; + PTDBDOS tdbp; XXBASE *xbp; if (!ptdb) @@ -862,35 +865,35 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, return k[1] - k[0] + 1; } else - tdbp= (PTDBDOX)ptdb; + tdbp= (PTDBDOS)ptdb; - if (!tdbp->To_Kindex || !tdbp->To_Link) { - if (!tdbp->To_Xdp) { - sprintf(g->Message, "Index not initialized for table %s", tdbp->Name); + if (!tdbp->GetKindex() || !tdbp->GetLink()) { + if (!tdbp->GetXdp()) { + sprintf(g->Message, "Index not initialized for table %s", tdbp->GetName()); DBUG_PRINT("Range", ("%s", g->Message)); return -1; } else // Dynamic index - return tdbp->To_Xdp->GetMaxSame(); // TODO a better estimate + return tdbp->GetXdp()->GetMaxSame(); // TODO a better estimate } else - xbp= (XXBASE*)tdbp->To_Kindex; + xbp= (XXBASE*)tdbp->GetKindex(); for (b= false, i= 0; i < 2; i++) { p= kp= key[i]; if (kp) { - for (n= 0; n < tdbp->Knum; n++) { + for (n= 0; n < tdbp->GetKnum(); n++) { if (kmap[i] & (key_part_map)(1 << n)) { if (b == true) // Cannot do indexing with missing intermediate key return -1; - colp= (PCOL)tdbp->To_Key_Col[n]; + colp= (PCOL)tdbp->Key(n); if (colp->GetColUse(U_NULLS)) p++; // Skip null byte ??? - valp= tdbp->To_Link[n]->GetValue(); + valp= tdbp->Link(n)->GetValue(); if (!valp->IsTypeNum()) { if (colp->GetColUse(U_VAR)) { diff --git a/storage/connect/connect.h b/storage/connect/connect.h index 3a60cd40160..d1fc2ea592f 100644 --- a/storage/connect/connect.h +++ b/storage/connect/connect.h @@ -46,6 +46,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, bool *incl, key_part_map *kmap); PGLOBAL CntExit(PGLOBAL g); +#if 0 /***********************************************************************/ /* Definition of classes XKPDEF, DOXDEF, TDBDOX */ /* These classes purpose is chiefly to access protected items! */ @@ -76,3 +77,4 @@ class XKPDEF: public KPARTDEF { public: XKPDEF(const char *name, int n) : KPARTDEF((PSZ)name, n) {} }; // end of class XKPDEF +#endif // 0 diff --git a/storage/connect/csort.cpp b/storage/connect/csort.cpp index 670131b8fd2..1e4ba674e23 100644 --- a/storage/connect/csort.cpp +++ b/storage/connect/csort.cpp @@ -178,9 +178,9 @@ void CSORT::DebugSort(int ph, int n, int *base, int *mid, int *tmp) /***********************************************************************/ int CSORT::Qsortx(void) { - register int c; - register int lo, hi, min; - register int i, j, rc = 0; + int c; + int lo, hi, min; + int i, j, rc = 0; // To do: rc should be checked for being used uninitialized int *top; #ifdef DEBTRACE @@ -344,7 +344,7 @@ int CSORT::Qsortx(void) /***********************************************************************/ void CSORT::Qstx(int *base, int *max) { - register int *i, *j, *jj, *mid, *him, c; + int *i, *j, *jj, *mid, *him, c; int *tmp; int lo, hi, rc; size_t zlo, zhi, cnm; @@ -543,9 +543,9 @@ void CSORT::Qstx(int *base, int *max) /***********************************************************************/ int CSORT::Qsortc(void) { - register int c; - register int lo, hi, min; - register int i, j, k, m, rc = 0; + int c; + int lo, hi, min; + int i, j, k, m, rc = 0; // To do: rc should be checked for being used uninitialized int *max; #ifdef DEBTRACE @@ -720,7 +720,7 @@ int CSORT::Qsortc(void) /***********************************************************************/ void CSORT::Qstc(int *base, int *max) { - register int *i, *j, *jj, *lt, *eq, *gt, *mid; + int *i, *j, *jj, *lt, *eq, *gt, *mid; int c = 0, lo, hi, rc; size_t zlo, zhi, cnm; @@ -907,9 +907,9 @@ void CSORT::Qstc(int *base, int *max) /***********************************************************************/ void CSORT::Istc(int *base, int *hi, int *max) { - register int c = 0; - register int *lo; - register int *i, *j; + int c = 0; + int *lo; + int *i, *j; /*********************************************************************/ /* First put smallest element, which must be in the first THRESH, */ diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index be7c6548181..0620fd78cc2 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -170,9 +170,9 @@ #define JSONMAX 10 // JSON Default max grp size extern "C" { - char version[]= "Version 1.06.0010 June 01, 2019"; + char version[]= "Version 1.07.0001 November 12, 2019"; #if defined(__WIN__) - char compver[]= "Version 1.06.0010 " __DATE__ " " __TIME__; + char compver[]= "Version 1.07.0001 " __DATE__ " " __TIME__; char slash= '\\'; #else // !__WIN__ char slash= '/'; @@ -1045,6 +1045,8 @@ TABTYPE ha_connect::GetRealType(PTOS pos) case TAB_REST: type = TAB_NIY; break; + default: + break; } // endswitch type #endif // REST_SUPPORT @@ -1341,7 +1343,7 @@ char *ha_connect::GetRealString(PCSZ s) { char *sv; - if (IsPartitioned() && s && partname && *partname) { + if (IsPartitioned() && s && *partname) { sv= (char*)PlugSubAlloc(xp->g, NULL, 0); sprintf(sv, s, partname); PlugSubAlloc(xp->g, NULL, strlen(sv) + 1); @@ -2964,10 +2966,12 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GT_FUNC: vop= OP_GT; break; +#if MYSQL_VERSION_ID > 100200 case Item_func::LIKE_FUNC: - vop= OP_LIKE; - neg= ((Item_func_opt_neg *)condf)->negated; - break; + vop = OP_LIKE; + neg= ((Item_func_like*)condf)->negated; + break; +#endif // VERSION_ID > 100200 case Item_func::ISNOTNULL_FUNC: neg= true; // fall through @@ -3095,7 +3099,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) strncat(s, res->ptr(), res->length()); if (res->length() < 19) - strcat(s, "1970-01-01 00:00:00" + res->length()); + strcat(s, &"1970-01-01 00:00:00"[res->length()]); strcat(s, "'}"); break; @@ -3125,7 +3129,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) strncat(s, res->ptr(), res->length()); if (res->length() < 19) - strcat(s, "1970-01-01 00:00:00" + res->length()); + strcat(s, &"1970-01-01 00:00:00"[res->length()]); strcat(s, "'}"); break; @@ -3785,9 +3789,9 @@ int ha_connect::index_init(uint idx, bool sorted) active_index= MAX_KEY; rc= HA_ERR_INTERNAL_ERROR; } else if (tdbp->GetKindex()) { - if (((PTDBDOX)tdbp)->To_Kindex->GetNum_K()) { + if (((PTDBDOS)tdbp)->GetKindex()->GetNum_K()) { if (tdbp->GetFtype() != RECFM_NAF) - ((PTDBDOX)tdbp)->GetTxfp()->ResetBuffer(g); + ((PTDBDOS)tdbp)->GetTxfp()->ResetBuffer(g); active_index= idx; // } else { // Void table @@ -4503,34 +4507,13 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick) case TAB_DIR: case TAB_ZIP: case TAB_OEM: -#ifdef NO_EMBEDDED_ACCESS_CHECKS - return false; - #endif - - /* - Check FILE_ACL - If table or table->mdl_ticket is NULL - it's a DLL, e.g. CREATE TABLE. - if the table has an MDL_EXCLUSIVE lock - it's a DDL too, e.g. the - insert step of CREATE ... SELECT. - - Otherwise it's a DML, the table was normally opened, locked, - privilege were already checked, and table->grant.privilege is set. - With SQL SECURITY DEFINER, table->grant.privilege has definer's privileges. - - Unless we're in prelocking mode, in this case table->grant.privilege - is only checked in start_stmt(), not in external_lock(). - */ - if (!table || !table->mdl_ticket || table->mdl_ticket->get_type() == MDL_EXCLUSIVE) - return check_access(thd, FILE_ACL, db, NULL, NULL, 0, 0); - - if ((!quick && thd->lex->requires_prelocking()) || table->grant.privilege & FILE_ACL) - return false; - - status_var_increment(thd->status_var.access_denied_errors); - my_error(access_denied_error_code(thd->password), MYF(0), - thd->security_ctx->priv_user, thd->security_ctx->priv_host, - (thd->password ? ER(ER_YES) : ER(ER_NO))); - return true; + if (table && table->pos_in_table_list) // if SELECT + { + Switch_to_definer_security_ctx backup_ctx(thd, table->pos_in_table_list); + return check_global_access(thd, FILE_ACL); + } + else + return check_global_access(thd, FILE_ACL); case TAB_ODBC: case TAB_JDBC: case TAB_MONGO: @@ -5653,6 +5636,8 @@ static int connect_assisted_discovery(handlerton *, THD* thd, case TAB_CSV: ttp = TAB_REST; break; + default: + break; } // endswitch type #endif // REST_SUPPORT } // endif ttp @@ -6062,7 +6047,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } // endif !nblin for (i= 0; !rc && i < qrp->Nblin; i++) { - typ= len= prec= dec= 0; + typ= len= prec= dec= flg= 0; tm= NOT_NULL_FLAG; cnm= (char*)"noname"; dft= xtra= key= fmt= tn= NULL; @@ -6102,6 +6087,9 @@ static int connect_assisted_discovery(handlerton *, THD* thd, if (crp->Kdata->GetIntValue(i)) tm= 0; // Nullable + break; + case FLD_FLAG: + flg = crp->Kdata->GetIntValue(i); break; case FLD_FORMAT: fmt= (crp->Kdata) ? crp->Kdata->GetCharValue(i) : NULL; @@ -6233,7 +6221,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, // Now add the field if (add_field(&sql, cnm, typ, prec, dec, key, tm, rem, dft, xtra, - fmt, 0, dbf, v)) + fmt, flg, dbf, v)) rc= HA_ERR_OUT_OF_MEM; } // endfor i @@ -7379,14 +7367,14 @@ maria_declare_plugin(connect) &connect_storage_engine, "CONNECT", "Olivier Bertrand", - "Management of External Data (SQL/NOSQL/MED), including many file formats", + "Management of External Data (SQL/NOSQL/MED), including Rest query results", PLUGIN_LICENSE_GPL, connect_init_func, /* Plugin Init */ connect_done_func, /* Plugin Deinit */ - 0x0106, /* version number (1.06) */ + 0x0107, /* version number (1.07) */ NULL, /* status variables */ connect_system_variables, /* system variables */ - "1.06.0010", /* string version */ + "1.07.0001", /* string version */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ } maria_declare_plugin_end; diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp index e0aca3333e6..2cb75e0adc1 100644 --- a/storage/connect/jdbconn.cpp +++ b/storage/connect/jdbconn.cpp @@ -1196,9 +1196,14 @@ int JDBConn::GetResultSize(PCSZ sql, PCOL colp) if ((rc = ExecuteQuery(sql)) != RC_OK) return -1; - if ((rc = Fetch()) > 0) - SetColumnValue(1, NULL, colp->GetValue()); - else + if ((rc = Fetch()) > 0) { + try { + SetColumnValue(1, NULL, colp->GetValue()); + } catch (...) { + return -4; + } // end catch + + } else return -2; if ((rc = Fetch()) != 0) diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index b1d23b8c5e2..f8b3dc03aa5 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -95,7 +95,7 @@ #endif // ZIP_SUPPORT #if defined(REST_SUPPORT) #include "tabrest.h" -#endif // Rest_SUPPORT +#endif // REST_SUPPORT #include "mycat.h" /***********************************************************************/ @@ -107,7 +107,6 @@ extern "C" HINSTANCE s_hModule; // Saved module handle #if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) bool MongoEnabled(void); #endif // JAVA_SUPPORT || CMGO_SUPPORT -PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); /***********************************************************************/ /* Get the plugin directory. */ @@ -349,100 +348,6 @@ uint GetFuncID(const char *func) return fnc; } // end of GetFuncID -/***********************************************************************/ -/* OEMColumn: Get table column info for an OEM table. */ -/***********************************************************************/ -PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info) - { - typedef PQRYRES (__stdcall *XCOLDEF) (PGLOBAL, void*, char*, char*, bool); - const char *module, *subtype; - char c, soname[_MAX_PATH], getname[40] = "Col"; -#if defined(__WIN__) - HANDLE hdll; /* Handle to the external DLL */ -#else // !__WIN__ - void *hdll; /* Handle for the loaded shared library */ -#endif // !__WIN__ - XCOLDEF coldef = NULL; - PQRYRES qrp = NULL; - - module = topt->module; - subtype = topt->subtype; - - if (!module || !subtype) - return NULL; - - /*********************************************************************/ - /* Ensure that the .dll doesn't have a path. */ - /* This is done to ensure that only approved dll from the system */ - /* directories are used (to make this even remotely secure). */ - /*********************************************************************/ - if (check_valid_path(module, strlen(module))) { - strcpy(g->Message, "Module cannot contain a path"); - return NULL; - } else - PlugSetPath(soname, module, GetPluginDir()); - - // The exported name is always in uppercase - for (int i = 0; ; i++) { - c = subtype[i]; - getname[i + 3] = toupper(c); - if (!c) break; - } // endfor i - -#if defined(__WIN__) - // Load the Dll implementing the table - if (!(hdll = LoadLibrary(soname))) { - char buf[256]; - DWORD rc = GetLastError(); - - sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, soname); - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0, - (LPTSTR)buf, sizeof(buf), NULL); - strcat(strcat(g->Message, ": "), buf); - return NULL; - } // endif hDll - - // Get the function returning an instance of the external DEF class - if (!(coldef = (XCOLDEF)GetProcAddress((HINSTANCE)hdll, getname))) { - sprintf(g->Message, MSG(PROCADD_ERROR), GetLastError(), getname); - FreeLibrary((HMODULE)hdll); - return NULL; - } // endif coldef -#else // !__WIN__ - const char *error = NULL; - - // Load the desired shared library - if (!(hdll = dlopen(soname, RTLD_LAZY))) { - error = dlerror(); - sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error)); - return NULL; - } // endif Hdll - - // Get the function returning an instance of the external DEF class - if (!(coldef = (XCOLDEF)dlsym(hdll, getname))) { - error = dlerror(); - sprintf(g->Message, MSG(GET_FUNC_ERR), getname, SVP(error)); - dlclose(hdll); - return NULL; - } // endif coldef -#endif // !__WIN__ - - // Just in case the external Get function does not set error messages - sprintf(g->Message, "Error getting column info from %s", subtype); - - // Get the table column definition - qrp = coldef(g, topt, tab, db, info); - -#if defined(__WIN__) - FreeLibrary((HMODULE)hdll); -#else // !__WIN__ - dlclose(hdll); -#endif // !__WIN__ - - return qrp; - } // end of OEMColumns - /* ------------------------- Class CATALOG --------------------------- */ /***********************************************************************/ @@ -483,10 +388,10 @@ void MYCAT::Reset(void) /* GetTableDesc: retrieve a table descriptor. */ /* Look for a table descriptor matching the name and type. */ /***********************************************************************/ -PRELDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep, +PTABDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR type, PRELDEF *) { - PRELDEF tdp= NULL; + PTABDEF tdp= NULL; if (trace(1)) htrc("GetTableDesc: name=%s am=%s\n", tablep->GetName(), SVP(type)); @@ -507,12 +412,12 @@ PRELDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep, /* MakeTableDesc: make a table/view description. */ /* Note: caller must check if name already exists before calling it. */ /***********************************************************************/ -PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) +PTABDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) { TABTYPE tc; LPCSTR name= (PSZ)PlugDup(g, tablep->GetName()); LPCSTR schema= (PSZ)PlugDup(g, tablep->GetSchema()); - PRELDEF tdp= NULL; + PTABDEF tdp= NULL; if (trace(1)) htrc("MakeTableDesc: name=%s schema=%s am=%s\n", @@ -580,8 +485,8 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) } // endswitch // Do make the table/view definition - if (tdp && tdp->Define(g, this, name, schema, am)) - tdp= NULL; + if (tdp && tdp->Define(g, this, name, schema, am)) + tdp = NULL; if (trace(1)) htrc("Table %s made\n", am); @@ -594,7 +499,7 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) /***********************************************************************/ PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type) { - PRELDEF tdp; + PTABDEF tdp; PTDB tdbp= NULL; // LPCSTR name= tablep->GetName(); diff --git a/storage/connect/mycat.h b/storage/connect/mycat.h index 818e535b32d..6473f7a5c11 100644 --- a/storage/connect/mycat.h +++ b/storage/connect/mycat.h @@ -102,14 +102,14 @@ class MYCAT : public CATALOG { // Methods void Reset(void); bool StoreIndex(PGLOBAL, PTABDEF) {return false;} // Temporary - PRELDEF GetTableDesc(PGLOBAL g, PTABLE tablep, + PTABDEF GetTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR type, PRELDEF *prp = NULL); PTDB GetTable(PGLOBAL g, PTABLE tablep, MODE mode = MODE_READ, LPCSTR type = NULL); void ClearDB(PGLOBAL g); protected: - PRELDEF MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am); + PTABDEF MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am); // Members ha_connect *Hc; // The Connect handler diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index 253c42bb002..4303a9e191b 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -472,7 +472,7 @@ int MYSQLC::Open(PGLOBAL g, const char *host, const char *db, int pt, const char *csname) { const char *pipe = NULL; - uint cto = 10, nrt = 20; + //uint cto = 10, nrt = 20; my_bool my_true= 1; m_DB = mysql_init(NULL); @@ -485,11 +485,11 @@ int MYSQLC::Open(PGLOBAL g, const char *host, const char *db, if (trace(1)) htrc("MYSQLC Open: m_DB=%.4X size=%d\n", m_DB, (int)sizeof(*m_DB)); - // Removed to do like FEDERATED do + // Removed to do like FEDERATED does //mysql_options(m_DB, MYSQL_READ_DEFAULT_GROUP, "client-mariadb"); - mysql_options(m_DB, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL); - mysql_options(m_DB, MYSQL_OPT_CONNECT_TIMEOUT, &cto); - mysql_options(m_DB, MYSQL_OPT_READ_TIMEOUT, &nrt); +//mysql_options(m_DB, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL); +//mysql_options(m_DB, MYSQL_OPT_CONNECT_TIMEOUT, &cto); +//mysql_options(m_DB, MYSQL_OPT_READ_TIMEOUT, &nrt); //mysql_options(m_DB, MYSQL_OPT_WRITE_TIMEOUT, ...); #if defined(__WIN__) @@ -879,7 +879,7 @@ MYSQL_FIELD *MYSQLC::GetNextField(void) PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb) { PCSZ fmt; - char *name, v; + char *name, v= 0; int n; bool uns; PCOLRES *pcrp, crp; diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 6687513fa6c..d08c6d1b7a5 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -2279,7 +2279,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) int i, irc; bool b; PCSZ fnc = "Unknown"; - UWORD n; + UWORD n = 0; SWORD ncol, len, tp; SQLULEN crow = 0; PQRYRES qrp = cap->Qrp; diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h index f10ae209e9d..a40e32bcfb2 100644 --- a/storage/connect/plgdbsem.h +++ b/storage/connect/plgdbsem.h @@ -149,16 +149,22 @@ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */ TYPE_AM_MGO = 194, /* MGO access method type no */ TYPE_AM_OUT = 200}; /* Output relations (storage) */ -enum RECFM {RECFM_NAF = -2, /* Not a file */ - RECFM_OEM = -1, /* OEM file access method */ - RECFM_VAR = 0, /* Varying length DOS files */ - RECFM_FIX = 1, /* Fixed length DOS files */ - RECFM_BIN = 2, /* Binary DOS files (also fixed) */ - RECFM_VCT = 3, /* VCT formatted files */ - RECFM_ODBC = 4, /* Table accessed via ODBC */ - RECFM_JDBC = 5, /* Table accessed via JDBC */ - RECFM_PLG = 6, /* Table accessed via PLGconn */ - RECFM_DBF = 7}; /* DBase formatted file */ +enum RECFM {RECFM_DFLT = 0, /* Default table type */ + RECFM_NAF = 1, /* Not a file table */ + RECFM_OEM = 2, /* OEM table */ + RECFM_VAR = 3, /* Varying length DOS files */ + RECFM_FIX = 4, /* Fixed length DOS files */ + RECFM_BIN = 5, /* Binary DOS files (also fixed) */ + RECFM_DBF = 6, /* DBase formatted file */ + RECFM_CSV = 7, /* CSV file */ + RECFM_FMT = 8, /* FMT formatted file */ + RECFM_VCT = 9, /* VCT formatted files */ + RECFM_XML = 10, /* XML formatted files */ + RECFM_JASON = 11, /* JASON formatted files */ + RECFM_DIR = 12, /* DIR table */ + RECFM_ODBC = 13, /* Table accessed via ODBC */ + RECFM_JDBC = 14, /* Table accessed via JDBC */ + RECFM_PLG = 15}; /* Table accessed via PLGconn */ enum MISC {DB_TABNO = 1, /* DB routines in Utility Table */ MAX_MULT_KEY = 10, /* Max multiple key number */ @@ -537,7 +543,8 @@ enum XFLD {FLD_NO = 0, /* Not a field definition item */ FLD_FORMAT = 16, /* Field format */ FLD_CAT = 17, /* Table catalog */ FLD_SCHEM = 18, /* Table schema */ - FLD_TABNAME = 19}; /* Column Table name */ + FLD_TABNAME = 19, /* Column Table name */ + FLD_FLAG = 20}; /* Field flag (CONNECT specific) */ /***********************************************************************/ /* Result of last SQL noconv query. */ diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 8ba8aac3621..2d3c6a6aacd 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -1,11 +1,11 @@ /************* RelDef CPP Program Source Code File (.CPP) **************/ /* PROGRAM NAME: RELDEF */ /* ------------- */ -/* Version 1.6 */ +/* Version 1.7 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2004-2016 */ +/* (C) Copyright to the author Olivier BERTRAND 2004-2019 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -20,7 +20,7 @@ #if defined(__WIN__) #include #else -#include // dlopen(), dlclose(), dlsym() ... +//#include // dlopen(), dlclose(), dlsym() ... #include "osutil.h" //#include "sqlext.h" #endif @@ -61,6 +61,102 @@ extern handlerton *connect_hton; /***********************************************************************/ USETEMP UseTemp(void); char *GetPluginDir(void); +PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info); + +/***********************************************************************/ +/* OEMColumns: Get table column info for an OEM table. */ +/***********************************************************************/ +PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info) +{ + typedef PQRYRES(__stdcall* XCOLDEF) (PGLOBAL, void*, char*, char*, bool); + const char* module, * subtype; + char c, soname[_MAX_PATH], getname[40] = "Col"; +#if defined(__WIN__) + HANDLE hdll; /* Handle to the external DLL */ +#else // !__WIN__ + void* hdll; /* Handle for the loaded shared library */ +#endif // !__WIN__ + XCOLDEF coldef = NULL; + PQRYRES qrp = NULL; + + module = topt->module; + subtype = topt->subtype; + + if (!module || !subtype) + return NULL; + + /*********************************************************************/ + /* Ensure that the .dll doesn't have a path. */ + /* This is done to ensure that only approved dll from the system */ + /* directories are used (to make this even remotely secure). */ + /*********************************************************************/ + if (check_valid_path(module, strlen(module))) { + strcpy(g->Message, "Module cannot contain a path"); + return NULL; + } + else + PlugSetPath(soname, module, GetPluginDir()); + + // The exported name is always in uppercase + for (int i = 0; ; i++) { + c = subtype[i]; + getname[i + 3] = toupper(c); + if (!c) break; + } // endfor i + +#if defined(__WIN__) + // Load the Dll implementing the table + if (!(hdll = LoadLibrary(soname))) { + char buf[256]; + DWORD rc = GetLastError(); + + sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, soname); + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0, + (LPTSTR)buf, sizeof(buf), NULL); + strcat(strcat(g->Message, ": "), buf); + return NULL; + } // endif hDll + +// Get the function returning an instance of the external DEF class + if (!(coldef = (XCOLDEF)GetProcAddress((HINSTANCE)hdll, getname))) { + sprintf(g->Message, MSG(PROCADD_ERROR), GetLastError(), getname); + FreeLibrary((HMODULE)hdll); + return NULL; + } // endif coldef +#else // !__WIN__ + const char* error = NULL; + + // Load the desired shared library + if (!(hdll = dlopen(soname, RTLD_LAZY))) { + error = dlerror(); + sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error)); + return NULL; + } // endif Hdll + +// Get the function returning an instance of the external DEF class + if (!(coldef = (XCOLDEF)dlsym(hdll, getname))) { + error = dlerror(); + sprintf(g->Message, MSG(GET_FUNC_ERR), getname, SVP(error)); + dlclose(hdll); + return NULL; + } // endif coldef +#endif // !__WIN__ + + // Just in case the external Get function does not set error messages + sprintf(g->Message, "Error getting column info from %s", subtype); + + // Get the table column definition + qrp = coldef(g, topt, tab, db, info); + +#if defined(__WIN__) + FreeLibrary((HMODULE)hdll); +#else // !__WIN__ + dlclose(hdll); +#endif // !__WIN__ + + return qrp; +} // end of OEMColumns /* --------------------------- Class RELDEF -------------------------- */ @@ -208,6 +304,7 @@ TABDEF::TABDEF(void) { Schema = NULL; Desc = NULL; + Recfm = RECFM_DFLT; Catfunc = FNC_NO; Card = 0; Elemt = 0; @@ -220,12 +317,39 @@ TABDEF::TABDEF(void) csname = NULL; } // end of TABDEF constructor +/***********************************************************************/ +/* Return the table format. */ +/***********************************************************************/ +RECFM TABDEF::GetTableFormat(const char* type) +{ + RECFM recfm = Recfm; + + if (Catfunc != FNC_NO) + recfm = RECFM_NAF; + else if (recfm == RECFM_DFLT) + // Default format depends on the table type + switch (GetTypeID(type)) { + case TAB_DOS: recfm = RECFM_VAR; break; + case TAB_CSV: recfm = RECFM_CSV; break; + case TAB_FMT: recfm = RECFM_FMT; break; + case TAB_FIX: recfm = RECFM_FIX; break; + case TAB_BIN: recfm = RECFM_BIN; break; + case TAB_VEC: recfm = RECFM_VCT; break; + case TAB_DBF: recfm = RECFM_DBF; break; + case TAB_XML: recfm = RECFM_XML; break; + case TAB_DIR: recfm = RECFM_DIR; break; + default: recfm = RECFM_NAF; break; + } // endswitch type + + return recfm; +} // end of GetTableFormat + /***********************************************************************/ /* Define: initialize the table definition block from XDB file. */ /***********************************************************************/ bool TABDEF::Define(PGLOBAL g, PCATLG cat, LPCSTR name, LPCSTR schema, LPCSTR am) - { +{ int poff = 0; Hc = ((MYCAT*)cat)->GetHandler(); @@ -243,13 +367,17 @@ bool TABDEF::Define(PGLOBAL g, PCATLG cat, NULL; csname = GetStringCatInfo(g, "Table_charset", NULL); - // Get The column definitions - if ((poff = GetColCatInfo(g)) < 0) - return true; + // Do the definition of AM specific fields + if (DefineAM(g, am, 0)) + return true; - // Do the definition of AM specific fields - return DefineAM(g, am, poff); - } // end of Define + // Get The column definitions + if (stricmp(am, "OEM") && GetColCatInfo(g) < 0) + return true; + + Hc->tshp = NULL; // TO BE CHECKED + return false; +} // end of Define /***********************************************************************/ /* This function returns the database data path. */ @@ -264,71 +392,71 @@ PCSZ TABDEF::GetPath(void) /***********************************************************************/ int TABDEF::GetColCatInfo(PGLOBAL g) { - char *type= GetStringCatInfo(g, "Type", "*"); + char *type = GetStringCatInfo(g, "Type", "*"); char c, fty, eds; int i, n, loff, poff, nof, nlg; - void *field= NULL; - TABTYPE tc; - PCOLDEF cdp, lcdp= NULL, tocols= NULL; + void *field = NULL; + RECFM trf; + PCOLDEF cdp, lcdp = NULL, tocols= NULL; PCOLINFO pcf= (PCOLINFO)PlugSubAlloc(g, NULL, sizeof(COLINFO)); memset(pcf, 0, sizeof(COLINFO)); - // Get a unique char identifier for type - tc= (Catfunc == FNC_NO) ? GetTypeID(type) : TAB_PRX; + // Get the table format + trf = GetTableFormat(type); // Take care of the column definitions i= poff= nof= nlg= 0; #if defined(__WIN__) // Offsets of HTML and DIR tables start from 0, DBF at 1 - loff= (tc == TAB_DBF) ? 1 : (tc == TAB_XML || tc == TAB_DIR) ? -1 : 0; + loff= (trf == RECFM_DBF) ? 1 : (trf == RECFM_XML || trf == RECFM_DIR) ? -1 : 0; #else // !__WIN__ // Offsets of HTML tables start from 0, DIR and DBF at 1 - loff = (tc == TAB_DBF || tc == TAB_DIR) ? 1 : (tc == TAB_XML) ? -1 : 0; + loff = (trf == RECFM_DBF || trf == RECFM_DIR) ? 1 : (trf == RECFM_XML) ? -1 : 0; #endif // !__WIN__ while (true) { - // Default Offset depends on table type - switch (tc) { - case TAB_DOS: - case TAB_FIX: - case TAB_BIN: - case TAB_VEC: - case TAB_DBF: + // Default Offset depends on table format + switch (trf ) { + case RECFM_VAR: + case RECFM_FIX: + case RECFM_BIN: + case RECFM_VCT: + case RECFM_DBF: poff= loff + nof; // Default next offset nlg= MY_MAX(nlg, poff); // Default lrecl break; - case TAB_CSV: - case TAB_FMT: + case RECFM_CSV: + case RECFM_FMT: nlg+= nof; - case TAB_DIR: - case TAB_XML: + case RECFM_DIR: + case RECFM_XML: poff= loff + (pcf->Flags & U_VIRTUAL ? 0 : 1); break; - case TAB_INI: - case TAB_MAC: - case TAB_TBL: - case TAB_XCL: - case TAB_OCCUR: - case TAB_PRX: - case TAB_OEM: + //case RECFM_INI: + //case RECFM_MAC: + //case RECFM_TBL: + //case RECFM_XCL: + //case RECFM_OCCUR: + //case RECFM_PRX: + case RECFM_OEM: poff = 0; // Offset represents an independant flag break; - default: // VCT PLG ODBC JDBC MYSQL WMI... + default: // PLG ODBC JDBC MYSQL WMI... poff = 0; // NA break; - } // endswitch tc + } // endswitch trf // do { field= Hc->GetColumnOption(g, field, pcf); // } while (field && (*pcf->Name =='*' /*|| pcf->Flags & U_VIRTUAL*/)); - if (tc == TAB_DBF && pcf->Type == TYPE_DATE && !pcf->Datefmt) { + if (trf == RECFM_DBF && pcf->Type == TYPE_DATE && !pcf->Datefmt) { // DBF date format defaults to 'YYYMMDD' pcf->Datefmt= "YYYYMMDD"; pcf->Length= 8; - } // endif tc + } // endif trf if (!field) break; @@ -341,10 +469,10 @@ int TABDEF::GetColCatInfo(PGLOBAL g) else loff= cdp->GetOffset(); - switch (tc) { - case TAB_VEC: + switch (trf ) { + case RECFM_VCT: cdp->SetOffset(0); // Not to have shift - case TAB_BIN: + case RECFM_BIN: // BIN/VEC are packed by default if (nof) { // Field width is the internal representation width @@ -395,7 +523,7 @@ int TABDEF::GetColCatInfo(PGLOBAL g) default: break; - } // endswitch tc + } // endswitch trf if (lcdp) lcdp->SetNext(cdp); @@ -413,21 +541,15 @@ int TABDEF::GetColCatInfo(PGLOBAL g) if (GetDefType() == TYPE_AM_DOS) { int ending, recln= 0; - // Was commented because sometimes ending is 0 even when - // not specified (for instance if quoted is specified) -// if ((ending= Hc->GetIntegerOption("Ending")) < 0) { - if ((ending= Hc->GetIntegerOption("Ending")) <= 0) { - ending= (tc == TAB_BIN || tc == TAB_VEC) ? 0 : CRLF; - Hc->SetIntegerOption("Ending", ending); - } // endif ending + ending = Hc->GetIntegerOption("Ending"); // Calculate the default record size - switch (tc) { - case TAB_FIX: - case TAB_BIN: + switch (trf ) { + case RECFM_FIX: + case RECFM_BIN: recln= nlg + ending; // + length of line ending break; - case TAB_VEC: + case RECFM_VCT: recln= nlg; // if ((k= (pak < 0) ? 8 : pak) > 1) @@ -436,18 +558,18 @@ int TABDEF::GetColCatInfo(PGLOBAL g) // recln= ((recln + k - 1) / k) * k; break; - case TAB_DOS: - case TAB_DBF: + case RECFM_VAR: + case RECFM_DBF: recln= nlg; break; - case TAB_CSV: - case TAB_FMT: + case RECFM_CSV: + case RECFM_FMT: // The number of separators (assuming an extra one can exist) // recln= poff * ((qotd) ? 3 : 1); to be investigated recln= nlg + poff * 3; // To be safe default: break; - } // endswitch tc + } // endswitch trf // lrecl must be at least recln to avoid buffer overflow if (trace(1)) @@ -461,7 +583,7 @@ int TABDEF::GetColCatInfo(PGLOBAL g) if (trace(1)) htrc("Lrecl set to %d\n", recln); - } // endif Lrecl + } // endif TYPE // Attach the column definition to the tabdef SetCols(tocols); @@ -500,7 +622,8 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g) return NULL; } else // PlugSetPath(soname, Module, GetPluginDir()); // Crashes on Fedora - strncat(strcpy(soname, GetPluginDir()), Module, _MAX_PATH); + strncat(strcpy(soname, GetPluginDir()), Module, + sizeof(soname) - strlen(soname) - 1); #if defined(__WIN__) // Is the DLL already loaded? @@ -596,10 +719,6 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g) cat->Cbuf = (char*)PlugSubAlloc(g, NULL, cat->Cblen); } // endif Cbuf - // Here "OEM" should be replace by a more useful value - if (xdefp->Define(g, cat, Name, Schema, "OEM")) - return NULL; - // Ok, return external block return xdefp; } // end of GetXdef @@ -622,7 +741,7 @@ bool OEMDEF::DeleteTableFile(PGLOBAL g) /***********************************************************************/ bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR, int) { - Module = GetStringCatInfo(g, "Module", ""); + Module = GetStringCatInfo(g, "Module", ""); Subtype = GetStringCatInfo(g, "Subtype", Module); if (!*Module) @@ -632,7 +751,13 @@ bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR, int) + strlen(Subtype) + 3); sprintf(desc, "%s(%s)", Module, Subtype); Desc = desc; - return false; + + // If define block not here yet, get it now + if (!Pxdef && !(Pxdef = GetXdef(g))) + return true; // Error + + // Here "OEM" should be replace by a more useful value + return Pxdef->Define(g, Cat, Name, Schema, Subtype); } // end of DefineAM /***********************************************************************/ @@ -640,7 +765,6 @@ bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR, int) /***********************************************************************/ PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode) { - RECFM rfm; PTDB tdbp = NULL; // If define block not here yet, get it now @@ -653,18 +777,10 @@ PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode) /*********************************************************************/ if (!(tdbp = Pxdef->GetTable(g, mode))) return NULL; - else - rfm = tdbp->GetFtype(); - - if (rfm == RECFM_NAF) - return tdbp; - else if (rfm == RECFM_OEM) { - if (Multiple) - tdbp = new(g) TDBMUL(tdbp); // No block optimization yet - - return tdbp; - } // endif OEM + else if (Multiple && tdbp->GetFtype() == RECFM_OEM) + tdbp = new(g) TDBMUL(tdbp); // No block optimization yet +#if 0 /*********************************************************************/ /* The OEM table is based on a file type (currently DOS+ only) */ /*********************************************************************/ @@ -723,7 +839,7 @@ PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode) if (Multiple) tdbp = new(g) TDBMUL(tdbp); - +#endif // 0 return tdbp; } // end of GetTable diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h index f8256a59b3d..73e178ed51c 100644 --- a/storage/connect/reldef.h +++ b/storage/connect/reldef.h @@ -84,10 +84,12 @@ public: void SetNext(PTABDEF tdfp) {Next = tdfp;} int GetMultiple(void) {return Multiple;} int GetPseudo(void) {return Pseudo;} - PCSZ GetPath(void); + RECFM GetRecfm(void) {return Recfm;} + PCSZ GetPath(void); //PSZ GetPath(void) // {return (Database) ? (PSZ)Database : Cat->GetDataPath();} - bool SepIndex(void) {return GetBoolCatInfo("SepIndex", false);} + RECFM GetTableFormat(const char* type); + bool SepIndex(void) {return GetBoolCatInfo("SepIndex", false);} bool IsReadOnly(void) {return Read_Only;} virtual AMT GetDefType(void) {return TYPE_AM_TAB;} virtual PIXDEF GetIndx(void) {return NULL;} @@ -108,7 +110,8 @@ public: // Members PCSZ Schema; /* Table schema (for ODBC) */ PCSZ Desc; /* Table description */ - uint Catfunc; /* Catalog function ID */ + RECFM Recfm; /* File or table format */ + uint Catfunc; /* Catalog function ID */ int Card; /* (max) number of rows in table */ int Elemt; /* Number of rows in blocks or rowset */ int Sort; /* Table already sorted ??? */ diff --git a/storage/connect/restget.cpp b/storage/connect/restget.cpp index 6b184ae6926..29dae230780 100644 --- a/storage/connect/restget.cpp +++ b/storage/connect/restget.cpp @@ -4,12 +4,6 @@ /***********************************************************************/ #include #include -#if defined(MARIADB) -#include -#else -#include "mini-global.h" -#define _OS_H_INCLUDED // Prevent os.h to be called -#endif using namespace utility::conversions; // String conversions utilities using namespace web; // Common features like URIs. @@ -17,24 +11,26 @@ using namespace web::http; // Common HTTP functionality using namespace web::http::client; // HTTP client features using namespace concurrency::streams; // Asynchronous streams -#include "global.h" +typedef const char* PCSZ; + +extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn); /***********************************************************************/ /* Make a local copy of the requested file. */ /***********************************************************************/ -int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn) +int restGetFile(char *m, bool xt, PCSZ http, PCSZ uri, PCSZ fn) { int rc = 0; - bool xt = trace(515); auto fileStream = std::make_shared(); if (!http || !fn) { - strcpy(g->Message, "Missing http or filename"); - return 2; + //strcpy(g->Message, "Missing http or filename"); + strcpy(m, "Missing http or filename"); + return 2; } // endif if (xt) - htrc("restGetFile: fn=%s\n", fn); + fprintf(stderr, "restGetFile: fn=%s\n", fn); // Open stream to output file. pplx::task requestTask = fstream::open_ostream(to_string_t(fn)) @@ -42,7 +38,7 @@ int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn) *fileStream= outFile; if (xt) - htrc("Outfile isopen=%d\n", outFile.is_open()); + fprintf(stderr, "Outfile isopen=%d\n", outFile.is_open()); // Create http_client to send the request. http_client client(to_string_t(http)); @@ -58,8 +54,8 @@ int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn) // Handle response headers arriving. .then([=](http_response response) { if (xt) - htrc("Received response status code:%u\n", - response.status_code()); + fprintf(stderr, "Received response status code:%u\n", + response.status_code()); // Write response body into the file. return response.body().read_to_end(fileStream->streambuf()); @@ -68,27 +64,27 @@ int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn) // Close the file stream. .then([=](size_t n) { if (xt) - htrc("Return size=%u\n", n); + fprintf(stderr, "Return size=%zu\n", n); return fileStream->close(); }); // Wait for all the outstanding I/O to complete and handle any exceptions try { - requestTask.wait(); - if (xt) - htrc("In Wait\n"); + fprintf(stderr, "Waiting\n"); + requestTask.wait(); } catch (const std::exception &e) { if (xt) - htrc("Error exception: %s\n", e.what()); - sprintf(g->Message, "Error exception: %s", e.what()); - rc= 1; + fprintf(stderr, "Error exception: %s\n", e.what()); + + sprintf(m, "Error exception: %s", e.what()); + rc= 1; } // end try/catch if (xt) - htrc("restget done: rc=%d\n", rc); + fprintf(stderr, "restget done: rc=%d\n", rc); return rc; } // end of restGetFile diff --git a/storage/connect/tabcmg.cpp b/storage/connect/tabcmg.cpp index da1cfd34ac7..b9b7f6e4b60 100644 --- a/storage/connect/tabcmg.cpp +++ b/storage/connect/tabcmg.cpp @@ -53,25 +53,30 @@ bool CMGDISC::FindInDoc(PGLOBAL g, bson_iter_t *iter, const bson_t *doc, { if (!doc || bson_iter_init(iter, doc)) { const char *key; - char colname[65]; - char fmt[129]; - bool newcol; + char colname[65]; + char fmt[129]; + bool newcol; + size_t n; while (bson_iter_next(iter)) { key = bson_iter_key(iter); newcol = true; if (pcn) { - strncpy(colname, pcn, 64); - colname[64] = 0; - strncat(strncat(colname, "_", 65), key, 65); + n = sizeof(colname) - 1; + strncpy(colname, pcn, n); + colname[n] = 0; + n -= strlen(colname); + strncat(strncat(colname, "_", n), key, n - 1); } else strcpy(colname, key); if (pfmt) { - strncpy(fmt, pfmt, 128); - fmt[128] = 0; - strncat(strncat(fmt, ".", 129), key, 129); + n = sizeof(fmt) - 1; + strncpy(fmt, pfmt, n); + fmt[n] = 0; + n -= strlen(fmt); + strncat(strncat(fmt, ".", n), key, n - 1); } else strcpy(fmt, key); diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index 4f6e2c81744..8efe2aad702 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -45,7 +45,7 @@ #include "global.h" #include "osutil.h" #include "plgdbsem.h" -#include "catalog.h" +//#include "catalog.h" #include "mycat.h" #include "xindex.h" #include "filamap.h" @@ -161,7 +161,12 @@ bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int) //Last = GetIntCatInfo("Last", 0); Ending = GetIntCatInfo("Ending", CRLF); - if (Recfm == RECFM_FIX || Recfm == RECFM_BIN) { + if (Ending <= 0) { + Ending = (Recfm == RECFM_BIN || Recfm == RECFM_VCT) ? 0 : CRLF; + SetIntCatInfo("Ending", Ending); + } // endif ending + + if (Recfm == RECFM_FIX || Recfm == RECFM_BIN) { Huge = GetBoolCatInfo("Huge", Cat->GetDefHuge()); Padded = GetBoolCatInfo("Padded", false); Blksize = GetIntCatInfo("Blksize", 0); @@ -191,7 +196,8 @@ bool DOSDEF::GetOptFileName(PGLOBAL g, char *filename) case RECFM_FIX: ftype = ".fop"; break; case RECFM_BIN: ftype = ".bop"; break; case RECFM_VCT: ftype = ".vop"; break; - case RECFM_DBF: ftype = ".dbp"; break; + case RECFM_CSV: ftype = ".cop"; break; + case RECFM_DBF: ftype = ".dbp"; break; default: sprintf(g->Message, MSG(INVALID_FTYPE), Recfm); return true; @@ -261,7 +267,8 @@ bool DOSDEF::DeleteIndexFile(PGLOBAL g, PIXDEF pxdf) case RECFM_FIX: ftype = ".fnx"; break; case RECFM_BIN: ftype = ".bnx"; break; case RECFM_VCT: ftype = ".vnx"; break; - case RECFM_DBF: ftype = ".dbx"; break; + case RECFM_CSV: ftype = ".cnx"; break; + case RECFM_DBF: ftype = ".dbx"; break; default: sprintf(g->Message, MSG(BAD_RECFM_VAL), Recfm); return true; @@ -2257,7 +2264,7 @@ int TDBDOS::ReadDB(PGLOBAL g) /***********************************************************************/ bool TDBDOS::PrepareWriting(PGLOBAL) { - if (!Ftype && (Mode == MODE_INSERT || Txfp->GetUseTemp())) { + if (Ftype == RECFM_VAR && (Mode == MODE_INSERT || Txfp->GetUseTemp())) { char *p; /*******************************************************************/ @@ -2542,7 +2549,8 @@ void DOSCOL::ReadColumn(PGLOBAL g) /*********************************************************************/ /* For a variable length file, check if the field exists. */ /*********************************************************************/ - if (tdbp->Ftype == RECFM_VAR && strlen(tdbp->To_Line) < (unsigned)Deplac) + if ((tdbp->Ftype == RECFM_VAR || tdbp->Ftype == RECFM_CSV) + && strlen(tdbp->To_Line) < (unsigned)Deplac) field = 0; else if (Dsp) for(i = 0; i < field; i++) @@ -2552,7 +2560,8 @@ void DOSCOL::ReadColumn(PGLOBAL g) switch (tdbp->Ftype) { case RECFM_VAR: case RECFM_FIX: // Fixed length text file - case RECFM_DBF: // Fixed length DBase file + case RECFM_CSV: // Variable length CSV or FMT file + case RECFM_DBF: // Fixed length DBase file if (Nod) switch (Buf_Type) { case TYPE_INT: case TYPE_SHORT: diff --git a/storage/connect/tabdos.h b/storage/connect/tabdos.h index bdde37adaad..207a1277fce 100644 --- a/storage/connect/tabdos.h +++ b/storage/connect/tabdos.h @@ -80,7 +80,6 @@ class DllExport DOSDEF : public TABDEF { /* Logical table description */ PCSZ Entry; /* Zip entry name or pattern */ PCSZ Pwd; /* Zip password */ PIXDEF To_Indx; /* To index definitions blocks */ - RECFM Recfm; /* 0:VAR, 1:FIX, 2:BIN, 3:VCT, 6:DBF */ bool Mapped; /* 0: disk file, 1: memory mapped file */ bool Zipped; /* true for zipped table file */ bool Mulentries; /* true for multiple entries */ diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 1969fd4465f..4a0a75460cd 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -84,7 +84,7 @@ PTDB TDBFIX::Clone(PTABS t) tp = new(g) TDBFIX(g, this); - if (Ftype < 2) { + if (Ftype == RECFM_VAR || Ftype == RECFM_FIX) { // File is text PDOSCOL cp1, cp2; diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp index 746382178fb..b395c49c95d 100644 --- a/storage/connect/tabfmt.cpp +++ b/storage/connect/tabfmt.cpp @@ -1,11 +1,11 @@ /************* TabFmt C++ Program Source Code File (.CPP) **************/ /* PROGRAM NAME: TABFMT */ /* ------------- */ -/* Version 3.9.2 */ +/* Version 3.9.3 */ /* */ /* COPYRIGHT: */ /* ---------- */ -/* (C) Copyright to the author Olivier BERTRAND 2001 - 2017 */ +/* (C) Copyright to the author Olivier BERTRAND 2001 - 2019 */ /* */ /* WHAT THIS PROGRAM DOES: */ /* ----------------------- */ @@ -477,6 +477,7 @@ bool CSVDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) if (DOSDEF::DefineAM(g, "CSV", poff)) return true; + Recfm = RECFM_CSV; GetCharCatInfo("Separator", ",", buf, sizeof(buf)); Sep = (strlen(buf) == 2 && buf[0] == '\\' && buf[1] == 't') ? '\t' : *buf; Quoted = GetIntCatInfo("Quoted", -1); diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 0b282345c8a..7e8d6c8d9f0 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -394,10 +394,11 @@ err: bool JSONDISC::Find(PGLOBAL g, PJVAL jvp, PCSZ key, int j) { - char *p, *pc = colname + strlen(colname); - int ars; - PJOB job; - PJAR jar; + char *p, *pc = colname + strlen(colname); + int ars; + size_t n; + PJOB job; + PJAR jar; if ((valp = jvp ? jvp->GetValue() : NULL)) { jcol.Type = valp->GetType(); @@ -423,8 +424,10 @@ bool JSONDISC::Find(PGLOBAL g, PJVAL jvp, PCSZ key, int j) PCSZ k = jrp->GetKey(); if (*k != '$') { - strncat(strncat(fmt, sep, 128), k, 128); - strncat(strncat(colname, "_", 64), k, 64); + n = sizeof(fmt) - strlen(fmt) -1; + strncat(strncat(fmt, sep, n), k, n - strlen(sep)); + n = sizeof(colname) - strlen(colname) - 1; + strncat(strncat(colname, "_", n), k, n - 1); } // endif Key if (Find(g, jrp->GetVal(), k, j + 1)) @@ -443,19 +446,26 @@ bool JSONDISC::Find(PGLOBAL g, PJVAL jvp, PCSZ key, int j) ars = MY_MIN(jar->GetSize(false), 1); for (int k = 0; k < ars; k++) { - if (!tdp->Xcol || stricmp(tdp->Xcol, key)) { + n = sizeof(fmt) - (strlen(fmt) + 1); + + if (!tdp->Xcol || stricmp(tdp->Xcol, key)) { sprintf(buf, "%d", k); - if (tdp->Uri) - strncat(strncat(fmt, sep, 128), buf, 128); - else - strncat(strncat(strncat(fmt, "[", 128), buf, 128), "]", 128); + if (tdp->Uri) { + strncat(strncat(fmt, sep, n), buf, n - strlen(sep)); + } else { + strncat(strncat(fmt, "[", n), buf, n - 1); + strncat(fmt, "]", n - (strlen(buf) + 1)); + } // endif uri - if (all) - strncat(strncat(colname, "_", 64), buf, 64); + if (all) { + n = sizeof(colname) - (strlen(colname) + 1); + strncat(strncat(colname, "_", n), buf, n - 1); + } // endif all - } else - strncat(fmt, (tdp->Uri ? sep : "[*]"), 128); + } else { + strncat(fmt, (tdp->Uri ? sep : "[*]"), n); + } if (Find(g, jar->GetValue(k), "", j)) return true; diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index ceffafac02c..7e165fb5a80 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -342,11 +342,13 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int) Delayed = !!GetIntCatInfo("Delayed", 0); } else { // MYSQL access from a PROXY table - Tabschema = GetStringCatInfo(g, "Database", Tabschema ? Tabschema : PlugDup(g, "*")); + TABLE_SHARE* s; + + Tabschema = GetStringCatInfo(g, "Database", Tabschema ? Tabschema : PlugDup(g, "*")); Isview = GetBoolCatInfo("View", false); // We must get other connection parms from the calling table - Remove_tshp(Cat); + s = Remove_tshp(Cat); url = GetStringCatInfo(g, "Connect", NULL); if (!url || !*url) { @@ -365,6 +367,9 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int) } // endif url Tabname = Name; + + // Needed for column description + Restore_tshp(Cat, s); } // endif am if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) { diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp index 0fa117c3d2f..ba5c65e2c94 100644 --- a/storage/connect/tabodbc.cpp +++ b/storage/connect/tabodbc.cpp @@ -605,8 +605,10 @@ bool TDBODBC::OpenDB(PGLOBAL g) Cnp->InitValue(g); if ((n = Ocp->GetResultSize(Query->GetStr(), Cnp)) < 0) { - strcpy(g->Message, "Cannot get result size"); - return true; + char* msg = PlugDup(g, g->Message); + + sprintf(g->Message, "Get result size: %s (rc=%d)", msg, n); + return true; } else if (n) { Ocp->m_Rows = n; diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index 9e1a643c89f..4f12caad52e 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -1,5 +1,5 @@ -/*************** Rest C++ Program Source Code File (.CPP) **************/ -/* PROGRAM NAME: Rest Version 1.5 */ +/************** tabrest C++ Program Source Code File (.CPP) ************/ +/* PROGRAM NAME: tabrest Version 1.7 */ /* (C) Copyright to the author Olivier BERTRAND 2018 - 2019 */ /* This program is the REST Web API support for MariaDB. */ /* When compiled without MARIADB defined, it is the EOM module code. */ @@ -9,13 +9,18 @@ /* Definitions needed by the included files. */ /***********************************************************************/ #if defined(MARIADB) -#include // All MariaDB stuff +#include // All MariaDB stuff #else // !MARIADB OEM module #include "mini-global.h" #define _MAX_PATH 260 -#if !defined(__WIN__) +#if !defined(REST_SOURCE) +#if defined(__WIN__) || defined(_WINDOWS) +#include +#else // !__WIN__ #define __stdcall +#include // dlopen(), dlclose(), dlsym() ... #endif // !__WIN__ +#endif // !REST_SOURCE #define _OS_H_INCLUDED // Prevent os.h to be called #endif // !MARIADB @@ -23,7 +28,6 @@ /* Include application header files: */ /* global.h is header containing all global declarations. */ /* plgdbsem.h is header containing the DB application declarations. */ -/* (x)table.h is header containing the TDBASE declarations. */ /***********************************************************************/ #include "global.h" #include "plgdbsem.h" @@ -36,17 +40,7 @@ #include "tabfmt.h" #include "tabrest.h" -/***********************************************************************/ -/* Get the file from the Web. */ -/***********************************************************************/ -int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn); - -#if defined(__WIN__) -static PCSZ slash = "\\"; -#else // !__WIN__ -static PCSZ slash = "/"; -#define stricmp strcasecmp -#endif // !__WIN__ +static XGETREST getRestFnc = NULL; #if !defined(MARIADB) /***********************************************************************/ @@ -75,6 +69,74 @@ PTABDEF __stdcall GetREST(PGLOBAL g, void *memp) } // end of GetREST #endif // !MARIADB +/***********************************************************************/ +/* GetREST: get the external TABDEF from OEM module. */ +/***********************************************************************/ +XGETREST GetRestFunction(PGLOBAL g) +{ + if (getRestFnc) + return getRestFnc; + +#if !defined(MARIADB) || !defined(REST_SOURCE) + if (trace(515)) + htrc("Looking for GetRest library\n"); + +#if defined(__WIN__) || defined(_WINDOWS) + HANDLE Hdll; + const char* soname = "GetRest.dll"; // Module name + + if (!(Hdll = LoadLibrary(soname))) { + char buf[256]; + DWORD rc = GetLastError(); + + sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, soname); + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0, + (LPTSTR)buf, sizeof(buf), NULL); + strcat(strcat(g->Message, ": "), buf); + return NULL; + } // endif Hdll + +// Get the function returning an instance of the external DEF class + if (!(getRestFnc = (XGETREST)GetProcAddress((HINSTANCE)Hdll, "restGetFile"))) { + char buf[256]; + DWORD rc = GetLastError(); + + sprintf(g->Message, MSG(PROCADD_ERROR), rc, "restGetFile"); + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0, + (LPTSTR)buf, sizeof(buf), NULL); + strcat(strcat(g->Message, ": "), buf); + FreeLibrary((HMODULE)Hdll); + return NULL; + } // endif getRestFnc +#else // !__WIN__ + void* Hso; + const char* error = NULL; + const char* soname = "GetRest.so"; // Module name + + // Load the desired shared library + if (!(Hso = dlopen(soname, RTLD_LAZY))) { + error = dlerror(); + sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error)); + return NULL; + } // endif Hdll + +// Get the function returning an instance of the external DEF class + if (!(getRestFnc = (XGETREST)dlsym(Hso, "restGetFile"))) { + error = dlerror(); + sprintf(g->Message, MSG(GET_FUNC_ERR), "restGetFile", SVP(error)); + dlclose(Hso); + return NULL; + } // endif getdef +#endif // !__WIN__ +#else + getRestFnc = restGetFile; +#endif + + return getRestFnc; +} // end of GetRestFunction + /***********************************************************************/ /* Return the columns definition to MariaDB. */ /***********************************************************************/ @@ -87,6 +149,10 @@ PQRYRES __stdcall ColREST(PGLOBAL g, PTOS tp, char *tab, char *db, bool info) PQRYRES qrp= NULL; char filename[_MAX_PATH + 1]; // MAX PATH ??? PCSZ http, uri, fn, ftype; + XGETREST grf = GetRestFunction(g); + + if (!grf) + return NULL; http = GetStringTableOption(g, tp, "Http", NULL); uri = GetStringTableOption(g, tp, "Uri", NULL); @@ -100,11 +166,11 @@ PQRYRES __stdcall ColREST(PGLOBAL g, PTOS tp, char *tab, char *db, bool info) // We used the file name relative to recorded datapath strcat(strcat(strcat(strcpy(filename, "."), slash), db), slash); - strncat(filename, fn, _MAX_PATH); + strncat(filename, fn, _MAX_PATH - strlen(filename)); // Retrieve the file from the web and copy it locally - if (http && restGetFile(g, http, uri, filename)) { - // sprintf(g->Message, "Failed to get file at %s", http); + if (http && grf(g->Message, trace(515), http, uri, filename)) { + // sprintf(g->Message, "Failed to get file at %s", http); } else if (!stricmp(ftype, "XML")) qrp = XMLColumns(g, db, tab, tp, info); else if (!stricmp(ftype, "JSON")) @@ -124,9 +190,14 @@ PQRYRES __stdcall ColREST(PGLOBAL g, PTOS tp, char *tab, char *db, bool info) /***********************************************************************/ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) { - char filename[_MAX_PATH + 1]; + char filename[_MAX_PATH + 1]; int rc = 0, n; - LPCSTR ftype; + bool xt = trace(515); + LPCSTR ftype; + XGETREST grf = GetRestFunction(g); + + if (!grf) + return true; #if defined(MARIADB) ftype = GetStringCatInfo(g, "Type", "JSON"); @@ -135,7 +206,7 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) ftype = GetStringCatInfo(g, "Ftype", "JSON"); #endif // !MARIADB - if (trace(515)) + if (xt) htrc("ftype = %s am = %s\n", ftype, SVP(am)); n = (!stricmp(ftype, "JSON")) ? 1 @@ -154,12 +225,13 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) // We used the file name relative to recorded datapath //PlugSetPath(filename, Fn, GetPath()); - strncat(strcpy(filename, GetPath()), Fn, _MAX_PATH); + strcpy(filename, GetPath()); + strncat(filename, Fn, _MAX_PATH - strlen(filename)); // Retrieve the file from the web and copy it locally - rc = restGetFile(g, Http, Uri, filename); + rc = grf(g->Message, xt, Http, Uri, filename); - if (trace(515)) + if (xt) htrc("Return from restGetFile: rc=%d\n", rc); if (rc) @@ -175,7 +247,7 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) if (Tdp && Tdp->Define(g, Cat, Name, Schema, "REST")) Tdp = NULL; // Error occured - if (trace(515)) + if (xt) htrc("Tdp defined\n", rc); // Return true in case of error diff --git a/storage/connect/tabrest.h b/storage/connect/tabrest.h index 1725f256079..9cf2d10a6b8 100644 --- a/storage/connect/tabrest.h +++ b/storage/connect/tabrest.h @@ -5,6 +5,27 @@ /***********************************************************************/ #pragma once +#if defined(__WIN__) +static PCSZ slash = "\\"; +#else // !__WIN__ +static PCSZ slash = "/"; +#define stricmp strcasecmp +#endif // !__WIN__ + +typedef int(__stdcall* XGETREST) (char*, bool, PCSZ, PCSZ, PCSZ); + +/***********************************************************************/ +/* Functions used by REST. */ +/***********************************************************************/ +XGETREST GetRestFunction(PGLOBAL g); +#if defined(REST_SOURCE) +extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn); +#endif // REST_SOURCE +#if defined(MARIADB) +PQRYRES RESTColumns(PGLOBAL g, PTOS tp, char* tab, char* db, bool info); +#endif // !MARIADB + + /***********************************************************************/ /* Restest table. */ /***********************************************************************/ diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index 462a6fcd839..e187e6eaec5 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -59,11 +59,23 @@ int GetConvSize(void); /* Used by MYSQL tables to get MySQL parameters from the calling proxy */ /* table (PROXY, TBL, XCL, or OCCUR) when used by one of these. */ /************************************************************************/ -void Remove_tshp(PCATLG cat) +TABLE_SHARE *Remove_tshp(PCATLG cat) { - ((MYCAT*)cat)->GetHandler()->tshp = NULL; + TABLE_SHARE *s = ((MYCAT*)cat)->GetHandler()->tshp; + + ((MYCAT*)cat)->GetHandler()->tshp = NULL; + return s; } // end of Remove_thsp +/************************************************************************/ +/* Used by MYSQL tables to get MySQL parameters from the calling proxy */ +/* table (PROXY, TBL, XCL, or OCCUR) when used by one of these. */ +/************************************************************************/ +void Restore_tshp(PCATLG cat, TABLE_SHARE *s) +{ + ((MYCAT*)cat)->GetHandler()->tshp = s; +} // end of Restore_thsp + /************************************************************************/ /* GetTableShare: allocates and open a table share. */ /************************************************************************/ diff --git a/storage/connect/tabutil.h b/storage/connect/tabutil.h index 62678508ca1..c8e7e75106f 100644 --- a/storage/connect/tabutil.h +++ b/storage/connect/tabutil.h @@ -18,7 +18,8 @@ TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db, PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, const char *name, bool& info); -void Remove_tshp(PCATLG cat); +TABLE_SHARE *Remove_tshp(PCATLG cat); +void Restore_tshp(PCATLG cat, TABLE_SHARE *s); /* -------------------------- PROXY classes -------------------------- */ diff --git a/storage/connect/tabvct.cpp b/storage/connect/tabvct.cpp index 40d020202ea..0ed466f6ffb 100644 --- a/storage/connect/tabvct.cpp +++ b/storage/connect/tabvct.cpp @@ -115,11 +115,14 @@ bool VCTDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Recfm = RECFM_VCT; + // poff is no more in use; This will have to be revisited +#if 0 // For packed files the logical record length is calculated in poff if (poff != Lrecl) { Lrecl = poff; SetIntCatInfo("Lrecl", poff); } // endif poff +#endif // 0 Padded = false; Blksize = 0; diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 19490d350e8..717090e9c5a 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -240,7 +240,9 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) more: if (vp->atp) { - strncpy(colname, vp->atp->GetName(g), sizeof(colname)); + size_t z = sizeof(colname) - 1; + strncpy(colname, vp->atp->GetName(g), z); + colname[z] = 0; strncat(xcol->Name, colname, XLEN(xcol->Name)); switch (vp->atp->GetText(g, buf, sizeof(buf))) { diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index 73ca135691c..b7c8c704e65 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -206,6 +206,7 @@ void VALBLK::ChkIndx(int n) { if (n < 0 || n >= Nval) { PGLOBAL& g = Global; + xtrc(1, "ChkIndx: n=%d Nval=%d\n", n, Nval); strcpy(g->Message, MSG(BAD_VALBLK_INDX)); throw Type; } // endif n @@ -216,7 +217,8 @@ void VALBLK::ChkTyp(PVAL v) { if (Check && (Type != v->GetType() || Unsigned != v->IsUnsigned())) { PGLOBAL& g = Global; - strcpy(g->Message, MSG(VALTYPE_NOMATCH)); + xtrc(1, "ChkTyp: Type=%d valType=%d\n", Type, v->GetType()); + strcpy(g->Message, MSG(VALTYPE_NOMATCH)); throw Type; } // endif Type @@ -511,7 +513,7 @@ void TYPBLK::SetValues(PVBLK pv, int k, int n) CheckType(pv) TYPE *lp = ((TYPBLK*)pv)->Typp; - for (register int i = k; i < n; i++) // TODO + for (int i = k; i < n; i++) // TODO Typp[i] = lp[i]; } // end of SetValues @@ -805,7 +807,7 @@ void CHRBLK::SetValue(const char *sp, uint len, int n) if (Blanks) { // Suppress eventual ending zero and right fill with blanks - for (register int i = len; i < Long; i++) + for (int i = len; i < Long; i++) p[i] = ' '; } else if ((signed)len < Long) diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index d9330a68a15..df75722d0e8 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -123,7 +123,7 @@ ulonglong CharToNumber(const char *p, int n, ulonglong maxval, case '+': p++; break; - } // endswitch *p + } // endswitch *p for (val = 0; p < p2 && (c = (uchar)(*p - '0')) < 10; p++) if (val > (maxval - c) / 10) { @@ -140,7 +140,7 @@ ulonglong CharToNumber(const char *p, int n, ulonglong maxval, /* GetTypeName: returns the PlugDB internal type name. */ /***********************************************************************/ PCSZ GetTypeName(int type) - { +{ PCSZ name; switch (type) { @@ -155,17 +155,17 @@ PCSZ GetTypeName(int type) case TYPE_BIN: name = "BINARY"; break; case TYPE_PCHAR: name = "PCHAR"; break; default: name = "UNKNOWN"; break; - } // endswitch type + } // endswitch type return name; - } // end of GetTypeName +} // end of GetTypeName /***********************************************************************/ /* GetTypeSize: returns the PlugDB internal type size. */ /***********************************************************************/ int GetTypeSize(int type, int len) { - switch (type) { + switch (type) { case TYPE_DECIM: case TYPE_BIN: case TYPE_STRING: len = len * sizeof(char); break; @@ -177,16 +177,16 @@ int GetTypeSize(int type, int len) case TYPE_TINY: len = sizeof(char); break; case TYPE_PCHAR: len = sizeof(char*); break; default: len = -1; - } // endswitch type + } // endswitch type return len; - } // end of GetTypeSize +} // end of GetTypeSize /***********************************************************************/ /* GetFormatType: returns the FORMAT character(s) according to type. */ /***********************************************************************/ const char *GetFormatType(int type) - { +{ const char *c = "X"; switch (type) { @@ -200,16 +200,16 @@ const char *GetFormatType(int type) case TYPE_DECIM: c = "M"; break; case TYPE_BIN: c = "B"; break; case TYPE_PCHAR: c = "P"; break; - } // endswitch type + } // endswitch type return c; - } // end of GetFormatType +} // end of GetFormatType /***********************************************************************/ /* GetFormatType: returns the FORMAT type according to character. */ /***********************************************************************/ int GetFormatType(char c) - { +{ int type = TYPE_ERROR; switch (c) { @@ -223,31 +223,31 @@ int GetFormatType(char c) case 'M': type = TYPE_DECIM; break; case 'B': type = TYPE_BIN; break; case 'P': type = TYPE_PCHAR; break; - } // endswitch type + } // endswitch type return type; - } // end of GetFormatType +} // end of GetFormatType /***********************************************************************/ /* IsTypeChar: returns true for character type(s). */ /***********************************************************************/ bool IsTypeChar(int type) - { +{ switch (type) { case TYPE_STRING: case TYPE_DECIM: case TYPE_BIN: return true; - } // endswitch type + } // endswitch type return false; - } // end of IsTypeChar +} // end of IsTypeChar /***********************************************************************/ /* IsTypeNum: returns true for numeric types. */ /***********************************************************************/ bool IsTypeNum(int type) - { +{ switch (type) { case TYPE_INT: case TYPE_BIGINT: @@ -258,16 +258,16 @@ bool IsTypeNum(int type) case TYPE_TINY: case TYPE_DECIM: return true; - } // endswitch type + } // endswitch type return false; - } // end of IsTypeNum +} // end of IsTypeNum /***********************************************************************/ /* GetFmt: returns the format to use with a typed value. */ /***********************************************************************/ const char *GetFmt(int type, bool un) - { +{ const char *fmt; switch (type) { @@ -278,10 +278,10 @@ const char *GetFmt(int type, bool un) case TYPE_DOUBLE: fmt = "%.*lf"; break; case TYPE_BIN: fmt = "%*x"; break; default: fmt = (un) ? "%u" : "%d"; break; - } // endswitch Type + } // endswitch Type return fmt; - } // end of GetFmt +} // end of GetFmt /***********************************************************************/ /* ConvertType: what this function does is to determine the type to */ @@ -293,7 +293,7 @@ const char *GetFmt(int type, bool un) /* IsType... functions so match does not prevent correct setting. */ /***********************************************************************/ int ConvertType(int target, int type, CONV kind, bool match) - { +{ switch (kind) { case CNV_CHAR: if (match && (!IsTypeChar(target) || !IsTypeChar(type))) @@ -326,15 +326,15 @@ int ConvertType(int target, int type, CONV kind, bool match) : (target == TYPE_STRING || type == TYPE_STRING) ? TYPE_STRING : (target == TYPE_TINY || type == TYPE_TINY) ? TYPE_TINY : TYPE_ERROR; - } // endswitch kind + } // endswitch kind - } // end of ConvertType +} // end of ConvertType /***********************************************************************/ /* AllocateConstant: allocates a constant Value. */ /***********************************************************************/ PVAL AllocateValue(PGLOBAL g, void *value, short type, short prec) - { +{ PVAL valp; if (trace(1)) @@ -362,18 +362,18 @@ PVAL AllocateValue(PGLOBAL g, void *value, short type, short prec) default: sprintf(g->Message, MSG(BAD_VALUE_TYPE), type); return NULL; - } // endswitch Type + } // endswitch Type valp->SetGlobal(g); return valp; - } // end of AllocateValue +} // end of AllocateValue /***********************************************************************/ /* Allocate a variable Value according to type, length and precision. */ /***********************************************************************/ PVAL AllocateValue(PGLOBAL g, int type, int len, int prec, bool uns, PCSZ fmt) - { +{ PVAL valp; switch (type) { @@ -423,18 +423,18 @@ PVAL AllocateValue(PGLOBAL g, int type, int len, int prec, default: sprintf(g->Message, MSG(BAD_VALUE_TYPE), type); return NULL; - } // endswitch type + } // endswitch type valp->SetGlobal(g); return valp; - } // end of AllocateValue +} // end of AllocateValue /***********************************************************************/ /* Allocate a constant Value converted to newtype. */ /* Can also be used to copy a Value eventually converted. */ /***********************************************************************/ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns) - { +{ PSZ p, sp; bool un = (uns < 0) ? false : (uns > 0) ? true : valp->IsUnsigned(); PVAL vp; @@ -495,13 +495,13 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns) default: sprintf(g->Message, MSG(BAD_VALUE_TYPE), newtype); return NULL; - } // endswitch type + } // endswitch type vp->SetNullable(valp->GetNullable()); vp->SetNull(valp->IsNull()); vp->SetGlobal(g); return vp; - } // end of AllocateValue +} // end of AllocateValue /* -------------------------- Class VALUE ---------------------------- */ @@ -509,7 +509,7 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns) /* Class VALUE protected constructor. */ /***********************************************************************/ VALUE::VALUE(int type, bool un) : Type(type) - { +{ Null = false; Nullable = false; Unsigned = un; @@ -517,13 +517,13 @@ VALUE::VALUE(int type, bool un) : Type(type) Prec = 0; Fmt = GetFmt(Type, Unsigned); Xfmt = GetXfmt(); - } // end of VALUE constructor +} // end of VALUE constructor /***********************************************************************/ /* VALUE GetXfmt: returns the extended format to use with typed value. */ /***********************************************************************/ const char *VALUE::GetXfmt(void) - { +{ const char *fmt; switch (Type) { @@ -537,7 +537,7 @@ const char *VALUE::GetXfmt(void) } // endswitch Type return fmt; - } // end of GetFmt +} // end of GetXFmt /***********************************************************************/ /* Returns a BYTE indicating the comparison between two values. */ @@ -545,20 +545,20 @@ const char *VALUE::GetXfmt(void) /* More than 1 bit can be set only in the case of TYPE_LIST. */ /***********************************************************************/ BYTE VALUE::TestValue(PVAL vp) - { +{ int n = CompareValue(vp); return (n > 0) ? 0x04 : (n < 0) ? 0x02 : 0x01; - } // end of TestValue +} // end of TestValue /***********************************************************************/ /* Compute a function on a string. */ /***********************************************************************/ bool VALUE::Compute(PGLOBAL g, PVAL *, int, OPVAL) - { +{ strcpy(g->Message, "Compute not implemented for this value type"); return true; - } // end of Compute +} // end of Compute /***********************************************************************/ /* Make file output of an object value. */ @@ -600,11 +600,11 @@ void VALUE::Prints(PGLOBAL g, char *ps, uint z) template TYPVAL::TYPVAL(TYPE n, int type, int prec, bool un) : VALUE(type, un) - { +{ Tval = n; Clen = sizeof(TYPE); Prec = prec; - } // end of TYPVAL constructor +} // end of TYPVAL constructor /***********************************************************************/ /* Return unsigned max value for the type. */ @@ -641,19 +641,19 @@ ulonglong TYPVAL::MaxVal(void) {return ULONGLONG_MAX;} /***********************************************************************/ template int TYPVAL::GetValLen(void) - { +{ char c[32]; - return sprintf(c, Fmt, Tval); - } // end of GetValLen + return snprintf(c, 32, Fmt, Tval); +} // end of GetValLen template <> int TYPVAL::GetValLen(void) - { +{ char c[32]; - return sprintf(c, Fmt, Prec, Tval); - } // end of GetValLen + return snprintf(c, 32, Fmt, Prec, Tval); +} // end of GetValLen /***********************************************************************/ /* TYPVAL SetValue: copy the value of another Value object. */ @@ -661,7 +661,7 @@ int TYPVAL::GetValLen(void) /***********************************************************************/ template bool TYPVAL::SetValue_pval(PVAL valp, bool chktype) - { +{ if (valp != this) { if (chktype && Type != valp->GetType()) return true; @@ -671,10 +671,10 @@ bool TYPVAL::SetValue_pval(PVAL valp, bool chktype) else Reset(); - } // endif valp + } // endif valp return false; - } // end of SetValue +} // end of SetValue template <> short TYPVAL::GetTypedValue(PVAL valp) @@ -717,7 +717,7 @@ uchar TYPVAL::GetTypedValue(PVAL valp) /***********************************************************************/ template bool TYPVAL::SetValue_char(const char *p, int n) - { +{ bool rc, minus; ulonglong maxval = MaxVal(); ulonglong val = CharToNumber(p, n, maxval, Unsigned, &minus, &rc); @@ -731,15 +731,15 @@ bool TYPVAL::SetValue_char(const char *p, int n) char buf[64]; htrc(strcat(strcat(strcpy(buf, " setting %s to: "), Fmt), "\n"), GetTypeName(Type), Tval); - } // endif trace + } // endif trace Null = false; return rc; - } // end of SetValue +} // end of SetValue template <> bool TYPVAL::SetValue_char(const char *p, int n) - { +{ if (p && n > 0) { char buf[64]; @@ -760,14 +760,14 @@ bool TYPVAL::SetValue_char(const char *p, int n) } // endif p return false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* TYPVAL SetValue: fill a typed value from a string. */ /***********************************************************************/ template void TYPVAL::SetValue_psz(PCSZ s) - { +{ if (s) { SetValue_char(s, (int)strlen(s)); Null = false; @@ -776,17 +776,17 @@ void TYPVAL::SetValue_psz(PCSZ s) Null = Nullable; } // endif p - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* TYPVAL SetValue: set value with a TYPE extracted from a block. */ /***********************************************************************/ template void TYPVAL::SetValue_pvblk(PVBLK blk, int n) - { +{ Tval = GetTypedValue(blk, n); Null = false; - } // end of SetValue +} // end of SetValue template <> int TYPVAL::GetTypedValue(PVBLK blk, int n) @@ -852,7 +852,7 @@ void TYPVAL::SetBinValue(void *p) /***********************************************************************/ template bool TYPVAL::GetBinValue(void *buf, int buflen, bool go) - { +{ // Test on length was removed here until a variable in column give the // real field length. For BIN files the field length logically cannot // be different from the variable length because no conversion is done. @@ -876,40 +876,41 @@ bool TYPVAL::GetBinValue(void *buf, int buflen, bool go) Null = false; return false; - } // end of GetBinValue +} // end of GetBinValue /***********************************************************************/ /* TYPVAL ShowValue: get string representation of a typed value. */ /***********************************************************************/ template int TYPVAL::ShowValue(char *buf, int len) - { +{ return snprintf(buf, len + 1, Xfmt, len, Tval); - } // end of ShowValue +} // end of ShowValue template <> int TYPVAL::ShowValue(char *buf, int len) - { +{ // TODO: use a more appropriate format to avoid possible truncation return snprintf(buf, len + 1, Xfmt, len, Prec, Tval); - } // end of ShowValue +} // end of ShowValue /***********************************************************************/ /* TYPVAL GetCharString: get string representation of a typed value. */ /***********************************************************************/ template char *TYPVAL::GetCharString(char *p) - { +{ sprintf(p, Fmt, Tval); return p; - } // end of GetCharString +} // end of GetCharString template <> char *TYPVAL::GetCharString(char *p) - { - sprintf(p, Fmt, Prec, Tval); +{ + // Most callers use a 32 long buffer + snprintf(p, 32, Fmt, Prec, Tval); return p; - } // end of GetCharString +} // end of GetCharString #if 0 /***********************************************************************/ @@ -917,50 +918,50 @@ char *TYPVAL::GetCharString(char *p) /***********************************************************************/ template char *TYPVAL::GetShortString(char *p, int n) - { +{ sprintf(p, "%*hd", n, (short)Tval); return p; - } // end of GetShortString +} // end of GetShortString /***********************************************************************/ /* TYPVAL GetIntString: get int representation of a typed value. */ /***********************************************************************/ template char *TYPVAL::GetIntString(char *p, int n) - { +{ sprintf(p, "%*d", n, (int)Tval); return p; - } // end of GetIntString +} // end of GetIntString /***********************************************************************/ /* TYPVAL GetBigintString: get big int representation of a TYPE value.*/ /***********************************************************************/ template char *TYPVAL::GetBigintString(char *p, int n) - { +{ sprintf(p, "%*lld", n, (longlong)Tval); return p; - } // end of GetBigintString +} // end of GetBigintString /***********************************************************************/ /* TYPVAL GetFloatString: get double representation of a typed value. */ /***********************************************************************/ template char *TYPVAL::GetFloatString(char *p, int n, int prec) - { +{ sprintf(p, "%*.*lf", n, (prec < 0) ? 2 : prec, (double)Tval); return p; - } // end of GetFloatString +} // end of GetFloatString /***********************************************************************/ /* TYPVAL GetTinyString: get char representation of a typed value. */ /***********************************************************************/ template char *TYPVAL::GetTinyString(char *p, int n) - { +{ sprintf(p, "%*d", n, (int)(char)Tval); return p; - } // end of GetIntString +} // end of GetIntString #endif // 0 /***********************************************************************/ @@ -968,7 +969,7 @@ char *TYPVAL::GetTinyString(char *p, int n) /***********************************************************************/ template bool TYPVAL::IsEqual(PVAL vp, bool chktype) - { +{ if (this == vp) return true; else if (chktype && Type != vp->GetType()) @@ -980,7 +981,7 @@ bool TYPVAL::IsEqual(PVAL vp, bool chktype) else return (Tval == GetTypedValue(vp)); - } // end of IsEqual +} // end of IsEqual /***********************************************************************/ /* Compare values and returns 1, 0 or -1 according to comparison. */ @@ -988,7 +989,7 @@ bool TYPVAL::IsEqual(PVAL vp, bool chktype) /***********************************************************************/ template int TYPVAL::CompareValue(PVAL vp) - { +{ //assert(vp->GetType() == Type); // Process filtering on numeric values. @@ -998,7 +999,7 @@ int TYPVAL::CompareValue(PVAL vp) // htrc(" Comparing: val=%d,%d\n", Tval, n); return (Tval > n) ? 1 : (Tval < n) ? (-1) : 0; - } // end of CompareValue +} // end of CompareValue /***********************************************************************/ /* Return max type value if b is true, else min type value. */ @@ -1044,7 +1045,7 @@ uchar TYPVAL::MinMaxVal(bool b) /***********************************************************************/ template TYPE TYPVAL::SafeAdd(TYPE n1, TYPE n2) - { +{ PGLOBAL& g = Global; TYPE n = n1 + n2; @@ -1059,20 +1060,20 @@ TYPE TYPVAL::SafeAdd(TYPE n1, TYPE n2) } // endif's n2 return n; - } // end of SafeAdd +} // end of SafeAdd template <> inline double TYPVAL::SafeAdd(double n1, double n2) - { +{ return n1 + n2; - } // end of SafeAdd +} // end of SafeAdd /***********************************************************************/ /* SafeMult: multiply values and test whether overflow occurred. */ /***********************************************************************/ template TYPE TYPVAL::SafeMult(TYPE n1, TYPE n2) - { +{ PGLOBAL& g = Global; double n = (double)n1 * (double)n2; @@ -1087,20 +1088,20 @@ TYPE TYPVAL::SafeMult(TYPE n1, TYPE n2) } // endif's n2 return (TYPE)n; - } // end of SafeMult +} // end of SafeMult template <> inline double TYPVAL::SafeMult(double n1, double n2) - { +{ return n1 * n2; - } // end of SafeMult +} // end of SafeMult /***********************************************************************/ /* Compute defined functions for the type. */ /***********************************************************************/ template bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) - { +{ bool rc = false; TYPE val[2]; @@ -1127,14 +1128,14 @@ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) default: rc = Compall(g, vp, np, op); break; - } // endswitch op + } // endswitch op return rc; - } // end of Compute +} // end of Compute template <> bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) - { +{ bool rc = false; double val[2]; @@ -1152,17 +1153,17 @@ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) break; default: rc = Compall(g, vp, np, op); - } // endswitch op + } // endswitch op return rc; - } // end of Compute +} // end of Compute /***********************************************************************/ /* Compute a function for all types. */ /***********************************************************************/ template bool TYPVAL::Compall(PGLOBAL g, PVAL *vp, int np, OPVAL op) - { +{ TYPE val[2]; for (int i = 0; i < np; i++) @@ -1191,10 +1192,10 @@ bool TYPVAL::Compall(PGLOBAL g, PVAL *vp, int np, OPVAL op) // sprintf(g->Message, MSG(BAD_EXP_OPER), op); strcpy(g->Message, "Function not supported"); return true; - } // endswitch op + } // endswitch op return false; - } // end of Compall +} // end of Compall /***********************************************************************/ /* FormatValue: This function set vp (a STRING value) to the string */ @@ -1203,26 +1204,28 @@ bool TYPVAL::Compall(PGLOBAL g, PVAL *vp, int np, OPVAL op) /***********************************************************************/ template bool TYPVAL::FormatValue(PVAL vp, PCSZ fmt) - { - char *buf = (char*)vp->GetTo_Val(); // Should be big enough +{ + // This function is wrong and should never be called + assert(false); + char *buf = (char*)vp->GetTo_Val(); // Not big enough int n = sprintf(buf, fmt, Tval); return (n > vp->GetValLen()); - } // end of FormatValue +} // end of FormatValue /***********************************************************************/ /* TYPVAL SetFormat function (used to set SELECT output format). */ /***********************************************************************/ template bool TYPVAL::SetConstFormat(PGLOBAL g, FORMAT& fmt) - { +{ char c[32]; fmt.Type[0] = *GetFormatType(Type); fmt.Length = sprintf(c, Fmt, Tval); fmt.Prec = Prec; return false; - } // end of SetConstFormat +} // end of SetConstFormat /* -------------------------- Class STRING --------------------------- */ @@ -1230,19 +1233,19 @@ bool TYPVAL::SetConstFormat(PGLOBAL g, FORMAT& fmt) /* STRING public constructor from a constant string. */ /***********************************************************************/ TYPVAL::TYPVAL(PSZ s, short c) : VALUE(TYPE_STRING) - { +{ Strp = s; Len = strlen(s); Clen = Len; Ci = (c == 1); - } // end of STRING constructor +} // end of STRING constructor /***********************************************************************/ /* STRING public constructor from char. */ /***********************************************************************/ TYPVAL::TYPVAL(PGLOBAL g, PSZ s, int n, int c) : VALUE(TYPE_STRING) - { +{ Len = (g) ? n : (s) ? strlen(s) : 0; if (!s) { @@ -1260,89 +1263,89 @@ TYPVAL::TYPVAL(PGLOBAL g, PSZ s, int n, int c) Clen = Len; Ci = (c != 0); - } // end of STRING constructor +} // end of STRING constructor /***********************************************************************/ /* Get the tiny value represented by the Strp string. */ /***********************************************************************/ char TYPVAL::GetTinyValue(void) - { +{ bool m; ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX8, false, &m); return (m && val < INT_MAX8) ? (char)(-(signed)val) : (char)val; - } // end of GetTinyValue +} // end of GetTinyValue /***********************************************************************/ /* Get the unsigned tiny value represented by the Strp string. */ /***********************************************************************/ uchar TYPVAL::GetUTinyValue(void) - { +{ return (uchar)CharToNumber(Strp, strlen(Strp), UINT_MAX8, true); - } // end of GetUTinyValue +} // end of GetUTinyValue /***********************************************************************/ /* Get the short value represented by the Strp string. */ /***********************************************************************/ short TYPVAL::GetShortValue(void) - { +{ bool m; ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX16, false, &m); return (m && val < INT_MAX16) ? (short)(-(signed)val) : (short)val; - } // end of GetShortValue +} // end of GetShortValue /***********************************************************************/ /* Get the unsigned short value represented by the Strp string. */ /***********************************************************************/ ushort TYPVAL::GetUShortValue(void) - { +{ return (ushort)CharToNumber(Strp, strlen(Strp), UINT_MAX16, true); - } // end of GetUshortValue +} // end of GetUshortValue /***********************************************************************/ /* Get the integer value represented by the Strp string. */ /***********************************************************************/ int TYPVAL::GetIntValue(void) - { +{ bool m; ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX32, false, &m); return (m && val < INT_MAX32) ? (int)(-(signed)val) : (int)val; - } // end of GetIntValue +} // end of GetIntValue /***********************************************************************/ /* Get the unsigned integer value represented by the Strp string. */ /***********************************************************************/ uint TYPVAL::GetUIntValue(void) - { +{ return (uint)CharToNumber(Strp, strlen(Strp), UINT_MAX32, true); - } // end of GetUintValue +} // end of GetUintValue /***********************************************************************/ /* Get the big integer value represented by the Strp string. */ /***********************************************************************/ longlong TYPVAL::GetBigintValue(void) - { +{ bool m; ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX64, false, &m); return (m && val < INT_MAX64) ? (-(signed)val) : (longlong)val; - } // end of GetBigintValue +} // end of GetBigintValue /***********************************************************************/ /* Get the unsigned big integer value represented by the Strp string. */ /***********************************************************************/ ulonglong TYPVAL::GetUBigintValue(void) - { +{ return CharToNumber(Strp, strlen(Strp), ULONGLONG_MAX, true); - } // end of GetUBigintValue +} // end of GetUBigintValue /***********************************************************************/ /* STRING SetValue: copy the value of another Value object. */ /***********************************************************************/ bool TYPVAL::SetValue_pval(PVAL valp, bool chktype) - { +{ if (valp != this) { if (chktype && (valp->GetType() != Type || valp->GetSize() > Len)) return true; @@ -1354,16 +1357,16 @@ bool TYPVAL::SetValue_pval(PVAL valp, bool chktype) else Reset(); - } // endif valp + } // endif valp return false; - } // end of SetValue_pval +} // end of SetValue_pval /***********************************************************************/ /* STRING SetValue: fill string with chars extracted from a line. */ /***********************************************************************/ bool TYPVAL::SetValue_char(const char *cp, int n) - { +{ bool rc = false; if (!cp || n == 0) { @@ -1389,16 +1392,16 @@ bool TYPVAL::SetValue_char(const char *cp, int n) Reset(); Null = false; - } // endif p + } // endif cp return rc; - } // end of SetValue_char +} // end of SetValue_char /***********************************************************************/ /* STRING SetValue: fill string with another string. */ /***********************************************************************/ void TYPVAL::SetValue_psz(PCSZ s) - { +{ if (!s) { Reset(); Null = Nullable; @@ -1407,26 +1410,26 @@ void TYPVAL::SetValue_psz(PCSZ s) Null = false; } // endif s - } // end of SetValue_psz +} // end of SetValue_psz /***********************************************************************/ /* STRING SetValue: fill string with a string extracted from a block. */ /***********************************************************************/ void TYPVAL::SetValue_pvblk(PVBLK blk, int n) - { +{ // STRBLK's can return a NULL pointer PSZ vp = blk->GetCharString(Strp, n); if (vp != Strp) SetValue_psz(vp); - } // end of SetValue_pvblk +} // end of SetValue_pvblk /***********************************************************************/ /* STRING SetValue: get the character representation of an integer. */ /***********************************************************************/ void TYPVAL::SetValue(int n) - { +{ char buf[16]; PGLOBAL& g = Global; int k = sprintf(buf, "%d", n); @@ -1438,13 +1441,13 @@ void TYPVAL::SetValue(int n) SetValue_psz(buf); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of an uint. */ /***********************************************************************/ void TYPVAL::SetValue(uint n) - { +{ char buf[16]; PGLOBAL& g = Global; int k = sprintf(buf, "%u", n); @@ -1456,31 +1459,31 @@ void TYPVAL::SetValue(uint n) SetValue_psz(buf); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a short int. */ /***********************************************************************/ void TYPVAL::SetValue(short i) - { +{ SetValue((int)i); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a ushort int. */ /***********************************************************************/ void TYPVAL::SetValue(ushort i) - { +{ SetValue((uint)i); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a big integer.*/ /***********************************************************************/ void TYPVAL::SetValue(longlong n) - { +{ char buf[24]; PGLOBAL& g = Global; int k = sprintf(buf, "%lld", n); @@ -1492,13 +1495,13 @@ void TYPVAL::SetValue(longlong n) SetValue_psz(buf); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a big integer.*/ /***********************************************************************/ void TYPVAL::SetValue(ulonglong n) - { +{ char buf[24]; PGLOBAL& g = Global; int k = sprintf(buf, "%llu", n); @@ -1510,13 +1513,13 @@ void TYPVAL::SetValue(ulonglong n) SetValue_psz(buf); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a double. */ /***********************************************************************/ void TYPVAL::SetValue(double f) - { +{ char *p, buf[64]; PGLOBAL& g = Global; int k = sprintf(buf, "%lf", f); @@ -1535,33 +1538,33 @@ void TYPVAL::SetValue(double f) SetValue_psz(buf); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a tiny int. */ /***********************************************************************/ void TYPVAL::SetValue(char c) - { +{ SetValue((int)c); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetValue: get the character representation of a tiny int. */ /***********************************************************************/ void TYPVAL::SetValue(uchar c) - { +{ SetValue((uint)c); Null = false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* STRING SetBinValue: fill string with chars extracted from a line. */ /***********************************************************************/ void TYPVAL::SetBinValue(void *p) - { +{ SetValue_char((const char *)p, Len); - } // end of SetBinValue +} // end of SetBinValue /***********************************************************************/ /* GetBinValue: fill a buffer with the internal binary value. */ @@ -1570,7 +1573,7 @@ void TYPVAL::SetBinValue(void *p) /* Currently used by WriteColumn of binary files. */ /***********************************************************************/ bool TYPVAL::GetBinValue(void *buf, int buflen, bool go) - { +{ int len = (Null) ? 0 : strlen(Strp); if (len > buflen) @@ -1581,7 +1584,7 @@ bool TYPVAL::GetBinValue(void *buf, int buflen, bool go) } // endif go return false; - } // end of GetBinValue +} // end of GetBinValue /***********************************************************************/ /* STRING ShowValue: get string representation of a char value. */ @@ -1591,7 +1594,7 @@ int TYPVAL::ShowValue(char *buf, int buflen) int len = (Null) ? 0 : strlen(Strp); if (buf && buf != Strp) { - memset(buf, ' ', buflen + 1); + memset(buf, ' ', (size_t)buflen + 1); memcpy(buf, Strp, MY_MIN(len, buflen)); } // endif buf @@ -1602,15 +1605,15 @@ int TYPVAL::ShowValue(char *buf, int buflen) /* STRING GetCharString: get string representation of a char value. */ /***********************************************************************/ char *TYPVAL::GetCharString(char *) - { +{ return Strp; - } // end of GetCharString +} // end of GetCharString /***********************************************************************/ /* STRING compare value with another Value. */ /***********************************************************************/ bool TYPVAL::IsEqual(PVAL vp, bool chktype) - { +{ if (this == vp) return true; else if (chktype && Type != vp->GetType()) @@ -1625,14 +1628,14 @@ bool TYPVAL::IsEqual(PVAL vp, bool chktype) else // (!Ci) return !strcmp(Strp, vp->GetCharString(buf)); - } // end of IsEqual +} // end of IsEqual /***********************************************************************/ /* Compare values and returns 1, 0 or -1 according to comparison. */ /* This function is used for evaluation of numeric filters. */ /***********************************************************************/ int TYPVAL::CompareValue(PVAL vp) - { +{ int n; //assert(vp->GetType() == Type); @@ -1651,13 +1654,13 @@ int TYPVAL::CompareValue(PVAL vp) #endif // __WIN__ return (n > 0) ? 1 : (n < 0) ? -1 : 0; - } // end of CompareValue +} // end of CompareValue /***********************************************************************/ /* Compute a function on a string. */ /***********************************************************************/ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) - { +{ char *p[2], val[2][32]; int i; @@ -1704,7 +1707,7 @@ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) Null = false; return false; - } // end of Compute +} // end of Compute /***********************************************************************/ /* FormatValue: This function set vp (a STRING value) to the string */ @@ -1712,23 +1715,23 @@ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) /* This function assumes that the format matches the value type. */ /***********************************************************************/ bool TYPVAL::FormatValue(PVAL vp, PCSZ fmt) - { +{ char *buf = (char*)vp->GetTo_Val(); // Should be big enough int n = sprintf(buf, fmt, Strp); return (n > vp->GetValLen()); - } // end of FormatValue +} // end of FormatValue /***********************************************************************/ /* STRING SetFormat function (used to set SELECT output format). */ /***********************************************************************/ bool TYPVAL::SetConstFormat(PGLOBAL, FORMAT& fmt) - { +{ fmt.Type[0] = 'C'; fmt.Length = Len; fmt.Prec = 0; return false; - } // end of SetConstFormat +} // end of SetConstFormat /***********************************************************************/ /* Make string output of an object value. */ @@ -1748,38 +1751,38 @@ void TYPVAL::Prints(PGLOBAL g, char *ps, uint z) /* DECIMAL public constructor from a constant string. */ /***********************************************************************/ DECVAL::DECVAL(PSZ s) : TYPVAL(s) - { +{ if (s) { char *p = strchr(Strp, '.'); Prec = (p) ? (int)(Len - (p - Strp)) : 0; - } // endif s + } // endif s Type = TYPE_DECIM; - } // end of DECVAL constructor +} // end of DECVAL constructor /***********************************************************************/ /* DECIMAL public constructor from char. */ /***********************************************************************/ DECVAL::DECVAL(PGLOBAL g, PSZ s, int n, int prec, bool uns) : TYPVAL(g, s, n + (prec ? 1 : 0) + (uns ? 0 : 1), 0) - { +{ Prec = prec; Unsigned = uns; Type = TYPE_DECIM; - } // end of DECVAL constructor +} // end of DECVAL constructor /***********************************************************************/ /* DECIMAL: Check whether the numerica value is equal to 0. */ /***********************************************************************/ bool DECVAL::IsZero(void) - { +{ for (int i = 0; Strp[i]; i++) if (!strchr("0 +-.", Strp[i])) return false; return true; - } // end of IsZero +} // end of IsZero /***********************************************************************/ /* DECIMAL: Reset value to zero. */ @@ -1797,7 +1800,7 @@ void DECVAL::Reset(void) Strp[i++] = '0'; } while (i < Prec + 2); - } // endif Prec + } // endif Prec Strp[i] = 0; } // end of Reset @@ -1806,9 +1809,9 @@ void DECVAL::Reset(void) /* DECIMAL ShowValue: get string representation right justified. */ /***********************************************************************/ int DECVAL::ShowValue(char *buf, int len) - { +{ return snprintf(buf, len + 1, Xfmt, len, Strp); - } // end of ShowValue +} // end of ShowValue /***********************************************************************/ /* GetBinValue: fill a buffer with the internal binary value. */ @@ -1817,7 +1820,7 @@ int DECVAL::ShowValue(char *buf, int len) /* Currently used by WriteColumn of binary files. */ /***********************************************************************/ bool DECVAL::GetBinValue(void *buf, int buflen, bool go) - { +{ int len = (Null) ? 0 : strlen(Strp); if (len > buflen) @@ -1825,16 +1828,16 @@ bool DECVAL::GetBinValue(void *buf, int buflen, bool go) else if (go) { memset(buf, ' ', buflen - len); memcpy((char*)buf + buflen - len, Strp, len); - } // endif go + } // endif go return false; - } // end of GetBinValue +} // end of GetBinValue /***********************************************************************/ /* DECIMAL compare value with another Value. */ /***********************************************************************/ bool DECVAL::IsEqual(PVAL vp, bool chktype) - { +{ if (this == vp) return true; else if (chktype && Type != vp->GetType()) @@ -1845,14 +1848,14 @@ bool DECVAL::IsEqual(PVAL vp, bool chktype) char buf[64]; return !strcmp(Strp, vp->GetCharString(buf)); - } // end of IsEqual +} // end of IsEqual /***********************************************************************/ /* Compare values and returns 1, 0 or -1 according to comparison. */ /* This function is used for evaluation of numeric filters. */ /***********************************************************************/ int DECVAL::CompareValue(PVAL vp) - { +{ //assert(vp->GetType() == Type); // Process filtering on numeric values. @@ -1862,7 +1865,7 @@ int DECVAL::CompareValue(PVAL vp) // htrc(" Comparing: val=%d,%d\n", f, n); return (f > n) ? 1 : (f < n) ? (-1) : 0; - } // end of CompareValue +} // end of CompareValue /* -------------------------- Class BINVAL --------------------------- */ @@ -1870,7 +1873,7 @@ int DECVAL::CompareValue(PVAL vp) /* BINVAL public constructor from bytes. */ /***********************************************************************/ BINVAL::BINVAL(PGLOBAL g, void *p, int cl, int n) : VALUE(TYPE_BIN) - { +{ assert(g); Len = n; Clen = cl; @@ -1881,19 +1884,19 @@ BINVAL::BINVAL(PGLOBAL g, void *p, int cl, int n) : VALUE(TYPE_BIN) memcpy(Binp, p, MY_MIN(Len,Clen)); Chrp = NULL; - } // end of BINVAL constructor +} // end of BINVAL constructor /***********************************************************************/ /* BINVAL: Check whether the hexadecimal value is equal to 0. */ /***********************************************************************/ bool BINVAL::IsZero(void) - { +{ for (int i = 0; i < Len; i++) if (((char*)Binp)[i] != 0) return false; return true; - } // end of IsZero +} // end of IsZero /***********************************************************************/ /* BINVAL: Reset value to zero. */ @@ -1908,77 +1911,77 @@ void BINVAL::Reset(void) /* Get the tiny value pointed by Binp. */ /***********************************************************************/ char BINVAL::GetTinyValue(void) - { +{ return *(char*)Binp; - } // end of GetTinyValue +} // end of GetTinyValue /***********************************************************************/ /* Get the unsigned tiny value pointed by Binp. */ /***********************************************************************/ uchar BINVAL::GetUTinyValue(void) - { +{ return *(uchar*)Binp; - } // end of GetUTinyValue +} // end of GetUTinyValue /***********************************************************************/ /* Get the short value pointed by Binp. */ /***********************************************************************/ short BINVAL::GetShortValue(void) - { +{ if (Len >= 2) return *(short*)Binp; else return (short)GetTinyValue(); - } // end of GetShortValue +} // end of GetShortValue /***********************************************************************/ /* Get the unsigned short value pointed by Binp. */ /***********************************************************************/ ushort BINVAL::GetUShortValue(void) - { +{ return (ushort)GetShortValue(); - } // end of GetUshortValue +} // end of GetUshortValue /***********************************************************************/ /* Get the integer value pointed by Binp. */ /***********************************************************************/ int BINVAL::GetIntValue(void) - { +{ if (Len >= 4) return *(int*)Binp; else return (int)GetShortValue(); - } // end of GetIntValue +} // end of GetIntValue /***********************************************************************/ /* Get the unsigned integer value pointed by Binp. */ /***********************************************************************/ uint BINVAL::GetUIntValue(void) - { +{ return (uint)GetIntValue(); - } // end of GetUintValue +} // end of GetUintValue /***********************************************************************/ /* Get the big integer value pointed by Binp. */ /***********************************************************************/ longlong BINVAL::GetBigintValue(void) - { +{ if (Len >= 8) return *(longlong*)Binp; else return (longlong)GetIntValue(); - } // end of GetBigintValue +} // end of GetBigintValue /***********************************************************************/ /* Get the unsigned big integer value pointed by Binp. */ /***********************************************************************/ ulonglong BINVAL::GetUBigintValue(void) - { +{ return (ulonglong)GetBigintValue(); - } // end of GetUBigintValue +} // end of GetUBigintValue /***********************************************************************/ /* Get the double value pointed by Binp. */ @@ -1998,7 +2001,7 @@ double BINVAL::GetFloatValue(void) /* BINVAL SetValue: copy the value of another Value object. */ /***********************************************************************/ bool BINVAL::SetValue_pval(PVAL valp, bool chktype) - { +{ bool rc = false; if (valp != this) { @@ -2018,16 +2021,16 @@ bool BINVAL::SetValue_pval(PVAL valp, bool chktype) } else Reset(); - } // endif valp + } // endif valp return rc; - } // end of SetValue_pval +} // end of SetValue_pval /***********************************************************************/ /* BINVAL SetValue: fill value with chars extracted from a line. */ /***********************************************************************/ bool BINVAL::SetValue_char(const char *p, int n) - { +{ bool rc; if (p && n > 0) { @@ -2047,13 +2050,13 @@ bool BINVAL::SetValue_char(const char *p, int n) } // endif p return rc; - } // end of SetValue_char +} // end of SetValue_char /***********************************************************************/ /* BINVAL SetValue: fill value with another string. */ /***********************************************************************/ void BINVAL::SetValue_psz(PCSZ s) - { +{ if (s) { int len = Len; @@ -2068,13 +2071,13 @@ void BINVAL::SetValue_psz(PCSZ s) Null = Nullable; } // endif s - } // end of SetValue_psz +} // end of SetValue_psz /***********************************************************************/ /* BINVAL SetValue: fill value with bytes extracted from a block. */ /***********************************************************************/ void BINVAL::SetValue_pvblk(PVBLK blk, int n) - { +{ // STRBLK's can return a NULL pointer void *vp = blk->GetValPtrEx(n); @@ -2097,13 +2100,13 @@ void BINVAL::SetValue_pvblk(PVBLK blk, int n) Null = false; } // endif vp - } // end of SetValue_pvblk +} // end of SetValue_pvblk /***********************************************************************/ /* BINVAL SetValue: get the binary representation of an integer. */ /***********************************************************************/ void BINVAL::SetValue(int n) - { +{ if (Clen >= 4) { if (Len > 4) memset(Binp, 0, Len); @@ -2113,13 +2116,13 @@ void BINVAL::SetValue(int n) } else SetValue((short)n); - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of an uint. */ /***********************************************************************/ void BINVAL::SetValue(uint n) - { +{ if (Clen >= 4) { if (Len > 4) memset(Binp, 0, Len); @@ -2129,13 +2132,13 @@ void BINVAL::SetValue(uint n) } else SetValue((ushort)n); - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of a short int. */ /***********************************************************************/ void BINVAL::SetValue(short i) - { +{ if (Clen >= 2) { if (Len > 2) memset(Binp, 0, Len); @@ -2145,13 +2148,13 @@ void BINVAL::SetValue(short i) } else SetValue((char)i); - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of a ushort int. */ /***********************************************************************/ void BINVAL::SetValue(ushort i) - { +{ if (Clen >= 2) { if (Len > 2) memset(Binp, 0, Len); @@ -2161,13 +2164,13 @@ void BINVAL::SetValue(ushort i) } else SetValue((uchar)i); - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of a big integer. */ /***********************************************************************/ void BINVAL::SetValue(longlong n) - { +{ if (Clen >= 8) { if (Len > 8) memset(Binp, 0, Len); @@ -2177,13 +2180,13 @@ void BINVAL::SetValue(longlong n) } else SetValue((int)n); - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of a big integer. */ /***********************************************************************/ void BINVAL::SetValue(ulonglong n) - { +{ if (Clen >= 8) { if (Len > 8) memset(Binp, 0, Len); @@ -2192,13 +2195,14 @@ void BINVAL::SetValue(ulonglong n) Len = 8; } else SetValue((uint)n); - } // end of SetValue + +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of a double. */ /***********************************************************************/ void BINVAL::SetValue(double n) - { +{ if (Len > 8) memset(Binp, 0, Len); @@ -2211,40 +2215,40 @@ void BINVAL::SetValue(double n) } else Len = 0; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the character binary of a tiny int. */ /***********************************************************************/ void BINVAL::SetValue(char c) - { +{ if (Len > 1) memset(Binp, 0, Len); *((char*)Binp) = c; Len = 1; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetValue: get the binary representation of a tiny int. */ /***********************************************************************/ void BINVAL::SetValue(uchar c) - { +{ if (Len > 1) memset(Binp, 0, Len); *((uchar*)Binp) = c; Len = 1; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* BINVAL SetBinValue: fill string with bytes extracted from a line. */ /***********************************************************************/ void BINVAL::SetBinValue(void *p) - { +{ memcpy(Binp, p, Clen); Len = Clen; - } // end of SetBinValue +} // end of SetBinValue /***********************************************************************/ /* GetBinValue: fill a buffer with the internal binary value. */ @@ -2253,7 +2257,7 @@ void BINVAL::SetBinValue(void *p) /* Currently used by WriteColumn of binary files. */ /***********************************************************************/ bool BINVAL::GetBinValue(void *buf, int buflen, bool go) - { +{ if (Len > buflen) return true; else if (go) { @@ -2262,7 +2266,7 @@ bool BINVAL::GetBinValue(void *buf, int buflen, bool go) } // endif go return false; - } // end of GetBinValue +} // end of GetBinValue /***********************************************************************/ /* BINVAL ShowValue: get string representation of a binary value. */ @@ -2278,19 +2282,19 @@ int BINVAL::ShowValue(char *buf, int len) /* BINVAL GetCharString: get string representation of a binary value. */ /***********************************************************************/ char *BINVAL::GetCharString(char *) - { +{ if (!Chrp) Chrp = (char*)PlugSubAlloc(Global, NULL, Clen * 2 + 1); sprintf(Chrp, GetXfmt(), Len, Binp); return Chrp; - } // end of GetCharString +} // end of GetCharString /***********************************************************************/ /* BINVAL compare value with another Value. */ /***********************************************************************/ bool BINVAL::IsEqual(PVAL vp, bool chktype) - { +{ if (this == vp) return true; else if (chktype && Type != vp->GetType()) @@ -2308,7 +2312,7 @@ bool BINVAL::IsEqual(PVAL vp, bool chktype) return false; return true; - } // end of IsEqual +} // end of IsEqual /***********************************************************************/ /* FormatValue: This function set vp (a STRING value) to the string */ @@ -2316,23 +2320,23 @@ bool BINVAL::IsEqual(PVAL vp, bool chktype) /* This function assumes that the format matches the value type. */ /***********************************************************************/ bool BINVAL::FormatValue(PVAL vp, PCSZ fmt) - { +{ char *buf = (char*)vp->GetTo_Val(); // Should be big enough int n = sprintf(buf, fmt, Len, Binp); return (n > vp->GetValLen()); - } // end of FormatValue +} // end of FormatValue /***********************************************************************/ /* BINVAL SetFormat function (used to set SELECT output format). */ /***********************************************************************/ bool BINVAL::SetConstFormat(PGLOBAL, FORMAT& fmt) - { +{ fmt.Type[0] = 'B'; fmt.Length = Clen; fmt.Prec = 0; return false; - } // end of SetConstFormat +} // end of SetConstFormat /* -------------------------- Class DTVAL ---------------------------- */ @@ -2341,7 +2345,7 @@ bool BINVAL::SetConstFormat(PGLOBAL, FORMAT& fmt) /***********************************************************************/ DTVAL::DTVAL(PGLOBAL g, int n, int prec, PCSZ fmt) : TYPVAL((int)0, TYPE_DATE) - { +{ if (!fmt) { Pdtp = NULL; Sdate = NULL; @@ -2351,37 +2355,37 @@ DTVAL::DTVAL(PGLOBAL g, int n, int prec, PCSZ fmt) SetFormat(g, fmt, n, prec); //Type = TYPE_DATE; - } // end of DTVAL constructor +} // end of DTVAL constructor /***********************************************************************/ /* DTVAL public constructor from int. */ /***********************************************************************/ DTVAL::DTVAL(int n) : TYPVAL(n, TYPE_DATE) - { +{ Pdtp = NULL; Len = 19; //Type = TYPE_DATE; Sdate = NULL; DefYear = 0; - } // end of DTVAL constructor +} // end of DTVAL constructor /***********************************************************************/ /* Set format so formatted dates can be converted on input/output. */ /***********************************************************************/ bool DTVAL::SetFormat(PGLOBAL g, PCSZ fmt, int len, int year) - { +{ Pdtp = MakeDateFormat(g, fmt, true, true, (year > 9999) ? 1 : 0); Sdate = (char*)PlugSubAlloc(g, NULL, len + 1); DefYear = (int)((year > 9999) ? (year - 10000) : year); Len = len; return false; - } // end of SetFormat +} // end of SetFormat /***********************************************************************/ /* Set format from the format of another date value. */ /***********************************************************************/ bool DTVAL::SetFormat(PGLOBAL g, PVAL valp) - { +{ DTVAL *vp; if (valp->GetType() != TYPE_DATE) { @@ -2395,14 +2399,14 @@ bool DTVAL::SetFormat(PGLOBAL g, PVAL valp) Sdate = (char*)PlugSubAlloc(g, NULL, Len + 1); DefYear = vp->DefYear; return false; - } // end of SetFormat +} // end of SetFormat /***********************************************************************/ /* We need TimeShift because the mktime C function does a correction */ /* for local time zone that we want to override for DB operations. */ /***********************************************************************/ void DTVAL::SetTimeShift(void) - { +{ struct tm dtm; memset(&dtm, 0, sizeof(dtm)); dtm.tm_mday=2; @@ -2414,7 +2418,7 @@ void DTVAL::SetTimeShift(void) if (trace(1)) htrc("DTVAL Shift=%d\n", Shift); - } // end of SetTimeShift +} // end of SetTimeShift // Added by Alexander Barkov static void TIME_to_localtime(struct tm *tm, const MYSQL_TIME *ltime) @@ -2444,7 +2448,7 @@ static struct tm *gmtime_mysql(const time_t *timep, struct tm *tm) /* extend the range of valid dates by accepting negative time values. */ /***********************************************************************/ struct tm *DTVAL::GetGmTime(struct tm *tm_buffer) - { +{ struct tm *datm; time_t t = (time_t)Tval; @@ -2463,7 +2467,7 @@ struct tm *DTVAL::GetGmTime(struct tm *tm_buffer) datm = gmtime_mysql(&t, tm_buffer); return datm; - } // end of GetGmTime +} // end of GetGmTime // Added by Alexander Barkov static time_t mktime_mysql(struct tm *ptm) @@ -2482,7 +2486,7 @@ static time_t mktime_mysql(struct tm *ptm) /* range of valid dates by accepting to set negative time values. */ /***********************************************************************/ bool DTVAL::MakeTime(struct tm *ptm) - { +{ int n, y = ptm->tm_year; time_t t = mktime_mysql(ptm); @@ -2498,7 +2502,7 @@ bool DTVAL::MakeTime(struct tm *ptm) for (n = 0; t == -1 && n < 20; n++) { ptm->tm_year += 4; t = mktime_mysql(ptm); - } // endfor t + } // endfor t if (t == -1) return true; @@ -2506,20 +2510,21 @@ bool DTVAL::MakeTime(struct tm *ptm) if ((t -= (n * FOURYEARS)) > 2000000000) return true; - } + } // endif t + Tval= (int) t; if (trace(2)) htrc("MakeTime Ival=%d\n", Tval); return false; - } // end of MakeTime +} // end of MakeTime /***********************************************************************/ /* Make a time_t datetime from its components (YY, MM, DD, hh, mm, ss) */ /***********************************************************************/ bool DTVAL::MakeDate(PGLOBAL g, int *val, int nval) - { +{ int i, m; int n; bool rc = false; @@ -2589,9 +2594,9 @@ bool DTVAL::MakeDate(PGLOBAL g, int *val, int nval) case 3: datm.tm_hour = n; break; case 4: datm.tm_min = n; break; case 5: datm.tm_sec = n; break; - } // endswitch i + } // endswitch i - } // endfor i + } // endfor i if (trace(2)) htrc("MakeDate datm=(%d,%d,%d,%d,%d,%d)\n", @@ -2607,14 +2612,14 @@ bool DTVAL::MakeDate(PGLOBAL g, int *val, int nval) Tval = 0; return rc; - } // end of MakeDate +} // end of MakeDate /***********************************************************************/ /* DTVAL SetValue: copy the value of another Value object. */ /* This function allows conversion if chktype is false. */ /***********************************************************************/ bool DTVAL::SetValue_pval(PVAL valp, bool chktype) - { +{ if (valp != this) { if (chktype && Type != valp->GetType()) return true; @@ -2636,16 +2641,16 @@ bool DTVAL::SetValue_pval(PVAL valp, bool chktype) } else Reset(); - } // endif valp + } // endif valp return false; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* SetValue: convert chars extracted from a line to date value. */ /***********************************************************************/ bool DTVAL::SetValue_char(const char *p, int n) - { +{ bool rc= 0; if (Pdtp) { @@ -2661,7 +2666,7 @@ bool DTVAL::SetValue_char(const char *p, int n) n = Len; memcpy(Sdate, p, n); - } // endif n + } // endif n Sdate[n] = '\0'; @@ -2678,13 +2683,13 @@ bool DTVAL::SetValue_char(const char *p, int n) } // endif Pdtp return rc; - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* SetValue: convert a char string to date value. */ /***********************************************************************/ void DTVAL::SetValue_psz(PCSZ p) - { +{ if (Pdtp) { int ndv; int dval[6]; @@ -2704,13 +2709,13 @@ void DTVAL::SetValue_psz(PCSZ p) Null = (Nullable && Tval == 0); } // endif Pdtp - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* DTVAL SetValue: set value with a value extracted from a block. */ /***********************************************************************/ void DTVAL::SetValue_pvblk(PVBLK blk, int n) - { +{ if (Pdtp && !::IsTypeNum(blk->GetType())) { int ndv; int dval[6]; @@ -2720,13 +2725,13 @@ void DTVAL::SetValue_pvblk(PVBLK blk, int n) } else Tval = blk->GetIntValue(n); - } // end of SetValue +} // end of SetValue /***********************************************************************/ /* DTVAL GetCharString: get string representation of a date value. */ /***********************************************************************/ char *DTVAL::GetCharString(char *p) - { +{ if (Pdtp) { size_t n = 0; struct tm tm, *ptm= GetGmTime(&tm); @@ -2745,7 +2750,7 @@ char *DTVAL::GetCharString(char *p) //Null = false; ?????????????? return p; - } // end of GetCharString +} // end of GetCharString /***********************************************************************/ /* DTVAL ShowValue: get string representation of a date value. */ @@ -2783,7 +2788,7 @@ int DTVAL::ShowValue(char *buf, int len) /* Returns a member of the struct tm representation of the date. */ /***********************************************************************/ bool DTVAL::GetTmMember(OPVAL op, int& mval) - { +{ bool rc = false; struct tm tm, *ptm = GetGmTime(&tm); @@ -2796,10 +2801,10 @@ bool DTVAL::GetTmMember(OPVAL op, int& mval) case OP_QUART: mval = ptm->tm_mon / 3 + 1; break; default: rc = true; - } // endswitch op + } // endswitch op return rc; - } // end of GetTmMember +} // end of GetTmMember /***********************************************************************/ /* Calculates the week number of the year for the internal date value.*/ @@ -2810,7 +2815,7 @@ bool DTVAL::GetTmMember(OPVAL op, int& mval) /* the week that contains the January 4th. */ /***********************************************************************/ bool DTVAL::WeekNum(PGLOBAL g, int& nval) - { +{ // w is the start of the week SUN=0, MON=1, etc. int m, n, w = nval % 7; struct tm tm, *ptm = GetGmTime(&tm); @@ -2827,7 +2832,7 @@ bool DTVAL::WeekNum(PGLOBAL g, int& nval) // Everything should be Ok return false; - } // end of WeekNum +} // end of WeekNum #endif // 0 /***********************************************************************/ @@ -2836,7 +2841,7 @@ bool DTVAL::WeekNum(PGLOBAL g, int& nval) /* This function assumes that the format matches the value type. */ /***********************************************************************/ bool DTVAL::FormatValue(PVAL vp, PCSZ fmt) - { +{ char *buf = (char*)vp->GetTo_Val(); // Should be big enough struct tm tm, *ptm = GetGmTime(&tm); @@ -2853,6 +2858,6 @@ bool DTVAL::FormatValue(PVAL vp, PCSZ fmt) } else return true; - } // end of FormatValue +} // end of FormatValue /* -------------------------- End of Value --------------------------- */ diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index efefc17b5f5..95f038d494c 100755 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -272,8 +272,8 @@ void XINDEX::Close(void) /***********************************************************************/ int XINDEX::Qcompare(int *i1, int *i2) { - register int k; - register PXCOL kcp; + int k; + PXCOL kcp; for (kcp = To_KeyCol, k = 0; kcp; kcp = kcp->Next) if ((k = kcp->Compare(*i1, *i2))) @@ -659,7 +659,7 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp) /* Not true for DBF tables because of eventual soft deleted lines. */ /* Note: for Num_K = 1 any non null value is Ok. */ /*********************************************************************/ - if (Srtd && !filp && Tdbp->Ftype != RECFM_VAR + if (Srtd && !filp && Tdbp->Ftype != RECFM_VAR && Tdbp->Ftype != RECFM_CSV && Tdbp->Txfp->GetAmType() != TYPE_AM_DBF) { Incr = (Num_K > 1) ? To_Rec[1] : Num_K; PlgDBfree(Record); @@ -745,7 +745,7 @@ int XINDEX::ColMaxSame(PXCOL kp) /***********************************************************************/ bool XINDEX::Reorder(PGLOBAL g __attribute__((unused))) { - register int i, j, k, n; + int i, j, k, n; bool sorted = true; PXCOL kcp; #if 0 @@ -837,7 +837,8 @@ bool XINDEX::SaveIndex(PGLOBAL g, PIXDEF sxp) case RECFM_FIX: ftype = ".fnx"; break; case RECFM_BIN: ftype = ".bnx"; break; case RECFM_VCT: ftype = ".vnx"; break; - case RECFM_DBF: ftype = ".dbx"; break; + case RECFM_CSV: ftype = ".cnx"; break; + case RECFM_DBF: ftype = ".dbx"; break; default: sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype); return true; @@ -990,7 +991,8 @@ bool XINDEX::Init(PGLOBAL g) case RECFM_FIX: ftype = ".fnx"; break; case RECFM_BIN: ftype = ".bnx"; break; case RECFM_VCT: ftype = ".vnx"; break; - case RECFM_DBF: ftype = ".dbx"; break; + case RECFM_CSV: ftype = ".cnx"; break; + case RECFM_DBF: ftype = ".dbx"; break; default: sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype); return true; @@ -1243,7 +1245,8 @@ bool XINDEX::MapInit(PGLOBAL g) case RECFM_FIX: ftype = ".fnx"; break; case RECFM_BIN: ftype = ".bnx"; break; case RECFM_VCT: ftype = ".vnx"; break; - case RECFM_DBF: ftype = ".dbx"; break; + case RECFM_CSV: ftype = ".cnx"; break; + case RECFM_DBF: ftype = ".dbx"; break; default: sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype); return true; @@ -1457,7 +1460,8 @@ bool XINDEX::GetAllSizes(PGLOBAL g,/* int &ndif,*/ int &numk) case RECFM_FIX: ftype = ".fnx"; break; case RECFM_BIN: ftype = ".bnx"; break; case RECFM_VCT: ftype = ".vnx"; break; - case RECFM_DBF: ftype = ".dbx"; break; + case RECFM_CSV: ftype = ".cnx"; break; + case RECFM_DBF: ftype = ".dbx"; break; default: sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype); return true; @@ -1870,8 +1874,8 @@ int XINDEX::Fetch(PGLOBAL g) /***********************************************************************/ int XINDEX::FastFind(void) { - register int curk, sup, inf, i= 0, k, n = 2; - register PXCOL kp, kcp; + int curk, sup, inf, i= 0, k, n = 2; + PXCOL kp, kcp; //assert((int)nv == Nval); @@ -2209,8 +2213,8 @@ int XINDXS::Fetch(PGLOBAL g) /***********************************************************************/ int XINDXS::FastFind(void) { - register int sup, inf, i= 0, n = 2; - register PXCOL kcp = To_KeyCol; + int sup, inf, i= 0, n = 2; + PXCOL kcp = To_KeyCol; if (Nblk && Op == OP_EQ) { // Look in block values to find in which block to search @@ -3235,7 +3239,7 @@ void KXYCOL::FillValue(PVAL valp) int KXYCOL::Compare(int i1, int i2) { // Do the actual comparison between values. - register int k = Kblp->CompVal(i1, i2); + int k = Kblp->CompVal(i1, i2); if (trace(4)) htrc("Compare done result=%d\n", k); @@ -3250,7 +3254,7 @@ int KXYCOL::CompVal(int i) { // Do the actual comparison between numerical values. if (trace(4)) { - register int k = (int)Kblp->CompVal(Valp, (int)i); + int k = (int)Kblp->CompVal(Valp, (int)i); htrc("Compare done result=%d\n", k); return k; diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index bc9265e0223..1b499e09047 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -173,9 +173,12 @@ class DllExport TDBASE : public TDB { inline void SetKindex(PKXBASE kxp) {To_Kindex = kxp;} // Properties - virtual PKXBASE GetKindex(void) {return To_Kindex;} + PKXBASE GetKindex(void) {return To_Kindex;} + PXOB *GetLink(void) {return To_Link;} + PIXDEF GetXdp(void) {return To_Xdp;} void ResetKindex(PGLOBAL g, PKXBASE kxp); PCOL Key(int i) {return (To_Key_Col) ? To_Key_Col[i] : NULL;} + PXOB Link(int i) { return (To_Link) ? To_Link[i] : NULL; } // Methods virtual bool IsUsingTemp(PGLOBAL) {return false;} From 98f70fa26bc94991767f6c2008dac3fccf14d23c Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sat, 11 Jan 2020 16:05:39 +0100 Subject: [PATCH 09/49] - Fix MDEV-21450 Failed compile when XML table type is not supported. Was because XMLDEF was unconditionally called from REST table. modified: storage/connect/tabrest.cpp --- storage/connect/tabrest.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index 4f12caad52e..9c6b724973f 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -35,7 +35,9 @@ #include "filamtxt.h" #include "tabdos.h" #include "plgxml.h" +#if defined(XML_SUPPORT) #include "tabxml.h" +#endif // XML_SUPPORT #include "tabjson.h" #include "tabfmt.h" #include "tabrest.h" @@ -171,13 +173,15 @@ PQRYRES __stdcall ColREST(PGLOBAL g, PTOS tp, char *tab, char *db, bool info) // Retrieve the file from the web and copy it locally if (http && grf(g->Message, trace(515), http, uri, filename)) { // sprintf(g->Message, "Failed to get file at %s", http); - } else if (!stricmp(ftype, "XML")) - qrp = XMLColumns(g, db, tab, tp, info); - else if (!stricmp(ftype, "JSON")) + } else if (!stricmp(ftype, "JSON")) qrp = JSONColumns(g, db, NULL, tp, info); else if (!stricmp(ftype, "CSV")) qrp = CSVColumns(g, NULL, tp, info); - else +#if defined(XML_SUPPORT) + else if (!stricmp(ftype, "XML")) + qrp = XMLColumns(g, db, tab, tp, info); +#endif // XML_SUPPORT + else sprintf(g->Message, "Usupported file type %s", ftype); return qrp; @@ -210,7 +214,9 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) htrc("ftype = %s am = %s\n", ftype, SVP(am)); n = (!stricmp(ftype, "JSON")) ? 1 +#if defined(XML_SUPPORT) : (!stricmp(ftype, "XML")) ? 2 +#endif // XML_SUPPORT : (!stricmp(ftype, "CSV")) ? 3 : 0; if (n == 0) { @@ -238,7 +244,9 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) return true; else switch (n) { case 1: Tdp = new (g) JSONDEF; break; - case 2: Tdp = new (g) XMLDEF; break; +#if defined(XML_SUPPORT) + case 2: Tdp = new (g) XMLDEF; break; +#endif // XML_SUPPORT case 3: Tdp = new (g) CSVDEF; break; default: Tdp = NULL; } // endswitch n From 85f2217cc852c290244e19a339669d0520b28eb5 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sun, 12 Jan 2020 00:52:46 +0100 Subject: [PATCH 10/49] - Update grant tests for new MariaDB version 10.1.44 modified: storage/connect/mysql-test/connect/disabled.def modified: storage/connect/mysql-test/connect/r/grant.result modified: storage/connect/mysql-test/connect/r/ini_grant.result modified: storage/connect/mysql-test/connect/r/mysql_grant.result modified: storage/connect/mysql-test/connect/r/xml2_grant.result modified: storage/connect/mysql-test/connect/r/xml_grant.result modified: storage/connect/mysql-test/connect/t/grant.inc modified: storage/connect/mysql-test/connect/t/grant.test modified: storage/connect/mysql-test/connect/t/grant2.test modified: storage/connect/mysql-test/connect/t/ini_grant.test modified: storage/connect/mysql-test/connect/t/mysql_grant.test --- .../connect/mysql-test/connect/disabled.def | 1 + .../connect/mysql-test/connect/r/grant.result | 174 ++++++------ .../mysql-test/connect/r/ini_grant.result | 26 +- .../mysql-test/connect/r/mysql_grant.result | 24 +- .../mysql-test/connect/r/xml2_grant.result | 30 +- .../mysql-test/connect/r/xml_grant.result | 30 +- .../connect/mysql-test/connect/t/grant.inc | 30 +- .../connect/mysql-test/connect/t/grant.test | 25 +- .../connect/mysql-test/connect/t/grant2.test | 260 +++++++++--------- .../mysql-test/connect/t/ini_grant.result | 89 ++++++ .../mysql-test/connect/t/ini_grant.test | 26 +- .../mysql-test/connect/t/mysql_grant.test | 24 +- 12 files changed, 415 insertions(+), 324 deletions(-) create mode 100644 storage/connect/mysql-test/connect/t/ini_grant.result diff --git a/storage/connect/mysql-test/connect/disabled.def b/storage/connect/mysql-test/connect/disabled.def index 1de4deb0a60..a4d629fc3d1 100644 --- a/storage/connect/mysql-test/connect/disabled.def +++ b/storage/connect/mysql-test/connect/disabled.def @@ -20,4 +20,5 @@ mongo_c : Need MongoDB running and its C Driver installed mongo_java_2 : Need MongoDB running and its Java Driver installed mongo_java_3 : Need MongoDB running and its Java Driver installed tbl_thread : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed +grant2 : Until fixed #vcol : Different error code on different versions diff --git a/storage/connect/mysql-test/connect/r/grant.result b/storage/connect/mysql-test/connect/r/grant.result index 4e64b983ea7..681442724e5 100644 --- a/storage/connect/mysql-test/connect/r/grant.result +++ b/storage/connect/mysql-test/connect/r/grant.result @@ -13,7 +13,7 @@ fname VARCHAR(256) NOT NULL, ftype CHAR(4) NOT NULL, size DOUBLE(12,0) NOT NULL flag=5 ) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.*'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -30,19 +30,19 @@ SELECT user(); user() user@localhost SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO t1 VALUES (); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1 WHERE path='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET path='yyy' WHERE path='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -52,13 +52,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (1,1,1,1); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET path=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -101,7 +101,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=BIN FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -111,23 +111,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -137,13 +137,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -157,7 +157,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # @@ -196,7 +196,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -206,23 +206,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -232,13 +232,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -252,7 +252,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # @@ -291,7 +291,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -301,23 +301,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -327,13 +327,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -347,7 +347,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # @@ -386,7 +386,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -396,23 +396,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -422,13 +422,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -442,7 +442,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # @@ -481,7 +481,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=VEC MAX_ROWS=100 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -491,23 +491,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -517,13 +517,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -537,7 +537,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # diff --git a/storage/connect/mysql-test/connect/r/ini_grant.result b/storage/connect/mysql-test/connect/r/ini_grant.result index 68330278183..ce53b0ef5ca 100644 --- a/storage/connect/mysql-test/connect/r/ini_grant.result +++ b/storage/connect/mysql-test/connect/r/ini_grant.result @@ -32,7 +32,7 @@ sec val DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -42,21 +42,21 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES ('sec2','val2'); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET val='val11'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -66,13 +66,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES ('sec3','val3'); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET val='val11'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP VIEW v1; DROP TABLE t1; DROP USER user@localhost; diff --git a/storage/connect/mysql-test/connect/r/mysql_grant.result b/storage/connect/mysql-test/connect/r/mysql_grant.result index 5f630834392..7bcae585425 100644 --- a/storage/connect/mysql-test/connect/r/mysql_grant.result +++ b/storage/connect/mysql-test/connect/r/mysql_grant.result @@ -9,7 +9,7 @@ SELECT user(); user() user@localhost CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=PORT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -25,19 +25,19 @@ SELECT user(); user() user@localhost SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO t1 VALUES ('xxx'); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1 WHERE a='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a='yyy' WHERE a='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -47,13 +47,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost diff --git a/storage/connect/mysql-test/connect/r/xml2_grant.result b/storage/connect/mysql-test/connect/r/xml2_grant.result index 9eb818bf32f..74f372f493c 100644 --- a/storage/connect/mysql-test/connect/r/xml2_grant.result +++ b/storage/connect/mysql-test/connect/r/xml2_grant.result @@ -33,7 +33,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -43,23 +43,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -69,13 +69,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -89,7 +89,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # diff --git a/storage/connect/mysql-test/connect/r/xml_grant.result b/storage/connect/mysql-test/connect/r/xml_grant.result index 9d8cb64b60a..d2a2e444e81 100644 --- a/storage/connect/mysql-test/connect/r/xml_grant.result +++ b/storage/connect/mysql-test/connect/r/xml_grant.result @@ -31,7 +31,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=domdoc,rownode=row' FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -41,23 +41,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE SELECT user(); user() @@ -67,13 +67,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT user(); user() root@localhost @@ -87,7 +87,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; DROP USER user@localhost; # diff --git a/storage/connect/mysql-test/connect/t/grant.inc b/storage/connect/mysql-test/connect/t/grant.inc index 6580c845b56..ef6e0cec297 100644 --- a/storage/connect/mysql-test/connect/t/grant.inc +++ b/storage/connect/mysql-test/connect/t/grant.inc @@ -25,7 +25,7 @@ DROP TABLE t1; # Making sure DROP erased the data file --error 1 --remove_file $MYSQLD_DATADIR/test/t1.$FILE_EXT ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT $TABLE_OPTIONS FILE_NAME='t1.EXT' --connection default SELECT user(); @@ -33,23 +33,23 @@ SELECT user(); INSERT INTO t1 VALUES (10); --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES (10); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 FILE_NAME='t2.EXT'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE --connection default @@ -57,13 +57,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES (2); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET a=123; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --connection default SELECT user(); @@ -74,7 +74,7 @@ DROP TABLE t1; INSERT INTO t1 VALUES (10); --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 FILE_NAME='t1.EXT'; --connection default DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/t/grant.test b/storage/connect/mysql-test/connect/t/grant.test index 738f156d8a4..5e07b7af369 100644 --- a/storage/connect/mysql-test/connect/t/grant.test +++ b/storage/connect/mysql-test/connect/t/grant.test @@ -11,7 +11,7 @@ REVOKE FILE ON *.* FROM user@localhost; --connect(user,localhost,user,,) --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE TABLE t1 ( path VARCHAR(256) NOT NULL flag=1, fname VARCHAR(256) NOT NULL, @@ -28,23 +28,24 @@ CREATE TABLE t1 ( ) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.*'; # "size>0" to skip directory names on Windows --replace_result $MYSQLD_DATADIR DATADIR/ +--sorted_result SELECT fname, ftype, size FROM t1 WHERE size>0; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES (); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1 WHERE path='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET path='yyy' WHERE path='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE @@ -53,13 +54,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES (1,1,1,1); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET path=123; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --disconnect user diff --git a/storage/connect/mysql-test/connect/t/grant2.test b/storage/connect/mysql-test/connect/t/grant2.test index 8e7d9453e70..351eb97f11a 100644 --- a/storage/connect/mysql-test/connect/t/grant2.test +++ b/storage/connect/mysql-test/connect/t/grant2.test @@ -23,13 +23,13 @@ CREATE DEFINER=user@localhost SQL SECURITY DEFINER VIEW v1_baddefiner AS SELECT SELECT * FROM t1; SELECT * FROM v1_invoker; SELECT * FROM v1_definer; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1_baddefiner; --connect(user,localhost,user,,) ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1_invoker; SELECT * FROM v1_definer; --connection default @@ -47,9 +47,9 @@ UPDATE t1 SET a=11; UPDATE v1_invoker SET a=12; UPDATE v1_definer SET a=13; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET a=21; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker SET a=22; UPDATE v1_definer SET a=23; --connection default @@ -67,9 +67,9 @@ INSERT INTO t1 VALUES (11); INSERT INTO v1_invoker VALUES (12); INSERT INTO v1_definer VALUES (13); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES (21); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker VALUES (22); INSERT INTO v1_definer VALUES (23); --connection default @@ -79,7 +79,7 @@ DROP TABLE t1; --echo # Testing SQLCOM_REPLACE # REPLACE is not supported by ConnectSE, so we're testing the difference -# between ER_ACCESS_DENIED_ERROR vs ER_NOT_ALLOWED_COMMAND +# between ER_SPECIFIC_ACCESS_DENIED_ERROR vs ER_NOT_ALLOWED_COMMAND --connection default CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); @@ -92,9 +92,9 @@ REPLACE INTO v1_invoker VALUES (12); --error ER_NOT_ALLOWED_COMMAND REPLACE INTO v1_definer VALUES (13); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 VALUES (21); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker VALUES (22); --error ER_NOT_ALLOWED_COMMAND REPLACE INTO v1_definer VALUES (23); @@ -113,9 +113,9 @@ DELETE FROM t1 WHERE a=11; DELETE FROM v1_invoker WHERE a=12; DELETE FROM v1_definer WHERE a=13; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1 WHERE a=21; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1_invoker WHERE a=22; DELETE FROM v1_definer WHERE a=23; --connection default @@ -137,10 +137,10 @@ CREATE SQL SECURITY DEFINER VIEW v1_definer AS SELECT * FROM t1; --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer --connection user --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE t1 --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_invoker --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer @@ -156,7 +156,7 @@ INSERT INTO t1 VALUES (10); TRUNCATE TABLE t1; INSERT INTO t1 VALUES (11); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; --connection default DROP TABLE t1; @@ -168,7 +168,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP TABLE t1; --connection default DROP TABLE t1; @@ -193,7 +193,7 @@ DROP TABLE t1; --echo # Testing SQLCOM_CREATE_TABLE --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; --connection default @@ -216,13 +216,13 @@ UNLOCK TABLES; LOCK TABLE v1_definer WRITE; UNLOCK TABLES; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE t1 READ; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE t1 WRITE; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE v1_invoker READ; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE v1_invoker WRITE; LOCK TABLE v1_definer READ; UNLOCK TABLES; @@ -299,108 +299,108 @@ UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; --connection user # All queries with t1 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # All queries with t2 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # t3 does not need FILE_ALC ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; # This is OK: UPDATE t3 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; # This is OK: UPDATE t3 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; # This is OK: UPDATE t3 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # All queries with v1_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # v1_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # All queries with v2_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # v2_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; @@ -476,108 +476,108 @@ DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a; --connection user # All queries with t1 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v2_definer a2 WHERE a1.a=a2.a; # All queries with t2 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v2_definer a2 WHERE a1.a=a2.a; # t3 does not need FILE_ALC ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,t2 a2 WHERE a1.a=a2.a; # This is OK: DELETE a1 FROM t3 a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,v1_invoker a2 WHERE a1.a=a2.a; # This is OK: DELETE a1 FROM t3 a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,v2_invoker a2 WHERE a1.a=a2.a; # This is OK: DELETE a1 FROM t3 a1,v2_definer a2 WHERE a1.a=a2.a; # All queries with v1_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v2_definer a2 WHERE a1.a=a2.a; # v1_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,t2 a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,v1_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,v2_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,v2_definer a2 WHERE a1.a=a2.a; # All queries with v2_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v2_definer a2 WHERE a1.a=a2.a; # v2_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,t2 a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,v1_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,v2_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a; @@ -598,9 +598,9 @@ DROP VIEW v2; CREATE VIEW v2 AS SELECT * FROM v1_definer; DROP VIEW v2; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v2 AS SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v2 AS SELECT * FROM v1_invoker; CREATE VIEW v2 AS SELECT * FROM v1_definer; DROP VIEW v2; @@ -625,21 +625,21 @@ INSERT INTO v1_definer SELECT * FROM t1 WHERE a=20; INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 SELECT * FROM v1_definer WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker SELECT * FROM v1_definer WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_definer SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; # This is OK: INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20; @@ -650,7 +650,7 @@ DROP TABLE t1; --echo # Testing SQLCOM_REPLACE_SELECT # REPLACE is not supported by CONNECT -# so we're testing ER_NOT_ALLOWED_COMMAND vs ER_ACCESS_DENIED_ERROR here +# so we're testing ER_NOT_ALLOWED_COMMAND vs ER_SPECIFIC_ACCESS_DENIED_ERROR here --connection default CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); @@ -676,17 +676,17 @@ REPLACE INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; REPLACE INTO v1_definer SELECT * FROM v1_definer WHERE a=20; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 SELECT * FROM v1_definer WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker SELECT * FROM v1_definer WHERE a=20; --error ER_NOT_ALLOWED_COMMAND REPLACE INTO v1_definer SELECT * FROM t1 WHERE a=20; @@ -708,7 +708,7 @@ SHOW CREATE TABLE t2; RENAME TABLE t2 TO t1; --connection user # TODO: Perhaps FILE_ACL is needed for RENAME. Discuss with Oliver. ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR RENAME TABLE t1 TO t2; --connection default DROP TABLE t1; @@ -723,7 +723,7 @@ SHOW CREATE TABLE t2; ALTER TABLE t2 RENAME TO t1; --connection user # TODO: Perhaps FILE_ACL is not needed for ALTER..RENAME. Discuss with Olivier. ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 RENAME TO t2; --connection default DROP TABLE t1; @@ -739,7 +739,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ENGINE=MyISAM; --connection default DROP TABLE t1; @@ -756,7 +756,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (10); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; --connection default DROP TABLE t1; @@ -779,7 +779,7 @@ CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); ALTER TABLE t1 ADD b INT; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ADD c INT; --connection default DROP TABLE t1; @@ -791,7 +791,7 @@ CREATE TABLE t1 (a INT,b INT,c INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1. INSERT INTO t1 VALUES (10,10,10); ALTER TABLE t1 DROP b; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 DROP c; --connection default DROP TABLE t1; @@ -803,7 +803,7 @@ CREATE TABLE t1 (a INT NOT NULL,b INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=fix FI INSERT INTO t1 VALUES (10,10); ALTER TABLE t1 ADD KEY(a); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ADD KEY(b); --connection default DROP TABLE t1; @@ -816,7 +816,7 @@ CREATE TABLE t1 (a INT NOT NULL,b INT NOT NULL, KEY a(a), KEY b(b)) ENGINE=CONNE INSERT INTO t1 VALUES (10,10); ALTER TABLE t1 DROP KEY a; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 DROP KEY b; --connection default DROP TABLE t1; @@ -831,9 +831,9 @@ CREATE INDEX a ON t1 (a); DROP INDEX a ON t1; CREATE INDEX a ON t1 (a); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE INDEX b ON t1 (b); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP INDEX a ON t1; --connection default DROP TABLE t1; @@ -852,11 +852,11 @@ CALL p_definer(); DROP TABLE t1; CALL p_invoker(); DROP TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CALL p_baddefiner(); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CALL p_invoker(); CALL p_definer(); diff --git a/storage/connect/mysql-test/connect/t/ini_grant.result b/storage/connect/mysql-test/connect/t/ini_grant.result new file mode 100644 index 00000000000..96d5e192c7d --- /dev/null +++ b/storage/connect/mysql-test/connect/t/ini_grant.result @@ -0,0 +1,89 @@ +# +# Checking FILE privileges +# +set sql_mode=""; +GRANT ALL PRIVILEGES ON *.* TO user@localhost; +REVOKE FILE ON *.* FROM user@localhost; +set sql_mode=default; +connect user,localhost,user,,; +connection user; +SELECT user(); +user() +user@localhost +CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI; +Warnings: +Warning 1105 No file name. Table will use t1.ini +INSERT INTO t1 VALUES ('sec1','val1'); +SELECT * FROM t1; +sec val +sec1 val1 +UPDATE t1 SET val='val11'; +SELECT * FROM t1; +sec val +sec1 val11 +DELETE FROM t1; +SELECT * FROM t1; +sec val +INSERT INTO t1 VALUES('sec2','val2'); +TRUNCATE TABLE t1; +SELECT * FROM t1; +sec val +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT * FROM v1; +sec val +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +connection default; +SELECT user(); +user() +root@localhost +CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; +INSERT INTO t1 VALUES ('sec1','val1'); +connection user; +SELECT user(); +user() +user@localhost +INSERT INTO t1 VALUES ('sec2','val2'); +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +SELECT * FROM t1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +UPDATE t1 SET val='val11'; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +DELETE FROM t1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +TRUNCATE TABLE t1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +ALTER TABLE t1 READONLY=1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +DROP TABLE t1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +CREATE VIEW v1 AS SELECT * FROM t1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +# Testing a VIEW created with FILE privileges but accessed with no FILE +connection default; +SELECT user(); +user() +root@localhost +CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; +connection user; +SELECT user(); +user() +user@localhost +SELECT * FROM v1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +INSERT INTO v1 VALUES ('sec3','val3'); +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +UPDATE v1 SET val='val11'; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +DELETE FROM v1; +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation +disconnect user; +connection default; +DROP VIEW v1; +DROP TABLE t1; +DROP USER user@localhost; +# +# Checking FILE privileges: done +# diff --git a/storage/connect/mysql-test/connect/t/ini_grant.test b/storage/connect/mysql-test/connect/t/ini_grant.test index b0ddcb57979..bbf85e5f794 100644 --- a/storage/connect/mysql-test/connect/t/ini_grant.test +++ b/storage/connect/mysql-test/connect/t/ini_grant.test @@ -29,7 +29,7 @@ DROP TABLE t1; # Making sure DROP erased the data file --error 1 --remove_file $MYSQLD_DATADIR/test/t1.ini ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; --connection default SELECT user(); @@ -37,21 +37,21 @@ CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CON INSERT INTO t1 VALUES ('sec1','val1'); --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES ('sec2','val2'); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET val='val11'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE --connection default @@ -59,13 +59,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES ('sec3','val3'); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET val='val11'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --disconnect user --connection default diff --git a/storage/connect/mysql-test/connect/t/mysql_grant.test b/storage/connect/mysql-test/connect/t/mysql_grant.test index 7d3d05cb8fd..30737258a1f 100644 --- a/storage/connect/mysql-test/connect/t/mysql_grant.test +++ b/storage/connect/mysql-test/connect/t/mysql_grant.test @@ -27,7 +27,7 @@ set sql_mode=default; --connection user SELECT user(); --replace_result $PORT PORT ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=$PORT' --connection default SELECT user(); @@ -38,19 +38,19 @@ INSERT INTO t1remote VALUES (10),(20),(30); SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES ('xxx'); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1 WHERE a='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET a='yyy' WHERE a='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE @@ -59,13 +59,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES (2); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET a=123; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --disconnect user From 8ff3eb417c0aa4b8d09e2b0296b2e66c0c530380 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sun, 12 Jan 2020 19:59:07 +0100 Subject: [PATCH 11/49] - Fix MDEV-21450 Failed compile when XML table type is not supported. Was because XMLDEF was unconditionally called from REST table. modified: storage/connect/tabrest.cpp - Make cmake less verbose modified: storage/connect/CMakeLists.txt - Hide Switch_to_definer_security_ctx not defined for 10.1 and 10.0 modified: storage/connect/ha_connect.cc --- storage/connect/CMakeLists.txt | 6 +++--- storage/connect/ha_connect.cc | 4 +++- storage/connect/tabrest.cpp | 18 +++++++++++++----- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 92e2e53a61b..7eedba08bee 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -318,7 +318,7 @@ ENDIF(CONNECT_WITH_MONGO) OPTION(CONNECT_WITH_REST "Compile CONNECT storage engine with REST support" ON) IF(CONNECT_WITH_REST) - MESSAGE(STATUS "=====> REST support is ON") +# MESSAGE(STATUS "=====> REST support is ON") SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp tabrest.h) add_definitions(-DREST_SUPPORT) FIND_PACKAGE(cpprestsdk QUIET) @@ -338,8 +338,8 @@ IF(CONNECT_WITH_REST) SET(CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp) add_definitions(-DREST_SOURCE) # ENDIF() - ELSE(NOT cpprestsdk_FOUND) -# MESSAGE(STATUS "=====> cpprestsdk package not found") +# ELSE(NOT cpprestsdk_FOUND) +# MESSAGE(STATUS "=====> cpprestsdk package not found") ENDIF (cpprestsdk_FOUND) ENDIF(CONNECT_WITH_REST) diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 0620fd78cc2..105ebf0545b 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -4509,7 +4509,9 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick) case TAB_OEM: if (table && table->pos_in_table_list) // if SELECT { - Switch_to_definer_security_ctx backup_ctx(thd, table->pos_in_table_list); +#if MYSQL_VERSION_ID > 100200 + Switch_to_definer_security_ctx backup_ctx(thd, table->pos_in_table_list); +#endif // VERSION_ID > 100200 return check_global_access(thd, FILE_ACL); } else diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index 4f12caad52e..9c6b724973f 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -35,7 +35,9 @@ #include "filamtxt.h" #include "tabdos.h" #include "plgxml.h" +#if defined(XML_SUPPORT) #include "tabxml.h" +#endif // XML_SUPPORT #include "tabjson.h" #include "tabfmt.h" #include "tabrest.h" @@ -171,13 +173,15 @@ PQRYRES __stdcall ColREST(PGLOBAL g, PTOS tp, char *tab, char *db, bool info) // Retrieve the file from the web and copy it locally if (http && grf(g->Message, trace(515), http, uri, filename)) { // sprintf(g->Message, "Failed to get file at %s", http); - } else if (!stricmp(ftype, "XML")) - qrp = XMLColumns(g, db, tab, tp, info); - else if (!stricmp(ftype, "JSON")) + } else if (!stricmp(ftype, "JSON")) qrp = JSONColumns(g, db, NULL, tp, info); else if (!stricmp(ftype, "CSV")) qrp = CSVColumns(g, NULL, tp, info); - else +#if defined(XML_SUPPORT) + else if (!stricmp(ftype, "XML")) + qrp = XMLColumns(g, db, tab, tp, info); +#endif // XML_SUPPORT + else sprintf(g->Message, "Usupported file type %s", ftype); return qrp; @@ -210,7 +214,9 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) htrc("ftype = %s am = %s\n", ftype, SVP(am)); n = (!stricmp(ftype, "JSON")) ? 1 +#if defined(XML_SUPPORT) : (!stricmp(ftype, "XML")) ? 2 +#endif // XML_SUPPORT : (!stricmp(ftype, "CSV")) ? 3 : 0; if (n == 0) { @@ -238,7 +244,9 @@ bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) return true; else switch (n) { case 1: Tdp = new (g) JSONDEF; break; - case 2: Tdp = new (g) XMLDEF; break; +#if defined(XML_SUPPORT) + case 2: Tdp = new (g) XMLDEF; break; +#endif // XML_SUPPORT case 3: Tdp = new (g) CSVDEF; break; default: Tdp = NULL; } // endswitch n From 5683c113b817644ffa5ba13c2485ce259250a8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 5 Dec 2019 07:58:02 +0200 Subject: [PATCH 12/49] Use get_ident_len in heartbeat event error messages The string doesn't appear to be null-terminated when binlog checksums are enabled. This causes a corrupt binlog name in the error message when a slave is ahead of the master. --- sql/slave.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/slave.cc b/sql/slave.cc index a8946c69d18..ae1c5ca2cf8 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4444,7 +4444,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) error= ER_SLAVE_HEARTBEAT_FAILURE; error_msg.append(STRING_WITH_LEN("inconsistent heartbeat event content;")); error_msg.append(STRING_WITH_LEN("the event's data: log_file_name ")); - error_msg.append(hb.get_log_ident(), (uint) strlen(hb.get_log_ident())); + error_msg.append(hb.get_log_ident(), (uint) hb.get_ident_len()); error_msg.append(STRING_WITH_LEN(" log_pos ")); llstr(hb.log_pos, llbuf); error_msg.append(llbuf, strlen(llbuf)); @@ -4471,7 +4471,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) error= ER_SLAVE_HEARTBEAT_FAILURE; error_msg.append(STRING_WITH_LEN("heartbeat is not compatible with local info;")); error_msg.append(STRING_WITH_LEN("the event's data: log_file_name ")); - error_msg.append(hb.get_log_ident(), (uint) strlen(hb.get_log_ident())); + error_msg.append(hb.get_log_ident(), (uint) hb.get_ident_len()); error_msg.append(STRING_WITH_LEN(" log_pos ")); llstr(hb.log_pos, llbuf); error_msg.append(llbuf, strlen(llbuf)); From 409aba3d997e97287bc67467ef437164c9e70b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Thu, 16 Jan 2020 12:40:45 +0200 Subject: [PATCH 13/49] Improve documentation of Unique class * size represents the size of an element in the Unique class * full_size is used when the Unique class counts the number of duplicates stored per element. This requires additional space per Unique element. --- sql/sql_class.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 4a390545593..2fac8d4e87f 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3923,16 +3923,21 @@ class user_var_entry class Unique :public Sql_alloc { DYNAMIC_ARRAY file_ptrs; - ulong max_elements; + ulong max_elements; /* Total number of elements that will be stored in-memory */ ulonglong max_in_memory_size; IO_CACHE file; TREE tree; uchar *record_pointers; + /* Number of elements filtered out due to min_dupl_count when storing results + to table. See Unique::get */ ulong filtered_out_elems; bool flush(); - uint size; - uint full_size; - uint min_dupl_count; /* always 0 for unions, > 0 for intersections */ + uint size; /* Size of element stored in unique object. */ + uint full_size; /* Size of element + space needed to store the number of + duplicates found for the element. */ + uint min_dupl_count; /* Minimum number of occurences of element required for + it to be written to record_pointers. + always 0 for unions, > 0 for intersections */ bool merge(TABLE *table, uchar *buff, bool without_last_merge); From 1bee9efcc44d94e92a0908a3b431fc45f4490807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Thu, 16 Jan 2020 13:37:21 +0200 Subject: [PATCH 14/49] MDEV-21210: main.uniques_crash-7912 tries to allocate 1TB of memory Remove the offending test case. This sort of error is hard to test in all possible corner cases and thus makes the test less valuable. The overflow error will be covered by warnings generated by the compiler, which is much more reliable in the general case. --- mysql-test/r/uniques_crash-7912.result | 11 ----------- mysql-test/t/uniques_crash-7912.test | 26 -------------------------- 2 files changed, 37 deletions(-) delete mode 100644 mysql-test/r/uniques_crash-7912.result delete mode 100644 mysql-test/t/uniques_crash-7912.test diff --git a/mysql-test/r/uniques_crash-7912.result b/mysql-test/r/uniques_crash-7912.result deleted file mode 100644 index bf3aab684ae..00000000000 --- a/mysql-test/r/uniques_crash-7912.result +++ /dev/null @@ -1,11 +0,0 @@ -call mtr.add_suppression("Out of memory"); -set sql_mode=""; -drop table if exists t1,t2; -create table `t1` (`a` datetime not null) engine=InnoDB; -create table `t2` (`a` int not null) engine=innodb; -replace into t1 values (),(); -insert into t2 values(0); -set session sort_buffer_size = 1024*1024*1024*1024; -delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; -drop table t2; -drop table t1; diff --git a/mysql-test/t/uniques_crash-7912.test b/mysql-test/t/uniques_crash-7912.test deleted file mode 100644 index 8dc82f8f540..00000000000 --- a/mysql-test/t/uniques_crash-7912.test +++ /dev/null @@ -1,26 +0,0 @@ -# -# MDEV-7912 -# -# multitable delete with wrongly set sort_buffer_size crashes in merge_buffers - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/windows.inc - -call mtr.add_suppression("Out of memory"); - -set sql_mode=""; ---disable_warnings -drop table if exists t1,t2; -create table `t1` (`a` datetime not null) engine=InnoDB; -create table `t2` (`a` int not null) engine=innodb; -replace into t1 values (),(); -insert into t2 values(0); -set session sort_buffer_size = 1024*1024*1024*1024; -#Either fail with EE_OUTOFMEMORY, or succeed ---error 0 , 5 -delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; ---enable_warnings - -drop table t2; -drop table t1; From 02af6278fb7c7889a02d617eb23e82fe7967abd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 17 Jan 2020 17:39:20 +0200 Subject: [PATCH 15/49] InnoDB 5.6.47 and XtraDB 5.6.46-86.2 The only change is a change of the version number. In MySQL 5.6.46, the copyright comments in a number of files were changed in mysql/mysql-server@f1a006ece7521cb02f9b961e6fad04d12ddfbab3 but there was no functional change to InnoDB code. This was also reflected by XtraDB. We are not changing the copyright comments in MariaDB Server for now. Between MySQL 5.6.46 and 5.6.47, InnoDB was not changed at all. Actually, we had forgotten to update the InnoDB version number to 5.6.46. With this change, we are updating InnoDB from 5.6.45 to 5.6.47 and XtraDB from 5.6.45-86.1 to 5.6.46-86.2. --- mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff | 4 ++-- mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff | 4 ++-- mysql-test/suite/sys_vars/r/sysvars_innodb.result | 2 +- storage/innobase/include/univ.i | 2 +- storage/xtradb/include/univ.i | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff index ff3f5ba1d2c..fe6ec0e6f33 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff @@ -1214,8 +1214,8 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_VERSION SESSION_VALUE NULL --GLOBAL_VALUE 5.6.45 -+GLOBAL_VALUE 5.6.45-86.1 +-GLOBAL_VALUE 5.6.47 ++GLOBAL_VALUE 5.6.46-86.2 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE NULL VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff index 77e8fb638a1..5fab6de421a 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff @@ -684,8 +684,8 @@ COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_VERSION SESSION_VALUE NULL --GLOBAL_VALUE 5.6.45 -+GLOBAL_VALUE 5.6.45-86.1 +-GLOBAL_VALUE 5.6.47 ++GLOBAL_VALUE 5.6.46-86.2 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE NULL VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 7c8ce321cb2..6e308e69199 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -2401,7 +2401,7 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_VERSION SESSION_VALUE NULL -GLOBAL_VALUE 5.6.45 +GLOBAL_VALUE 5.6.47 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE NULL VARIABLE_SCOPE GLOBAL diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 02ab9e8b94f..8a9e1fc5e0d 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -45,7 +45,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 5 #define INNODB_VERSION_MINOR 6 -#define INNODB_VERSION_BUGFIX 45 +#define INNODB_VERSION_BUGFIX 47 /* The following is the InnoDB version as shown in SELECT plugin_version FROM information_schema.plugins; diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index 011921d9a39..f5cc649f944 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -45,10 +45,10 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 5 #define INNODB_VERSION_MINOR 6 -#define INNODB_VERSION_BUGFIX 45 +#define INNODB_VERSION_BUGFIX 46 #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 86.1 +#define PERCONA_INNODB_VERSION 86.2 #endif /* Enable UNIV_LOG_ARCHIVE in XtraDB */ From 49b9ce15ef1e27ce27b6c173ec8f82dcdffba956 Mon Sep 17 00:00:00 2001 From: Maheedhar PV Date: Wed, 20 Nov 2019 08:10:36 +0530 Subject: [PATCH 16/49] Bug#30194841 INSERT ON DUPLICATE KEY UPDATE UPDATES THE WRONG ROW test case only --- mysql-test/r/insert_debug.result | 25 +++++++++++++ mysql-test/t/insert_debug-master.opt | 1 + mysql-test/t/insert_debug.test | 54 ++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 mysql-test/r/insert_debug.result create mode 100644 mysql-test/t/insert_debug-master.opt create mode 100644 mysql-test/t/insert_debug.test diff --git a/mysql-test/r/insert_debug.result b/mysql-test/r/insert_debug.result new file mode 100644 index 00000000000..ef4f304800a --- /dev/null +++ b/mysql-test/r/insert_debug.result @@ -0,0 +1,25 @@ +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); +CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); +CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), +c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; +SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; +INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; +INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; +SET DEBUG_SYNC = "now SIGNAL flushed"; +SELECT * FROM result; +id c1 c2 c3 update_count +1 A1 B1 IT1 0 +2 A3 B3 UT1 1 +3 A2 B2 UT1 1 +4 A4 B4 UT1 1 +5 A5 B5 UT1 1 +9 A6 B6 IT1 0 +10 A7 B7 IT1 0 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE result; +SET DEBUG_SYNC = "RESET"; diff --git a/mysql-test/t/insert_debug-master.opt b/mysql-test/t/insert_debug-master.opt new file mode 100644 index 00000000000..824f656cbd5 --- /dev/null +++ b/mysql-test/t/insert_debug-master.opt @@ -0,0 +1 @@ +--innodb_autoinc_lock_mode=2 diff --git a/mysql-test/t/insert_debug.test b/mysql-test/t/insert_debug.test new file mode 100644 index 00000000000..b35d6b838da --- /dev/null +++ b/mysql-test/t/insert_debug.test @@ -0,0 +1,54 @@ +source include/have_innodb.inc; +source include/have_debug.inc; +source include/have_debug_sync.inc; + +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; + +connect (con1, localhost, root,,); +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; + +connection default; + +let $conn0_id= `SELECT CONNECTION_ID()`; + +CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); + +CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); + +CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), +c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; + +# Insert one row from 't1' into the 'result' table and wait on a debug sync +# point. The next insert statement from an session 2 inserts values that would +# lead to unique key clash, when this insert resumes. +# The subsequent inserts of this statement(after resume) will fail because of a +# clash with the unique index, and are expected to update the row which clashes +# with the unique key. +# Without the fix for bug#30194841 a stale auto increment value, would cause a +# collision with existing auto increment column value and ends up updating that +# colliding row, instead of the row colliding with the unique index. +SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; +send INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; + +# While session 1 is waiting (after one insert), insert rows that will cause a clash +# with the inserts of session 1 on the unique key. +connection con1; + +# Wait for the session 1 to hit the debug sync point. +let $wait_condition=SELECT 1 FROM information_schema.processlist WHERE id = $conn0_id AND state LIKE '%ha_write_row_end%'; +--source include/wait_condition.inc + +INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; + +# Signal to resume the insert statement in session 1 +SET DEBUG_SYNC = "now SIGNAL flushed"; +connection default; +reap; +SELECT * FROM result; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE result; +SET DEBUG_SYNC = "RESET"; From 4d1c1b23e1373bbd4e72f524e855f1db076d2c73 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 17 Jan 2020 15:08:11 +0100 Subject: [PATCH 17/49] Bug#29630767 - USE OF UNINITIALIZED VALUE IN LIBMYSQL (CLIENT.CC FUNCTION RUN_PLUGIN_AUTH) --- mysql-test/r/connect_debug.result | 8 ++++++++ mysql-test/t/connect_debug.test | 15 +++++++++++++++ sql-common/client.c | 5 ++++- sql/sql_acl.cc | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/connect_debug.result b/mysql-test/r/connect_debug.result index 3151166a0e6..c455363eb41 100644 --- a/mysql-test/r/connect_debug.result +++ b/mysql-test/r/connect_debug.result @@ -8,3 +8,11 @@ create user 'bad' identified by 'worse'; ERROR 2059 (HY000): Authentication plugin 'foo/bar' cannot be loaded: invalid plugin name set global debug_dbug=@old_dbug; drop user bad; +set global debug_dbug='+d,increase_srv_handshake_scramble_len'; +connect(localhost,root,,test,MASTER_MYPORT,MYSQL_TMP_DIR/mysqld.1.sock); +ERROR HY000: Malformed packet +set global debug_dbug=@old_dbug; +set global debug_dbug='+d,poison_srv_handshake_scramble_len'; +connect(localhost,root,,test,MASTER_MYPORT,MYSQL_TMP_DIR/mysqld.1.sock); +ERROR HY000: Malformed packet +set global debug_dbug=@old_dbug; diff --git a/mysql-test/t/connect_debug.test b/mysql-test/t/connect_debug.test index 7a2f2872b79..de7a292ce67 100644 --- a/mysql-test/t/connect_debug.test +++ b/mysql-test/t/connect_debug.test @@ -21,3 +21,18 @@ create user 'bad' identified by 'worse'; --exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse 2>&1 set global debug_dbug=@old_dbug; drop user bad; + +# +# Bug#29630767 - USE OF UNINITIALIZED VALUE IN LIBMYSQL (CLIENT.CC FUNCTION RUN_PLUGIN_AUTH) +# +set global debug_dbug='+d,increase_srv_handshake_scramble_len'; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MASTER_MYPORT MASTER_MYPORT +--error 2027 +connect con1,localhost,root; +set global debug_dbug=@old_dbug; + +set global debug_dbug='+d,poison_srv_handshake_scramble_len'; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MASTER_MYPORT MASTER_MYPORT +--error 2027 +connect con2,localhost,root; +set global debug_dbug=@old_dbug; diff --git a/sql-common/client.c b/sql-common/client.c index f535b5119b7..c7fb70fbeef 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -3538,7 +3538,10 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, scramble_data_len= pkt_scramble_len; scramble_plugin= scramble_data + scramble_data_len; if (scramble_data + scramble_data_len > pkt_end) - scramble_data_len= pkt_end - scramble_data; + { + set_mysql_error(mysql, CR_MALFORMED_PACKET, unknown_sqlstate); + goto error; + } } else { diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 8670f5b390d..ac1adf9e58b 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -8178,6 +8178,7 @@ static bool send_server_handshake_packet(MPVIO_EXT *mpvio, int2store(end+5, thd->client_capabilities >> 16); end[7]= data_len; DBUG_EXECUTE_IF("poison_srv_handshake_scramble_len", end[7]= -100;); + DBUG_EXECUTE_IF("increase_srv_handshake_scramble_len", end[7]= 50;); bzero(end + 8, 10); end+= 18; /* write scramble tail */ From 3aff3f3679c99c92f239b8fad2f1b930b67aa525 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sun, 19 Jan 2020 12:52:07 +0100 Subject: [PATCH 18/49] 5.6.47 --- include/mysql/psi/mysql_file.h | 13 ++++++++++--- include/mysql/psi/mysql_idle.h | 13 ++++++++++--- include/mysql/psi/mysql_socket.h | 18 ++++++++++++------ include/mysql/psi/mysql_stage.h | 13 ++++++++++--- include/mysql/psi/mysql_statement.h | 13 ++++++++++--- include/mysql/psi/mysql_table.h | 13 ++++++++++--- include/mysql/psi/mysql_thread.h | 13 ++++++++++--- include/mysql/psi/psi.h | 13 ++++++++++--- include/mysql/psi/psi_abi_v0.h | 13 ++++++++++--- include/mysql/psi/psi_abi_v1.h | 13 ++++++++++--- include/mysql/psi/psi_abi_v2.h | 13 ++++++++++--- .../perfschema/r/stage_mdl_procedure.result | 2 +- .../suite/perfschema/t/ddl_esms_by_digest.test | 13 ++++++++++--- .../suite/perfschema/t/dml_esms_by_digest.test | 13 ++++++++++--- storage/perfschema/CMakeLists.txt | 18 ++++++++++++------ storage/perfschema/cursor_by_account.cc | 13 ++++++++++--- storage/perfschema/cursor_by_account.h | 13 ++++++++++--- storage/perfschema/cursor_by_host.cc | 13 ++++++++++--- storage/perfschema/cursor_by_host.h | 13 ++++++++++--- storage/perfschema/cursor_by_thread.cc | 13 ++++++++++--- storage/perfschema/cursor_by_thread.h | 13 ++++++++++--- .../cursor_by_thread_connect_attr.cc | 13 ++++++++++--- .../perfschema/cursor_by_thread_connect_attr.h | 13 ++++++++++--- storage/perfschema/cursor_by_user.cc | 13 ++++++++++--- storage/perfschema/cursor_by_user.h | 13 ++++++++++--- storage/perfschema/gen_pfs_lex_token.cc | 13 ++++++++++--- storage/perfschema/ha_perfschema.cc | 13 ++++++++++--- storage/perfschema/ha_perfschema.h | 13 ++++++++++--- storage/perfschema/pfs.cc | 13 ++++++++++--- storage/perfschema/pfs.h | 13 ++++++++++--- storage/perfschema/pfs_account.cc | 13 ++++++++++--- storage/perfschema/pfs_account.h | 13 ++++++++++--- storage/perfschema/pfs_atomic.cc | 13 ++++++++++--- storage/perfschema/pfs_atomic.h | 13 ++++++++++--- storage/perfschema/pfs_autosize.cc | 13 ++++++++++--- storage/perfschema/pfs_check.cc | 13 ++++++++++--- storage/perfschema/pfs_column_types.h | 13 ++++++++++--- storage/perfschema/pfs_column_values.cc | 13 ++++++++++--- storage/perfschema/pfs_column_values.h | 13 ++++++++++--- storage/perfschema/pfs_con_slice.cc | 13 ++++++++++--- storage/perfschema/pfs_con_slice.h | 13 ++++++++++--- storage/perfschema/pfs_defaults.cc | 13 ++++++++++--- storage/perfschema/pfs_defaults.h | 13 ++++++++++--- storage/perfschema/pfs_digest.cc | 13 ++++++++++--- storage/perfschema/pfs_digest.h | 13 ++++++++++--- storage/perfschema/pfs_engine_table.cc | 13 ++++++++++--- storage/perfschema/pfs_engine_table.h | 13 ++++++++++--- storage/perfschema/pfs_events.h | 13 ++++++++++--- storage/perfschema/pfs_events_stages.cc | 13 ++++++++++--- storage/perfschema/pfs_events_stages.h | 13 ++++++++++--- storage/perfschema/pfs_events_statements.cc | 13 ++++++++++--- storage/perfschema/pfs_events_statements.h | 13 ++++++++++--- storage/perfschema/pfs_events_waits.cc | 13 ++++++++++--- storage/perfschema/pfs_events_waits.h | 13 ++++++++++--- storage/perfschema/pfs_global.cc | 13 ++++++++++--- storage/perfschema/pfs_global.h | 13 ++++++++++--- storage/perfschema/pfs_host.cc | 13 ++++++++++--- storage/perfschema/pfs_host.h | 13 ++++++++++--- storage/perfschema/pfs_instr.cc | 13 ++++++++++--- storage/perfschema/pfs_instr.h | 13 ++++++++++--- storage/perfschema/pfs_instr_class.cc | 13 ++++++++++--- storage/perfschema/pfs_instr_class.h | 13 ++++++++++--- storage/perfschema/pfs_lock.h | 13 ++++++++++--- storage/perfschema/pfs_server.cc | 13 ++++++++++--- storage/perfschema/pfs_server.h | 13 ++++++++++--- storage/perfschema/pfs_setup_actor.cc | 13 ++++++++++--- storage/perfschema/pfs_setup_actor.h | 13 ++++++++++--- storage/perfschema/pfs_setup_object.cc | 13 ++++++++++--- storage/perfschema/pfs_setup_object.h | 13 ++++++++++--- storage/perfschema/pfs_stat.h | 13 ++++++++++--- storage/perfschema/pfs_timer.cc | 13 ++++++++++--- storage/perfschema/pfs_timer.h | 13 ++++++++++--- storage/perfschema/pfs_user.cc | 13 ++++++++++--- storage/perfschema/pfs_user.h | 13 ++++++++++--- storage/perfschema/pfs_visitor.cc | 13 ++++++++++--- storage/perfschema/pfs_visitor.h | 13 ++++++++++--- storage/perfschema/table_accounts.cc | 13 ++++++++++--- storage/perfschema/table_accounts.h | 13 ++++++++++--- storage/perfschema/table_all_instr.cc | 13 ++++++++++--- storage/perfschema/table_all_instr.h | 13 ++++++++++--- .../table_esgs_by_account_by_event_name.cc | 13 ++++++++++--- .../table_esgs_by_account_by_event_name.h | 13 ++++++++++--- .../table_esgs_by_host_by_event_name.cc | 13 ++++++++++--- .../table_esgs_by_host_by_event_name.h | 13 ++++++++++--- .../table_esgs_by_thread_by_event_name.cc | 13 ++++++++++--- .../table_esgs_by_thread_by_event_name.h | 13 ++++++++++--- .../table_esgs_by_user_by_event_name.cc | 13 ++++++++++--- .../table_esgs_by_user_by_event_name.h | 13 ++++++++++--- .../table_esgs_global_by_event_name.cc | 13 ++++++++++--- .../table_esgs_global_by_event_name.h | 13 ++++++++++--- .../table_esms_by_account_by_event_name.cc | 13 ++++++++++--- .../table_esms_by_account_by_event_name.h | 13 ++++++++++--- storage/perfschema/table_esms_by_digest.cc | 13 ++++++++++--- storage/perfschema/table_esms_by_digest.h | 13 ++++++++++--- .../table_esms_by_host_by_event_name.cc | 13 ++++++++++--- .../table_esms_by_host_by_event_name.h | 13 ++++++++++--- .../table_esms_by_thread_by_event_name.cc | 13 ++++++++++--- .../table_esms_by_thread_by_event_name.h | 13 ++++++++++--- .../table_esms_by_user_by_event_name.cc | 13 ++++++++++--- .../table_esms_by_user_by_event_name.h | 13 ++++++++++--- .../table_esms_global_by_event_name.cc | 13 ++++++++++--- .../table_esms_global_by_event_name.h | 13 ++++++++++--- storage/perfschema/table_events_stages.cc | 13 ++++++++++--- storage/perfschema/table_events_stages.h | 13 ++++++++++--- storage/perfschema/table_events_statements.cc | 13 ++++++++++--- storage/perfschema/table_events_statements.h | 13 ++++++++++--- storage/perfschema/table_events_waits.cc | 13 ++++++++++--- storage/perfschema/table_events_waits.h | 13 ++++++++++--- .../perfschema/table_events_waits_summary.cc | 13 ++++++++++--- .../perfschema/table_events_waits_summary.h | 13 ++++++++++--- .../table_ews_by_account_by_event_name.cc | 13 ++++++++++--- .../table_ews_by_account_by_event_name.h | 13 ++++++++++--- .../table_ews_by_host_by_event_name.cc | 13 ++++++++++--- .../table_ews_by_host_by_event_name.h | 13 ++++++++++--- .../table_ews_by_thread_by_event_name.cc | 13 ++++++++++--- .../table_ews_by_thread_by_event_name.h | 13 ++++++++++--- .../table_ews_by_user_by_event_name.cc | 13 ++++++++++--- .../table_ews_by_user_by_event_name.h | 13 ++++++++++--- .../table_ews_global_by_event_name.cc | 13 ++++++++++--- .../table_ews_global_by_event_name.h | 13 ++++++++++--- storage/perfschema/table_file_instances.cc | 13 ++++++++++--- storage/perfschema/table_file_instances.h | 13 ++++++++++--- .../table_file_summary_by_event_name.cc | 13 ++++++++++--- .../table_file_summary_by_event_name.h | 13 ++++++++++--- .../table_file_summary_by_instance.cc | 13 ++++++++++--- .../table_file_summary_by_instance.h | 13 ++++++++++--- storage/perfschema/table_helper.cc | 13 ++++++++++--- storage/perfschema/table_helper.h | 13 ++++++++++--- storage/perfschema/table_host_cache.cc | 13 ++++++++++--- storage/perfschema/table_host_cache.h | 13 ++++++++++--- storage/perfschema/table_hosts.cc | 13 ++++++++++--- storage/perfschema/table_hosts.h | 13 ++++++++++--- storage/perfschema/table_os_global_by_type.cc | 13 ++++++++++--- storage/perfschema/table_os_global_by_type.h | 13 ++++++++++--- storage/perfschema/table_performance_timers.cc | 13 ++++++++++--- storage/perfschema/table_performance_timers.h | 13 ++++++++++--- .../table_session_account_connect_attrs.cc | 13 ++++++++++--- .../table_session_account_connect_attrs.h | 13 ++++++++++--- storage/perfschema/table_session_connect.cc | 13 ++++++++++--- storage/perfschema/table_session_connect.h | 13 ++++++++++--- .../perfschema/table_session_connect_attrs.cc | 13 ++++++++++--- .../perfschema/table_session_connect_attrs.h | 13 ++++++++++--- storage/perfschema/table_setup_actors.cc | 13 ++++++++++--- storage/perfschema/table_setup_actors.h | 13 ++++++++++--- storage/perfschema/table_setup_consumers.cc | 13 ++++++++++--- storage/perfschema/table_setup_consumers.h | 13 ++++++++++--- storage/perfschema/table_setup_instruments.cc | 13 ++++++++++--- storage/perfschema/table_setup_instruments.h | 13 ++++++++++--- storage/perfschema/table_setup_objects.cc | 13 ++++++++++--- storage/perfschema/table_setup_objects.h | 13 ++++++++++--- storage/perfschema/table_setup_timers.cc | 13 ++++++++++--- storage/perfschema/table_setup_timers.h | 13 ++++++++++--- storage/perfschema/table_socket_instances.cc | 13 ++++++++++--- storage/perfschema/table_socket_instances.h | 13 ++++++++++--- .../table_socket_summary_by_event_name.cc | 13 ++++++++++--- .../table_socket_summary_by_event_name.h | 13 ++++++++++--- .../table_socket_summary_by_instance.cc | 13 ++++++++++--- .../table_socket_summary_by_instance.h | 13 ++++++++++--- storage/perfschema/table_sync_instances.cc | 13 ++++++++++--- storage/perfschema/table_sync_instances.h | 13 ++++++++++--- storage/perfschema/table_threads.cc | 13 ++++++++++--- storage/perfschema/table_threads.h | 13 ++++++++++--- .../perfschema/table_tiws_by_index_usage.cc | 13 ++++++++++--- storage/perfschema/table_tiws_by_index_usage.h | 13 ++++++++++--- storage/perfschema/table_tiws_by_table.cc | 13 ++++++++++--- storage/perfschema/table_tiws_by_table.h | 13 ++++++++++--- storage/perfschema/table_tlws_by_table.cc | 13 ++++++++++--- storage/perfschema/table_tlws_by_table.h | 13 ++++++++++--- storage/perfschema/table_users.cc | 13 ++++++++++--- storage/perfschema/table_users.h | 13 ++++++++++--- storage/perfschema/unittest/CMakeLists.txt | 18 +++++++++++------- storage/perfschema/unittest/conf.txt | 13 ++++++++++--- storage/perfschema/unittest/pfs-t.cc | 13 ++++++++++--- .../perfschema/unittest/pfs_account-oom-t.cc | 13 ++++++++++--- .../perfschema/unittest/pfs_connect_attr-t.cc | 13 ++++++++++--- storage/perfschema/unittest/pfs_host-oom-t.cc | 13 ++++++++++--- storage/perfschema/unittest/pfs_instr-oom-t.cc | 13 ++++++++++--- storage/perfschema/unittest/pfs_instr-t.cc | 13 ++++++++++--- .../unittest/pfs_instr_class-oom-t.cc | 13 ++++++++++--- .../perfschema/unittest/pfs_instr_class-t.cc | 13 ++++++++++--- storage/perfschema/unittest/pfs_misc-t.cc | 13 ++++++++++--- .../perfschema/unittest/pfs_server_stubs.cc | 13 ++++++++++--- storage/perfschema/unittest/pfs_timer-t.cc | 13 ++++++++++--- storage/perfschema/unittest/pfs_user-oom-t.cc | 13 ++++++++++--- .../perfschema/unittest/stub_pfs_defaults.h | 13 ++++++++++--- storage/perfschema/unittest/stub_pfs_global.h | 13 ++++++++++--- storage/perfschema/unittest/stub_print_error.h | 13 ++++++++++--- 187 files changed, 1866 insertions(+), 569 deletions(-) diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index a83e2ef8a1d..1920eb37b52 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h index 5c72b715b7a..257dea090e4 100644 --- a/include/mysql/psi/mysql_idle.h +++ b/include/mysql/psi/mysql_idle.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index 209f113ffe2..e7bdfb105be 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -1,14 +1,20 @@ /* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. -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 the Free Software Foundation; version 2 of the -License. +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, version 2.0, +as published by the Free Software Foundation. + +This program is also distributed with certain software (including +but not limited to OpenSSL) that is licensed under separate terms, +as designated in a particular file or component or in included license +documentation. The authors of MySQL hereby grant you an additional +permission to link the program and your derivative works with the +separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h index 91a5c12f82e..3f7bb859def 100644 --- a/include/mysql/psi/mysql_stage.h +++ b/include/mysql/psi/mysql_stage.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 3d5943fa55a..cb76a24be3e 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h index 815313e654b..5bc3b15a02c 100644 --- a/include/mysql/psi/mysql_table.h +++ b/include/mysql/psi/mysql_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index ee2693d2863..71f623e946d 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index 7fcff89c8b6..0d49f2c85a9 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h index 7444cb0b276..60a3692f296 100644 --- a/include/mysql/psi/psi_abi_v0.h +++ b/include/mysql/psi/psi_abi_v0.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/psi_abi_v1.h b/include/mysql/psi/psi_abi_v1.h index 54c49f0c518..723e5aa3216 100644 --- a/include/mysql/psi/psi_abi_v1.h +++ b/include/mysql/psi/psi_abi_v1.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h index 08bca609b41..f40166508b4 100644 --- a/include/mysql/psi/psi_abi_v2.h +++ b/include/mysql/psi/psi_abi_v2.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result index b214a8ec290..92eee3945be 100644 --- a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result +++ b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result @@ -15,7 +15,7 @@ test.f1() drop procedure test.p1; call dump_one_thread('user1'); username event_name sql_text -user1 statement/sql/select select test.f1() +user1 statement/sql/select call test.p1() username event_name nesting_event_type username event_name nesting_event_type user1 stage/sql/executing STATEMENT diff --git a/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test b/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test index b674dc8d385..e054c9c6cd6 100644 --- a/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test +++ b/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test @@ -1,13 +1,20 @@ # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # # 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 -# the Free Software Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, diff --git a/mysql-test/suite/perfschema/t/dml_esms_by_digest.test b/mysql-test/suite/perfschema/t/dml_esms_by_digest.test index 6fdc8ec9fdc..478c2d41670 100644 --- a/mysql-test/suite/perfschema/t/dml_esms_by_digest.test +++ b/mysql-test/suite/perfschema/t/dml_esms_by_digest.test @@ -1,13 +1,20 @@ # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # # 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 -# the Free Software Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index 8071476e1f6..3c6e2e7f176 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -1,13 +1,20 @@ -# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. # # 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 -# the Free Software Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, @@ -16,8 +23,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/extra/yassl/include) + ${CMAKE_SOURCE_DIR}/regex) ADD_DEFINITIONS(-DMYSQL_SERVER) diff --git a/storage/perfschema/cursor_by_account.cc b/storage/perfschema/cursor_by_account.cc index 6be69f803b2..a40cadb2c72 100644 --- a/storage/perfschema/cursor_by_account.cc +++ b/storage/perfschema/cursor_by_account.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_account.h b/storage/perfschema/cursor_by_account.h index ac52ada880d..2fde607e37f 100644 --- a/storage/perfschema/cursor_by_account.h +++ b/storage/perfschema/cursor_by_account.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_host.cc b/storage/perfschema/cursor_by_host.cc index e405bcad7e6..61fbe14ca5a 100644 --- a/storage/perfschema/cursor_by_host.cc +++ b/storage/perfschema/cursor_by_host.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_host.h b/storage/perfschema/cursor_by_host.h index c0db4c5bf0c..1dfdf71a940 100644 --- a/storage/perfschema/cursor_by_host.h +++ b/storage/perfschema/cursor_by_host.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_thread.cc b/storage/perfschema/cursor_by_thread.cc index 400e4bd238c..1f9cfc63c2e 100644 --- a/storage/perfschema/cursor_by_thread.cc +++ b/storage/perfschema/cursor_by_thread.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_thread.h b/storage/perfschema/cursor_by_thread.h index a671e0edd42..d8ed26f6e69 100644 --- a/storage/perfschema/cursor_by_thread.h +++ b/storage/perfschema/cursor_by_thread.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_thread_connect_attr.cc b/storage/perfschema/cursor_by_thread_connect_attr.cc index 7a0dd04119d..3e5ab61419c 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.cc +++ b/storage/perfschema/cursor_by_thread_connect_attr.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/cursor_by_thread_connect_attr.h b/storage/perfschema/cursor_by_thread_connect_attr.h index fbce56f208d..576693c3545 100644 --- a/storage/perfschema/cursor_by_thread_connect_attr.h +++ b/storage/perfschema/cursor_by_thread_connect_attr.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/cursor_by_user.cc b/storage/perfschema/cursor_by_user.cc index d50a6dde1e2..528fe811103 100644 --- a/storage/perfschema/cursor_by_user.cc +++ b/storage/perfschema/cursor_by_user.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/cursor_by_user.h b/storage/perfschema/cursor_by_user.h index c37bb8aa518..b236527f3c3 100644 --- a/storage/perfschema/cursor_by_user.h +++ b/storage/perfschema/cursor_by_user.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/gen_pfs_lex_token.cc b/storage/perfschema/gen_pfs_lex_token.cc index c67f2920b75..a0e4c76313a 100644 --- a/storage/perfschema/gen_pfs_lex_token.cc +++ b/storage/perfschema/gen_pfs_lex_token.cc @@ -2,13 +2,20 @@ Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc index 285768be49d..4aa1120bd82 100644 --- a/storage/perfschema/ha_perfschema.cc +++ b/storage/perfschema/ha_perfschema.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/ha_perfschema.h b/storage/perfschema/ha_perfschema.h index 481d663f8e4..0e01a6e82e5 100644 --- a/storage/perfschema/ha_perfschema.h +++ b/storage/perfschema/ha_perfschema.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc index b8848d108ff..b447186dabb 100644 --- a/storage/perfschema/pfs.cc +++ b/storage/perfschema/pfs.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs.h b/storage/perfschema/pfs.h index 5f543d80375..7674ed1bdd2 100644 --- a/storage/perfschema/pfs.h +++ b/storage/perfschema/pfs.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_account.cc b/storage/perfschema/pfs_account.cc index 8650a9340b1..7dab7a3f57a 100644 --- a/storage/perfschema/pfs_account.cc +++ b/storage/perfschema/pfs_account.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_account.h b/storage/perfschema/pfs_account.h index efd0a424e68..a9ce758c87a 100644 --- a/storage/perfschema/pfs_account.h +++ b/storage/perfschema/pfs_account.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_atomic.cc b/storage/perfschema/pfs_atomic.cc index 06090accdc6..0cbd029ae9b 100644 --- a/storage/perfschema/pfs_atomic.cc +++ b/storage/perfschema/pfs_atomic.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_atomic.h b/storage/perfschema/pfs_atomic.h index 61b8c2b2804..98f3e9da98d 100644 --- a/storage/perfschema/pfs_atomic.h +++ b/storage/perfschema/pfs_atomic.h @@ -1,13 +1,20 @@ /* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_autosize.cc b/storage/perfschema/pfs_autosize.cc index 38bd36d8321..c1764108668 100644 --- a/storage/perfschema/pfs_autosize.cc +++ b/storage/perfschema/pfs_autosize.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_check.cc b/storage/perfschema/pfs_check.cc index 97b23c38065..fa6c80fb07c 100644 --- a/storage/perfschema/pfs_check.cc +++ b/storage/perfschema/pfs_check.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_column_types.h b/storage/perfschema/pfs_column_types.h index c70ca220d84..41213f6f8cf 100644 --- a/storage/perfschema/pfs_column_types.h +++ b/storage/perfschema/pfs_column_types.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_column_values.cc b/storage/perfschema/pfs_column_values.cc index 65d0ae7171b..f9934c668de 100644 --- a/storage/perfschema/pfs_column_values.cc +++ b/storage/perfschema/pfs_column_values.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_column_values.h b/storage/perfschema/pfs_column_values.h index 204d5230ddf..ff09e40ad55 100644 --- a/storage/perfschema/pfs_column_values.h +++ b/storage/perfschema/pfs_column_values.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_con_slice.cc b/storage/perfschema/pfs_con_slice.cc index bd449df0a4b..05c68df8327 100644 --- a/storage/perfschema/pfs_con_slice.cc +++ b/storage/perfschema/pfs_con_slice.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_con_slice.h b/storage/perfschema/pfs_con_slice.h index d82adcb58a3..d451cc577ce 100644 --- a/storage/perfschema/pfs_con_slice.h +++ b/storage/perfschema/pfs_con_slice.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_defaults.cc b/storage/perfschema/pfs_defaults.cc index 01cf0d73771..7bea6660478 100644 --- a/storage/perfschema/pfs_defaults.cc +++ b/storage/perfschema/pfs_defaults.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_defaults.h b/storage/perfschema/pfs_defaults.h index bbb041504e2..7a3168cbc51 100644 --- a/storage/perfschema/pfs_defaults.h +++ b/storage/perfschema/pfs_defaults.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_digest.cc b/storage/perfschema/pfs_digest.cc index 3b5f1d35862..ac542c0405e 100644 --- a/storage/perfschema/pfs_digest.cc +++ b/storage/perfschema/pfs_digest.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_digest.h b/storage/perfschema/pfs_digest.h index 429a9f4250a..985ae202803 100644 --- a/storage/perfschema/pfs_digest.h +++ b/storage/perfschema/pfs_digest.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc index d114c2286d4..6f7fdb5715b 100644 --- a/storage/perfschema/pfs_engine_table.cc +++ b/storage/perfschema/pfs_engine_table.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h index 981d72ee19e..1a7a9e5008e 100644 --- a/storage/perfschema/pfs_engine_table.h +++ b/storage/perfschema/pfs_engine_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_events.h b/storage/perfschema/pfs_events.h index 97fb7e08d63..99906002202 100644 --- a/storage/perfschema/pfs_events.h +++ b/storage/perfschema/pfs_events.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_events_stages.cc b/storage/perfschema/pfs_events_stages.cc index 7351c95c9cb..0ac2296b314 100644 --- a/storage/perfschema/pfs_events_stages.cc +++ b/storage/perfschema/pfs_events_stages.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_events_stages.h b/storage/perfschema/pfs_events_stages.h index 43231796be5..c33ade70e97 100644 --- a/storage/perfschema/pfs_events_stages.h +++ b/storage/perfschema/pfs_events_stages.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_events_statements.cc b/storage/perfschema/pfs_events_statements.cc index cecd0167c38..71a54073df2 100644 --- a/storage/perfschema/pfs_events_statements.cc +++ b/storage/perfschema/pfs_events_statements.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_events_statements.h b/storage/perfschema/pfs_events_statements.h index d3fd79ea195..dca5701aa8a 100644 --- a/storage/perfschema/pfs_events_statements.h +++ b/storage/perfschema/pfs_events_statements.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_events_waits.cc b/storage/perfschema/pfs_events_waits.cc index 1120ac2a445..d0727e6e5bc 100644 --- a/storage/perfschema/pfs_events_waits.cc +++ b/storage/perfschema/pfs_events_waits.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_events_waits.h b/storage/perfschema/pfs_events_waits.h index a7f7a095b9f..efa3a7291c0 100644 --- a/storage/perfschema/pfs_events_waits.h +++ b/storage/perfschema/pfs_events_waits.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_global.cc b/storage/perfschema/pfs_global.cc index 1e2070129e0..13baf6200ce 100644 --- a/storage/perfschema/pfs_global.cc +++ b/storage/perfschema/pfs_global.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h index e69b304f4c4..6003c4f099b 100644 --- a/storage/perfschema/pfs_global.h +++ b/storage/perfschema/pfs_global.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_host.cc b/storage/perfschema/pfs_host.cc index 99e6820cdff..f9d21d032a8 100644 --- a/storage/perfschema/pfs_host.cc +++ b/storage/perfschema/pfs_host.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_host.h b/storage/perfschema/pfs_host.h index 9c039cf919f..7ec55d39da1 100644 --- a/storage/perfschema/pfs_host.h +++ b/storage/perfschema/pfs_host.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc index e842aa7fa6e..f773d4e8d69 100644 --- a/storage/perfschema/pfs_instr.cc +++ b/storage/perfschema/pfs_instr.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h index b25f5769b69..4cdf44c715c 100644 --- a/storage/perfschema/pfs_instr.h +++ b/storage/perfschema/pfs_instr.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc index 61d9b4d1484..f82320bb96d 100644 --- a/storage/perfschema/pfs_instr_class.cc +++ b/storage/perfschema/pfs_instr_class.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h index e50e824aee9..acd8abc4590 100644 --- a/storage/perfschema/pfs_instr_class.h +++ b/storage/perfschema/pfs_instr_class.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_lock.h b/storage/perfschema/pfs_lock.h index 339a893c833..1a3e58a1a57 100644 --- a/storage/perfschema/pfs_lock.h +++ b/storage/perfschema/pfs_lock.h @@ -1,13 +1,20 @@ /* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_server.cc b/storage/perfschema/pfs_server.cc index cc5e52f379d..8d19b749814 100644 --- a/storage/perfschema/pfs_server.cc +++ b/storage/perfschema/pfs_server.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_server.h b/storage/perfschema/pfs_server.h index c816628a5f0..59bc821e5c7 100644 --- a/storage/perfschema/pfs_server.h +++ b/storage/perfschema/pfs_server.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_setup_actor.cc b/storage/perfschema/pfs_setup_actor.cc index c18ab72e453..7b2e3d3c0ff 100644 --- a/storage/perfschema/pfs_setup_actor.cc +++ b/storage/perfschema/pfs_setup_actor.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_setup_actor.h b/storage/perfschema/pfs_setup_actor.h index baebd27f0ad..f6628de1abb 100644 --- a/storage/perfschema/pfs_setup_actor.h +++ b/storage/perfschema/pfs_setup_actor.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_setup_object.cc b/storage/perfschema/pfs_setup_object.cc index 3ad1186a8a1..7210228c539 100644 --- a/storage/perfschema/pfs_setup_object.cc +++ b/storage/perfschema/pfs_setup_object.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_setup_object.h b/storage/perfschema/pfs_setup_object.h index 2615802fe01..ad1d848484f 100644 --- a/storage/perfschema/pfs_setup_object.h +++ b/storage/perfschema/pfs_setup_object.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_stat.h b/storage/perfschema/pfs_stat.h index 13a32d0e3ad..e3dfce688e4 100644 --- a/storage/perfschema/pfs_stat.h +++ b/storage/perfschema/pfs_stat.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_timer.cc b/storage/perfschema/pfs_timer.cc index 8348f165e5c..ab33b826b21 100644 --- a/storage/perfschema/pfs_timer.cc +++ b/storage/perfschema/pfs_timer.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_timer.h b/storage/perfschema/pfs_timer.h index 1cae20e89dd..0d36bd4aa2c 100644 --- a/storage/perfschema/pfs_timer.h +++ b/storage/perfschema/pfs_timer.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_user.cc b/storage/perfschema/pfs_user.cc index 671afab0d16..5911db0177e 100644 --- a/storage/perfschema/pfs_user.cc +++ b/storage/perfschema/pfs_user.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_user.h b/storage/perfschema/pfs_user.h index 2cb70e8e4ea..077f39b10a4 100644 --- a/storage/perfschema/pfs_user.h +++ b/storage/perfschema/pfs_user.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/pfs_visitor.cc b/storage/perfschema/pfs_visitor.cc index 616bc27900a..8bc59c89225 100644 --- a/storage/perfschema/pfs_visitor.cc +++ b/storage/perfschema/pfs_visitor.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/pfs_visitor.h b/storage/perfschema/pfs_visitor.h index 4ec63d00636..e7ee4916134 100644 --- a/storage/perfschema/pfs_visitor.h +++ b/storage/perfschema/pfs_visitor.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_accounts.cc b/storage/perfschema/table_accounts.cc index 92a5d264a44..d07149fe1bb 100644 --- a/storage/perfschema/table_accounts.cc +++ b/storage/perfschema/table_accounts.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_accounts.h b/storage/perfschema/table_accounts.h index 232cb9d9b36..f64169ccf6e 100644 --- a/storage/perfschema/table_accounts.h +++ b/storage/perfschema/table_accounts.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_all_instr.cc b/storage/perfschema/table_all_instr.cc index ae8988d3a93..8b55bc32ec8 100644 --- a/storage/perfschema/table_all_instr.cc +++ b/storage/perfschema/table_all_instr.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_all_instr.h b/storage/perfschema/table_all_instr.h index f78f8cee3ba..77ad37bee7c 100644 --- a/storage/perfschema/table_all_instr.h +++ b/storage/perfschema/table_all_instr.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.cc b/storage/perfschema/table_esgs_by_account_by_event_name.cc index 87b414c7c40..42049e97437 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.h b/storage/perfschema/table_esgs_by_account_by_event_name.h index 2cd51783db1..c4d45adbb1c 100644 --- a/storage/perfschema/table_esgs_by_account_by_event_name.h +++ b/storage/perfschema/table_esgs_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.cc b/storage/perfschema/table_esgs_by_host_by_event_name.cc index 4087b22f98e..8015776be75 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.h b/storage/perfschema/table_esgs_by_host_by_event_name.h index a8404e11e93..f4a8d1d0f17 100644 --- a/storage/perfschema/table_esgs_by_host_by_event_name.h +++ b/storage/perfschema/table_esgs_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.cc b/storage/perfschema/table_esgs_by_thread_by_event_name.cc index eeef6c3fbb2..fcfb37e63bc 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.h b/storage/perfschema/table_esgs_by_thread_by_event_name.h index 5295a9eacdf..44c06eeeddd 100644 --- a/storage/perfschema/table_esgs_by_thread_by_event_name.h +++ b/storage/perfschema/table_esgs_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.cc b/storage/perfschema/table_esgs_by_user_by_event_name.cc index cbaec6e16e9..de77710dc26 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.cc +++ b/storage/perfschema/table_esgs_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.h b/storage/perfschema/table_esgs_by_user_by_event_name.h index 9fc66033caa..3467a0a8f58 100644 --- a/storage/perfschema/table_esgs_by_user_by_event_name.h +++ b/storage/perfschema/table_esgs_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_global_by_event_name.cc b/storage/perfschema/table_esgs_global_by_event_name.cc index 276ac8d7704..1129213f684 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.cc +++ b/storage/perfschema/table_esgs_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esgs_global_by_event_name.h b/storage/perfschema/table_esgs_global_by_event_name.h index a9c1456e9b1..f71eb1416b5 100644 --- a/storage/perfschema/table_esgs_global_by_event_name.h +++ b/storage/perfschema/table_esgs_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_account_by_event_name.cc b/storage/perfschema/table_esms_by_account_by_event_name.cc index 941429ad307..ccd13f9fcdf 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.cc +++ b/storage/perfschema/table_esms_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_account_by_event_name.h b/storage/perfschema/table_esms_by_account_by_event_name.h index 23168d03cd3..2ea5501881e 100644 --- a/storage/perfschema/table_esms_by_account_by_event_name.h +++ b/storage/perfschema/table_esms_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_digest.cc b/storage/perfschema/table_esms_by_digest.cc index 002a7f0104b..334a8bfe7d8 100644 --- a/storage/perfschema/table_esms_by_digest.cc +++ b/storage/perfschema/table_esms_by_digest.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_digest.h b/storage/perfschema/table_esms_by_digest.h index 5df8ec69633..17db2628d46 100644 --- a/storage/perfschema/table_esms_by_digest.h +++ b/storage/perfschema/table_esms_by_digest.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_host_by_event_name.cc b/storage/perfschema/table_esms_by_host_by_event_name.cc index d48808fd5c7..ed73a5c8c2f 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.cc +++ b/storage/perfschema/table_esms_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_host_by_event_name.h b/storage/perfschema/table_esms_by_host_by_event_name.h index c28f17a4473..414e8dfa477 100644 --- a/storage/perfschema/table_esms_by_host_by_event_name.h +++ b/storage/perfschema/table_esms_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.cc b/storage/perfschema/table_esms_by_thread_by_event_name.cc index 3f3117d6dc1..7c6d003397f 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.cc +++ b/storage/perfschema/table_esms_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.h b/storage/perfschema/table_esms_by_thread_by_event_name.h index 9fb9f7c58dc..70e314b7e61 100644 --- a/storage/perfschema/table_esms_by_thread_by_event_name.h +++ b/storage/perfschema/table_esms_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_user_by_event_name.cc b/storage/perfschema/table_esms_by_user_by_event_name.cc index 1434966204f..7d288b6edf8 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.cc +++ b/storage/perfschema/table_esms_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_by_user_by_event_name.h b/storage/perfschema/table_esms_by_user_by_event_name.h index 6dc481d3273..c0f1431e0a3 100644 --- a/storage/perfschema/table_esms_by_user_by_event_name.h +++ b/storage/perfschema/table_esms_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_global_by_event_name.cc b/storage/perfschema/table_esms_global_by_event_name.cc index a335c8e6c5d..08c9f90f7eb 100644 --- a/storage/perfschema/table_esms_global_by_event_name.cc +++ b/storage/perfschema/table_esms_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_esms_global_by_event_name.h b/storage/perfschema/table_esms_global_by_event_name.h index ed07e2b9062..b4cf0399d30 100644 --- a/storage/perfschema/table_esms_global_by_event_name.h +++ b/storage/perfschema/table_esms_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_events_stages.cc b/storage/perfschema/table_events_stages.cc index ad0c7eb6d91..97302f6b73a 100644 --- a/storage/perfschema/table_events_stages.cc +++ b/storage/perfschema/table_events_stages.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_stages.h b/storage/perfschema/table_events_stages.h index 09c555c80fd..c5fb196962e 100644 --- a/storage/perfschema/table_events_stages.h +++ b/storage/perfschema/table_events_stages.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_statements.cc b/storage/perfschema/table_events_statements.cc index 233994dc9c1..585c8741024 100644 --- a/storage/perfschema/table_events_statements.cc +++ b/storage/perfschema/table_events_statements.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_statements.h b/storage/perfschema/table_events_statements.h index 6c8899e14c3..c29d1cb4b45 100644 --- a/storage/perfschema/table_events_statements.h +++ b/storage/perfschema/table_events_statements.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_waits.cc b/storage/perfschema/table_events_waits.cc index 0966c9ee9ae..6b132f16b15 100644 --- a/storage/perfschema/table_events_waits.cc +++ b/storage/perfschema/table_events_waits.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_waits.h b/storage/perfschema/table_events_waits.h index 065bf95e5a6..1503b010160 100644 --- a/storage/perfschema/table_events_waits.h +++ b/storage/perfschema/table_events_waits.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_waits_summary.cc b/storage/perfschema/table_events_waits_summary.cc index f437e83f3ff..713fd458539 100644 --- a/storage/perfschema/table_events_waits_summary.cc +++ b/storage/perfschema/table_events_waits_summary.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_events_waits_summary.h b/storage/perfschema/table_events_waits_summary.h index 7463ace3eb6..c796f1e37aa 100644 --- a/storage/perfschema/table_events_waits_summary.h +++ b/storage/perfschema/table_events_waits_summary.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_ews_by_account_by_event_name.cc b/storage/perfschema/table_ews_by_account_by_event_name.cc index a4b44458027..a183d85e64d 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.cc +++ b/storage/perfschema/table_ews_by_account_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_account_by_event_name.h b/storage/perfschema/table_ews_by_account_by_event_name.h index 8ccfee599eb..ce919cf21e3 100644 --- a/storage/perfschema/table_ews_by_account_by_event_name.h +++ b/storage/perfschema/table_ews_by_account_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_host_by_event_name.cc b/storage/perfschema/table_ews_by_host_by_event_name.cc index 5a02235bcb2..d56396dea4e 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.cc +++ b/storage/perfschema/table_ews_by_host_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_host_by_event_name.h b/storage/perfschema/table_ews_by_host_by_event_name.h index 124b121e8d2..d4361787a10 100644 --- a/storage/perfschema/table_ews_by_host_by_event_name.h +++ b/storage/perfschema/table_ews_by_host_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.cc b/storage/perfschema/table_ews_by_thread_by_event_name.cc index 4db97b1c98c..d2e286a420f 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.cc +++ b/storage/perfschema/table_ews_by_thread_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.h b/storage/perfschema/table_ews_by_thread_by_event_name.h index 989356be646..4ad3cb5ac31 100644 --- a/storage/perfschema/table_ews_by_thread_by_event_name.h +++ b/storage/perfschema/table_ews_by_thread_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_user_by_event_name.cc b/storage/perfschema/table_ews_by_user_by_event_name.cc index 46f2ba568fb..5766d533fe2 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.cc +++ b/storage/perfschema/table_ews_by_user_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_by_user_by_event_name.h b/storage/perfschema/table_ews_by_user_by_event_name.h index 123ee2349ae..b139dd3c299 100644 --- a/storage/perfschema/table_ews_by_user_by_event_name.h +++ b/storage/perfschema/table_ews_by_user_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_global_by_event_name.cc b/storage/perfschema/table_ews_global_by_event_name.cc index 1e165c36bc5..c61c14438c1 100644 --- a/storage/perfschema/table_ews_global_by_event_name.cc +++ b/storage/perfschema/table_ews_global_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_ews_global_by_event_name.h b/storage/perfschema/table_ews_global_by_event_name.h index a118e536b6a..b88a753cdc8 100644 --- a/storage/perfschema/table_ews_global_by_event_name.h +++ b/storage/perfschema/table_ews_global_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_file_instances.cc b/storage/perfschema/table_file_instances.cc index a3d2fc454bb..0b2d95eb93b 100644 --- a/storage/perfschema/table_file_instances.cc +++ b/storage/perfschema/table_file_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_file_instances.h b/storage/perfschema/table_file_instances.h index f7ec16715f3..2699f58cdfe 100644 --- a/storage/perfschema/table_file_instances.h +++ b/storage/perfschema/table_file_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_file_summary_by_event_name.cc b/storage/perfschema/table_file_summary_by_event_name.cc index 7e72f4d4158..3b6a0343cbb 100644 --- a/storage/perfschema/table_file_summary_by_event_name.cc +++ b/storage/perfschema/table_file_summary_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_file_summary_by_event_name.h b/storage/perfschema/table_file_summary_by_event_name.h index 8a51dffad65..f47b66e57f4 100644 --- a/storage/perfschema/table_file_summary_by_event_name.h +++ b/storage/perfschema/table_file_summary_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_file_summary_by_instance.cc b/storage/perfschema/table_file_summary_by_instance.cc index 40478647f5b..563614ae15d 100644 --- a/storage/perfschema/table_file_summary_by_instance.cc +++ b/storage/perfschema/table_file_summary_by_instance.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_file_summary_by_instance.h b/storage/perfschema/table_file_summary_by_instance.h index d9f406966db..23646e7bf35 100644 --- a/storage/perfschema/table_file_summary_by_instance.h +++ b/storage/perfschema/table_file_summary_by_instance.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011 Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_helper.cc b/storage/perfschema/table_helper.cc index d064333dc7e..23627529d83 100644 --- a/storage/perfschema/table_helper.cc +++ b/storage/perfschema/table_helper.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_helper.h b/storage/perfschema/table_helper.h index b1377eb9748..bfefd234cb2 100644 --- a/storage/perfschema/table_helper.h +++ b/storage/perfschema/table_helper.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_host_cache.cc b/storage/perfschema/table_host_cache.cc index 57f1ea42a02..be9dec404b5 100644 --- a/storage/perfschema/table_host_cache.cc +++ b/storage/perfschema/table_host_cache.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_host_cache.h b/storage/perfschema/table_host_cache.h index 74795707ac1..82ecdafa0e6 100644 --- a/storage/perfschema/table_host_cache.h +++ b/storage/perfschema/table_host_cache.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_hosts.cc b/storage/perfschema/table_hosts.cc index 8e919ec0724..835f22efd19 100644 --- a/storage/perfschema/table_hosts.cc +++ b/storage/perfschema/table_hosts.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_hosts.h b/storage/perfschema/table_hosts.h index 6fdbf1bb0d9..d159c3c1b82 100644 --- a/storage/perfschema/table_hosts.h +++ b/storage/perfschema/table_hosts.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_os_global_by_type.cc b/storage/perfschema/table_os_global_by_type.cc index 954128a7647..44efeedbda9 100644 --- a/storage/perfschema/table_os_global_by_type.cc +++ b/storage/perfschema/table_os_global_by_type.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_os_global_by_type.h b/storage/perfschema/table_os_global_by_type.h index 888e3760488..45e84496f8f 100644 --- a/storage/perfschema/table_os_global_by_type.h +++ b/storage/perfschema/table_os_global_by_type.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_performance_timers.cc b/storage/perfschema/table_performance_timers.cc index a891d2f04cd..ff187e822e2 100644 --- a/storage/perfschema/table_performance_timers.cc +++ b/storage/perfschema/table_performance_timers.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_performance_timers.h b/storage/perfschema/table_performance_timers.h index dbd47665ff6..5c906dcaff6 100644 --- a/storage/perfschema/table_performance_timers.h +++ b/storage/perfschema/table_performance_timers.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_session_account_connect_attrs.cc b/storage/perfschema/table_session_account_connect_attrs.cc index 4a3fcc22341..a97e7345067 100644 --- a/storage/perfschema/table_session_account_connect_attrs.cc +++ b/storage/perfschema/table_session_account_connect_attrs.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_session_account_connect_attrs.h b/storage/perfschema/table_session_account_connect_attrs.h index ba8893e7cad..3feeb2e6edd 100644 --- a/storage/perfschema/table_session_account_connect_attrs.h +++ b/storage/perfschema/table_session_account_connect_attrs.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_session_connect.cc b/storage/perfschema/table_session_connect.cc index 70e89c0b195..e88c03255fc 100644 --- a/storage/perfschema/table_session_connect.cc +++ b/storage/perfschema/table_session_connect.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_session_connect.h b/storage/perfschema/table_session_connect.h index e6faa283e42..e5113672322 100644 --- a/storage/perfschema/table_session_connect.h +++ b/storage/perfschema/table_session_connect.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_session_connect_attrs.cc b/storage/perfschema/table_session_connect_attrs.cc index 9e1804b7294..d2d84a40864 100644 --- a/storage/perfschema/table_session_connect_attrs.cc +++ b/storage/perfschema/table_session_connect_attrs.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_session_connect_attrs.h b/storage/perfschema/table_session_connect_attrs.h index b10b106ba0d..9145f45cda0 100644 --- a/storage/perfschema/table_session_connect_attrs.h +++ b/storage/perfschema/table_session_connect_attrs.h @@ -1,13 +1,20 @@ /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_actors.cc b/storage/perfschema/table_setup_actors.cc index 00699a9c2e5..de04bbcde7b 100644 --- a/storage/perfschema/table_setup_actors.cc +++ b/storage/perfschema/table_setup_actors.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_actors.h b/storage/perfschema/table_setup_actors.h index be3ab1bdf0d..e2ee71d9830 100644 --- a/storage/perfschema/table_setup_actors.h +++ b/storage/perfschema/table_setup_actors.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_consumers.cc b/storage/perfschema/table_setup_consumers.cc index 7b5441b684a..12bfa1217e9 100644 --- a/storage/perfschema/table_setup_consumers.cc +++ b/storage/perfschema/table_setup_consumers.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_consumers.h b/storage/perfschema/table_setup_consumers.h index bc7e9d553bb..6a22ffe1fa4 100644 --- a/storage/perfschema/table_setup_consumers.h +++ b/storage/perfschema/table_setup_consumers.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_instruments.cc b/storage/perfschema/table_setup_instruments.cc index 31e2adb0f62..f797b98d1f0 100644 --- a/storage/perfschema/table_setup_instruments.cc +++ b/storage/perfschema/table_setup_instruments.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_instruments.h b/storage/perfschema/table_setup_instruments.h index cb4c6a06de1..22cdf5b6cc4 100644 --- a/storage/perfschema/table_setup_instruments.h +++ b/storage/perfschema/table_setup_instruments.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_objects.cc b/storage/perfschema/table_setup_objects.cc index 11fab913ac4..8c39ec3e75a 100644 --- a/storage/perfschema/table_setup_objects.cc +++ b/storage/perfschema/table_setup_objects.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_objects.h b/storage/perfschema/table_setup_objects.h index 4b31fa6a8a6..0d53b8f08fa 100644 --- a/storage/perfschema/table_setup_objects.h +++ b/storage/perfschema/table_setup_objects.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_timers.cc b/storage/perfschema/table_setup_timers.cc index a6a8a52b7e5..a5d16a89dab 100644 --- a/storage/perfschema/table_setup_timers.cc +++ b/storage/perfschema/table_setup_timers.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_setup_timers.h b/storage/perfschema/table_setup_timers.h index a81e6fefaaf..eaa8ed1f097 100644 --- a/storage/perfschema/table_setup_timers.h +++ b/storage/perfschema/table_setup_timers.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_socket_instances.cc b/storage/perfschema/table_socket_instances.cc index 0fa1d2b1a3a..1e2b7df1bcb 100644 --- a/storage/perfschema/table_socket_instances.cc +++ b/storage/perfschema/table_socket_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_socket_instances.h b/storage/perfschema/table_socket_instances.h index 080f11c1ba8..5ad96fb93e7 100644 --- a/storage/perfschema/table_socket_instances.h +++ b/storage/perfschema/table_socket_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_socket_summary_by_event_name.cc b/storage/perfschema/table_socket_summary_by_event_name.cc index 0262178e5b5..2bbe2f6f361 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.cc +++ b/storage/perfschema/table_socket_summary_by_event_name.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_socket_summary_by_event_name.h b/storage/perfschema/table_socket_summary_by_event_name.h index b34bed41f83..f24bdabf8ef 100644 --- a/storage/perfschema/table_socket_summary_by_event_name.h +++ b/storage/perfschema/table_socket_summary_by_event_name.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_socket_summary_by_instance.cc b/storage/perfschema/table_socket_summary_by_instance.cc index 5b177cb3dce..5073672a9b8 100644 --- a/storage/perfschema/table_socket_summary_by_instance.cc +++ b/storage/perfschema/table_socket_summary_by_instance.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_socket_summary_by_instance.h b/storage/perfschema/table_socket_summary_by_instance.h index f4c8ea41d8c..96d39f960cd 100644 --- a/storage/perfschema/table_socket_summary_by_instance.h +++ b/storage/perfschema/table_socket_summary_by_instance.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_sync_instances.cc b/storage/perfschema/table_sync_instances.cc index 4d7c48efdc1..25a672875a4 100644 --- a/storage/perfschema/table_sync_instances.cc +++ b/storage/perfschema/table_sync_instances.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_sync_instances.h b/storage/perfschema/table_sync_instances.h index ff7b2765a11..1e2e37e7e71 100644 --- a/storage/perfschema/table_sync_instances.h +++ b/storage/perfschema/table_sync_instances.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_threads.cc b/storage/perfschema/table_threads.cc index 0774858ca92..c75b0b56d86 100644 --- a/storage/perfschema/table_threads.cc +++ b/storage/perfschema/table_threads.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_threads.h b/storage/perfschema/table_threads.h index bce45c0cbce..852365aa381 100644 --- a/storage/perfschema/table_threads.h +++ b/storage/perfschema/table_threads.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_tiws_by_index_usage.cc b/storage/perfschema/table_tiws_by_index_usage.cc index 71455793516..bc00a12c406 100644 --- a/storage/perfschema/table_tiws_by_index_usage.cc +++ b/storage/perfschema/table_tiws_by_index_usage.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_tiws_by_index_usage.h b/storage/perfschema/table_tiws_by_index_usage.h index b5f589d0cea..2fc8123a6fc 100644 --- a/storage/perfschema/table_tiws_by_index_usage.h +++ b/storage/perfschema/table_tiws_by_index_usage.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_tiws_by_table.cc b/storage/perfschema/table_tiws_by_table.cc index ab6ad3f5e3f..4dc9b4a9c99 100644 --- a/storage/perfschema/table_tiws_by_table.cc +++ b/storage/perfschema/table_tiws_by_table.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_tiws_by_table.h b/storage/perfschema/table_tiws_by_table.h index ea52b5297d7..e7563cd484b 100644 --- a/storage/perfschema/table_tiws_by_table.h +++ b/storage/perfschema/table_tiws_by_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_tlws_by_table.cc b/storage/perfschema/table_tlws_by_table.cc index 7d33b42648e..f325fc193ad 100644 --- a/storage/perfschema/table_tlws_by_table.cc +++ b/storage/perfschema/table_tlws_by_table.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_tlws_by_table.h b/storage/perfschema/table_tlws_by_table.h index fc396447bcf..cb63afe38cb 100644 --- a/storage/perfschema/table_tlws_by_table.h +++ b/storage/perfschema/table_tlws_by_table.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/table_users.cc b/storage/perfschema/table_users.cc index c0d85017ebc..dd91427221a 100644 --- a/storage/perfschema/table_users.cc +++ b/storage/perfschema/table_users.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/table_users.h b/storage/perfschema/table_users.h index 94ea44832d1..ab6cbd2ce3a 100644 --- a/storage/perfschema/table_users.h +++ b/storage/perfschema/table_users.h @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/CMakeLists.txt b/storage/perfschema/unittest/CMakeLists.txt index 22e4aad3f36..3b039fd9229 100644 --- a/storage/perfschema/unittest/CMakeLists.txt +++ b/storage/perfschema/unittest/CMakeLists.txt @@ -1,13 +1,20 @@ -# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. # # 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 -# the Free Software Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software @@ -70,6 +77,3 @@ TARGET_LINK_LIBRARIES(pfs_connect_attr-t mysys mysys_ssl) TARGET_LINK_LIBRARIES(pfs_connect_attr-t vio ${SSL_LIBRARIES}) TARGET_LINK_LIBRARIES(pfs_connect_attr-t strings dbug regex mysys ${ZLIB_LIBRARY}) ADD_TEST(pfs_connect_attr pfs_connect_attr-t) - -# On windows, pfs_connect_attr-t may depend on openssl dlls. -COPY_OPENSSL_DLLS(copy_openssl_pfs_unittest) diff --git a/storage/perfschema/unittest/conf.txt b/storage/perfschema/unittest/conf.txt index 8afd0b4dca7..2e355bafb6c 100644 --- a/storage/perfschema/unittest/conf.txt +++ b/storage/perfschema/unittest/conf.txt @@ -1,13 +1,20 @@ # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # # 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 -# the Free Software Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index d50ae49435f..9aca02184bc 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_account-oom-t.cc b/storage/perfschema/unittest/pfs_account-oom-t.cc index fccb9ef2e43..4d28ba2fa05 100644 --- a/storage/perfschema/unittest/pfs_account-oom-t.cc +++ b/storage/perfschema/unittest/pfs_account-oom-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_connect_attr-t.cc b/storage/perfschema/unittest/pfs_connect_attr-t.cc index ecf790eeede..684e7e352c1 100644 --- a/storage/perfschema/unittest/pfs_connect_attr-t.cc +++ b/storage/perfschema/unittest/pfs_connect_attr-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_host-oom-t.cc b/storage/perfschema/unittest/pfs_host-oom-t.cc index 95a375c4d10..02b6e1f3a7f 100644 --- a/storage/perfschema/unittest/pfs_host-oom-t.cc +++ b/storage/perfschema/unittest/pfs_host-oom-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc index f58d9026c7d..953cc379ee7 100644 --- a/storage/perfschema/unittest/pfs_instr-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc index f457bf1f811..46c70490270 100644 --- a/storage/perfschema/unittest/pfs_instr-t.cc +++ b/storage/perfschema/unittest/pfs_instr-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc index 9b01044e31f..a8677a4244f 100644 --- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc index b58ae2e371d..fb7eed96939 100644 --- a/storage/perfschema/unittest/pfs_instr_class-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_misc-t.cc b/storage/perfschema/unittest/pfs_misc-t.cc index d960b5fe0a0..94e4f39598e 100644 --- a/storage/perfschema/unittest/pfs_misc-t.cc +++ b/storage/perfschema/unittest/pfs_misc-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_server_stubs.cc b/storage/perfschema/unittest/pfs_server_stubs.cc index ec916865a7d..b3a2b51f22d 100644 --- a/storage/perfschema/unittest/pfs_server_stubs.cc +++ b/storage/perfschema/unittest/pfs_server_stubs.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/unittest/pfs_timer-t.cc b/storage/perfschema/unittest/pfs_timer-t.cc index 7ea1326365e..956fd929e83 100644 --- a/storage/perfschema/unittest/pfs_timer-t.cc +++ b/storage/perfschema/unittest/pfs_timer-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/pfs_user-oom-t.cc b/storage/perfschema/unittest/pfs_user-oom-t.cc index 87558e9e813..6d3f99d6044 100644 --- a/storage/perfschema/unittest/pfs_user-oom-t.cc +++ b/storage/perfschema/unittest/pfs_user-oom-t.cc @@ -1,13 +1,20 @@ /* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/stub_pfs_defaults.h b/storage/perfschema/unittest/stub_pfs_defaults.h index f4fa24245d5..8f8594f1cc7 100644 --- a/storage/perfschema/unittest/stub_pfs_defaults.h +++ b/storage/perfschema/unittest/stub_pfs_defaults.h @@ -1,13 +1,20 @@ /* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff --git a/storage/perfschema/unittest/stub_pfs_global.h b/storage/perfschema/unittest/stub_pfs_global.h index 8f204006f48..23966727055 100644 --- a/storage/perfschema/unittest/stub_pfs_global.h +++ b/storage/perfschema/unittest/stub_pfs_global.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff --git a/storage/perfschema/unittest/stub_print_error.h b/storage/perfschema/unittest/stub_print_error.h index e9b8bc25548..88f7885cd66 100644 --- a/storage/perfschema/unittest/stub_print_error.h +++ b/storage/perfschema/unittest/stub_print_error.h @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, From 6cb208107e6f3225ee6f0572a49a558c54a3bbe9 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sun, 19 Jan 2020 14:08:35 +0100 Subject: [PATCH 19/49] 5.6.46-86.2 --- storage/tokudb/CMakeLists.txt | 11 +++- .../PerconaFT/ft/cachetable/cachetable.cc | 6 ++ .../PerconaFT/ft/ft-cachetable-wrappers.cc | 10 ++-- storage/tokudb/PerconaFT/ft/ft-flusher.cc | 44 +++++++------- storage/tokudb/PerconaFT/ft/ft-internal.h | 21 ++++++- storage/tokudb/PerconaFT/ft/ft-ops.cc | 56 +++++++++++------- storage/tokudb/PerconaFT/ft/ft-ops.h | 4 +- .../tokudb/PerconaFT/ft/ft-recount-rows.cc | 2 +- .../tokudb/PerconaFT/ft/ft-test-helpers.cc | 2 +- storage/tokudb/PerconaFT/ft/ft-verify.cc | 2 +- storage/tokudb/PerconaFT/ft/ft.cc | 28 ++++----- storage/tokudb/PerconaFT/ft/ft.h | 10 ++-- storage/tokudb/PerconaFT/ft/logger/logger.cc | 12 ++-- storage/tokudb/PerconaFT/ft/node.cc | 18 +++--- storage/tokudb/PerconaFT/ft/node.h | 21 ++++++- .../PerconaFT/ft/serialize/block_table.cc | 4 +- .../ft/serialize/ft-node-deserialize.cc | 2 +- .../PerconaFT/ft/serialize/ft-serialize.cc | 2 +- .../ft/serialize/ft_node-serialize.cc | 12 ++-- storage/tokudb/PerconaFT/ft/txn/rollback.cc | 4 ++ storage/tokudb/PerconaFT/ft/txn/txn.cc | 4 ++ .../PerconaFT/portability/toku_instr_mysql.cc | 9 +++ storage/tokudb/PerconaFT/src/ydb.cc | 58 ++++++++++++++++--- storage/tokudb/PerconaFT/src/ydb_db.cc | 8 ++- storage/tokudb/PerconaFT/src/ydb_db.h | 1 + storage/tokudb/PerconaFT/tools/tokuftdump.cc | 2 +- storage/tokudb/ha_tokudb.cc | 4 +- storage/tokudb/tokudb_status.h | 4 +- 28 files changed, 249 insertions(+), 112 deletions(-) diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index 0ac3c20bf16..8cf572e7be1 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -21,7 +21,9 @@ include(CheckCXXCompilerFlag) # pick language dialect check_cxx_compiler_flag(-std=c++11 HAVE_STDCXX11) if (HAVE_STDCXX11) - set(CMAKE_CXX_FLAGS "-std=c++11 -Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}") + # compiler_options.cmake sets -std=gnu++03 for clang-6 or newer + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wno-deprecated-declarations") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -std=c++11 -Wno-deprecated-declarations") else () message(FATAL_ERROR "${CMAKE_CXX_COMPILER} doesn't support -std=c++11, you need one that does.") endif () @@ -83,6 +85,13 @@ endmacro(append_cflags_if_supported) set_cflags_if_supported(-Wno-missing-field-initializers) append_cflags_if_supported(-Wno-vla) +# Disable warnings for gcc-9 or higher +IF(CMAKE_COMPILER_IS_GNUCXX AND + (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 9.0 OR + CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)) + append_cflags_if_supported(-Wno-address-of-packed-member) +ENDIF() + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/PerconaFT/") IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ft-index/") MESSAGE(FATAL_ERROR "Found both PerconaFT and ft-index sources. Don't know which to use.") diff --git a/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc b/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc index d97d8762252..8e9856b4060 100644 --- a/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc +++ b/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc @@ -224,6 +224,9 @@ uint32_t toku_get_checkpoint_period_unlocked (CACHETABLE ct) { } void toku_set_cleaner_period (CACHETABLE ct, uint32_t new_period) { + if(force_recovery) { + return; + } ct->cl.set_period(new_period); } @@ -3025,9 +3028,12 @@ int toku_cleaner_thread (void *cleaner_v) { // ENSURE_POD(cleaner); +extern uint force_recovery; + int cleaner::init(uint32_t _cleaner_iterations, pair_list* _pl, CACHETABLE _ct) { // default is no cleaner, for now m_cleaner_cron_init = false; + if (force_recovery) return 0; int r = toku_minicron_setup(&m_cleaner_cron, 0, toku_cleaner_thread, this); if (r == 0) { m_cleaner_cron_init = true; diff --git a/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc b/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc index 35ba864b9ea..ab9802e88b0 100644 --- a/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc +++ b/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc @@ -72,7 +72,7 @@ cachetable_put_empty_node_with_dep_nodes( enum cachetable_dirty dependent_dirty_bits[num_dependent_nodes]; for (uint32_t i = 0; i < num_dependent_nodes; i++) { dependent_pairs[i] = dependent_nodes[i]->ct_pair; - dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty; + dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty(); } toku_cachetable_put_with_dep_pairs( @@ -252,7 +252,7 @@ toku_pin_ftnode_for_query( // written out, it would have to be dirtied. That // requires a write lock, and a write lock requires you to // resolve checkpointing. - if (!node->dirty) { + if (!node->dirty()) { toku_ft_bn_update_max_msn(node, max_msn_in_path, bfe->child_to_read); } } @@ -279,7 +279,7 @@ toku_pin_ftnode_with_dep_nodes( enum cachetable_dirty dependent_dirty_bits[num_dependent_nodes]; for (uint32_t i = 0; i < num_dependent_nodes; i++) { dependent_pairs[i] = dependent_nodes[i]->ct_pair; - dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty; + dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty(); } int r = toku_cachetable_get_and_pin_with_dep_pairs( @@ -332,7 +332,7 @@ cleanup: void toku_unpin_ftnode(FT ft, FTNODE node) { int r = toku_cachetable_unpin(ft->cf, node->ct_pair, - static_cast(node->dirty), + static_cast(node->dirty()), make_ftnode_pair_attr(node)); invariant_zero(r); } @@ -343,7 +343,7 @@ toku_unpin_ftnode_read_only(FT ft, FTNODE node) int r = toku_cachetable_unpin( ft->cf, node->ct_pair, - (enum cachetable_dirty) node->dirty, + (enum cachetable_dirty) node->dirty(), make_invalid_pair_attr() ); assert(r==0); diff --git a/storage/tokudb/PerconaFT/ft/ft-flusher.cc b/storage/tokudb/PerconaFT/ft/ft-flusher.cc index e6452f60cfc..8e687d4ae58 100644 --- a/storage/tokudb/PerconaFT/ft/ft-flusher.cc +++ b/storage/tokudb/PerconaFT/ft/ft-flusher.cc @@ -138,7 +138,7 @@ maybe_destroy_child_blbs(FTNODE node, FTNODE child, FT ft) // up to date. if (child->n_children > 1 && child->height == 0 && - !child->dirty) { + !child->dirty()) { for (int i = 0; i < child->n_children; ++i) { if (BP_STATE(child, i) == PT_AVAIL && node->max_msn_applied_to_node_on_disk.msn < BLB_MAX_MSN_APPLIED(child, i).msn) @@ -479,7 +479,7 @@ handle_split_of_child( } ) - node->dirty = 1; + node->set_dirty(); XREALLOC_N(node->n_children+1, node->bp); // Slide the children over. @@ -661,8 +661,8 @@ static void ftnode_finalize_split(FTNODE node, FTNODE B, MSN max_msn_applied_to_ // The new node in the split inherits the oldest known reference xid B->oldest_referenced_xid_known = node->oldest_referenced_xid_known; - node->dirty = 1; - B->dirty = 1; + node->set_dirty(); + B->set_dirty(); } void @@ -1002,8 +1002,8 @@ flush_this_child( paranoid_invariant(child->blocknum.b!=0); // VERIFY_NODE does not work off client thread as of now //VERIFY_NODE(t, child); - node->dirty = 1; - child->dirty = 1; + node->set_dirty(); + child->set_dirty(); BP_WORKDONE(node, childnum) = 0; // this buffer is drained, no work has been done by its contents NONLEAF_CHILDINFO bnc = BNC(node, childnum); @@ -1033,8 +1033,8 @@ merge_leaf_nodes(FTNODE a, FTNODE b) // TODO(leif): this is no longer the way in_memory_stats is // maintained. verify that it's ok to move this just before the unpin // and then do that. - a->dirty = 1; - b->dirty = 1; + a->set_dirty(); + b->set_dirty(); bn_data* a_last_bd = BLB_DATA(a, a->n_children-1); // this bool states if the last basement node in a has any items or not @@ -1166,8 +1166,8 @@ maybe_merge_pinned_nonleaf_nodes( a->n_children = new_n_children; b->n_children = 0; - a->dirty = 1; - b->dirty = 1; + a->set_dirty(); + b->set_dirty(); *did_merge = true; *did_rebalance = false; @@ -1210,7 +1210,7 @@ maybe_merge_pinned_nodes( toku_ftnode_assert_fully_in_memory(parent); toku_ftnode_assert_fully_in_memory(a); toku_ftnode_assert_fully_in_memory(b); - parent->dirty = 1; // just to make sure + parent->set_dirty(); // just to make sure { MSN msna = a->max_msn_applied_to_node_on_disk; MSN msnb = b->max_msn_applied_to_node_on_disk; @@ -1334,8 +1334,8 @@ ft_merge_child( } paranoid_invariant(BP_BLOCKNUM(node, childnuma).b == childa->blocknum.b); - childa->dirty = 1; // just to make sure - childb->dirty = 1; // just to make sure + childa->set_dirty(); // just to make sure + childb->set_dirty(); // just to make sure } else { // flow will be inaccurate for a while, oh well. the children // are leaves in this case so it's not a huge deal (we're @@ -1344,7 +1344,7 @@ ft_merge_child( // If we didn't merge the nodes, then we need the correct pivot. invariant_notnull(splitk.data); node->pivotkeys.replace_at(&splitk, childnuma); - node->dirty = 1; + node->set_dirty(); } toku_destroy_dbt(&splitk); } @@ -1368,7 +1368,7 @@ ft_merge_child( call_flusher_thread_callback(ft_flush_aflter_merge); // unlock the parent - paranoid_invariant(node->dirty); + paranoid_invariant(node->dirty()); toku_unpin_ftnode(ft, node); } else { @@ -1376,7 +1376,7 @@ ft_merge_child( call_flusher_thread_callback(ft_flush_aflter_rebalance); // unlock the parent - paranoid_invariant(node->dirty); + paranoid_invariant(node->dirty()); toku_unpin_ftnode(ft, node); toku_unpin_ftnode(ft, childb); } @@ -1438,9 +1438,9 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa) // only do the following work if there is a flush to perform if (toku_bnc_n_entries(BNC(parent, childnum)) > 0 || parent->height == 1) { - if (!parent->dirty) { + if (!parent->dirty()) { dirtied++; - parent->dirty = 1; + parent->set_dirty(); } // detach buffer BP_WORKDONE(parent, childnum) = 0; // this buffer is drained, no work has been done by its contents @@ -1485,9 +1485,9 @@ void toku_ft_flush_some_child(FT ft, FTNODE parent, struct flusher_advice *fa) // in the buffer to flush, and as a result, flushing is not necessary // and bnc is NULL if (bnc != NULL) { - if (!child->dirty) { + if (!child->dirty()) { dirtied++; - child->dirty = 1; + child->set_dirty(); } // do the actual flush toku_bnc_flush_to_child( @@ -1786,7 +1786,7 @@ static void flush_node_fun(void *fe_v) // read them back in, or just do the regular partial fetch. If we // don't, that means fe->node is a parent, so we need to do this anyway. bring_node_fully_into_memory(fe->node,fe->ft); - fe->node->dirty = 1; + fe->node->set_dirty(); struct flusher_advice fa; struct flush_status_update_extra fste; @@ -1892,7 +1892,7 @@ void toku_ft_flush_node_on_background_thread(FT ft, FTNODE parent) // // can detach buffer and unpin root here // - parent->dirty = 1; + parent->set_dirty(); BP_WORKDONE(parent, childnum) = 0; // this buffer is drained, no work has been done by its contents NONLEAF_CHILDINFO bnc = BNC(parent, childnum); NONLEAF_CHILDINFO new_bnc = toku_create_empty_nl(); diff --git a/storage/tokudb/PerconaFT/ft/ft-internal.h b/storage/tokudb/PerconaFT/ft/ft-internal.h index eec591d1744..130d3c302aa 100644 --- a/storage/tokudb/PerconaFT/ft/ft-internal.h +++ b/storage/tokudb/PerconaFT/ft/ft-internal.h @@ -76,11 +76,30 @@ enum ft_type { FT_CHECKPOINT_INPROGRESS }; +extern "C" { +extern uint force_recovery; +} + +extern int writing_rollback; + // The ft_header is not managed by the cachetable. Instead, it hangs off the cachefile as userdata. struct ft_header { enum ft_type type; - int dirty; + int dirty_; + + void set_dirty() { + if(force_recovery) assert(writing_rollback); + dirty_ = 1; + } + + void clear_dirty() { + dirty_ = 0; + } + + bool dirty() { + return dirty_; + } // Free-running counter incremented once per checkpoint (toggling LSB). // LSB indicates which header location is used on disk so this diff --git a/storage/tokudb/PerconaFT/ft/ft-ops.cc b/storage/tokudb/PerconaFT/ft/ft-ops.cc index ad9f5c2e476..a2f9f0c40d8 100644 --- a/storage/tokudb/PerconaFT/ft/ft-ops.cc +++ b/storage/tokudb/PerconaFT/ft/ft-ops.cc @@ -655,7 +655,7 @@ void toku_ftnode_clone_callback(void *value_data, node->layout_version_read_from_disk; cloned_node->build_id = node->build_id; cloned_node->height = node->height; - cloned_node->dirty = node->dirty; + cloned_node->dirty_ = node->dirty_; cloned_node->fullhash = node->fullhash; cloned_node->n_children = node->n_children; @@ -671,8 +671,8 @@ void toku_ftnode_clone_callback(void *value_data, toku_ftnode_clone_partitions(node, cloned_node); // clear dirty bit - node->dirty = 0; - cloned_node->dirty = 0; + node->clear_dirty(); + cloned_node->clear_dirty(); node->layout_version_read_from_disk = FT_LAYOUT_VERSION; // set new pair attr if necessary if (node->height == 0) { @@ -741,7 +741,7 @@ void toku_ftnode_flush_callback(CACHEFILE UU(cachefile), // persisted, we need undo the logical row count adjustments as // they may occur again in the future if/when the node is // re-read from disk for another query or change. - if (!ftnode->dirty && !write_me) { + if (!ftnode->dirty() && !write_me) { int64_t lrc_delta = 0; for (int i = 0; i < ftnode->n_children; i++) { if (BP_STATE(ftnode, i) == PT_AVAIL) { @@ -846,8 +846,8 @@ int toku_ftnode_fetch_callback(CACHEFILE UU(cachefile), if (r == 0) { *sizep = make_ftnode_pair_attr(*node); (*node)->ct_pair = p; - *dirtyp = (*node)->dirty; // deserialize could mark the node as dirty - // (presumably for upgrade) + *dirtyp = (*node)->dirty(); // deserialize could mark the node as dirty + // (presumably for upgrade) } return r; } @@ -869,7 +869,7 @@ void toku_ftnode_pe_est_callback( paranoid_invariant(ftnode_pv != NULL); long bytes_to_free = 0; FTNODE node = static_cast(ftnode_pv); - if (node->dirty || node->height == 0 || + if (node->dirty() || node->height == 0 || node->layout_version_read_from_disk < FT_FIRST_LAYOUT_VERSION_WITH_BASEMENT_NODES) { *bytes_freed_estimate = 0; *cost = PE_CHEAP; @@ -946,7 +946,7 @@ int toku_ftnode_pe_callback(void *ftnode_pv, void *pointers_to_free[node->n_children * 2]; // Don't partially evict dirty nodes - if (node->dirty) { + if (node->dirty()) { goto exit; } // Don't partially evict nodes whose partitions can't be read back @@ -1399,7 +1399,7 @@ ft_init_new_root(FT ft, FTNODE oldroot, FTNODE *newrootp) MSN msna = oldroot->max_msn_applied_to_node_on_disk; newroot->max_msn_applied_to_node_on_disk = msna; BP_STATE(newroot,0) = PT_AVAIL; - newroot->dirty = 1; + newroot->set_dirty(); // Set the first child to have the new blocknum, // and then swap newroot with oldroot. The new root @@ -1487,7 +1487,7 @@ static void inject_message_in_locked_node( // mark the node as dirty. // enforcing invariant here. // - paranoid_invariant(node->dirty != 0); + paranoid_invariant(node->dirty() != 0); // update some status variables if (node->height != 0) { @@ -1847,7 +1847,7 @@ static void push_something_in_subtree( } } - if (next_loc != NEITHER_EXTREME || child->dirty || toku_bnc_should_promote(ft, bnc)) { + if (next_loc != NEITHER_EXTREME || child->dirty() || toku_bnc_should_promote(ft, bnc)) { push_something_in_subtree(ft, child, -1, msg, flow_deltas, gc_info, depth + 1, next_loc, false); toku_sync_fetch_and_add(&bnc->flow[0], flow_deltas[0]); // The recursive call unpinned the child, but @@ -2802,9 +2802,9 @@ static int ft_create_file(FT_HANDLE UU(ft_handle), const char *fname, int *fdp) } // open a file for use by the ft. if the file does not exist, error -static int ft_open_file(const char *fname, int *fdp) { +static int ft_open_file(const char *fname, int *fdp, bool rw) { int fd; - fd = ft_open_maybe_direct(fname, O_RDWR | O_BINARY, file_mode); + fd = ft_open_maybe_direct(fname, (rw ? O_RDWR : O_RDONLY) | O_BINARY, file_mode); if (fd==-1) { return get_error_errno(); } @@ -2955,7 +2955,7 @@ toku_ft_handle_inherit_options(FT_HANDLE t, FT ft) { // The checkpointed version (checkpoint_lsn) of the dictionary must be no later than max_acceptable_lsn . // Requires: The multi-operation client lock must be held to prevent a checkpoint from occuring. static int -ft_handle_open(FT_HANDLE ft_h, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn, FILENUM use_filenum, DICTIONARY_ID use_dictionary_id, LSN max_acceptable_lsn) { +ft_handle_open(FT_HANDLE ft_h, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn, FILENUM use_filenum, DICTIONARY_ID use_dictionary_id, LSN max_acceptable_lsn, bool open_rw = true) { int r; bool txn_created = false; char *fname_in_cwd = NULL; @@ -2977,7 +2977,7 @@ ft_handle_open(FT_HANDLE ft_h, const char *fname_in_env, int is_create, int only fname_in_cwd = toku_cachetable_get_fname_in_cwd(cachetable, fname_in_env); { int fd = -1; - r = ft_open_file(fname_in_cwd, &fd); + r = ft_open_file(fname_in_cwd, &fd, open_rw); if (reserved_filenum.fileid == FILENUM_NONE.fileid) { reserved_filenum = toku_cachetable_reserve_filenum(cachetable); } @@ -3123,15 +3123,15 @@ toku_ft_handle_open_recovery(FT_HANDLE t, const char *fname_in_env, int is_creat // Open an ft in normal use. The FILENUM and dict_id are assigned by the ft_handle_open() function. // Requires: The multi-operation client lock must be held to prevent a checkpoint from occuring. int -toku_ft_handle_open(FT_HANDLE t, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn) { +toku_ft_handle_open(FT_HANDLE t, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn, bool open_rw) { int r; - r = ft_handle_open(t, fname_in_env, is_create, only_create, cachetable, txn, FILENUM_NONE, DICTIONARY_ID_NONE, MAX_LSN); + r = ft_handle_open(t, fname_in_env, is_create, only_create, cachetable, txn, FILENUM_NONE, DICTIONARY_ID_NONE, MAX_LSN, open_rw); return r; } // clone an ft handle. the cloned handle has a new dict_id but refers to the same fractal tree int -toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn) { +toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn, bool open_rw) { FT_HANDLE result_ft_handle; toku_ft_handle_create(&result_ft_handle); @@ -3146,7 +3146,7 @@ toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN t CACHEFILE cf = ft_handle->ft->cf; CACHETABLE ct = toku_cachefile_get_cachetable(cf); const char *fname_in_env = toku_cachefile_fname_in_env(cf); - int r = toku_ft_handle_open(result_ft_handle, fname_in_env, false, false, ct, txn); + int r = toku_ft_handle_open(result_ft_handle, fname_in_env, false, false, ct, txn, open_rw); if (r != 0) { toku_ft_handle_close(result_ft_handle); result_ft_handle = NULL; @@ -3547,7 +3547,7 @@ unlock_ftnode_fun (void *v) { int r = toku_cachetable_unpin_ct_prelocked_no_flush( ft_handle->ft->cf, node->ct_pair, - (enum cachetable_dirty) node->dirty, + (enum cachetable_dirty) node->dirty(), x->msgs_applied ? make_ftnode_pair_attr(node) : make_invalid_pair_attr() ); assert_zero(r); @@ -4969,6 +4969,14 @@ static void toku_pfs_keys_destroy(void) { } int toku_ft_layer_init(void) { + static bool ft_layer_init_started = false; + + if(ft_layer_init_started) { + return 0; + } + + ft_layer_init_started = true; + int r = 0; // Portability must be initialized first @@ -4999,6 +5007,14 @@ exit: } void toku_ft_layer_destroy(void) { + static bool ft_layer_destroy_started = false; + + if(ft_layer_destroy_started) { + return; + } + + ft_layer_destroy_started = true; + toku_mutex_destroy(&ft_open_close_lock); toku_ft_serialize_layer_destroy(); toku_checkpoint_destroy(); diff --git a/storage/tokudb/PerconaFT/ft/ft-ops.h b/storage/tokudb/PerconaFT/ft/ft-ops.h index df8ffe287df..7b6d0634c37 100644 --- a/storage/tokudb/PerconaFT/ft/ft-ops.h +++ b/storage/tokudb/PerconaFT/ft/ft-ops.h @@ -125,12 +125,12 @@ typedef int (*ft_update_func)(DB *db, const DBT *key, const DBT *old_val, const void toku_ft_set_update(FT_HANDLE ft_h, ft_update_func update_fun); int toku_ft_handle_open(FT_HANDLE, const char *fname_in_env, - int is_create, int only_create, CACHETABLE ct, TOKUTXN txn) __attribute__ ((warn_unused_result)); + int is_create, int only_create, CACHETABLE ct, TOKUTXN txn, bool open_rw=true) __attribute__ ((warn_unused_result)); int toku_ft_handle_open_recovery(FT_HANDLE, const char *fname_in_env, int is_create, int only_create, CACHETABLE ct, TOKUTXN txn, FILENUM use_filenum, LSN max_acceptable_lsn) __attribute__ ((warn_unused_result)); // clone an ft handle. the cloned handle has a new dict_id but refers to the same fractal tree -int toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn); +int toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn, bool open_rw=true); // close an ft handle during normal operation. the underlying ft may or may not close, // depending if there are still references. an lsn for this close will come from the logger. diff --git a/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc b/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc index e31d80772d5..3b5501b66d3 100644 --- a/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc +++ b/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc @@ -98,7 +98,7 @@ int toku_ft_recount_rows(FT_HANDLE ft, if (rre._cancelled == false) { // update ft count toku_unsafe_set(&ft->ft->in_memory_logical_rows, rre._keys); - ft->ft->h->dirty = 1; + ft->ft->h->set_dirty(); ret = 0; } diff --git a/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc b/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc index 930fb3013d2..8338a0777eb 100644 --- a/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc +++ b/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc @@ -258,7 +258,7 @@ int toku_testsetup_insert_to_nonleaf (FT_HANDLE ft_handle, BLOCKNUM blocknum, en // is directly queueing something in a FIFO instead of // using ft APIs. node->max_msn_applied_to_node_on_disk = msn; - node->dirty = 1; + node->set_dirty(); // Also hack max_msn_in_ft ft_handle->ft->h->max_msn_in_ft = msn; diff --git a/storage/tokudb/PerconaFT/ft/ft-verify.cc b/storage/tokudb/PerconaFT/ft/ft-verify.cc index a2835f730eb..3819799c32f 100644 --- a/storage/tokudb/PerconaFT/ft/ft-verify.cc +++ b/storage/tokudb/PerconaFT/ft/ft-verify.cc @@ -511,7 +511,7 @@ toku_verify_ft_with_progress (FT_HANDLE ft_handle, int (*progress_callback)(void if (r == 0) { toku_ft_lock(ft_handle->ft); ft_handle->ft->h->time_of_last_verification = time(NULL); - ft_handle->ft->h->dirty = 1; + ft_handle->ft->h->set_dirty(); toku_ft_unlock(ft_handle->ft); } return r; diff --git a/storage/tokudb/PerconaFT/ft/ft.cc b/storage/tokudb/PerconaFT/ft/ft.cc index 454bf11794f..5c9f27bf5ad 100644 --- a/storage/tokudb/PerconaFT/ft/ft.cc +++ b/storage/tokudb/PerconaFT/ft/ft.cc @@ -60,7 +60,7 @@ void toku_reset_root_xid_that_created(FT ft, TXNID new_root_xid_that_created) { // (see cooperative use of dirty bit in ft_begin_checkpoint()) toku_ft_lock(ft); ft->h->root_xid_that_created = new_root_xid_that_created; - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } @@ -146,7 +146,7 @@ static void ft_begin_checkpoint (LSN checkpoint_lsn, void *header_v) { assert(ft->h->type == FT_CURRENT); assert(ft->checkpoint_header == NULL); ft_copy_for_checkpoint_unlocked(ft, checkpoint_lsn); - ft->h->dirty = 0; // this is only place this bit is cleared (in currentheader) + ft->h->clear_dirty(); // this is only place this bit is cleared (in currentheader) ft->blocktable.note_start_checkpoint_unlocked(); toku_ft_unlock (ft); } @@ -185,7 +185,7 @@ static void ft_checkpoint (CACHEFILE cf, int fd, void *header_v) { FT_HEADER ch = ft->checkpoint_header; assert(ch); assert(ch->type == FT_CHECKPOINT_INPROGRESS); - if (ch->dirty) { // this is only place this bit is tested (in checkpoint_header) + if (ch->dirty()) { // this is only place this bit is tested (in checkpoint_header) TOKULOGGER logger = toku_cachefile_logger(cf); if (logger) { toku_logger_fsync_if_lsn_not_fsynced(logger, ch->checkpoint_lsn); @@ -200,7 +200,7 @@ static void ft_checkpoint (CACHEFILE cf, int fd, void *header_v) { // write translation and header to disk (or at least to OS internal buffer) toku_serialize_ft_to(fd, ch, &ft->blocktable, ft->cf); - ch->dirty = 0; // this is only place this bit is cleared (in checkpoint_header) + ch->clear_dirty(); // this is only place this bit is cleared (in checkpoint_header) // fsync the cachefile toku_cachefile_fsync(cf); @@ -254,7 +254,7 @@ static void ft_close(CACHEFILE cachefile, int fd, void *header_v, bool oplsn_val toku_log_fclose( logger, &lsn, - ft->h->dirty, + ft->h->dirty(), bs, toku_cachefile_filenum(cachefile)); // flush the log on // close (if new header @@ -265,7 +265,7 @@ static void ft_close(CACHEFILE cachefile, int fd, void *header_v, bool oplsn_val } } } - if (ft->h->dirty) { // this is the only place this bit is tested (in currentheader) + if (ft->h->dirty()) { // this is the only place this bit is tested (in currentheader) bool do_checkpoint = true; if (logger && logger->rollback_cachefile == cachefile) { do_checkpoint = false; @@ -274,7 +274,7 @@ static void ft_close(CACHEFILE cachefile, int fd, void *header_v, bool oplsn_val ft_begin_checkpoint(lsn, header_v); ft_checkpoint(cachefile, fd, ft); ft_end_checkpoint(cachefile, fd, header_v); - assert(!ft->h->dirty); // dirty bit should be cleared by begin_checkpoint and never set again (because we're closing the dictionary) + assert(!ft->h->dirty()); // dirty bit should be cleared by begin_checkpoint and never set again (because we're closing the dictionary) } } } @@ -370,7 +370,7 @@ ft_header_create(FT_OPTIONS options, BLOCKNUM root_blocknum, TXNID root_xid_that uint64_t now = (uint64_t) time(NULL); struct ft_header h = { .type = FT_CURRENT, - .dirty = 0, + .dirty_ = 0, .checkpoint_count = 0, .checkpoint_lsn = ZERO_LSN, .layout_version = FT_LAYOUT_VERSION, @@ -521,7 +521,7 @@ toku_ft_note_hot_begin(FT_HANDLE ft_handle) { toku_ft_lock(ft); ft->h->time_of_last_optimize_begin = now; ft->h->count_of_optimize_in_progress++; - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } @@ -545,7 +545,7 @@ toku_ft_note_hot_complete(FT_HANDLE ft_handle, bool success, MSN msn_at_start_of if (ft->h->count_of_optimize_in_progress == ft->h->count_of_optimize_in_progress_read_from_disk) ft->h->count_of_optimize_in_progress = 0; } - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } @@ -958,7 +958,7 @@ void toku_ft_remove_reference( void toku_ft_set_nodesize(FT ft, unsigned int nodesize) { toku_ft_lock(ft); ft->h->nodesize = nodesize; - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } @@ -971,7 +971,7 @@ void toku_ft_get_nodesize(FT ft, unsigned int *nodesize) { void toku_ft_set_basementnodesize(FT ft, unsigned int basementnodesize) { toku_ft_lock(ft); ft->h->basementnodesize = basementnodesize; - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } @@ -984,7 +984,7 @@ void toku_ft_get_basementnodesize(FT ft, unsigned int *basementnodesize) { void toku_ft_set_compression_method(FT ft, enum toku_compression_method method) { toku_ft_lock(ft); ft->h->compression_method = method; - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } @@ -997,7 +997,7 @@ void toku_ft_get_compression_method(FT ft, enum toku_compression_method *methodp void toku_ft_set_fanout(FT ft, unsigned int fanout) { toku_ft_lock(ft); ft->h->fanout = fanout; - ft->h->dirty = 1; + ft->h->set_dirty(); toku_ft_unlock(ft); } diff --git a/storage/tokudb/PerconaFT/ft/ft.h b/storage/tokudb/PerconaFT/ft/ft.h index 7a3c4fa783c..08743e25865 100644 --- a/storage/tokudb/PerconaFT/ft/ft.h +++ b/storage/tokudb/PerconaFT/ft/ft.h @@ -181,11 +181,11 @@ void tokuft_update_product_name_strings(void); extern char toku_product_name[TOKU_MAX_PRODUCT_NAME_LENGTH]; struct toku_product_name_strings_struct { - char db_version[sizeof(toku_product_name) + sizeof("1.2.3 build ") + 256]; - char environmentdictionary[sizeof(toku_product_name) + sizeof(".environment")]; - char fileopsdirectory[sizeof(toku_product_name) + sizeof(".directory")]; - char single_process_lock[sizeof(toku_product_name) + sizeof("___lock_dont_delete_me")]; - char rollback_cachefile[sizeof(toku_product_name) + sizeof(".rollback")]; + char db_version[sizeof(toku_product_name) + sizeof("1.2.3 build ") + 256 + 1]; + char environmentdictionary[sizeof(toku_product_name) + sizeof(".environment") + 1]; + char fileopsdirectory[sizeof(toku_product_name) + sizeof(".directory") + 1]; + char single_process_lock[sizeof(toku_product_name) + sizeof("___lock_dont_delete_me") + 1]; + char rollback_cachefile[sizeof(toku_product_name) + sizeof(".rollback") + 1]; }; extern struct toku_product_name_strings_struct toku_product_name_strings; diff --git a/storage/tokudb/PerconaFT/ft/logger/logger.cc b/storage/tokudb/PerconaFT/ft/logger/logger.cc index 3f13fe10feb..7258f5552e6 100644 --- a/storage/tokudb/PerconaFT/ft/logger/logger.cc +++ b/storage/tokudb/PerconaFT/ft/logger/logger.cc @@ -49,6 +49,8 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. #include "util/status.h" +int writing_rollback = 0; + static const int log_format_version = TOKU_LOG_VERSION; toku_instr_key *result_output_condition_lock_mutex_key; @@ -231,6 +233,7 @@ void toku_logger_initialize_rollback_cache(TOKULOGGER logger, FT ft) { } int toku_logger_open_rollback(TOKULOGGER logger, CACHETABLE cachetable, bool create) { + writing_rollback++; assert(logger->is_open); assert(!logger->rollback_cachefile); @@ -250,6 +253,7 @@ int toku_logger_open_rollback(TOKULOGGER logger, CACHETABLE cachetable, bool cre } else { toku_ft_handle_close(ft_handle); } + writing_rollback--; return r; } @@ -267,20 +271,20 @@ void toku_logger_close_rollback_check_empty(TOKULOGGER logger, bool clean_shutdo FT CAST_FROM_VOIDP(ft, toku_cachefile_get_userdata(cf)); if (clean_shutdown) { //Verify it is safe to close it. - assert(!ft->h->dirty); //Must not be dirty. + assert(!ft->h->dirty()); //Must not be dirty. ft->blocktable.free_unused_blocknums(ft->h->root_blocknum); // Must have no data blocks (rollback logs or otherwise). ft->blocktable.verify_no_data_blocks_except_root(ft->h->root_blocknum); - assert(!ft->h->dirty); + assert(!ft->h->dirty()); } else { - ft->h->dirty = 0; + ft->h->clear_dirty(); } ft_to_close = toku_ft_get_only_existing_ft_handle(ft); if (clean_shutdown) { bool is_empty; is_empty = toku_ft_is_empty_fast(ft_to_close); assert(is_empty); - assert(!ft->h->dirty); // it should not have been dirtied by the toku_ft_is_empty test. + assert(!ft->h->dirty()); // it should not have been dirtied by the toku_ft_is_empty test. } } diff --git a/storage/tokudb/PerconaFT/ft/node.cc b/storage/tokudb/PerconaFT/ft/node.cc index 27943496fbf..39a76c8615e 100644 --- a/storage/tokudb/PerconaFT/ft/node.cc +++ b/storage/tokudb/PerconaFT/ft/node.cc @@ -77,7 +77,7 @@ void toku_initialize_empty_ftnode(FTNODE n, BLOCKNUM blocknum, int height, int n } } } - n->dirty = 1; // special case exception, it's okay to mark as dirty because the basements are empty + n->set_dirty(); // special case exception, it's okay to mark as dirty because the basements are empty toku_ft_status_note_ftnode(height, true); } @@ -153,7 +153,7 @@ void toku_ftnode_clone_partitions(FTNODE node, FTNODE cloned_node) { void toku_evict_bn_from_memory(FTNODE node, int childnum, FT ft) { // free the basement node - assert(!node->dirty); + assert(!node->dirty()); BASEMENTNODE bn = BLB(node, childnum); toku_ft_decrease_stats(&ft->in_memory_stats, bn->stat64_delta); toku_ft_adjust_logical_row_count(ft, -BLB_LRD(node, childnum)); @@ -595,7 +595,7 @@ toku_apply_ancestors_messages_to_node ( oldest_referenced_xid_for_simple_gc, node->oldest_referenced_xid_known, true); - if (!node->dirty && child_to_read >= 0) { + if (!node->dirty() && child_to_read >= 0) { paranoid_invariant(BP_STATE(node, child_to_read) == PT_AVAIL); apply_ancestors_messages_to_bn( t, @@ -712,7 +712,7 @@ bool toku_ft_leaf_needs_ancestors_messages( paranoid_invariant(node->height == 0); bool needs_ancestors_messages = false; // child_to_read may be -1 in test cases - if (!node->dirty && child_to_read >= 0) { + if (!node->dirty() && child_to_read >= 0) { paranoid_invariant(BP_STATE(node, child_to_read) == PT_AVAIL); needs_ancestors_messages = bn_needs_ancestors_messages( ft, @@ -745,7 +745,7 @@ cleanup: void toku_ft_bn_update_max_msn(FTNODE node, MSN max_msn_applied, int child_to_read) { invariant(node->height == 0); - if (!node->dirty && child_to_read >= 0) { + if (!node->dirty() && child_to_read >= 0) { paranoid_invariant(BP_STATE(node, child_to_read) == PT_AVAIL); BASEMENTNODE bn = BLB(node, child_to_read); if (max_msn_applied.msn > bn->max_msn_applied.msn) { @@ -832,7 +832,7 @@ struct rebalance_array_info { void toku_ftnode_leaf_rebalance(FTNODE node, unsigned int basementnodesize) { assert(node->height == 0); - assert(node->dirty); + assert(node->dirty()); uint32_t num_orig_basements = node->n_children; // Count number of leaf entries in this leaf (num_le). @@ -1141,7 +1141,7 @@ void toku_ft_nonleaf_append_child(FTNODE node, FTNODE child, const DBT *pivotkey invariant(childnum > 0); node->pivotkeys.insert_at(pivotkey, childnum - 1); } - node->dirty = 1; + node->set_dirty(); } void @@ -1744,7 +1744,7 @@ static void ft_append_msg_to_child_buffer(const toku::comparator &cmp, FTNODE no int childnum, const ft_msg &msg, bool is_fresh) { paranoid_invariant(BP_STATE(node,childnum) == PT_AVAIL); bnc_insert_msg(BNC(node, childnum), msg, is_fresh, cmp); - node->dirty = 1; + node->set_dirty(); } // This is only exported for tests. @@ -2089,7 +2089,7 @@ void toku_ft_leaf_apply_msg( // be reapplied later), we mark the node as dirty and // take the opportunity to update node->max_msn_applied_to_node_on_disk. // - node->dirty = 1; + node->set_dirty(); // // we cannot blindly update node->max_msn_applied_to_node_on_disk, diff --git a/storage/tokudb/PerconaFT/ft/node.h b/storage/tokudb/PerconaFT/ft/node.h index 05c8a44ebed..61093f3ed8d 100644 --- a/storage/tokudb/PerconaFT/ft/node.h +++ b/storage/tokudb/PerconaFT/ft/node.h @@ -155,6 +155,12 @@ private: size_t _total_size; }; +extern int writing_rollback; + +extern "C" { +extern uint force_recovery; +} + // TODO: class me up struct ftnode { // max_msn_applied that will be written to disk @@ -173,9 +179,22 @@ struct ftnode { uint32_t build_id; // height is always >= 0. 0 for leaf, >0 for nonleaf. int height; - int dirty; + int dirty_; uint32_t fullhash; + void set_dirty() { + if(force_recovery) assert(writing_rollback); + dirty_ = 1; + } + + void clear_dirty() { + dirty_ = 0; + } + + bool dirty() { + return dirty_; + } + // for internal nodes, if n_children==fanout+1 then the tree needs to be // rebalanced. for leaf nodes, represents number of basement nodes int n_children; diff --git a/storage/tokudb/PerconaFT/ft/serialize/block_table.cc b/storage/tokudb/PerconaFT/ft/serialize/block_table.cc index 56d51f56915..c4c99844edf 100644 --- a/storage/tokudb/PerconaFT/ft/serialize/block_table.cc +++ b/storage/tokudb/PerconaFT/ft/serialize/block_table.cc @@ -195,9 +195,9 @@ static void ft_set_dirty(FT ft, bool for_checkpoint) { invariant(ft->h->type == FT_CURRENT); if (for_checkpoint) { invariant(ft->checkpoint_header->type == FT_CHECKPOINT_INPROGRESS); - ft->checkpoint_header->dirty = 1; + ft->checkpoint_header->set_dirty(); } else { - ft->h->dirty = 1; + ft->h->set_dirty(); } } diff --git a/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc b/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc index 02a9dfd085c..de58fb42a8b 100644 --- a/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc +++ b/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc @@ -60,7 +60,7 @@ initialize_ftnode(FTNODE node, BLOCKNUM blocknum) { node->fullhash = 0xDEADBEEF; // Is this 'spoof' ok? node->blocknum = blocknum; - node->dirty = 0; + node->clear_dirty(); node->bp = NULL; // Can we use this initialization as a correctness assert in // a later function? diff --git a/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc b/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc index b24d72a5dff..b08308385ff 100644 --- a/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc +++ b/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc @@ -340,7 +340,7 @@ int deserialize_ft_versioned(int fd, struct rbuf *rb, FT *ftp, uint32_t version) { struct ft_header h = { .type = FT_CURRENT, - .dirty = 0, + .dirty_ = 0, .checkpoint_count = checkpoint_count, .checkpoint_lsn = checkpoint_lsn, .layout_version = FT_LAYOUT_VERSION, diff --git a/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc b/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc index 55899905baf..ecaf59d27b6 100644 --- a/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc +++ b/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc @@ -827,7 +827,7 @@ int toku_serialize_ftnode_to(int fd, node, n_uncompressed_bytes, n_to_write, io_time, for_checkpoint); toku_free(compressed_buf); - node->dirty = 0; // See #1957. Must set the node to be clean after + node->clear_dirty(); // See #1957. Must set the node to be clean after // serializing it so that it doesn't get written again on // the next checkpoint or eviction. if (node->height == 0) { @@ -1544,7 +1544,7 @@ static FTNODE alloc_ftnode_for_deserialize(uint32_t fullhash, BLOCKNUM blocknum) FTNODE XMALLOC(node); node->fullhash = fullhash; node->blocknum = blocknum; - node->dirty = 0; + node->clear_dirty(); node->oldest_referenced_xid_known = TXNID_NONE; node->bp = nullptr; node->ct_pair = nullptr; @@ -1951,7 +1951,7 @@ static int deserialize_and_upgrade_internal_node(FTNODE node, // Assign the highest msn from our upgrade message buffers node->max_msn_applied_to_node_on_disk = highest_msn; // Since we assigned MSNs to this node's messages, we need to dirty it. - node->dirty = 1; + node->set_dirty(); // Must compute the checksum now (rather than at the end, while we // still have the pointer to the buffer). @@ -2908,9 +2908,9 @@ int toku_serialize_rollback_log_to(int fd, toku_free(compressed_buf); if (!is_serialized) { toku_static_serialized_rollback_log_destroy(&serialized_local); - log->dirty = 0; // See #1957. Must set the node to be clean after - // serializing it so that it doesn't get written again - // on the next checkpoint or eviction. + log->dirty = false; // See #1957. Must set the node to be clean after + // serializing it so that it doesn't get written again + // on the next checkpoint or eviction. } return 0; } diff --git a/storage/tokudb/PerconaFT/ft/txn/rollback.cc b/storage/tokudb/PerconaFT/ft/txn/rollback.cc index 0c793842f3c..105f980dc0d 100644 --- a/storage/tokudb/PerconaFT/ft/txn/rollback.cc +++ b/storage/tokudb/PerconaFT/ft/txn/rollback.cc @@ -43,6 +43,8 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. #include "ft/logger/log-internal.h" #include "ft/txn/rollback-ct-callbacks.h" +extern int writing_rollback; + static void rollback_unpin_remove_callback(CACHEKEY* cachekey, bool for_checkpoint, void* extra) { FT CAST_FROM_VOIDP(ft, extra); ft->blocktable.free_blocknum(cachekey, ft, for_checkpoint); @@ -155,6 +157,7 @@ static void rollback_log_create ( ROLLBACK_LOG_NODE *result ) { + writing_rollback++; ROLLBACK_LOG_NODE XMALLOC(log); rollback_empty_log_init(log); @@ -169,6 +172,7 @@ static void rollback_log_create ( get_write_callbacks_for_rollback_log(ft), toku_rollback_node_save_ct_pair); txn->roll_info.current_rollback = log->blocknum; + writing_rollback --; } void toku_rollback_log_unpin(TOKUTXN txn, ROLLBACK_LOG_NODE log) { diff --git a/storage/tokudb/PerconaFT/ft/txn/txn.cc b/storage/tokudb/PerconaFT/ft/txn/txn.cc index 7327cbd9d24..7152833d88d 100644 --- a/storage/tokudb/PerconaFT/ft/txn/txn.cc +++ b/storage/tokudb/PerconaFT/ft/txn/txn.cc @@ -723,7 +723,11 @@ time_t toku_txn_get_start_time(struct tokutxn *txn) { return txn->start_time; } +extern uint force_recovery; int toku_txn_reads_txnid(TXNID txnid, TOKUTXN txn, bool is_provisional UU()) { + if(force_recovery) { + return TOKUDB_ACCEPT; + } int r = 0; TXNID oldest_live_in_snapshot = toku_get_oldest_in_live_root_txn_list(txn); if (oldest_live_in_snapshot == TXNID_NONE && txnid < txn->snapshot_txnid64) { diff --git a/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc b/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc index b5305ffaff4..d7c869f7a5f 100644 --- a/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc +++ b/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc @@ -359,7 +359,16 @@ void toku_instr_rwlock_wrlock_wait_end( void toku_instr_rwlock_unlock(toku_pthread_rwlock_t &rwlock) { if (rwlock.psi_rwlock) + +// Due to change introduced in e4148f2a22922687f7652c4e3d21a22da07c9e78 +// PSI rwlock version and interface changed +// PSI_CURRENT_RWLOCK_VERSION is not defined in MySQL 5.6 and is defined +// as 1 in 5.7 and < 8.0.17 +#if defined(PSI_CURRENT_RWLOCK_VERSION) && (PSI_CURRENT_RWLOCK_VERSION == 2) + PSI_RWLOCK_CALL(unlock_rwlock)(rwlock.psi_rwlock, PSI_RWLOCK_UNLOCK); +#else PSI_RWLOCK_CALL(unlock_rwlock)(rwlock.psi_rwlock); +#endif } #endif // TOKU_MYSQL_WITH_PFS diff --git a/storage/tokudb/PerconaFT/src/ydb.cc b/storage/tokudb/PerconaFT/src/ydb.cc index 66e7502f625..ca8bf82009b 100644 --- a/storage/tokudb/PerconaFT/src/ydb.cc +++ b/storage/tokudb/PerconaFT/src/ydb.cc @@ -39,6 +39,9 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. extern const char *toku_patent_string; const char *toku_copyright_string = "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved."; + +extern int writing_rollback; + #include #include #include @@ -87,6 +90,10 @@ const char *toku_copyright_string = "Copyright (c) 2006, 2015, Percona and/or it int toku_close_trace_file (void) { return 0; } #endif +extern "C" { + uint force_recovery = 0; +} + // Set when env is panicked, never cleared. static int env_is_panicked = 0; @@ -223,6 +230,9 @@ env_fs_redzone(DB_ENV *env, uint64_t total) { // Check the available space in the file systems used by tokuft and erect barriers when available space gets low. static int env_fs_poller(void *arg) { + if(force_recovery == 6) { + return 0; + } DB_ENV *env = (DB_ENV *) arg; int r; @@ -307,6 +317,9 @@ env_fs_init(DB_ENV *env) { // Initialize the minicron that polls file system space static int env_fs_init_minicron(DB_ENV *env) { + if(force_recovery == 6) { + return 0; + } int r = toku_minicron_setup(&env->i->fs_poller, env->i->fs_poll_time*1000, env_fs_poller, env); if (r == 0) env->i->fs_poller_is_init = true; @@ -709,7 +722,7 @@ static int validate_env(DB_ENV *env, } // Test for fileops directory - if (r == 0) { + if (r == 0 && force_recovery != 6) { path = toku_construct_full_name( 2, env->i->dir, toku_product_name_strings.fileopsdirectory); assert(path); @@ -752,7 +765,7 @@ static int validate_env(DB_ENV *env, } // Test for recovery log - if ((r == 0) && (env->i->open_flags & DB_INIT_LOG)) { + if ((r == 0) && (env->i->open_flags & DB_INIT_LOG) && force_recovery != 6) { // if using transactions, test for existence of log r = ydb_recover_log_exists(env); // return 0 or ENOENT if (expect_newenv && (r != ENOENT)) @@ -813,6 +826,27 @@ unlock_single_process(DB_ENV *env) { // (The set of necessary files is defined in the function validate_env() above.) static int env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { + + if(force_recovery == 6) { + { + const int len = strlen(toku_product_name_strings.rollback_cachefile); + toku_product_name_strings.rollback_cachefile[len] = '2'; + toku_product_name_strings.rollback_cachefile[len+1] = 0; + } + + { + const int len = strlen(toku_product_name_strings.single_process_lock); + toku_product_name_strings.single_process_lock[len] = '2'; + toku_product_name_strings.single_process_lock[len+1] = 0; + } + + { + const int len = strlen(toku_product_name_strings.environmentdictionary); + toku_product_name_strings.environmentdictionary[len] = '2'; + toku_product_name_strings.environmentdictionary[len+1] = 0; + } + } + HANDLE_PANICKED_ENV(env); int r; bool newenv; // true iff creating a new environment @@ -903,7 +937,7 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { bool need_rollback_cachefile; need_rollback_cachefile = false; - if (flags & (DB_INIT_TXN | DB_INIT_LOG)) { + if (flags & (DB_INIT_TXN | DB_INIT_LOG) && force_recovery != 6) { need_rollback_cachefile = true; } @@ -916,7 +950,7 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { r = ydb_maybe_upgrade_env(env, &last_lsn_of_clean_shutdown_read_from_log, &upgrade_in_progress); if (r!=0) goto cleanup; - if (upgrade_in_progress) { + if (upgrade_in_progress || force_recovery == 6) { // Delete old rollback file. There was a clean shutdown, so it has nothing useful, // and there is no value in upgrading it. It is simpler to just create a new one. char* rollback_filename = toku_construct_full_name(2, env->i->dir, toku_product_name_strings.rollback_cachefile); @@ -934,9 +968,13 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { unused_flags &= ~DB_INIT_TXN & ~DB_INIT_LOG; + if(force_recovery == 6) { + flags |= DB_INIT_LOG | DB_INIT_TXN; + } + // do recovery only if there exists a log and recovery is requested // otherwise, a log is created when the logger is opened later - if (!newenv) { + if (!newenv && force_recovery == 0) { if (flags & DB_INIT_LOG) { // the log does exist if (flags & DB_RECOVER) { @@ -1005,7 +1043,7 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { assert (using_txns); toku_logger_set_cachetable(env->i->logger, env->i->cachetable); if (!toku_logger_rollback_is_open(env->i->logger)) { - bool create_new_rollback_file = newenv | upgrade_in_progress; + bool create_new_rollback_file = newenv | upgrade_in_progress | (force_recovery == 6); r = toku_logger_open_rollback(env->i->logger, env->i->cachetable, create_new_rollback_file); if (r != 0) { r = toku_ydb_do_error(env, r, "Cant open rollback\n"); @@ -1024,6 +1062,7 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { assert_zero(r); r = toku_db_use_builtin_key_cmp(env->i->persistent_environment); assert_zero(r); + writing_rollback++; r = toku_db_open_iname(env->i->persistent_environment, txn, toku_product_name_strings.environmentdictionary, DB_CREATE, mode); if (r != 0) { r = toku_ydb_do_error(env, r, "Cant open persistent env\n"); @@ -1056,6 +1095,7 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { assert_zero(r); } capture_persistent_env_contents(env, txn); + writing_rollback--; } { r = toku_db_create(&env->i->directory, env, 0); @@ -1074,8 +1114,10 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) { txn = NULL; } cp = toku_cachetable_get_checkpointer(env->i->cachetable); - r = toku_checkpoint(cp, env->i->logger, NULL, NULL, NULL, NULL, STARTUP_CHECKPOINT); - assert_zero(r); + if (!force_recovery) { + r = toku_checkpoint(cp, env->i->logger, NULL, NULL, NULL, NULL, STARTUP_CHECKPOINT); + } + writing_rollback--; env_fs_poller(env); // get the file system state at startup r = env_fs_init_minicron(env); if (r != 0) { diff --git a/storage/tokudb/PerconaFT/src/ydb_db.cc b/storage/tokudb/PerconaFT/src/ydb_db.cc index 40c4a7f6577..ac44b8e7fd3 100644 --- a/storage/tokudb/PerconaFT/src/ydb_db.cc +++ b/storage/tokudb/PerconaFT/src/ydb_db.cc @@ -323,6 +323,7 @@ toku_db_open(DB * db, DB_TXN * txn, const char *fname, const char *dbname, DBTYP // DB_THREAD is implicitly supported and DB_BLACKHOLE is supported at the ft-layer unused_flags &= ~DB_THREAD; unused_flags &= ~DB_BLACKHOLE; + unused_flags &= ~DB_RDONLY; // check for unknown or conflicting flags if (unused_flags) return EINVAL; // unknown flags @@ -404,7 +405,7 @@ int toku_db_lt_on_create_callback(toku::locktree *lt, void *extra) { FT_HANDLE ft_handle = info->ft_handle; FT_HANDLE cloned_ft_handle; - r = toku_ft_handle_clone(&cloned_ft_handle, ft_handle, ttxn); + r = toku_ft_handle_clone(&cloned_ft_handle, ft_handle, ttxn, info->open_rw); if (r == 0) { assert(lt->get_userdata() == NULL); lt->set_userdata(cloned_ft_handle); @@ -465,6 +466,7 @@ int toku_db_open_iname(DB * db, DB_TXN * txn, const char *iname_in_env, uint32_t flags&=~DB_READ_COMMITTED; flags&=~DB_SERIALIZABLE; flags&=~DB_IS_HOT_INDEX; + flags&=~DB_RDONLY; // unknown or conflicting flags are bad int unknown_flags = flags & ~DB_THREAD; unknown_flags &= ~DB_BLACKHOLE; @@ -479,11 +481,12 @@ int toku_db_open_iname(DB * db, DB_TXN * txn, const char *iname_in_env, uint32_t db->i->open_flags = flags; db->i->open_mode = mode; + bool open_rw = mode & (S_IWUSR | S_IWOTH | S_IWGRP); FT_HANDLE ft_handle = db->i->ft_handle; int r = toku_ft_handle_open(ft_handle, iname_in_env, is_db_create, is_db_excl, db->dbenv->i->cachetable, - txn ? db_txn_struct_i(txn)->tokutxn : nullptr); + txn ? db_txn_struct_i(txn)->tokutxn : nullptr, open_rw); if (r != 0) { goto out; } @@ -505,6 +508,7 @@ int toku_db_open_iname(DB * db, DB_TXN * txn, const char *iname_in_env, uint32_t struct lt_on_create_callback_extra on_create_extra = { .txn = txn, .ft_handle = db->i->ft_handle, + open_rw }; db->i->lt = db->dbenv->i->ltm.get_lt(db->i->dict_id, toku_ft_get_comparator(db->i->ft_handle), diff --git a/storage/tokudb/PerconaFT/src/ydb_db.h b/storage/tokudb/PerconaFT/src/ydb_db.h index ab8fcd2a401..c260e9d0fbe 100644 --- a/storage/tokudb/PerconaFT/src/ydb_db.h +++ b/storage/tokudb/PerconaFT/src/ydb_db.h @@ -67,6 +67,7 @@ void ydb_db_layer_get_status(YDB_DB_LAYER_STATUS statp); struct lt_on_create_callback_extra { DB_TXN *txn; FT_HANDLE ft_handle; + bool open_rw; }; int toku_db_lt_on_create_callback(toku::locktree *lt, void *extra); void toku_db_lt_on_destroy_callback(toku::locktree *lt); diff --git a/storage/tokudb/PerconaFT/tools/tokuftdump.cc b/storage/tokudb/PerconaFT/tools/tokuftdump.cc index 2838ae5182e..44edb15162a 100644 --- a/storage/tokudb/PerconaFT/tools/tokuftdump.cc +++ b/storage/tokudb/PerconaFT/tools/tokuftdump.cc @@ -181,7 +181,7 @@ static void dump_header(FT ft) { printf(" time_of_creation= %" PRIu64 " %s\n", ft->h->time_of_creation, timestr); format_time(ft->h->time_of_last_modification, timestr); printf(" time_of_last_modification=%" PRIu64 " %s\n", ft->h->time_of_last_modification, timestr); - printf(" dirty=%d\n", ft->h->dirty); + printf(" dirty=%d\n", ft->h->dirty()); printf(" checkpoint_count=%" PRId64 "\n", ft->h->checkpoint_count); printf(" checkpoint_lsn=%" PRId64 "\n", ft->h->checkpoint_lsn.lsn); printf(" nodesize=%u\n", ft->h->nodesize); diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 32f3e77cf13..1d4d2335c7d 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -1331,7 +1331,7 @@ int ha_tokudb::open_main_dictionary( NULL, DB_BTREE, open_flags, - 0); + S_IWUSR); if (error) { goto exit; } @@ -1394,7 +1394,7 @@ int ha_tokudb::open_secondary_dictionary( } - error = (*ptr)->open(*ptr, txn, newname, NULL, DB_BTREE, open_flags, 0); + error = (*ptr)->open(*ptr, txn, newname, NULL, DB_BTREE, open_flags, S_IWUSR); if (error) { my_errno = error; goto cleanup; diff --git a/storage/tokudb/tokudb_status.h b/storage/tokudb/tokudb_status.h index 5cca54e52c9..07772bdc92a 100644 --- a/storage/tokudb/tokudb_status.h +++ b/storage/tokudb/tokudb_status.h @@ -201,7 +201,7 @@ int create( name, NULL, DB_BTREE, DB_CREATE | DB_EXCL, - 0); + S_IWUSR); } if (error == 0) { *status_db_ptr = status_db; @@ -230,7 +230,7 @@ int open( NULL, DB_BTREE, DB_THREAD, - 0); + S_IWUSR); } if (error == 0) { uint32_t pagesize = 0; From 578b6ba02af4ecd0468e452578cebf3a2a506216 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 14 Jan 2020 14:23:15 +0100 Subject: [PATCH 20/49] MDEV-19457: sys_vars.wsrep_provider_basic failed in buildbot If the initialization of the wsrep provider failed, in some cases the internal variable wrep_inited indicating that the initialization has already been completed is still set to "1", which then leads to confusion in the initialization status. To solve the problem, we should set this variable to "1" only if the wsrep provider initialization really completed successfully. An earlier issue has already been fixed for branch 10.4, and this patch contains a fix for earlier versions (where Galera 3.x is used). --- sql/wsrep_mysqld.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 0627127c6e0..c256467706b 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -599,7 +599,6 @@ int wsrep_init() { // enable normal operation in case no provider is specified wsrep_ready_set(TRUE); - wsrep_inited= 1; global_system_variables.wsrep_on = 0; wsrep_init_args args; args.logger_cb = wsrep_log_cb; @@ -610,10 +609,15 @@ int wsrep_init() { DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode)); WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode); + wsrep_ready_set(FALSE); wsrep->free(wsrep); free(wsrep); wsrep = NULL; } + else + { + wsrep_inited= 1; + } return rcode; } else From 90d39f2f91346a848f48c9308b5e4bb4e5c8a36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 20 Jan 2020 13:46:44 +0200 Subject: [PATCH 21/49] MDEV-21532 : galera.galera_rsu_drop_pk MTR failed: Result content mismatch Add wait conditions to make sure correct number of rows have been replicated. --- mysql-test/suite/galera/disabled.def | 1 - .../suite/galera/r/galera_rsu_drop_pk.result | 50 +++++++++---------- .../suite/galera/t/galera_rsu_drop_pk.test | 28 +++++++---- 3 files changed, 43 insertions(+), 36 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 581e9e80daa..504adbbd1d1 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -24,7 +24,6 @@ galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc -galera_binlog_stmt_autoinc: MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc galera_flush : MariaDB does not have global.thread_statistics galera_gcache_recover_manytrx : MDEV-18834 Galera test failure galera_ist_mariabackup : MDEV-18829 test leaves port open diff --git a/mysql-test/suite/galera/r/galera_rsu_drop_pk.result b/mysql-test/suite/galera/r/galera_rsu_drop_pk.result index f64649ef4e2..a8b623cc37f 100644 --- a/mysql-test/suite/galera/r/galera_rsu_drop_pk.result +++ b/mysql-test/suite/galera/r/galera_rsu_drop_pk.result @@ -1,5 +1,5 @@ connection node_1; -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; @@ -9,19 +9,19 @@ SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 DROP PRIMARY KEY; SET SESSION wsrep_OSU_method = "TOI"; INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) as expect_300000 FROM t1; +expect_300000 +300000 +SELECT MAX(f1) as expect_299999 FROM t1; +expect_299999 +299999 connection node_1; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) as expect_300000 FROM t1; +expect_300000 +300000 +SELECT MAX(f1) as expect_299999 FROM t1; +expect_299999 +299999 SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 DROP PRIMARY KEY; SET SESSION wsrep_OSU_method = "TOI"; @@ -29,20 +29,20 @@ connection node_2; INSERT INTO t1 (f1) VALUES (1); INSERT INTO t1 (f1) VALUES (10); connection node_1; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 10; -COUNT(*) = 2 -1 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1; +expect_2 +2 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 10; +expect_2 +2 INSERT INTO t1 (f1) VALUES (100); INSERT INTO t1 (f1) VALUES (1000); connection node_2; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 100; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1000; -COUNT(*) = 2 -1 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 100; +expect_2 +2 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1000; +expect_2 +2 DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/galera/t/galera_rsu_drop_pk.test b/mysql-test/suite/galera/t/galera_rsu_drop_pk.test index e64259494d1..97bdbcfdb84 100644 --- a/mysql-test/suite/galera/t/galera_rsu_drop_pk.test +++ b/mysql-test/suite/galera/t/galera_rsu_drop_pk.test @@ -4,10 +4,9 @@ --source include/big_test.inc --source include/galera_cluster.inc ---source include/have_innodb.inc --connection node_1 -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; @@ -26,13 +25,18 @@ SET SESSION wsrep_OSU_method = "TOI"; # Insert even more data after the ALTER has completed INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) as expect_300000 FROM t1; +SELECT MAX(f1) as expect_299999 FROM t1; --connection node_1 --reap -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc +SELECT COUNT(*) as expect_300000 FROM t1; +SELECT MAX(f1) as expect_299999 FROM t1; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 DROP PRIMARY KEY; @@ -44,15 +48,19 @@ INSERT INTO t1 (f1) VALUES (1); INSERT INTO t1 (f1) VALUES (10); --connection node_1 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 10; +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1 where f1 = 10; +--source include/wait_condition.inc +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1; +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 10; INSERT INTO t1 (f1) VALUES (100); INSERT INTO t1 (f1) VALUES (1000); --connection node_2 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 100; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1000; +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1 where f1 = 1000; +--source include/wait_condition.inc +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 100; +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1000; DROP TABLE t1; DROP TABLE ten; From 3155a643df6ffe9f7513c2cabedb066dd8bb9f72 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 20 Jan 2020 16:31:50 +0100 Subject: [PATCH 22/49] new wolfssl v4.3.0-stable --- extra/wolfssl/wolfssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl index 50fbdb961fd..3f13b49fa31 160000 --- a/extra/wolfssl/wolfssl +++ b/extra/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit 50fbdb961fd8c2d8123064e567ae8ec44167732d +Subproject commit 3f13b49fa318fbd3216d7da36d942e7c276d3413 From a5b38151c0c020633ff2f3bbd18901427039f5b4 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 20 Jan 2020 18:05:48 +0100 Subject: [PATCH 23/49] new version CC 3.1 --- libmariadb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb b/libmariadb index 42be9e67d83..a1283d0b10a 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit 42be9e67d83488121f8219a3aeaba6e54204e964 +Subproject commit a1283d0b10a3b675bede48d9fe2d082865a24a6c From 1ecd0e073252f10852ebfc8591fd101cd8e97105 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Jan 2020 22:35:54 +0100 Subject: [PATCH 24/49] compilation fixes for new wolfssl --- include/ssl_compat.h | 2 ++ include/violite.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/ssl_compat.h b/include/ssl_compat.h index 9b63c24399a..cff5f7ef3de 100644 --- a/include/ssl_compat.h +++ b/include/ssl_compat.h @@ -79,7 +79,9 @@ #define EVP_CIPHER_CTX_encrypting(ctx) ((ctx)->encrypt) #define EVP_CIPHER_CTX_SIZE sizeof(EVP_CIPHER_CTX) +#ifndef HAVE_WOLFSSL #define EVP_MD_CTX_reset(X) EVP_MD_CTX_cleanup(X) +#endif #define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X) #define X509_get0_notBefore(X) X509_get_notBefore(X) #define X509_get0_notAfter(X) X509_get_notAfter(X) diff --git a/include/violite.h b/include/violite.h index 4778c5521de..1d981c8bf83 100644 --- a/include/violite.h +++ b/include/violite.h @@ -146,7 +146,9 @@ int vio_getnameinfo(const struct sockaddr *sa, /* Set yaSSL to use same type as MySQL do for socket handles */ typedef my_socket YASSL_SOCKET_T; #define YASSL_SOCKET_T_DEFINED +#define Timeval WOLFSSL_Timeval #include +#undef Timeval #include enum enum_ssl_init_error From 7c0e4748ac51a02870474d842b3e5e58c343add2 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 21 Jan 2020 09:20:59 +0100 Subject: [PATCH 25/49] silence a warning in WolfSSL. There is a warning about inconsistency between function definition and prototype. See https://github.com/wolfSSL/wolfssl/issues/2752 Disable specific MSVC warning for now. --- extra/wolfssl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt index 7eefa840bfa..dced917169a 100644 --- a/extra/wolfssl/CMakeLists.txt +++ b/extra/wolfssl/CMakeLists.txt @@ -39,7 +39,7 @@ ADD_DEFINITIONS(-DWOLFSSL_LIB -DBUILDING_WOLFSSL) INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl) IF(MSVC) # size_t to long truncation warning - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267 -wd4334") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267 -wd4334 -wd4028") ENDIF() ADD_CONVENIENCE_LIBRARY(wolfssl ${WOLFSSL_SOURCES}) From 982294ac1680938ac9223fb64a64e21f0cbc322a Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 14 Jan 2020 13:57:14 +0100 Subject: [PATCH 26/49] MDEV-17601: MariaDB Galera does not expect 'mbstream' as streamfmt Setting "streamfmt=mbstream" in the "[sst]" section causes SST to fail because the format automatically switches to 'tar' by default (insead of mbstream). To fix this, we need to add mbstream to the list of valid values for the format, making it synonymous with xbstream. This must be done both in the SST script and when parsing the options of the corresponding utilities. --- extra/mariabackup/CMakeLists.txt | 2 +- extra/mariabackup/innobackupex.cc | 9 +++++---- extra/mariabackup/xtrabackup.cc | 5 +++-- scripts/wsrep_sst_mariabackup.sh | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/extra/mariabackup/CMakeLists.txt b/extra/mariabackup/CMakeLists.txt index 9e5b8506658..edbb4e28ab2 100644 --- a/extra/mariabackup/CMakeLists.txt +++ b/extra/mariabackup/CMakeLists.txt @@ -94,7 +94,7 @@ ENDIF() ######################################################################## -# xbstream binary +# mbstream binary ######################################################################## MYSQL_ADD_EXECUTABLE(mbstream ds_buffer.c diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc index 5382f876f74..e3cb7fa5cde 100644 --- a/extra/mariabackup/innobackupex.cc +++ b/extra/mariabackup/innobackupex.cc @@ -600,8 +600,8 @@ static struct my_option ibx_long_options[] = {"stream", OPT_STREAM, "This option specifies the format in which to " "do the streamed backup. The option accepts a string argument. The " "backup will be done to STDOUT in the specified format. Currently, " - "the only supported formats are tar and xbstream. This option is " - "passed directly to xtrabackup's --stream option.", + "the only supported formats are tar and mbstream/xbstream. This " + "option is passed directly to xtrabackup's --stream option.", (uchar*) &ibx_xtrabackup_stream_str, (uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -669,7 +669,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu [--include=REGEXP] [--user=NAME]\n\ [--password=WORD] [--port=PORT] [--socket=SOCKET]\n\ [--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\ - [--slave-info] [--galera-info] [--stream=tar|xbstream]\n\ + [--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\ [--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\ [--databases=LIST] [--no-lock] \n\ [--tmpdir=DIRECTORY] [--tables-file=FILE]\n\ @@ -765,7 +765,8 @@ ibx_get_one_option(int optid, } break; case OPT_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { ibx_msg("Invalid --stream argument: %s\n", argument); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index b9cb8a8007a..137ae021381 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -675,7 +675,7 @@ struct my_option xb_client_options[] = {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " "in the specified format." - "Supported format is 'xbstream'." + "Supported format is 'mbstream' or 'xbstream'." , (G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1398,7 +1398,8 @@ xb_get_one_option(int optid, xtrabackup_target_dir= xtrabackup_real_target_dir; break; case OPT_XTRA_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 59d2e12817b..a2d10beee06 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -386,8 +386,8 @@ read_cnf() get_stream() { - if [[ $sfmt == 'xbstream' ]];then - wsrep_log_info "Streaming with xbstream" + if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then + wsrep_log_info "Streaming with ${sfmt}" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then strmcmd="${XBSTREAM_BIN} -x" else From 42049f9d397b1e82d7ba5de8ac01acea537b0924 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Jan 2020 14:30:13 +0100 Subject: [PATCH 27/49] cleanup: simplify install_layout.cmake --- cmake/install_layout.cmake | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index 7c3036be0a0..d1bb477c072 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -139,11 +139,10 @@ SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d") # IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(INSTALL_LIBDIR_RPM "lib64") - SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") ELSE() SET(INSTALL_LIBDIR_RPM "lib") - SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin") ENDIF() +SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin") # SET(INSTALL_INCLUDEDIR_RPM "include/mysql") # @@ -235,17 +234,18 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "") # Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR # will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE # layout is chosen) -FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2 - INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR - SYSTEMD_UNIT SYSTEMD_SYSUSERS SYSTEMD_TMPFILES) - SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} - CACHE STRING "${var} installation directory" ${FORCE}) - MARK_AS_ADVANCED(INSTALL_${var}DIR) +GET_CMAKE_PROPERTY(ALL_VARS VARIABLES) +FOREACH (V ${ALL_VARS}) + IF (V MATCHES "^(INSTALL_([A-Z_0-9]+)DIR)_${INSTALL_LAYOUT}$") + SET(var ${CMAKE_MATCH_1}) + SET(${var} "${${V}}" CACHE STRING "${CMAKE_MATCH_2} installation directory" ${FORCE}) + MARK_AS_ADVANCED(${var}) - IF(IS_ABSOLUTE ${INSTALL_${var}DIR}) - SET(INSTALL_${var}DIRABS ${INSTALL_${var}DIR}) - ELSE() - SET(INSTALL_${var}DIRABS "${CMAKE_INSTALL_PREFIX}/${INSTALL_${var}DIR}") + IF(IS_ABSOLUTE "${${var}}") + SET(${var}ABS "${${var}}") + ELSE() + SET(${var}ABS "${CMAKE_INSTALL_PREFIX}/${${var}}") + ENDIF() ENDIF() ENDFOREACH() From 8870f18e1df8774b76c30792f6c7bf04230f2a58 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Jan 2020 15:10:39 +0100 Subject: [PATCH 28/49] MDEV-17292 Package the pam_user_map module --- cmake/cpack_rpm.cmake | 3 +++ cmake/install_layout.cmake | 6 ++++++ debian/mariadb-server-10.2.install | 2 ++ plugin/auth_pam/CMakeLists.txt | 10 ++++++++++ plugin/auth_pam/mapper/user_map.conf | 13 +++++++++++++ 5 files changed, 34 insertions(+) create mode 100644 plugin/auth_pam/mapper/user_map.conf diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 82fadd6b689..8a2313cd20c 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -100,8 +100,11 @@ SET(ignored "%ignore /etc" "%ignore /etc/init.d" "%ignore /etc/logrotate.d" + "%ignore /etc/security" "%ignore /etc/systemd" "%ignore /etc/systemd/system" + "%ignore /lib" + "%ignore /lib/security" "%ignore ${CMAKE_INSTALL_PREFIX}" "%ignore ${CMAKE_INSTALL_PREFIX}/bin" "%ignore ${CMAKE_INSTALL_PREFIX}/include" diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index d1bb477c072..57c57992f18 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -163,6 +163,7 @@ SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock" SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d") +SET(INSTALL_PAMDIR_RPM "/lib/security") # # DEB layout @@ -195,6 +196,11 @@ SET(INSTALL_UNIX_ADDRDIR_DEB "/var/run/mysqld/mysqld.sock") SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d") +IF(CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(INSTALL_PAMDIR_DEB "/lib/x86_64-linux-gnu/security") +ELSE() + SET(INSTALL_PAMDIR_DEB "/lib/i386-linux-gnu/security") +ENDIF() # # SVR4 layout diff --git a/debian/mariadb-server-10.2.install b/debian/mariadb-server-10.2.install index 1ac1c67472c..d35fdf87b94 100644 --- a/debian/mariadb-server-10.2.install +++ b/debian/mariadb-server-10.2.install @@ -3,7 +3,9 @@ debian/additions/debian-start.inc.sh usr/share/mysql debian/additions/echo_stderr usr/share/mysql debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d etc/apparmor.d/usr.sbin.mysqld +etc/security/user_map.conf lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf +lib/*/security/pam_user_map.so usr/bin/aria_chk usr/bin/aria_dump_log usr/bin/aria_ftdump diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt index 606fef002e7..0efb0b07feb 100644 --- a/plugin/auth_pam/CMakeLists.txt +++ b/plugin/auth_pam/CMakeLists.txt @@ -10,5 +10,15 @@ IF(HAVE_PAM_APPL_H) ENDIF(HAVE_STRNDUP) FIND_LIBRARY(PAM_LIBRARY pam) MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY) + + IF(TARGET auth_pam) + ADD_LIBRARY(pam_user_map MODULE mapper/pam_user_map.c) + TARGET_LINK_LIBRARIES(pam_user_map pam) + SET_TARGET_PROPERTIES (pam_user_map PROPERTIES PREFIX "") + IF(INSTALL_PAMDIR) + INSTALL(TARGETS pam_user_map DESTINATION ${INSTALL_PAMDIR} COMPONENT Server) + INSTALL(FILES mapper/user_map.conf DESTINATION /etc/security COMPONENT Server) + ENDIF() + ENDIF() ENDIF(HAVE_PAM_APPL_H) diff --git a/plugin/auth_pam/mapper/user_map.conf b/plugin/auth_pam/mapper/user_map.conf new file mode 100644 index 00000000000..4af8fb0fe10 --- /dev/null +++ b/plugin/auth_pam/mapper/user_map.conf @@ -0,0 +1,13 @@ +# +# Configuration file for pam_user_map.so +# +# defines mapping in the form +# +# orig_user_name: mapped_user_name +# +# or (to map all users in a specific group) +# +# @group_name: mapped_user_name +# +# comments and empty lines are ignored +# From 10a5e1eccb9cfe7b86436254c958b2b40a246b52 Mon Sep 17 00:00:00 2001 From: Alice Sherepa Date: Thu, 16 Jan 2020 23:37:15 +0100 Subject: [PATCH 29/49] MDEV-21360 save/restore debud_dbug instead of total reset at the end of the test --- .../extra/binlog_tests/binlog_index.inc | 4 +- mysql-test/extra/rpl_tests/rpl_corruption.inc | 7 +-- mysql-test/extra/rpl_tests/rpl_parallel.inc | 21 ++++----- .../rpl_tests/rpl_stop_middle_group.test | 4 +- mysql-test/suite/binlog/r/binlog_index.result | 3 +- .../binlog_encryption/binlog_index.result | 3 +- .../binlog_encryption/rpl_corruption.result | 6 +-- .../binlog_encryption/rpl_parallel.result | 19 ++++---- .../rpl_parallel_ignored_errors.result | 2 +- .../innodb_fts/r/concurrent_insert.result | 2 +- .../suite/innodb_fts/r/sync_block.result | 4 +- .../suite/innodb_fts/t/concurrent_insert.test | 2 +- mysql-test/suite/innodb_fts/t/sync_block.test | 4 +- .../include/rpl_parallel_ignored_errors.inc | 2 +- .../suite/rpl/r/circular_serverid0.result | 2 +- mysql-test/suite/rpl/r/rpl_corruption.result | 6 +-- .../r/rpl_domain_id_filter_io_crash.result | 2 + .../rpl_domain_id_filter_master_crash.result | 1 - .../suite/rpl/r/rpl_gtid_reconnect.result | 2 +- .../rpl/r/rpl_mariadb_slave_capability.result | 6 +-- mysql-test/suite/rpl/r/rpl_parallel.result | 19 ++++---- .../rpl/r/rpl_parallel_ignored_errors.result | 2 +- .../rpl/r/rpl_parallel_optimistic.result | 2 +- .../rpl/r/rpl_stm_stop_middle_group.result | 3 +- .../suite/rpl/t/circular_serverid0.test | 3 +- .../rpl/t/rpl_domain_id_filter_io_crash.test | 3 +- .../t/rpl_domain_id_filter_master_crash.test | 1 - .../suite/rpl/t/rpl_gtid_reconnect.test | 2 +- .../rpl/t/rpl_mariadb_slave_capability.test | 8 ++-- .../suite/rpl/t/rpl_parallel_optimistic.test | 2 +- .../suite/rpl/t/rpl_stm_lcase_tblnames.test | 2 +- .../suite/sys_vars/r/debug_dbug_func.result | 44 +++++++++---------- .../suite/sys_vars/t/debug_dbug_func.test | 30 ++++++------- 33 files changed, 110 insertions(+), 113 deletions(-) diff --git a/mysql-test/extra/binlog_tests/binlog_index.inc b/mysql-test/extra/binlog_tests/binlog_index.inc index 50215aef9a9..47adcb8df7a 100644 --- a/mysql-test/extra/binlog_tests/binlog_index.inc +++ b/mysql-test/extra/binlog_tests/binlog_index.inc @@ -22,7 +22,7 @@ call mtr.add_suppression('Could not open .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; -let $old=`select @@debug`; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; @@ -273,6 +273,6 @@ SELECT @index; -- replace_regex /\.[\\\/]master/master/ SELECT @index; -eval SET SESSION debug_dbug="$old"; +SET @@SESSION.debug_dbug = @saved_dbug; --echo End of tests diff --git a/mysql-test/extra/rpl_tests/rpl_corruption.inc b/mysql-test/extra/rpl_tests/rpl_corruption.inc index 88f683ed53d..c97b3b35766 100644 --- a/mysql-test/extra/rpl_tests/rpl_corruption.inc +++ b/mysql-test/extra/rpl_tests/rpl_corruption.inc @@ -74,6 +74,7 @@ while ($i) { # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing --echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS set @saved_dbug = @@global.debug_dbug; + SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; --echo SHOW BINLOG EVENTS; --disable_query_log @@ -131,12 +132,13 @@ let $slave_io_errno= 1595,1743; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_R --source include/wait_for_slave_io_error.inc --connection master SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # Emulate corruption in network --echo # 5. Slave. Corruption in network --connection slave +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; let $slave_io_errno= 1595,1743; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE @@ -153,7 +155,7 @@ let $slave_sql_errno= 1593; --source include/wait_for_slave_sql_error.inc SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # Start normal replication and compare same table on master # and slave @@ -172,6 +174,5 @@ set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; --sync_slave_with_master -set @@global.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/extra/rpl_tests/rpl_parallel.inc b/mysql-test/extra/rpl_tests/rpl_parallel.inc index 42354343084..e2dbb7c3f18 100644 --- a/mysql-test/extra/rpl_tests/rpl_parallel.inc +++ b/mysql-test/extra/rpl_tests/rpl_parallel.inc @@ -1651,7 +1651,6 @@ SELECT * FROM t2 WHERE a >= 40 ORDER BY a; --sync_with_master SELECT * FROM t2 WHERE a >= 40 ORDER BY a; --source include/stop_slave.inc -SET GLOBAL debug_dbug=@old_dbug; SET DEBUG_SYNC= 'RESET'; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; @@ -1951,7 +1950,6 @@ SELECT * FROM t2 WHERE a >= 1040 ORDER BY a; --source include/stop_slave.inc SET GLOBAL debug_dbug=@old_dbug; - --echo *** MDEV-6676 - test disabling domain-based parallel replication *** --connection server_1 # Let's do a bunch of transactions that will conflict if run out-of-order in @@ -2000,7 +1998,7 @@ SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; # so sleep is ok here. And it's in general not possible to trigger reliably # the race with debug_sync, since the bugfix makes the race impossible). -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; # Group commit with cid=10000, two event groups. @@ -2012,7 +2010,7 @@ INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; --source include/save_master_gtid.inc @@ -2044,7 +2042,7 @@ SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; # We inject a small sleep in the corresponding record_gtid() to make the race # easier to hit. -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; # Group commit with cid=10010, two event groups. @@ -2059,8 +2057,7 @@ INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; - +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; --source include/save_master_gtid.inc @@ -2097,7 +2094,7 @@ SET GLOBAL debug_dbug= '+d,inject_mdev8031'; # complete. Finally an extra KILL check catches an unhandled, lingering # deadlock kill. So rather artificial, but at least it exercises the # relevant code paths. -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; @@ -2119,7 +2116,7 @@ UPDATE t3 SET b=b+1 WHERE a=204; UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/save_master_gtid.inc @@ -2144,7 +2141,7 @@ SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; --connection server_1 -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; --let $large= `SELECT REPEAT("*", 8192)` @@ -2167,7 +2164,7 @@ eval UPDATE t3 SET b=b+1 WHERE a=203 /* $large */; eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */; eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */; --enable_query_log -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/save_master_gtid.inc @@ -2178,7 +2175,7 @@ SELECT * FROM t3 WHERE a>=200 ORDER BY a; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; --source include/start_slave.inc diff --git a/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test b/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test index 43c561c5b85..5c88c14d9b5 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test @@ -13,6 +13,7 @@ create table tm (a int auto_increment primary key) engine=myisam; create table ti (a int auto_increment primary key) engine=innodb; sync_slave_with_master; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,stop_slave_middle_group"; connection master; @@ -135,8 +136,7 @@ eval SELECT "$error" AS Last_SQL_Error, @check as `true`; select max(a) as two from tm; select max(a) as one from ti; -set @@global.debug_dbug="-d"; - +SET @@GLOBAL.debug_dbug = @saved_dbug; # # clean-up # diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index bb5d9ff74f1..1f3428e6eef 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -5,6 +5,7 @@ call mtr.add_suppression('Turning logging off for the whole duration of the MySQ call mtr.add_suppression('Could not open .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; flush logs; flush logs; @@ -183,5 +184,5 @@ master-bin.000011 master-bin.000012 master-bin.000013 -SET SESSION debug_dbug=""; +SET @@SESSION.debug_dbug = @saved_dbug; End of tests diff --git a/mysql-test/suite/binlog_encryption/binlog_index.result b/mysql-test/suite/binlog_encryption/binlog_index.result index bb5d9ff74f1..1f3428e6eef 100644 --- a/mysql-test/suite/binlog_encryption/binlog_index.result +++ b/mysql-test/suite/binlog_encryption/binlog_index.result @@ -5,6 +5,7 @@ call mtr.add_suppression('Turning logging off for the whole duration of the MySQ call mtr.add_suppression('Could not open .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; flush logs; flush logs; @@ -183,5 +184,5 @@ master-bin.000011 master-bin.000012 master-bin.000013 -SET SESSION debug_dbug=""; +SET @@SESSION.debug_dbug = @saved_dbug; End of tests diff --git a/mysql-test/suite/binlog_encryption/rpl_corruption.result b/mysql-test/suite/binlog_encryption/rpl_corruption.result index db72bb304fc..f32b7c58ad1 100644 --- a/mysql-test/suite/binlog_encryption/rpl_corruption.result +++ b/mysql-test/suite/binlog_encryption/rpl_corruption.result @@ -34,10 +34,11 @@ START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] connection master; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network connection slave; +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] @@ -47,7 +48,7 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # 7. Seek diff for tables on master and slave connection slave; include/start_slave.inc @@ -60,5 +61,4 @@ set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; connection slave; -set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result index 20f3facea27..20d7687ec3f 100644 --- a/mysql-test/suite/binlog_encryption/rpl_parallel.result +++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result @@ -1227,7 +1227,6 @@ a 45 46 include/stop_slave.inc -SET GLOBAL debug_dbug=@old_dbug; SET DEBUG_SYNC= 'RESET'; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; @@ -1513,7 +1512,7 @@ SET GLOBAL slave_parallel_threads=10; SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10000; ANALYZE TABLE t2; @@ -1522,7 +1521,7 @@ test.t2 analyze status OK INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; a b 120 0 @@ -1544,7 +1543,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @old_server_id= @@SESSION.server_id; SET SESSION server_id= 100; @@ -1554,7 +1553,7 @@ SET SESSION server_id= @old_server_id; INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; a b 130 0 @@ -1580,7 +1579,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_mdev8031'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; INSERT INTO t3 VALUES (203, 1); @@ -1601,7 +1600,7 @@ UPDATE t3 SET b=b+1 WHERE a=204; UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 3 @@ -1631,11 +1630,11 @@ SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill'; SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10210; Omit long queries that cause relaylog rotations and transaction retries... -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 6 @@ -1655,7 +1654,7 @@ a b 204 7 205 5 include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; include/start_slave.inc *** MDEV-8725: Assertion on ROLLBACK statement in the binary log *** diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result b/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result index 570d2534ed7..3dd5a3ea83c 100644 --- a/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result +++ b/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result @@ -4,7 +4,7 @@ connection server_2; include/stop_slave.inc SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL slave_parallel_mode='optimistic'; SET GLOBAL slave_parallel_threads= 3; CHANGE MASTER TO master_use_gtid=slave_pos; diff --git a/mysql-test/suite/innodb_fts/r/concurrent_insert.result b/mysql-test/suite/innodb_fts/r/concurrent_insert.result index 9be7ba35f30..e91ea02b1de 100644 --- a/mysql-test/suite/innodb_fts/r/concurrent_insert.result +++ b/mysql-test/suite/innodb_fts/r/concurrent_insert.result @@ -29,7 +29,7 @@ ALTER TABLE t2 drop index idx1; connection default; set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; connection con1; -SET @@GLOBAL.debug_dbug = @saved_dbug; drop table t1, t2; connection default; set DEBUG_SYNC=RESET; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/innodb_fts/r/sync_block.result b/mysql-test/suite/innodb_fts/r/sync_block.result index f9f695c42f4..65bee127e80 100644 --- a/mysql-test/suite/innodb_fts/r/sync_block.result +++ b/mysql-test/suite/innodb_fts/r/sync_block.result @@ -39,7 +39,7 @@ SLEEP(2) SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; sql_text INSERT INTO t1(title) VALUES('mysql database') -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1; # Case 2: Sync blocks DML(insert) on other tables. @@ -71,7 +71,7 @@ SLEEP(2) # slow log results should be empty here. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; sql_text -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1,t2; disconnect con1; diff --git a/mysql-test/suite/innodb_fts/t/concurrent_insert.test b/mysql-test/suite/innodb_fts/t/concurrent_insert.test index 1505767d835..35debd87cea 100644 --- a/mysql-test/suite/innodb_fts/t/concurrent_insert.test +++ b/mysql-test/suite/innodb_fts/t/concurrent_insert.test @@ -46,7 +46,7 @@ set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; connection con1; reap; -SET @@GLOBAL.debug_dbug = @saved_dbug; drop table t1, t2; connection default; set DEBUG_SYNC=RESET; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/innodb_fts/t/sync_block.test b/mysql-test/suite/innodb_fts/t/sync_block.test index 1dd3c2bc38e..895d2ba8a59 100644 --- a/mysql-test/suite/innodb_fts/t/sync_block.test +++ b/mysql-test/suite/innodb_fts/t/sync_block.test @@ -61,7 +61,7 @@ SELECT SLEEP(2); -- echo # slow log results should only contain INSERT INTO t1. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1; @@ -107,7 +107,7 @@ SELECT SLEEP(2); -- echo # slow log results should be empty here. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1,t2; diff --git a/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc b/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc index 25da12f30a3..7a6a758a508 100644 --- a/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc +++ b/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc @@ -47,7 +47,7 @@ --source include/stop_slave.inc SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL slave_parallel_mode='optimistic'; SET GLOBAL slave_parallel_threads= 3; CHANGE MASTER TO master_use_gtid=slave_pos; diff --git a/mysql-test/suite/rpl/r/circular_serverid0.result b/mysql-test/suite/rpl/r/circular_serverid0.result index 112f9359ac4..928a0a48888 100644 --- a/mysql-test/suite/rpl/r/circular_serverid0.result +++ b/mysql-test/suite/rpl/r/circular_serverid0.result @@ -1,9 +1,9 @@ include/rpl_init.inc [topology=1->2->1] include/rpl_connect.inc [creating M4] include/rpl_connect.inc [creating M2] -SET @old_debug= @@global.debug; connection M2; STOP SLAVE; +SET @old_debug= @@global.debug; SET GLOBAL debug_dbug= "+d,dbug.rows_events_to_delay_relay_logging"; START SLAVE IO_THREAD; include/wait_for_slave_io_to_start.inc diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result index db72bb304fc..f32b7c58ad1 100644 --- a/mysql-test/suite/rpl/r/rpl_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_corruption.result @@ -34,10 +34,11 @@ START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] connection master; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network connection slave; +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; include/wait_for_slave_io_error.inc [errno=1595,1743] @@ -47,7 +48,7 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # 7. Seek diff for tables on master and slave connection slave; include/start_slave.inc @@ -60,5 +61,4 @@ set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; connection slave; -set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result index a2b1d03c4fd..b8415977154 100644 --- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result +++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result @@ -26,6 +26,7 @@ CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos; include/start_slave.inc DO_DOMAIN_IDS (AFTER) : IGNORE_DOMAIN_IDS (AFTER) : +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug="+d,kill_slave_io_before_commit"; connection master; START TRANSACTION; @@ -414,4 +415,5 @@ connection slave; include/stop_slave.inc CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(); include/start_slave.inc +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result index 457947cabe0..0a414cb3b1f 100644 --- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result +++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result @@ -37,7 +37,6 @@ IGNORE_DOMAIN_IDS (AFTER) : 1 connection master; include/rpl_start_server.inc [server_number=1] # Master has restarted successfully -set @@global.debug_dbug="-d"; connection slave; include/stop_slave.inc include/start_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result b/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result index d5037f8cf94..4f50d7c6d85 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result @@ -27,7 +27,7 @@ a connection server_1; include/kill_binlog_dump_threads.inc INSERT INTO t1 VALUES (10); -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_force_reconnect_at_10_1_100"; connection server_2; diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result index b96153a226a..d384422f88a 100644 --- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result +++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result @@ -2,10 +2,10 @@ include/master-slave.inc [connection master] connection master; set @old_master_binlog_checksum= @@global.binlog_checksum; -set @old_slave_dbug= @@global.debug_dbug; connection slave; include/stop_slave.inc # Test slave with no capability gets dummy event, which is ignored. +set @old_dbug= @@global.debug_dbug; SET @@global.debug_dbug='+d,simulate_slave_capability_none'; include/start_slave.inc connection master; @@ -50,7 +50,7 @@ slave-relay-bin.000005 # Annotate_rows # # INSERT INTO t1 /* A comment just to m slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) slave-relay-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000005 # Query # # COMMIT -set @@global.debug_dbug= @old_slave_dbug; +set @@global.debug_dbug= @old_dbug; # Test dummy event is checksummed correctly. connection master; set @@global.binlog_checksum = CRC32; @@ -148,10 +148,10 @@ select @@global.log_slave_updates; select @@global.replicate_annotate_row_events; @@global.replicate_annotate_row_events 1 -set @@global.debug_dbug= @old_slave_dbug; Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; DROP TABLE t1, t2; connection slave; +set @@global.debug_dbug= @old_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index d994e4fdef6..e1dbc15d3b9 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -1226,7 +1226,6 @@ a 45 46 include/stop_slave.inc -SET GLOBAL debug_dbug=@old_dbug; SET DEBUG_SYNC= 'RESET'; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; @@ -1512,7 +1511,7 @@ SET GLOBAL slave_parallel_threads=10; SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10000; ANALYZE TABLE t2; @@ -1521,7 +1520,7 @@ test.t2 analyze status OK INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; a b 120 0 @@ -1543,7 +1542,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @old_server_id= @@SESSION.server_id; SET SESSION server_id= 100; @@ -1553,7 +1552,7 @@ SET SESSION server_id= @old_server_id; INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; a b 130 0 @@ -1579,7 +1578,7 @@ include/stop_slave.inc SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_mdev8031'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; INSERT INTO t3 VALUES (203, 1); @@ -1600,7 +1599,7 @@ UPDATE t3 SET b=b+1 WHERE a=204; UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 3 @@ -1630,11 +1629,11 @@ SET GLOBAL debug_dbug= '+d,inject_retry_event_group_open_binlog_kill'; SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10210; Omit long queries that cause relaylog rotations and transaction retries... -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 6 @@ -1654,7 +1653,7 @@ a b 204 7 205 5 include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; include/start_slave.inc *** MDEV-8725: Assertion on ROLLBACK statement in the binary log *** diff --git a/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result b/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result index 570d2534ed7..3dd5a3ea83c 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result @@ -4,7 +4,7 @@ connection server_2; include/stop_slave.inc SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL slave_parallel_mode='optimistic'; SET GLOBAL slave_parallel_threads= 3; CHANGE MASTER TO master_use_gtid=slave_pos; diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index 5d514d23101..862851c7a49 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -352,7 +352,7 @@ include/save_master_gtid.inc connection server_2; include/sync_with_master_gtid.inc include/stop_slave.inc -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; ALTER TABLE t2 COMMENT "123abc"; diff --git a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result index f08f50f2467..b670a16bfcd 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result +++ b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result @@ -6,6 +6,7 @@ call mtr.add_suppression("Unsafe statement written to the binary log using state create table tm (a int auto_increment primary key) engine=myisam; create table ti (a int auto_increment primary key) engine=innodb; connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,stop_slave_middle_group"; connection master; begin; @@ -74,7 +75,7 @@ two select max(a) as one from ti; one 1 -set @@global.debug_dbug="-d"; +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_reset.inc connection master; drop table tm, ti; diff --git a/mysql-test/suite/rpl/t/circular_serverid0.test b/mysql-test/suite/rpl/t/circular_serverid0.test index 20ad58e2c52..097a2932404 100644 --- a/mysql-test/suite/rpl/t/circular_serverid0.test +++ b/mysql-test/suite/rpl/t/circular_serverid0.test @@ -22,10 +22,9 @@ # The parameter reflects binlog-row-event-max-size @cnf. --let $row_size=1024 -SET @old_debug= @@global.debug; - --connection M2 STOP SLAVE; +SET @old_debug= @@global.debug; SET GLOBAL debug_dbug= "+d,dbug.rows_events_to_delay_relay_logging"; START SLAVE IO_THREAD; --source include/wait_for_slave_io_to_start.inc diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test index 9088866d28b..f3ba39fb330 100644 --- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test +++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test @@ -35,6 +35,7 @@ let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignor --echo DO_DOMAIN_IDS (AFTER) : $do_domain_ids_after --echo IGNORE_DOMAIN_IDS (AFTER) : $ignore_domain_ids_after +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug="+d,kill_slave_io_before_commit"; connection master; @@ -379,5 +380,5 @@ connection slave; --source include/stop_slave.inc CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(); --source include/start_slave.inc - +SET @@GLOBAL.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test index 3619ede2c01..6dafab192a0 100644 --- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test +++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test @@ -64,7 +64,6 @@ connection master; #--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --echo # Master has restarted successfully -set @@global.debug_dbug="-d"; save_master_pos; --connection slave diff --git a/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test b/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test index 22cf10afba3..bc28ebddf5e 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test @@ -42,7 +42,7 @@ SELECT * FROM t1 ORDER BY a; # interfere with our DBUG error injection. --source include/kill_binlog_dump_threads.inc INSERT INTO t1 VALUES (10); -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_force_reconnect_at_10_1_100"; --save_master_pos diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index ed26e61d9b6..046a65f77db 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -5,9 +5,7 @@ --source include/master-slave.inc connection master; - set @old_master_binlog_checksum= @@global.binlog_checksum; -set @old_slave_dbug= @@global.debug_dbug; # MDEV-4475: Cannot replicate to old server when binlog contains # empty Gtid_list event @@ -16,6 +14,7 @@ set @old_slave_dbug= @@global.debug_dbug; connection slave; --source include/stop_slave.inc --echo # Test slave with no capability gets dummy event, which is ignored. +set @old_dbug= @@global.debug_dbug; SET @@global.debug_dbug='+d,simulate_slave_capability_none'; --source include/start_slave.inc @@ -52,7 +51,7 @@ let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); let $binlog_start= $relaylog_start; let $binlog_limit=0,10; --source include/show_relaylog_events.inc -set @@global.debug_dbug= @old_slave_dbug; +set @@global.debug_dbug= @old_dbug; --echo # Test dummy event is checksummed correctly. @@ -150,11 +149,10 @@ let $binlog_limit=0,5; select @@global.log_slave_updates; select @@global.replicate_annotate_row_events; -set @@global.debug_dbug= @old_slave_dbug; - --echo Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; DROP TABLE t1, t2; sync_slave_with_master; +set @@global.debug_dbug= @old_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index eef11be1f1b..ebf6eff2cc4 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -325,7 +325,7 @@ INSERT INTO t2 VALUES (1,1), (2,1), (3,1), (4,1), (5,1); --connection server_2 --source include/sync_with_master_gtid.inc --source include/stop_slave.inc -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; --connection server_1 diff --git a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test index 00df8e9d385..caaae06a8e9 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test +++ b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test @@ -3,10 +3,10 @@ # For details look into extra/rpl_tests/rpl_lower_case_table_names.test # +-- source include/have_binlog_format_mixed_or_statement.inc -- source include/master-slave.inc -- source include/have_innodb.inc -- source include/not_windows.inc --- source include/have_binlog_format_mixed_or_statement.inc -- let $engine=InnoDB -- source extra/rpl_tests/rpl_lower_case_table_names.test diff --git a/mysql-test/suite/sys_vars/r/debug_dbug_func.result b/mysql-test/suite/sys_vars/r/debug_dbug_func.result index 64b9c1a759b..d0c002cf111 100644 --- a/mysql-test/suite/sys_vars/r/debug_dbug_func.result +++ b/mysql-test/suite/sys_vars/r/debug_dbug_func.result @@ -1,55 +1,55 @@ -SET @old_debug = @@GLOBAL.debug; +SET @old_debug = @@GLOBAL.debug_dbug; SET debug_dbug= 'T'; -select @@debug; -@@debug +select @@debug_dbug; +@@debug_dbug T SET debug_dbug= '+P'; -select @@debug; -@@debug +select @@debug_dbug; +@@debug_dbug P:T SET debug_dbug= '-P'; -select @@debug; -@@debug +select @@debug_dbug; +@@debug_dbug T -SELECT @@session.debug, @@global.debug; -@@session.debug @@global.debug +SELECT @@session.debug_dbug, @@global.debug_dbug; +@@session.debug_dbug @@global.debug_dbug T SET SESSION debug_dbug= ''; -SELECT @@session.debug, @@global.debug; -@@session.debug @@global.debug +SELECT @@session.debug_dbug, @@global.debug_dbug; +@@session.debug_dbug @@global.debug_dbug # # Bug #52629: memory leak from sys_var_thd_dbug in # binlog.binlog_write_error # SET GLOBAL debug_dbug='d,injecting_fault_writing'; -SELECT @@global.debug; -@@global.debug +SELECT @@global.debug_dbug; +@@global.debug_dbug d,injecting_fault_writing SET GLOBAL debug_dbug=''; -SELECT @@global.debug; -@@global.debug +SELECT @@global.debug_dbug; +@@global.debug_dbug SET GLOBAL debug_dbug=@old_debug; # # Bug #56709: Memory leaks at running the 5.1 test suite # -SET @old_local_debug = @@debug; +SET @old_local_debug = @@debug_dbug; SET @@debug_dbug='d,foo'; -SELECT @@debug; -@@debug +SELECT @@debug_dbug; +@@debug_dbug d,foo SET @@debug_dbug=''; -SELECT @@debug; -@@debug +SELECT @@debug_dbug; +@@debug_dbug SET @@debug_dbug= @old_local_debug; End of 5.1 tests # # Bug#46165 server crash in dbug # -SET @old_globaldebug = @@global.debug; -SET @old_sessiondebug= @@session.debug; +SET @old_globaldebug = @@global.debug_dbug; +SET @old_sessiondebug= @@session.debug_dbug; # Test 1 - Bug test case, single connection SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.1.trace'; SET SESSION debug_dbug= '-d:-t:-i'; diff --git a/mysql-test/suite/sys_vars/t/debug_dbug_func.test b/mysql-test/suite/sys_vars/t/debug_dbug_func.test index 136a4c5504d..a72636131ee 100644 --- a/mysql-test/suite/sys_vars/t/debug_dbug_func.test +++ b/mysql-test/suite/sys_vars/t/debug_dbug_func.test @@ -1,27 +1,27 @@ --source include/have_debug.inc -SET @old_debug = @@GLOBAL.debug; +SET @old_debug = @@GLOBAL.debug_dbug; # -# Bug#34678 @@debug variable's incremental mode +# Bug#34678 @@debug_dbug variable's incremental mode # SET debug_dbug= 'T'; -select @@debug; +select @@debug_dbug; SET debug_dbug= '+P'; -select @@debug; +select @@debug_dbug; SET debug_dbug= '-P'; -select @@debug; +select @@debug_dbug; # -# Bug#38054: "SET SESSION debug" modifies @@global.debug variable +# Bug#38054: "SET SESSION debug" modifies @@global.debug_dbug variable # -SELECT @@session.debug, @@global.debug; +SELECT @@session.debug_dbug, @@global.debug_dbug; SET SESSION debug_dbug= ''; -SELECT @@session.debug, @@global.debug; +SELECT @@session.debug_dbug, @@global.debug_dbug; --echo # --echo # Bug #52629: memory leak from sys_var_thd_dbug in @@ -29,9 +29,9 @@ SELECT @@session.debug, @@global.debug; --echo # SET GLOBAL debug_dbug='d,injecting_fault_writing'; -SELECT @@global.debug; +SELECT @@global.debug_dbug; SET GLOBAL debug_dbug=''; -SELECT @@global.debug; +SELECT @@global.debug_dbug; SET GLOBAL debug_dbug=@old_debug; @@ -39,12 +39,12 @@ SET GLOBAL debug_dbug=@old_debug; --echo # Bug #56709: Memory leaks at running the 5.1 test suite --echo # -SET @old_local_debug = @@debug; +SET @old_local_debug = @@debug_dbug; SET @@debug_dbug='d,foo'; -SELECT @@debug; +SELECT @@debug_dbug; SET @@debug_dbug=''; -SELECT @@debug; +SELECT @@debug_dbug; SET @@debug_dbug= @old_local_debug; @@ -55,8 +55,8 @@ SET @@debug_dbug= @old_local_debug; --echo # Bug#46165 server crash in dbug --echo # -SET @old_globaldebug = @@global.debug; -SET @old_sessiondebug= @@session.debug; +SET @old_globaldebug = @@global.debug_dbug; +SET @old_sessiondebug= @@session.debug_dbug; --echo # Test 1 - Bug test case, single connection --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR From 90e7e6783b8a667012146e16f4d804a0c8b9ee8a Mon Sep 17 00:00:00 2001 From: Alice Sherepa Date: Mon, 20 Jan 2020 13:56:43 +0100 Subject: [PATCH 30/49] MDEV-21360 save/restore debud_dbug instead of total reset at the end of the test --- mysql-test/extra/rpl_tests/rpl_corruption.inc | 1 - mysql-test/extra/rpl_tests/rpl_parallel.inc | 1 + mysql-test/suite/binlog_encryption/rpl_parallel.result | 1 + mysql-test/suite/rpl/r/rpl_parallel.result | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/extra/rpl_tests/rpl_corruption.inc b/mysql-test/extra/rpl_tests/rpl_corruption.inc index c97b3b35766..4106bb45eef 100644 --- a/mysql-test/extra/rpl_tests/rpl_corruption.inc +++ b/mysql-test/extra/rpl_tests/rpl_corruption.inc @@ -74,7 +74,6 @@ while ($i) { # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing --echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS set @saved_dbug = @@global.debug_dbug; - SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; --echo SHOW BINLOG EVENTS; --disable_query_log diff --git a/mysql-test/extra/rpl_tests/rpl_parallel.inc b/mysql-test/extra/rpl_tests/rpl_parallel.inc index e2dbb7c3f18..b88d2126d4d 100644 --- a/mysql-test/extra/rpl_tests/rpl_parallel.inc +++ b/mysql-test/extra/rpl_tests/rpl_parallel.inc @@ -1651,6 +1651,7 @@ SELECT * FROM t2 WHERE a >= 40 ORDER BY a; --sync_with_master SELECT * FROM t2 WHERE a >= 40 ORDER BY a; --source include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; SET DEBUG_SYNC= 'RESET'; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result index 20d7687ec3f..12e5455c6c1 100644 --- a/mysql-test/suite/binlog_encryption/rpl_parallel.result +++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result @@ -1227,6 +1227,7 @@ a 45 46 include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; SET DEBUG_SYNC= 'RESET'; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index e1dbc15d3b9..657b3ba7448 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -1226,6 +1226,7 @@ a 45 46 include/stop_slave.inc +SET GLOBAL debug_dbug=@old_dbug; SET DEBUG_SYNC= 'RESET'; SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; From 4e7f3fb8332c42c3beb2376ee0d90f559f1e7470 Mon Sep 17 00:00:00 2001 From: Vlad Lesin Date: Mon, 20 Jan 2020 22:56:01 +0300 Subject: [PATCH 31/49] MDEV-14183: aria_pack segfaults in compress_maria_file Column definition order in st_maria_share::columndef can differ from order of fields in record(see also st_maria_share::column_nr, st_maria_columndef::column_nr, _ma_column_nr_write(), _ma_column_nr_read()). This was not taken into account in aria_pack tool. The fix is to initialize elements of HUFF_COUNTS array in the correct order. --- .../suite/maria/aria_pack_mdev14183.result | 22 +++++++++++++++++++ .../suite/maria/aria_pack_mdev14183.test | 22 +++++++++++++++++++ storage/maria/maria_pack.c | 16 ++++++++------ 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 mysql-test/suite/maria/aria_pack_mdev14183.result create mode 100644 mysql-test/suite/maria/aria_pack_mdev14183.test diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.result b/mysql-test/suite/maria/aria_pack_mdev14183.result new file mode 100644 index 00000000000..cd1decdef75 --- /dev/null +++ b/mysql-test/suite/maria/aria_pack_mdev14183.result @@ -0,0 +1,22 @@ +CREATE TABLE `t` ( +`col_1` varchar(255) NOT NULL DEFAULT '', +`col_2` varchar(255) NOT NULL, +`col_3` int(11) NOT NULL DEFAULT '0', +`col_4` int(11) NOT NULL DEFAULT '0' +) ENGINE=Aria; +insert into t values +('foobar','qux',0,0),('abcdef','qux',0,0); +Compressing test/t.MAD: (2 records) +- Calculating statistics + +normal: 0 empty-space: 0 empty-zero: 0 empty-fill: 0 +pre-space: 0 end-space: 0 intervall-fields: 0 zero: 2 +Original trees: 4 After join: 1 +- Compressing file +Min record length: 5 Max length: 5 Mean total length: 35 +99.57% +SELECT * FROM t; +col_1 col_2 col_3 col_4 +foobar qux 0 0 +abcdef qux 0 0 +DROP TABLE t; diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.test b/mysql-test/suite/maria/aria_pack_mdev14183.test new file mode 100644 index 00000000000..ab0589dc780 --- /dev/null +++ b/mysql-test/suite/maria/aria_pack_mdev14183.test @@ -0,0 +1,22 @@ +--source include/have_aria.inc +--source include/have_debug.inc + +CREATE TABLE `t` ( + `col_1` varchar(255) NOT NULL DEFAULT '', + `col_2` varchar(255) NOT NULL, + `col_3` int(11) NOT NULL DEFAULT '0', + `col_4` int(11) NOT NULL DEFAULT '0' +) ENGINE=Aria; + +insert into t values + ('foobar','qux',0,0),('abcdef','qux',0,0); + +--let $datadir= `SELECT @@datadir` +--source include/shutdown_mysqld.inc +# maria_pack crashes by assert() if the bug is not fixed +--exec cd $datadir && $MARIA_PACK -t test/t + +--source include/start_mysqld.inc +SELECT * FROM t; + +DROP TABLE t; diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c index 5166ae63758..6f2d9fe8a5d 100644 --- a/storage/maria/maria_pack.c +++ b/storage/maria/maria_pack.c @@ -782,27 +782,29 @@ static HUFF_COUNTS *init_huff_count(MARIA_HA *info,my_off_t records) for (i=0 ; i < info->s->base.fields ; i++) { enum en_fieldtype type; - count[i].field_length=info->s->columndef[i].length; - type= count[i].field_type= (enum en_fieldtype) info->s->columndef[i].type; + uint col_nr = info->s->columndef[i].column_nr; + count[col_nr].field_length=info->s->columndef[i].length; + type= count[col_nr].field_type= + (enum en_fieldtype) info->s->columndef[i].type; if (type == FIELD_INTERVALL || type == FIELD_CONSTANT || type == FIELD_ZERO) type = FIELD_NORMAL; - if (count[i].field_length <= 8 && + if (count[col_nr].field_length <= 8 && (type == FIELD_NORMAL || type == FIELD_SKIP_ZERO)) - count[i].max_zero_fill= count[i].field_length; + count[col_nr].max_zero_fill= count[col_nr].field_length; /* For every column initialize a tree, which is used to detect distinct column values. 'int_tree' works together with 'tree_buff' and 'tree_pos'. It's keys are implemented by pointers into 'tree_buff'. This is accomplished by '-1' as the element size. */ - init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL, + init_tree(&count[col_nr].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL, NULL, MYF(0)); if (records && type != FIELD_BLOB && type != FIELD_VARCHAR) - count[i].tree_pos=count[i].tree_buff = - my_malloc(count[i].field_length > 1 ? tree_buff_length : 2, + count[col_nr].tree_pos=count[col_nr].tree_buff = + my_malloc(count[col_nr].field_length > 1 ? tree_buff_length : 2, MYF(MY_WME)); } } From 5cd21ac202256e1dea55d05875c1928a3ec9c433 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Fri, 17 Jan 2020 20:26:14 +0200 Subject: [PATCH 32/49] MDEV-20821 parallel slave server shutdown hang Parallel slave server shutdown found to be hanging in close_connections() triggered by shutdown due to a slave worker thread would not be notified to exit in case the worker was sitting idle. Fixed with destroying the worker pool earlier that is in slave_prepare_for_shutdown() when all their driver threads have already left. A test file is added to simulate the bug condition as well as check multi-sourced and not-idle worker cases. --- .../rpl/r/rpl_slave_shutdown_mdev20821.result | 79 +++++++++ .../rpl/t/rpl_slave_shutdown_mdev20821.cnf | 19 ++ .../rpl/t/rpl_slave_shutdown_mdev20821.test | 165 ++++++++++++++++++ sql/slave.cc | 3 + 4 files changed, 266 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_slave_shutdown_mdev20821.result create mode 100644 mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test diff --git a/mysql-test/suite/rpl/r/rpl_slave_shutdown_mdev20821.result b/mysql-test/suite/rpl/r/rpl_slave_shutdown_mdev20821.result new file mode 100644 index 00000000000..f90d2126103 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_slave_shutdown_mdev20821.result @@ -0,0 +1,79 @@ +include/rpl_init.inc [topology=1->3] +connection server_3; +set default_master_connection = ''; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +set default_master_connection = 'm2'; +change master to master_host='127.0.0.1', master_port=SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos; +include/start_slave.inc +select @@global.slave_parallel_workers as two; +two +2 +connection server_3; +SHUTDOWN; +connection server_3; +connection server_3; +connection server_1; +create table t1 (i int primary key) engine=Innodb; +connection server_2; +create table t2 (i int primary key) engine=Innodb; +connection server_3; +set default_master_connection = ''; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +set default_master_connection = 'm2'; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +connection server_2; +insert into t2 values (1); +connection server_3; +connection server_1; +insert into t1 values (1); +connection server_3; +connection server_3; +SHUTDOWN; +connection server_3; +connection server_3; +connection server_3; +set default_master_connection = ''; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +set default_master_connection = 'm2'; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +connect conn_block_server3, 127.0.0.1, root,, test, $SERVER_MYPORT_3,; +begin; +insert into t1 values (2); +insert into t2 values (2); +connection server_1; +insert into t1 values (2); +connection server_2; +insert into t2 values (2); +connection server_3; +SHUTDOWN; +connection server_3; +connection server_3; +connection server_3; +set default_master_connection = ''; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +set default_master_connection = 'm2'; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +connection server_1; +drop table t1; +connection server_2; +drop table t2; +connection server_3; +set default_master_connection = 'm2'; +include/stop_slave.inc +RESET SLAVE ALL; +set default_master_connection = ''; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.cnf b/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.cnf new file mode 100644 index 00000000000..1e7cdee510b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.cnf @@ -0,0 +1,19 @@ +!include suite/rpl/rpl_1slave_base.cnf +!include include/default_client.cnf + +[mysqld.1] +log-slave-updates +gtid-domain-id=1 + +[mysqld.2] +log-slave-updates +gtid-domain-id=2 + +[mysqld.3] +log-slave-updates +gtid-domain-id=3 +slave_parallel_threads=2 + +[ENV] +SERVER_MYPORT_3= @mysqld.3.port +SERVER_MYSOCK_3= @mysqld.3.socket diff --git a/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test b/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test new file mode 100644 index 00000000000..563533bb104 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slave_shutdown_mdev20821.test @@ -0,0 +1,165 @@ +# MDEV-20821 parallel slave server shutdown hang +# +# Test the bug condition of a parallel slave server shutdown +# hang when the parallel workers were idle. +# The bug reported scenario is extented to cover the multi-sources case as well as +# checking is done for both the idle and busy workers cases. + +--source include/have_innodb.inc +--source include/have_binlog_format_mixed.inc +--let $rpl_topology= 1->3 +--source include/rpl_init.inc + +# +# A. idle workers. +# +--connection server_3 +set default_master_connection = ''; +--source include/start_slave.inc + +set default_master_connection = 'm2'; +--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2 +eval change master to master_host='127.0.0.1', master_port=$SERVER_MYPORT_2, master_user='root', master_use_gtid=slave_pos; +--source include/start_slave.inc + +select @@global.slave_parallel_workers as two; + +# At this point worker threads have no assignement. +# Shutdown must not hang. + +--connection server_3 +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +wait +EOF +--send SHUTDOWN +--reap +--source include/wait_until_disconnected.inc + +--connection server_3 +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +restart +EOF + +# No hang is *proved* to occur when this point is reached. +--connection server_3 +--enable_reconnect +--source include/wait_until_connected_again.inc + +# +# B. resting workers after some busy time +# +--connection server_1 +create table t1 (i int primary key) engine=Innodb; + +--connection server_2 +create table t2 (i int primary key) engine=Innodb; + +--connection server_3 +set default_master_connection = ''; +--source include/start_slave.inc + +set default_master_connection = 'm2'; +--source include/start_slave.inc + +--connection server_2 +insert into t2 values (1); +--save_master_pos + +--connection server_3 +--sync_with_master 0,'m2' + +--connection server_1 +insert into t1 values (1); +--save_master_pos + +--connection server_3 +--sync_with_master 0,'' + +# At this point worker threads have no assignement. +# Shutdown must not hang. + +--connection server_3 +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +wait +EOF +--send SHUTDOWN +--reap +--source include/wait_until_disconnected.inc + +--connection server_3 +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +restart +EOF + +# No hang is *proved* to occur when this point is reached. +--connection server_3 +--enable_reconnect +--source include/wait_until_connected_again.inc + +# +# C. busy workers +# +--connection server_3 +set default_master_connection = ''; +--source include/start_slave.inc + +set default_master_connection = 'm2'; +--source include/start_slave.inc + +--connect (conn_block_server3, 127.0.0.1, root,, test, $SERVER_MYPORT_3,) +begin; + insert into t1 values (2); + insert into t2 values (2); + +--connection server_1 +insert into t1 values (2); +--connection server_2 +insert into t2 values (2); + + +# At this point there's a good chance the worker threads are busy. +# SHUTDOWN must proceed without any delay as above. +--connection server_3 +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +wait +EOF +--send SHUTDOWN +--reap +--source include/wait_until_disconnected.inc + +--connection server_3 +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.3.expect +restart +EOF + +# No hang is *proved* to occur when this point is reached. +--connection server_3 +--enable_reconnect +--source include/wait_until_connected_again.inc + + +# Cleanup + +--connection server_3 +set default_master_connection = ''; +--source include/start_slave.inc + +set default_master_connection = 'm2'; +--source include/start_slave.inc + +--connection server_1 +drop table t1; + +--connection server_2 +drop table t2; +--save_master_pos + +# (!) The following block is critical to avoid check-mysqld_3.reject by mtr: +--connection server_3 +--sync_with_master 0,'m2' +set default_master_connection = 'm2'; +--source include/stop_slave.inc +RESET SLAVE ALL; +set default_master_connection = ''; + +--source include/rpl_end.inc diff --git a/sql/slave.cc b/sql/slave.cc index d39e17baadc..87c43ad64aa 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1443,6 +1443,9 @@ void slave_prepare_for_shutdown() mysql_mutex_lock(&LOCK_active_mi); master_info_index->free_connections(); mysql_mutex_unlock(&LOCK_active_mi); + // It's safe to destruct worker pool now when + // all driver threads are gone. + global_rpl_thread_pool.destroy(); stop_slave_background_thread(); } From 1084fa77abad9a24caa1eddb5dfbda89c0bc0576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 21 Jan 2020 18:47:56 +0200 Subject: [PATCH 33/49] MDEV-21539 Assertion ...prtype... failed in row_log_table_apply_convert_mrec This bug is a cousin of MDEV-18719 and MDEV-20190, which failed to relax a debug assertion in one more code path. row_log_table_apply_convert_mrec(): Use dict_col_t::same_format() and ignore all format-agnostic flags in the assertions. --- .../innodb/r/alter_not_null_debug.result | 24 ++++++++++++++- .../suite/innodb/t/alter_not_null_debug.test | 29 ++++++++++++++++++- storage/innobase/row/row0log.cc | 6 ++-- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/innodb/r/alter_not_null_debug.result b/mysql-test/suite/innodb/r/alter_not_null_debug.result index c12f1fbca3d..0c1af03159d 100644 --- a/mysql-test/suite/innodb/r/alter_not_null_debug.result +++ b/mysql-test/suite/innodb/r/alter_not_null_debug.result @@ -74,5 +74,27 @@ c1 c2 c3 1 2 3 2 0 4 DROP TABLE t1; -disconnect con1; SET DEBUG_SYNC='RESET'; +# +# MDEV-21539 Assertion ...prtype... in row_log_table_apply_convert_mrec +# +CREATE TABLE t1 (f VARCHAR(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci) +ENGINE=InnoDB; +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done'; +ALTER TABLE t1 MODIFY f VARCHAR(256) COLLATE latin1_german2_ci NOT NULL; +# session default +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; +INSERT INTO t1 VALUES('one'); +SET DEBUG_SYNC = 'now SIGNAL insert_done'; +connection con1; +disconnect con1; +connection default; +SET DEBUG_SYNC=RESET; +ALTER TABLE t1 CHANGE f eins VARCHAR(257) COLLATE latin1_german1_ci NOT NULL, +ALGORITHM=INSTANT; +SELECT * FROM t1; +eins +one +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/alter_not_null_debug.test b/mysql-test/suite/innodb/t/alter_not_null_debug.test index 058f0fc02a5..7a965fd413a 100644 --- a/mysql-test/suite/innodb/t/alter_not_null_debug.test +++ b/mysql-test/suite/innodb/t/alter_not_null_debug.test @@ -68,5 +68,32 @@ reap; --disable_info SELECT * FROM t1; DROP TABLE t1; -disconnect con1; SET DEBUG_SYNC='RESET'; + +--echo # +--echo # MDEV-21539 Assertion ...prtype... in row_log_table_apply_convert_mrec +--echo # +CREATE TABLE t1 (f VARCHAR(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci) +ENGINE=InnoDB; + +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done'; +send ALTER TABLE t1 MODIFY f VARCHAR(256) COLLATE latin1_german2_ci NOT NULL; + +--echo # session default +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; +INSERT INTO t1 VALUES('one'); +SET DEBUG_SYNC = 'now SIGNAL insert_done'; + +connection con1; +reap; +disconnect con1; +connection default; +SET DEBUG_SYNC=RESET; + +ALTER TABLE t1 CHANGE f eins VARCHAR(257) COLLATE latin1_german1_ci NOT NULL, +ALGORITHM=INSTANT; + +SELECT * FROM t1; +DROP TABLE t1; diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index fa50ff80e55..91879068c17 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1648,12 +1648,12 @@ blob_done: /* See if any columns were changed to NULL or NOT NULL. */ const dict_col_t* new_col = dict_table_get_nth_col(log->table, col_no); - ut_ad(new_col->mtype == col->mtype); + ut_ad(new_col->same_format(*col)); /* Assert that prtype matches except for nullability. */ - ut_ad(!((new_col->prtype ^ col->prtype) & ~DATA_NOT_NULL)); ut_ad(!((new_col->prtype ^ dfield_get_type(dfield)->prtype) - & ~DATA_NOT_NULL)); + & ~(DATA_NOT_NULL | DATA_VERSIONED + | CHAR_COLL_MASK << 16 | DATA_LONG_TRUE_VARCHAR))); if (new_col->prtype == col->prtype) { continue; From 8eec2d61fcb1d4ce4fcd56989c6fe13cd012ecad Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 21 Jan 2020 15:17:43 +0100 Subject: [PATCH 34/49] MDEV-21249 MariaDB 10.3.10 When referring to bigint to generate timestamp data in the virtual generated column, the value of the generated column does not change when the time zone changes FROM_UNIXTIME() depends on @@time_zone, so it's VCOL_SESSION_FUNC --- mysql-test/r/default_session.result | 28 ++++++++++++++++++++++++++++ mysql-test/t/default_session.test | 24 ++++++++++++++++++++++++ sql/item_timefunc.h | 4 ++++ 3 files changed, 56 insertions(+) diff --git a/mysql-test/r/default_session.result b/mysql-test/r/default_session.result index 6c0bcad0cb3..1b0c5f3f67a 100644 --- a/mysql-test/r/default_session.result +++ b/mysql-test/r/default_session.result @@ -92,3 +92,31 @@ a STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI drop table t1; +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +a b c +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +flush tables; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; diff --git a/mysql-test/t/default_session.test b/mysql-test/t/default_session.test index 7796354ffd4..5e582bd5ca1 100644 --- a/mysql-test/t/default_session.test +++ b/mysql-test/t/default_session.test @@ -80,3 +80,27 @@ insert t1 () values (); set sql_mode=default; select * from t1; drop table t1; + +# +# MDEV-21249 MariaDB 10.3.10 When referring to bigint to generate timestamp data in the virtual generated column, the value of the generated column does not change when the time zone changes +# +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +drop table t1; + +# same with vcols +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +flush tables; +select a, b, from_unixtime(a) from t1; +drop table t1; diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index c89b6921796..f25fe3a551f 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -867,6 +867,10 @@ class Item_func_from_unixtime :public Item_datetimefunc const char *func_name() const { return "from_unixtime"; } bool fix_length_and_dec(); bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date); + bool check_vcol_func_processor(void *arg) + { + return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); + } Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy(thd, mem_root, this); } }; From 8a931e4d16303b76e4744428faaab7b200f408ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 22 Jan 2020 11:58:50 +0200 Subject: [PATCH 35/49] MDEV-17571 : Make systemd timeout behavior more compatible with long Galera SSTs This is 10.4 version. Idea is to create monitor thread for both donor and joiner that will periodically if needed extend systemd timeout while SST is being processed. In 10.4 actual SST is executed by running SST script and exchanging messages on pipe using blocking fgets. This fix starts monitoring thread before SST script is started and we stop monitoring thread when SST has been completed. --- .../galera/r/galera_performance_schema.result | 4 + sql/wsrep_mysqld.cc | 40 +++- sql/wsrep_mysqld.h | 9 + sql/wsrep_sst.cc | 194 +++++++++++++++--- 4 files changed, 211 insertions(+), 36 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_performance_schema.result b/mysql-test/suite/galera/r/galera_performance_schema.result index ea0b6ad9ef4..b40dcb0de60 100644 --- a/mysql-test/suite/galera/r/galera_performance_schema.result +++ b/mysql-test/suite/galera/r/galera_performance_schema.result @@ -15,7 +15,9 @@ select name from mutex_instances where name like 'wait/synch/mutex/sql/LOCK_wsre name wait/synch/mutex/sql/LOCK_wsrep_cluster_config name wait/synch/mutex/sql/LOCK_wsrep_config_state name wait/synch/mutex/sql/LOCK_wsrep_desync +name wait/synch/mutex/sql/LOCK_wsrep_donor_monitor name wait/synch/mutex/sql/LOCK_wsrep_group_commit +name wait/synch/mutex/sql/LOCK_wsrep_joiner_monitor name wait/synch/mutex/sql/LOCK_wsrep_ready name wait/synch/mutex/sql/LOCK_wsrep_replaying name wait/synch/mutex/sql/LOCK_wsrep_slave_threads @@ -24,6 +26,8 @@ name wait/synch/mutex/sql/LOCK_wsrep_SR_store name wait/synch/mutex/sql/LOCK_wsrep_sst name wait/synch/mutex/sql/LOCK_wsrep_sst_init select name from cond_instances where name like 'wait/synch/cond/sql/COND_wsrep%' order by name; +name wait/synch/cond/sql/COND_wsrep_donor_monitor +name wait/synch/cond/sql/COND_wsrep_joiner_monitor name wait/synch/cond/sql/COND_wsrep_ready name wait/synch/cond/sql/COND_wsrep_replaying name wait/synch/cond/sql/COND_wsrep_sst diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 24e5ac0e8d3..6692e8c4ef0 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -150,6 +150,10 @@ mysql_mutex_t LOCK_wsrep_config_state; mysql_mutex_t LOCK_wsrep_group_commit; mysql_mutex_t LOCK_wsrep_SR_pool; mysql_mutex_t LOCK_wsrep_SR_store; +mysql_mutex_t LOCK_wsrep_joiner_monitor; +mysql_mutex_t LOCK_wsrep_donor_monitor; +mysql_cond_t COND_wsrep_joiner_monitor; +mysql_cond_t COND_wsrep_donor_monitor; int wsrep_replaying= 0; ulong wsrep_running_threads = 0; // # of currently running wsrep @@ -160,7 +164,7 @@ ulong wsrep_running_rollbacker_threads = 0; // # of running ulong my_bind_addr; #ifdef HAVE_PSI_INTERFACE -PSI_mutex_key +PSI_mutex_key key_LOCK_wsrep_replaying, key_LOCK_wsrep_ready, key_LOCK_wsrep_sst, key_LOCK_wsrep_sst_thread, key_LOCK_wsrep_sst_init, key_LOCK_wsrep_slave_threads, key_LOCK_wsrep_desync, @@ -168,13 +172,15 @@ PSI_mutex_key key_LOCK_wsrep_group_commit, key_LOCK_wsrep_SR_pool, key_LOCK_wsrep_SR_store, - key_LOCK_wsrep_thd_queue; + key_LOCK_wsrep_thd_queue, + key_LOCK_wsrep_joiner_monitor, + key_LOCK_wsrep_donor_monitor; PSI_cond_key key_COND_wsrep_thd, key_COND_wsrep_replaying, key_COND_wsrep_ready, key_COND_wsrep_sst, key_COND_wsrep_sst_init, key_COND_wsrep_sst_thread, - key_COND_wsrep_thd_queue, key_COND_wsrep_slave_threads; - + key_COND_wsrep_thd_queue, key_COND_wsrep_slave_threads, + key_COND_wsrep_joiner_monitor, key_COND_wsrep_donor_monitor; PSI_file_key key_file_wsrep_gra_log; @@ -192,7 +198,9 @@ static PSI_mutex_info wsrep_mutexes[]= { &key_LOCK_wsrep_config_state, "LOCK_wsrep_config_state", PSI_FLAG_GLOBAL}, { &key_LOCK_wsrep_group_commit, "LOCK_wsrep_group_commit", PSI_FLAG_GLOBAL}, { &key_LOCK_wsrep_SR_pool, "LOCK_wsrep_SR_pool", PSI_FLAG_GLOBAL}, - { &key_LOCK_wsrep_SR_store, "LOCK_wsrep_SR_store", PSI_FLAG_GLOBAL} + { &key_LOCK_wsrep_SR_store, "LOCK_wsrep_SR_store", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_joiner_monitor, "LOCK_wsrep_joiner_monitor", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_donor_monitor, "LOCK_wsrep_donor_monitor", PSI_FLAG_GLOBAL} }; static PSI_cond_info wsrep_conds[]= @@ -203,7 +211,9 @@ static PSI_cond_info wsrep_conds[]= { &key_COND_wsrep_sst_thread, "wsrep_sst_thread", 0}, { &key_COND_wsrep_thd, "THD::COND_wsrep_thd", 0}, { &key_COND_wsrep_replaying, "COND_wsrep_replaying", PSI_FLAG_GLOBAL}, - { &key_COND_wsrep_slave_threads, "COND_wsrep_wsrep_slave_threads", PSI_FLAG_GLOBAL} + { &key_COND_wsrep_slave_threads, "COND_wsrep_wsrep_slave_threads", PSI_FLAG_GLOBAL}, + { &key_COND_wsrep_joiner_monitor, "COND_wsrep_joiner_monitor", PSI_FLAG_GLOBAL}, + { &key_COND_wsrep_donor_monitor, "COND_wsrep_donor_monitor", PSI_FLAG_GLOBAL} }; static PSI_file_info wsrep_files[]= @@ -212,14 +222,17 @@ static PSI_file_info wsrep_files[]= }; PSI_thread_key key_wsrep_sst_joiner, key_wsrep_sst_donor, - key_wsrep_rollbacker, key_wsrep_applier; + key_wsrep_rollbacker, key_wsrep_applier, + key_wsrep_sst_joiner_monitor, key_wsrep_sst_donor_monitor; static PSI_thread_info wsrep_threads[]= { {&key_wsrep_sst_joiner, "wsrep_sst_joiner_thread", PSI_FLAG_GLOBAL}, {&key_wsrep_sst_donor, "wsrep_sst_donor_thread", PSI_FLAG_GLOBAL}, {&key_wsrep_rollbacker, "wsrep_rollbacker_thread", PSI_FLAG_GLOBAL}, - {&key_wsrep_applier, "wsrep_applier_thread", PSI_FLAG_GLOBAL} + {&key_wsrep_applier, "wsrep_applier_thread", PSI_FLAG_GLOBAL}, + {&key_wsrep_sst_joiner_monitor, "wsrep_sst_joiner_monitor", PSI_FLAG_GLOBAL}, + {&key_wsrep_sst_donor_monitor, "wsrep_sst_donor_monitor", PSI_FLAG_GLOBAL} }; #endif /* HAVE_PSI_INTERFACE */ @@ -788,6 +801,13 @@ void wsrep_thr_init() &LOCK_wsrep_SR_pool, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_LOCK_wsrep_SR_store, &LOCK_wsrep_SR_store, MY_MUTEX_INIT_FAST); + mysql_mutex_init(key_LOCK_wsrep_joiner_monitor, + &LOCK_wsrep_joiner_monitor, MY_MUTEX_INIT_FAST); + mysql_mutex_init(key_LOCK_wsrep_donor_monitor, + &LOCK_wsrep_donor_monitor, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_joiner_monitor, &COND_wsrep_joiner_monitor, NULL); + mysql_cond_init(key_COND_wsrep_donor_monitor, &COND_wsrep_donor_monitor, NULL); + DBUG_VOID_RETURN; } @@ -891,6 +911,10 @@ void wsrep_thr_deinit() mysql_mutex_destroy(&LOCK_wsrep_group_commit); mysql_mutex_destroy(&LOCK_wsrep_SR_pool); mysql_mutex_destroy(&LOCK_wsrep_SR_store); + mysql_mutex_destroy(&LOCK_wsrep_joiner_monitor); + mysql_mutex_destroy(&LOCK_wsrep_donor_monitor); + mysql_cond_destroy(&COND_wsrep_joiner_monitor); + mysql_cond_destroy(&COND_wsrep_donor_monitor); delete wsrep_config_state; wsrep_config_state= 0; // Safety diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index d71d4afea11..71cbc875b91 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -309,6 +309,11 @@ extern mysql_mutex_t LOCK_wsrep_SR_pool; extern mysql_mutex_t LOCK_wsrep_SR_store; extern mysql_mutex_t LOCK_wsrep_config_state; extern mysql_mutex_t LOCK_wsrep_group_commit; +extern mysql_mutex_t LOCK_wsrep_joiner_monitor; +extern mysql_mutex_t LOCK_wsrep_donor_monitor; +extern mysql_cond_t COND_wsrep_joiner_monitor; +extern mysql_cond_t COND_wsrep_donor_monitor; + extern my_bool wsrep_emulate_bin_log; extern int wsrep_to_isolation; #ifdef GTID_SUPPORT @@ -339,6 +344,8 @@ extern PSI_mutex_key key_LOCK_wsrep_SR_store; extern PSI_mutex_key key_LOCK_wsrep_global_seqno; extern PSI_mutex_key key_LOCK_wsrep_thd_queue; extern PSI_cond_key key_COND_wsrep_thd_queue; +extern PSI_mutex_key key_LOCK_wsrep_joiner_monitor; +extern PSI_mutex_key key_LOCK_wsrep_donor_monitor; extern PSI_file_key key_file_wsrep_gra_log; @@ -346,6 +353,8 @@ extern PSI_thread_key key_wsrep_sst_joiner; extern PSI_thread_key key_wsrep_sst_donor; extern PSI_thread_key key_wsrep_rollbacker; extern PSI_thread_key key_wsrep_applier; +extern PSI_thread_key key_wsrep_sst_joiner_monitor; +extern PSI_thread_key key_wsrep_sst_donor_monitor; #endif /* HAVE_PSI_INTERFACE */ diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 74a8b9dff05..02f7d4b6760 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -49,6 +49,126 @@ const char* wsrep_sst_auth = NULL; static const char* sst_auth_real = NULL; my_bool wsrep_sst_donor_rejects_queries= FALSE; +#define WSREP_EXTEND_TIMEOUT_INTERVAL 60 +#define WSREP_TIMEDWAIT_SECONDS 30 + +bool sst_joiner_completed = false; +bool sst_donor_completed = false; + +struct sst_thread_arg +{ + const char* cmd; + char** env; + char* ret_str; + int err; + mysql_mutex_t lock; + mysql_cond_t cond; + + sst_thread_arg (const char* c, char** e) + : cmd(c), env(e), ret_str(0), err(-1) + { + mysql_mutex_init(key_LOCK_wsrep_sst_thread, &lock, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_sst_thread, &cond, NULL); + } + + ~sst_thread_arg() + { + mysql_cond_destroy (&cond); + mysql_mutex_unlock (&lock); + mysql_mutex_destroy (&lock); + } +}; + +static void wsrep_donor_monitor_end(void) +{ + mysql_mutex_lock(&LOCK_wsrep_donor_monitor); + sst_donor_completed= true; + mysql_cond_signal(&COND_wsrep_donor_monitor); + mysql_mutex_unlock(&LOCK_wsrep_donor_monitor); +} + +static void wsrep_joiner_monitor_end(void) +{ + mysql_mutex_lock(&LOCK_wsrep_joiner_monitor); + sst_joiner_completed= true; + mysql_cond_signal(&COND_wsrep_joiner_monitor); + mysql_mutex_unlock(&LOCK_wsrep_joiner_monitor); +} + +static void* wsrep_sst_donor_monitor_thread(void *arg __attribute__((unused))) +{ + int ret= 0; + unsigned long time_waited= 0; + + mysql_mutex_lock(&LOCK_wsrep_donor_monitor); + + WSREP_INFO("Donor monitor thread started to monitor"); + + wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can + // operate with wsrep_ready == OFF + + while (!sst_donor_completed) + { + timespec ts; + set_timespec(ts, WSREP_TIMEDWAIT_SECONDS); + time_t start_time= time(NULL); + ret= mysql_cond_timedwait(&COND_wsrep_donor_monitor, &LOCK_wsrep_donor_monitor, &ts); + time_t end_time= time(NULL); + time_waited+= difftime(end_time, start_time); + + if (ret == ETIMEDOUT && !sst_donor_completed) + { + WSREP_DEBUG("Donor waited %lu sec, extending systemd startup timeout as SST" + "is not completed", + time_waited); + service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL, + "WSREP state transfer ongoing..."); + } + } + + WSREP_INFO("Donor monitor thread ended with total time %lu sec", time_waited); + mysql_mutex_unlock(&LOCK_wsrep_donor_monitor); + + return NULL; +} + +static void* wsrep_sst_joiner_monitor_thread(void *arg __attribute__((unused))) +{ + int ret= 0; + unsigned long time_waited= 0; + + mysql_mutex_lock(&LOCK_wsrep_joiner_monitor); + + WSREP_INFO("Joiner monitor thread started to monitor"); + + wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can + // operate with wsrep_ready == OFF + + while (!sst_joiner_completed) + { + timespec ts; + set_timespec(ts, WSREP_TIMEDWAIT_SECONDS); + time_t start_time= time(NULL); + ret= mysql_cond_timedwait(&COND_wsrep_joiner_monitor, &LOCK_wsrep_joiner_monitor, &ts); + time_t end_time= time(NULL); + time_waited+= difftime(end_time, start_time); + + if (ret == ETIMEDOUT && !sst_joiner_completed) + { + WSREP_DEBUG("Joiner waited %lu sec, extending systemd startup timeout as SST" + "is not completed", + time_waited); + service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL, + "WSREP state transfer ongoing..."); + } + } + + WSREP_INFO("Joiner monitor thread ended with total time %lu sec", time_waited); + mysql_mutex_unlock(&LOCK_wsrep_joiner_monitor); + + return NULL; +} + bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var) { if ((! var->save_result.string_value.str) || @@ -193,6 +313,7 @@ static void wsrep_sst_complete (THD* thd, { Wsrep_client_service client_service(thd, thd->wsrep_cs()); Wsrep_server_state::instance().sst_received(client_service, rcode); + wsrep_joiner_monitor_end(); } /* @@ -253,30 +374,6 @@ void wsrep_sst_received (THD* thd, } } -struct sst_thread_arg -{ - const char* cmd; - char** env; - char* ret_str; - int err; - mysql_mutex_t lock; - mysql_cond_t cond; - - sst_thread_arg (const char* c, char** e) - : cmd(c), env(e), ret_str(0), err(-1) - { - mysql_mutex_init(key_LOCK_wsrep_sst_thread, &lock, MY_MUTEX_INIT_FAST); - mysql_cond_init(key_COND_wsrep_sst_thread, &cond, NULL); - } - - ~sst_thread_arg() - { - mysql_cond_destroy (&cond); - mysql_mutex_unlock (&lock); - mysql_mutex_destroy (&lock); - } -}; - static int sst_scan_uuid_seqno (const char* str, wsrep_uuid_t* uuid, wsrep_seqno_t* seqno) { @@ -442,10 +539,12 @@ static void* sst_joiner_thread (void* a) wsrep_uuid_t ret_uuid = WSREP_UUID_UNDEFINED; wsrep_seqno_t ret_seqno= WSREP_SEQNO_UNDEFINED; - // in case of successfull receiver start, wait for SST completion/end + // in case of successfull receiver start, wait for SST + // completion/end char* tmp= my_fgets (out, out_len, proc.pipe()); proc.wait(); + err= EINVAL; if (!tmp) @@ -989,16 +1088,33 @@ static ssize_t sst_prepare_other (const char* method, } } - pthread_t tmp; + pthread_t tmp, monitor; sst_thread_arg arg(cmd_str(), env()); + mysql_mutex_lock (&arg.lock); - ret = mysql_thread_create (key_wsrep_sst_joiner, &tmp, NULL, sst_joiner_thread, &arg); + + ret = mysql_thread_create (key_wsrep_sst_joiner_monitor, &monitor, NULL, wsrep_sst_joiner_monitor_thread, NULL); + if (ret) { WSREP_ERROR("sst_prepare_other(): mysql_thread_create() failed: %d (%s)", ret, strerror(ret)); return -ret; } + + sst_joiner_completed= false; + + ret= mysql_thread_create (key_wsrep_sst_joiner, &tmp, NULL, sst_joiner_thread, &arg); + + if (ret) + { + WSREP_ERROR("sst_prepare_other(): mysql_thread_create() failed: %d (%s)", + ret, strerror(ret)); + + pthread_detach(monitor); + return -ret; + } + mysql_cond_wait (&arg.cond, &arg.lock); *addr_out= arg.ret_str; @@ -1012,6 +1128,7 @@ static ssize_t sst_prepare_other (const char* method, } pthread_detach (tmp); + pthread_detach (monitor); return ret; } @@ -1509,6 +1626,7 @@ static void* sst_donor_thread (void* a) wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can // operate with wsrep_ready == OFF + wsp::process proc(arg->cmd, "r", arg->env); err= -proc.error(); @@ -1604,9 +1722,13 @@ wait_signal: wsrep::gtid gtid(wsrep::id(ret_uuid.data, sizeof(ret_uuid.data)), wsrep::seqno(err ? wsrep::seqno::undefined() : wsrep::seqno(ret_seqno))); + Wsrep_server_state::instance().sst_sent(gtid, err); + proc.wait(); + wsrep_donor_monitor_end(); + return NULL; } @@ -1681,14 +1803,18 @@ static int sst_donate_other (const char* method, pthread_t tmp; sst_thread_arg arg(cmd_str(), env); + mysql_mutex_lock (&arg.lock); - ret = mysql_thread_create (key_wsrep_sst_donor, &tmp, NULL, sst_donor_thread, &arg); + + ret= mysql_thread_create (key_wsrep_sst_donor, &tmp, NULL, sst_donor_thread, &arg); + if (ret) { WSREP_ERROR("sst_donate_other(): mysql_thread_create() failed: %d (%s)", ret, strerror(ret)); return ret; } + mysql_cond_wait (&arg.cond, &arg.lock); WSREP_INFO("sst_donor_thread signaled with %d", arg.err); @@ -1732,6 +1858,18 @@ int wsrep_sst_donate(const std::string& msg, } } + sst_donor_completed= false; + pthread_t monitor; + + ret= mysql_thread_create (key_wsrep_sst_donor_monitor, &monitor, NULL, wsrep_sst_donor_monitor_thread, NULL); + + if (ret) + { + WSREP_ERROR("sst_donate: mysql_thread_create() failed: %d (%s)", + ret, strerror(ret)); + return WSREP_CB_FAILURE; + } + if (!strcmp (WSREP_SST_MYSQLDUMP, method)) { ret= sst_donate_mysqldump(data, current_gtid, bypass, env()); From 1f9a0437da22c621d890d4eb0369bf1fc8797ba3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 22 Jan 2020 18:18:22 +0100 Subject: [PATCH 36/49] new C/C and --ssl-verify-server-cert tests tests for --ssl-verify-server-cert with system CA and with incorrect hostname --- libmariadb | 2 +- mysql-test/r/ssl_system_ca,bad.result | 1 + mysql-test/r/ssl_system_ca.result | 2 ++ mysql-test/t/ssl_system_ca.combinations | 11 +++++++++++ mysql-test/t/ssl_system_ca.test | 20 ++++++++++++++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/ssl_system_ca,bad.result create mode 100644 mysql-test/r/ssl_system_ca.result create mode 100644 mysql-test/t/ssl_system_ca.combinations create mode 100644 mysql-test/t/ssl_system_ca.test diff --git a/libmariadb b/libmariadb index a1283d0b10a..8e9c3116105 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit a1283d0b10a3b675bede48d9fe2d082865a24a6c +Subproject commit 8e9c3116105d9a998a60991b7f4ba910d454d4b1 diff --git a/mysql-test/r/ssl_system_ca,bad.result b/mysql-test/r/ssl_system_ca,bad.result new file mode 100644 index 00000000000..b9c6d3e29d8 --- /dev/null +++ b/mysql-test/r/ssl_system_ca,bad.result @@ -0,0 +1 @@ +ERROR 2026 (HY000): SSL connection error: Validation of SSL server certificate failed diff --git a/mysql-test/r/ssl_system_ca.result b/mysql-test/r/ssl_system_ca.result new file mode 100644 index 00000000000..78f8bf805dd --- /dev/null +++ b/mysql-test/r/ssl_system_ca.result @@ -0,0 +1,2 @@ +*************************** 1. row *************************** +have_ssl: 1 diff --git a/mysql-test/t/ssl_system_ca.combinations b/mysql-test/t/ssl_system_ca.combinations new file mode 100644 index 00000000000..6e3576ada15 --- /dev/null +++ b/mysql-test/t/ssl_system_ca.combinations @@ -0,0 +1,11 @@ +[good] +# +# hostname on the certificate is localhost +# + +[bad] +# +# hostname on the certificate is server8k +# +loose-ssl-key=$MYSQL_TEST_DIR/std_data/server8k-key.pem +loose-ssl-cert=$MYSQL_TEST_DIR/std_data/server8k-cert.pem diff --git a/mysql-test/t/ssl_system_ca.test b/mysql-test/t/ssl_system_ca.test new file mode 100644 index 00000000000..0bedb6e4af6 --- /dev/null +++ b/mysql-test/t/ssl_system_ca.test @@ -0,0 +1,20 @@ +# +# Tests here don't use --ssl-ca but expect the certificate to be +# signed by a CA in a system CA store +# +# They only work for openssl, because the following line works only there: +let SSL_CERT_DIR=$MYSQL_TMP_DIR; + +if (`select @@version_ssl_library not like 'OpenSSL%'`) { + skip Needs OpenSSL; +} + +# See `openssl x509 -in cacert.pem -noout -issuer_hash` +copy_file $MYSQL_TEST_DIR/std_data/cacert.pem $MYSQL_TMP_DIR/ed1f42db.0; + +# +# test --ssl-verify-server-cert +# + +disable_abort_on_error; +exec $MYSQL --ssl-verify-server-cert -Ee "select (variable_value <> '') as have_ssl from information_schema.session_status where variable_name='ssl_cipher'" 2>&1; From 7c166e68aaf51bd9c1b3152ba9674fcc261f3d84 Mon Sep 17 00:00:00 2001 From: Vlad Lesin Date: Wed, 22 Jan 2020 21:13:14 +0300 Subject: [PATCH 37/49] MDEV-14183: aria_pack segfaults in compress_maria_file Post-push fix. aria_pack_mdev14183 test is unstable. The fix is the following: 1. Disable the test for embedded server. 2. Create non-"transactional" Aria table in the test, as aria_pack does not support "transactional" Aria tables. --- mysql-test/suite/maria/aria_pack_mdev14183.result | 2 +- mysql-test/suite/maria/aria_pack_mdev14183.test | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.result b/mysql-test/suite/maria/aria_pack_mdev14183.result index cd1decdef75..b20f60c5b8a 100644 --- a/mysql-test/suite/maria/aria_pack_mdev14183.result +++ b/mysql-test/suite/maria/aria_pack_mdev14183.result @@ -3,7 +3,7 @@ CREATE TABLE `t` ( `col_2` varchar(255) NOT NULL, `col_3` int(11) NOT NULL DEFAULT '0', `col_4` int(11) NOT NULL DEFAULT '0' -) ENGINE=Aria; +) ENGINE=Aria TRANSACTIONAL=0 PAGE_CHECKSUM=0; insert into t values ('foobar','qux',0,0),('abcdef','qux',0,0); Compressing test/t.MAD: (2 records) diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.test b/mysql-test/suite/maria/aria_pack_mdev14183.test index ab0589dc780..5386ae774a0 100644 --- a/mysql-test/suite/maria/aria_pack_mdev14183.test +++ b/mysql-test/suite/maria/aria_pack_mdev14183.test @@ -1,12 +1,13 @@ --source include/have_aria.inc --source include/have_debug.inc +--source include/not_embedded.inc CREATE TABLE `t` ( `col_1` varchar(255) NOT NULL DEFAULT '', `col_2` varchar(255) NOT NULL, `col_3` int(11) NOT NULL DEFAULT '0', `col_4` int(11) NOT NULL DEFAULT '0' -) ENGINE=Aria; +) ENGINE=Aria TRANSACTIONAL=0 PAGE_CHECKSUM=0; insert into t values ('foobar','qux',0,0),('abcdef','qux',0,0); From 1d12bff42c7dd73b2a0158d6780267467b9e0871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 23 Jan 2020 16:14:28 +0200 Subject: [PATCH 38/49] MDEV-20775: page_zip_validate() failure due to AUTO_INCREMENT cmake -DWITH_INNODB_EXTRA_DEBUG:BOOL=ON was broken ever since commit 8777458a6eb73ac1d7d864ebac390ea7039e21c1 (MDEV-6076 Persistent AUTO_INCREMENT for InnoDB). There is a race condition between page reads that call page_zip_validate() (while holding clustered index root page S-latch) and writes that update PAGE_ROOT_AUTO_INC (with buf_block_t::lock SX-latch, compatible with S-latch). page_zip_validate_low(): Skip the PAGE_ROOT_AUTO_INC field on clustered index root pages in order to avoid false positives. --- storage/innobase/page/page0zip.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index 1c0c8f75f78..7a017913dfe 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -2,7 +2,7 @@ Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2014, 2019, MariaDB Corporation. +Copyright (c) 2014, 2020, 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 the Free Software @@ -3336,7 +3336,19 @@ page_zip_validate_low( FIL_PAGE_LSN - FIL_PAGE_PREV) || memcmp(page_zip->data + FIL_PAGE_TYPE, page + FIL_PAGE_TYPE, 2) || memcmp(page_zip->data + FIL_PAGE_DATA, page + FIL_PAGE_DATA, - PAGE_DATA - FIL_PAGE_DATA)) { + PAGE_ROOT_AUTO_INC) + /* The PAGE_ROOT_AUTO_INC can be updated while holding an SX-latch + on the clustered index root page (page number 3 in .ibd files). + That allows concurrent readers (holding buf_block_t::lock S-latch). + Because we do not know what type of a latch our caller is holding, + we will ignore the field on clustered index root pages in order + to avoid false positives. */ + || (page_get_page_no(page) != 3/* clustered index root page */ + && memcmp(&page_zip->data[FIL_PAGE_DATA + PAGE_ROOT_AUTO_INC], + &page[FIL_PAGE_DATA + PAGE_ROOT_AUTO_INC], 8)) + || memcmp(&page_zip->data[FIL_PAGE_DATA + PAGE_HEADER_PRIV_END], + &page[FIL_PAGE_DATA + PAGE_HEADER_PRIV_END], + PAGE_DATA - FIL_PAGE_DATA - PAGE_HEADER_PRIV_END)) { page_zip_fail(("page_zip_validate: page header\n")); page_zip_hexdump(page_zip, sizeof *page_zip); page_zip_hexdump(page_zip->data, page_zip_get_size(page_zip)); From 7aa443ca7dc58f301a8c6051e2623498d894d44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 23 Jan 2020 16:29:52 +0200 Subject: [PATCH 39/49] Remove an unused tokuvalgrind script This is the only symlink in the repository. Symlinks can cause trouble when using file systems or operating systems that do not support them. Also remove the unused file DartConfig.cmake that refers to the script. --- storage/tokudb/PerconaFT/DartConfig.cmake | 10 ---------- storage/tokudb/PerconaFT/scripts/tokuvalgrind | 1 - 2 files changed, 11 deletions(-) delete mode 100644 storage/tokudb/PerconaFT/DartConfig.cmake delete mode 120000 storage/tokudb/PerconaFT/scripts/tokuvalgrind diff --git a/storage/tokudb/PerconaFT/DartConfig.cmake b/storage/tokudb/PerconaFT/DartConfig.cmake deleted file mode 100644 index 9ad189869c6..00000000000 --- a/storage/tokudb/PerconaFT/DartConfig.cmake +++ /dev/null @@ -1,10 +0,0 @@ -if(BUILD_TESTING) - if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) - # Valgrind on OSX 10.8 generally works but outputs some warning junk - # that is hard to parse out, so we'll just let it run alone - set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind") - endif () - set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --soname-synonyms=somalloc=*tokuportability* --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump,*/tdb-recover --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind") - set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind") - set(UPDATE_COMMAND "svn") -endif() diff --git a/storage/tokudb/PerconaFT/scripts/tokuvalgrind b/storage/tokudb/PerconaFT/scripts/tokuvalgrind deleted file mode 120000 index 74517aa2975..00000000000 --- a/storage/tokudb/PerconaFT/scripts/tokuvalgrind +++ /dev/null @@ -1 +0,0 @@ -tokugrind \ No newline at end of file From 683a49889c312e0c39fc34d61577efcb11560d29 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Fri, 24 Jan 2020 00:29:06 +0400 Subject: [PATCH 40/49] MENT-464 ASAN MTR quick test - some failures to be investigated. PCRE reports small frame size working with ASAN, so the test has to be ready for the minimlas possible size. --- mysql-test/r/func_regexp_pcre.result | 18 +++++++++--------- mysql-test/t/func_regexp_pcre.test | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mysql-test/r/func_regexp_pcre.result b/mysql-test/r/func_regexp_pcre.result index e030df99756..494fe917dc6 100644 --- a/mysql-test/r/func_regexp_pcre.result +++ b/mysql-test/r/func_regexp_pcre.result @@ -888,33 +888,33 @@ Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 1 -SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 1 -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 243 -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) 0 -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); -LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) -803 +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +1603 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR('a_kollision', 'oll'); diff --git a/mysql-test/t/func_regexp_pcre.test b/mysql-test/t/func_regexp_pcre.test index 21600390bb2..de0fe94b7c1 100644 --- a/mysql-test/t/func_regexp_pcre.test +++ b/mysql-test/t/func_regexp_pcre.test @@ -438,19 +438,19 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, # SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); # # MDEV-12942 REGEXP_INSTR returns 1 when using brackets From 26a46444b4e5f7c459eab3cd949a269f4ccf4137 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jan 2020 23:26:01 +0100 Subject: [PATCH 41/49] don't run main.ssl_system_ca in --embedded this test needs a *server* and tries to connect with $MYSQL to it --- mysql-test/t/ssl_system_ca.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/t/ssl_system_ca.test b/mysql-test/t/ssl_system_ca.test index 0bedb6e4af6..920e391090f 100644 --- a/mysql-test/t/ssl_system_ca.test +++ b/mysql-test/t/ssl_system_ca.test @@ -5,6 +5,8 @@ # They only work for openssl, because the following line works only there: let SSL_CERT_DIR=$MYSQL_TMP_DIR; +source include/not_embedded.inc; + if (`select @@version_ssl_library not like 'OpenSSL%'`) { skip Needs OpenSSL; } From 599a06098b967db3d636c1053bdbdd0011cba606 Mon Sep 17 00:00:00 2001 From: Sujatha Date: Fri, 24 Jan 2020 13:35:03 +0530 Subject: [PATCH 42/49] MDEV-21490: binlog tests fail with valgrind: Conditional jump or move depends on uninitialised value in sql_ex_info::init Problem: ======= P1) Conditional jump or move depends on uninitialised value(s) sql_ex_info::init(char const*, char const*, bool) (log_event.cc:3083) code: All the following variables are not initialized. ---- return ((cached_new_format != -1) ? cached_new_format : (cached_new_format=(field_term_len > 1 || enclosed_len > 1 || line_term_len > 1 || line_start_len > 1 || escaped_len > 1))); P2) Conditional jump or move depends on uninitialised value(s) Rows_log_event::Rows_log_event(char const*, unsigned int, Format_description_log_event const*) (log_event.cc:9571) Code: Uninitialized values is reported for 'var_header_len' variable. ---- if (var_header_len < 2 || event_len < static_cast(var_header_len + (post_start - buf))) P3) Conditional jump or move depends on uninitialised value(s) Table_map_log_event::pack_info(Protocol*) (log_event.cc:11553) code:'m_table_id' is uninitialized. ---- void Table_map_log_event::pack_info(Protocol *protocol) ... size_t bytes= my_snprintf(buf, sizeof(buf), "table_id: %lu (%s.%s)", m_table_id, m_dbnam, m_tblnam); Fix: === P1 - Fix) Initialize cached_new_format,field_term_len, enclosed_len, line_term_len, line_start_len, escaped_len members in default constructor. P2 - Fix) "var_header_len" is initialized by reading the event buffer. In case of an invalid event the buffer will contain invalid data. Hence added a check to validate the event data. If event_len is smaller than valid header length return immediately. P3 - Fix) 'm_table_id' within Table_map_log_event is initialized by reading data from the event buffer. Use 'VALIDATE_BYTES_READ' macro to validate the current state of the buffer. If it is invalid return immediately. --- sql/log_event.cc | 9 ++++++++- sql/log_event.h | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index e8881c77f2b..d731c39d9c5 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5902,7 +5902,7 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len, { DBUG_ENTER("Load_log_event::copy_log_event"); uint data_len; - if ((int) event_len < body_offset) + if ((int) event_len <= body_offset) DBUG_RETURN(1); char* buf_end = (char*)buf + event_len; /* this is the beginning of the post-header */ @@ -9535,6 +9535,12 @@ Rows_log_event::Rows_log_event(const char *buf, uint event_len, uint8 const post_header_len= description_event->post_header_len[event_type-1]; + if (event_len < (uint)(common_header_len + post_header_len)) + { + m_cols.bitmap= 0; + DBUG_VOID_RETURN; + } + DBUG_PRINT("enter",("event_len: %u common_header_len: %d " "post_header_len: %d", event_len, common_header_len, @@ -11043,6 +11049,7 @@ Table_map_log_event::Table_map_log_event(const char *buf, uint event_len, const char *post_start= buf + common_header_len; post_start+= TM_MAPID_OFFSET; + VALIDATE_BYTES_READ(post_start, buf, event_len); if (post_header_len == 6) { /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */ diff --git a/sql/log_event.h b/sql/log_event.h index 2c8dc3d7353..1337e9a7d69 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2057,7 +2057,15 @@ public: /* !!! Public in this patch to allow old usage */ ****************************************************************************/ struct sql_ex_info { - sql_ex_info() {} /* Remove gcc warning */ + sql_ex_info(): + cached_new_format(-1), + field_term_len(0), + enclosed_len(0), + line_term_len(0), + line_start_len(0), + escaped_len(0), + empty_flags(0) + {} /* Remove gcc warning */ const char* field_term; const char* enclosed; const char* line_term; From ac3e3e12adad505b9f09bd068ddd6819ac084a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 24 Jan 2020 14:43:19 +0200 Subject: [PATCH 43/49] MDEV-21509: Work around occasional lost DEBUG_SYNC --- mysql-test/suite/innodb/r/innodb_bug30113362.result | 4 ++-- mysql-test/suite/innodb/t/innodb_bug30113362.test | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb_bug30113362.result b/mysql-test/suite/innodb/r/innodb_bug30113362.result index 64f20650a6b..57dff622211 100644 --- a/mysql-test/suite/innodb/r/innodb_bug30113362.result +++ b/mysql-test/suite/innodb/r/innodb_bug30113362.result @@ -63,11 +63,11 @@ SET DEBUG_SYNC = 'now WAIT_FOR roll1_wait'; COMMIT; SET DEBUG_SYNC = 'now SIGNAL roll2'; connect con1,localhost,root,,; -SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting'; +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; SELECT a00 FROM t1 WHERE a00 = 'bii'; connection default; -SET DEBUG_SYNC = 'now WAIT_FOR lockwait1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; SET DEBUG_SYNC = 'now SIGNAL resume'; connection con1; a00 diff --git a/mysql-test/suite/innodb/t/innodb_bug30113362.test b/mysql-test/suite/innodb/t/innodb_bug30113362.test index 7c3888aaec5..2291574f9ec 100644 --- a/mysql-test/suite/innodb/t/innodb_bug30113362.test +++ b/mysql-test/suite/innodb/t/innodb_bug30113362.test @@ -106,12 +106,18 @@ COMMIT; SET DEBUG_SYNC = 'now SIGNAL roll2'; connect (con1,localhost,root,,); -SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting'; +# FIXME: This occasionally times out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +--enable_warnings SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; send SELECT a00 FROM t1 WHERE a00 = 'bii'; connection default; -SET DEBUG_SYNC = 'now WAIT_FOR lockwait1'; +# FIXME: This occasionally times out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +--enable_warnings # bug#30113362 caused deadlock SET DEBUG_SYNC = 'now SIGNAL resume'; From 2833e906190e4fa3b0261a204822d419542aebe7 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 24 Jan 2020 14:34:07 +0100 Subject: [PATCH 44/49] fix perfschema.start_server_innodb test (related to MDEV-17571) --- mysql-test/suite/perfschema/r/ortho_iter.result | 2 +- mysql-test/suite/perfschema/r/privilege_table_io.result | 2 +- mysql-test/suite/perfschema/r/start_server_no_cond_inst.result | 2 +- mysql-test/suite/perfschema/r/start_server_variables.result | 2 +- storage/perfschema/pfs_server.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result index a1fb88e7059..dfd31a80b3f 100644 --- a/mysql-test/suite/perfschema/r/ortho_iter.result +++ b/mysql-test/suite/perfschema/r/ortho_iter.result @@ -111,7 +111,7 @@ performance_schema_events_statements_history_size 10 performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 -performance_schema_max_cond_classes 80 +performance_schema_max_cond_classes 90 performance_schema_max_cond_instances 1000 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result index 2cdcb494d6a..00f382de966 100644 --- a/mysql-test/suite/perfschema/r/privilege_table_io.result +++ b/mysql-test/suite/perfschema/r/privilege_table_io.result @@ -38,7 +38,7 @@ performance_schema_events_statements_history_size 10 performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 -performance_schema_max_cond_classes 80 +performance_schema_max_cond_classes 90 performance_schema_max_cond_instances 1000 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result index df5373ead87..bb3d0a24db9 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result @@ -21,7 +21,7 @@ show engine PERFORMANCE_SCHEMA status; show status like "performance_schema%"; show variables like "performance_schema_max_cond_classes"; Variable_name Value -performance_schema_max_cond_classes 80 +performance_schema_max_cond_classes 90 select count(*) > 0 from performance_schema.setup_instruments where name like "wait/synch/cond/%"; count(*) > 0 diff --git a/mysql-test/suite/perfschema/r/start_server_variables.result b/mysql-test/suite/perfschema/r/start_server_variables.result index 3f2df9603b3..6199fb94f92 100644 --- a/mysql-test/suite/perfschema/r/start_server_variables.result +++ b/mysql-test/suite/perfschema/r/start_server_variables.result @@ -33,7 +33,7 @@ performance_schema_events_statements_history_size 10 performance_schema_events_waits_history_long_size 10000 performance_schema_events_waits_history_size 10 performance_schema_hosts_size 100 -performance_schema_max_cond_classes 80 +performance_schema_max_cond_classes 90 performance_schema_max_cond_instances 1000 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 diff --git a/storage/perfschema/pfs_server.h b/storage/perfschema/pfs_server.h index 3457a91d376..9f904e6545b 100644 --- a/storage/perfschema/pfs_server.h +++ b/storage/perfschema/pfs_server.h @@ -35,7 +35,7 @@ #define PFS_MAX_RWLOCK_CLASS 40 #endif #ifndef PFS_MAX_COND_CLASS - #define PFS_MAX_COND_CLASS 80 + #define PFS_MAX_COND_CLASS 90 #endif #ifndef PFS_MAX_THREAD_CLASS #define PFS_MAX_THREAD_CLASS 50 From fdb9b05cbba648fdc411afb3e39495f37321f084 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 24 Jan 2020 15:38:25 +0100 Subject: [PATCH 45/49] fix tests --- mysql-test/main/mysqld--help.result | 2 +- mysql-test/suite/maria/aria_pack_mdev14183.result | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index bd9656a106d..f9dfa604d23 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -1626,7 +1626,7 @@ performance-schema-events-waits-history-long-size -1 performance-schema-events-waits-history-size -1 performance-schema-hosts-size -1 performance-schema-instrument -performance-schema-max-cond-classes 80 +performance-schema-max-cond-classes 90 performance-schema-max-cond-instances -1 performance-schema-max-digest-length 1024 performance-schema-max-file-classes 50 diff --git a/mysql-test/suite/maria/aria_pack_mdev14183.result b/mysql-test/suite/maria/aria_pack_mdev14183.result index b20f60c5b8a..1f71ccd53b5 100644 --- a/mysql-test/suite/maria/aria_pack_mdev14183.result +++ b/mysql-test/suite/maria/aria_pack_mdev14183.result @@ -15,6 +15,7 @@ Original trees: 4 After join: 1 - Compressing file Min record length: 5 Max length: 5 Mean total length: 35 99.57% +# restart SELECT * FROM t; col_1 col_2 col_3 col_4 foobar qux 0 0 From 7e8a58020bc2b0dcac95937a0178401ecc55f6ad Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Mon, 20 Jan 2020 00:06:51 +0300 Subject: [PATCH 46/49] MDEV-21383: Possible range plan is not used under certain conditions [Variant 2 of the fix: collect the attached conditions] Problem: make_join_select() has a section of code which starts with "We plan to scan all rows. Check again if we should use an index." the code in that section will [unnecessarily] re-run the range optimizer using this condition: condition_attached_to_current_table AND current_table's_ON_expr Note that the original invocation of range optimizer in make_join_statistics was done using the whole select's WHERE condition. Taking the whole select's WHERE condition and using multiple-equalities allowed the range optimizer to infer more range restrictions. The fix: - Do range optimization using a condition that is an AND of this table's condition and all of the previous tables' conditions. - Also, fix the range optimizer to prefer SEL_ARGs with type=KEY_RANGE over SEL_ARGS with type=MAYBE_KEY, regardless of the key part. Computing key_and( SEL_ARG(type=MAYBE_KEY key_part=1), SEL_ARG(type=KEY_RANGE, key_part=2) ) will now produce the SEL_ARG with type=KEY_RANGE. --- mysql-test/main/join.result | 56 +++++++++++++++++++++++++++++ mysql-test/main/join.test | 65 +++++++++++++++++++++++++++++++++ sql/opt_range.cc | 2 ++ sql/sql_select.cc | 72 ++++++++++++++++++++++++++++++++++++- 4 files changed, 194 insertions(+), 1 deletion(-) diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result index fb4f35ed555..fe6d18f7807 100644 --- a/mysql-test/main/join.result +++ b/mysql-test/main/join.result @@ -3339,3 +3339,59 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where 1 SIMPLE t1 ref a a 5 test.t0.a 1 drop table t0,t1; +# +# MDEV-21383: Possible range plan is not used under certain conditions +# +drop table if exists t10, t1000, t03; +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1000(a int); +insert into t1000 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; +create table t03(a int); +insert into t03 values (0),(1),(2); +create table t1 ( +stationid int +); +insert into t1 select a from t10; +CREATE TABLE t2 ( +stationId int, +startTime int, +filler char(100), +key1 int, +key2 int, +key(key1), +key(key2), +PRIMARY KEY (`stationId`,`startTime`) +); +insert into t2 select +A.a, +B.a, +repeat('filler=data-', 4), +B.a, +1 +from +t03 A, +t1000 B; +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +create table t3(a int, filler char(100), key(a)); +insert into t3 select A.a+1000*B.a, 'filler-data' from t1000 A, t10 B; +# This should produce a join order of t1,t2,t3 +# t2 should have type=range, key=PRIMARY key_len=8 (not type=ALL or key_len<8) +explain +SELECT * +FROM +t1,t2,t3 +WHERE +t2.startTime <= 100 and +t2.stationId = t1.stationId and +(t1.stationid = 1 or t1.stationid = 2 or t1.stationid = 3) and +key1 >0 and +t2.key2=t3.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +1 SIMPLE t2 range PRIMARY,key1,key2 PRIMARY 8 NULL 219 Using index condition; Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 ref a a 5 test.t2.key2 1 +drop table t1,t2,t3; +drop table t1000,t10,t03; diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test index c5d62e213d8..c72ff0e1a8c 100644 --- a/mysql-test/main/join.test +++ b/mysql-test/main/join.test @@ -1748,3 +1748,68 @@ show keys from t1; explain select * from t0,t1 where t0.a=t1.a; drop table t0,t1; + +--echo # +--echo # MDEV-21383: Possible range plan is not used under certain conditions +--echo # + +--disable_warnings +drop table if exists t10, t1000, t03; +--enable_warnings + +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t1000(a int); +insert into t1000 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; + +create table t03(a int); +insert into t03 values (0),(1),(2); + + +create table t1 ( + stationid int +); +insert into t1 select a from t10; + +CREATE TABLE t2 ( + stationId int, + startTime int, + filler char(100), + key1 int, + key2 int, + key(key1), + key(key2), + PRIMARY KEY (`stationId`,`startTime`) +); + +insert into t2 select + A.a, + B.a, + repeat('filler=data-', 4), + B.a, + 1 +from + t03 A, + t1000 B; +analyze table t2; + +create table t3(a int, filler char(100), key(a)); +insert into t3 select A.a+1000*B.a, 'filler-data' from t1000 A, t10 B; + +--echo # This should produce a join order of t1,t2,t3 +--echo # t2 should have type=range, key=PRIMARY key_len=8 (not type=ALL or key_len<8) +explain +SELECT * +FROM + t1,t2,t3 +WHERE + t2.startTime <= 100 and + t2.stationId = t1.stationId and + (t1.stationid = 1 or t1.stationid = 2 or t1.stationid = 3) and + key1 >0 and + t2.key2=t3.a; + +drop table t1,t2,t3; +drop table t1000,t10,t03; + diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 32e6a767f15..bd5f25d67c2 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8999,6 +8999,8 @@ and_all_keys(RANGE_OPT_PARAM *param, SEL_ARG *key1, SEL_ARG *key2, } if (key1->type == SEL_ARG::MAYBE_KEY) { + if (key2->type == SEL_ARG::KEY_RANGE) + return key2; key1->right= key1->left= &null_element; key1->next= key1->prev= 0; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 87a45a1baed..ae26458d451 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10543,6 +10543,74 @@ make_outerjoin_info(JOIN *join) } +/* + @brief + Build a temporary join prefix condition for JOIN_TABs up to the last tab + + @param ret OUT the condition is returned here + + @return + false OK + true Out of memory + + @detail + Walk through the join prefix (from the first table to the last_tab) and + build a condition: + + join_tab_1_cond AND join_tab_2_cond AND ... AND last_tab_conds + + The condition is only intended to be used by the range optimizer, so: + - it is not normalized (can have Item_cond_and inside another + Item_cond_and) + - it does not include join->exec_const_cond and other similar conditions. +*/ + +bool build_tmp_join_prefix_cond(JOIN *join, JOIN_TAB *last_tab, Item **ret) +{ + THD *const thd= join->thd; + Item_cond_and *all_conds= NULL; + + Item *res= NULL; + + // Pick the ON-expression. Use the same logic as in get_sargable_cond(): + if (last_tab->on_expr_ref) + res= *last_tab->on_expr_ref; + else if (last_tab->table->pos_in_table_list && + last_tab->table->pos_in_table_list->embedding && + !last_tab->table->pos_in_table_list->embedding->sj_on_expr) + { + res= last_tab->table->pos_in_table_list->embedding->on_expr; + } + + for (JOIN_TAB *tab= first_depth_first_tab(join); + tab; + tab= next_depth_first_tab(join, tab)) + { + if (tab->select_cond) + { + if (!res) + res= tab->select_cond; + else + { + if (!all_conds) + { + if (!(all_conds= new (thd->mem_root)Item_cond_and(thd, res, + tab->select_cond))) + return true; + res= all_conds; + } + else + all_conds->add(tab->select_cond, thd->mem_root); + } + } + if (tab == last_tab) + break; + } + *ret= all_conds? all_conds: res; + return false; +} + + static bool make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) { @@ -10890,7 +10958,9 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) { /* Join with outer join condition */ COND *orig_cond=sel->cond; - sel->cond= and_conds(thd, sel->cond, *tab->on_expr_ref); + + if (build_tmp_join_prefix_cond(join, tab, &sel->cond)) + return true; /* We can't call sel->cond->fix_fields, From ee33c4a6946c4291f103437428e34a405193b270 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Sun, 26 Jan 2020 12:47:20 +0300 Subject: [PATCH 47/49] Post-merge fix --- mysql-test/main/join.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result index 55730da47f0..1a59c7b16e9 100644 --- a/mysql-test/main/join.result +++ b/mysql-test/main/join.result @@ -3381,6 +3381,7 @@ t03 A, t1000 B; analyze table t2; Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK create table t3(a int, filler char(100), key(a)); insert into t3 select A.a+1000*B.a, 'filler-data' from t1000 A, t10 B; From ba6bfc402c352372cc1a9ec20b5dc50b2204549f Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Sun, 26 Jan 2020 22:39:52 +0200 Subject: [PATCH 48/49] List of unstable tests for 10.4.12 release --- mysql-test/unstable-tests | 499 ++++++++++++++++++++------------------ 1 file changed, 268 insertions(+), 231 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index b738604b13a..5fb89c560fa 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,93 +23,95 @@ # ############################################################################## # -# Based on bb-10.4-release a15234bf4bf98d7833996284c033fc53a981f5d4 +# Based on bb-10.4-release ee33c4a6946c4291f103437428e34a405193b270 main.alter_table_trans : MDEV-12084 - timeout main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.auth_named_pipe : MDEV-14724 - System error 2 -main.auto_increment_ranges_innodb : Include file modified in 10.4.9 -main.auto_increment_ranges_myisam : Include file modified in 10.4.9 -main.backup_interaction : Modified in 10.4.9 main.binary_to_hex : MDEV-20211 - Wrong result -main.brackets : Modified in 10.4.9 -main.compare : Modified in 10.4.9 +main.cache_temporal_4265 : Modified in 10.4.12 main.connect : MDEV-17282 - Wrong result main.connect-abstract : MDEV-20162 - Could not execute 'check-testcase' main.connect2 : MDEV-13885 - Server crash +main.connect_debug : Modified in 10.4.12 main.count_distinct2 : MDEV-11768 - timeout main.create : Modified in 10.4.11 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result -main.cte_nonrecursive : Modified in 10.4.9 +main.create_or_replace2 : Modified in 10.4.12 +main.cte_nonrecursive : Modified in 10.4.12 main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result -main.ctype_many : Modified in 10.4.9 -main.ctype_uca : Include file modified in 10.4.9 -main.ctype_uca_innodb : Include file modified in 10.4.9 main.ctype_ucs : MDEV-17681 - Data too long for column main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade main.ctype_utf16 : MDEV-10675: timeout or extra warnings main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.ctype_utf8 : Include file modified in 10.4.9 main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison main.debug_sync : MDEV-10607 - internal error +main.default_session : Modified in 10.4.12 main.delayed : MDEV-20961 - Assertion failure -main.derived_cond_pushdown : MDEV-20532 - Floating point differences +main.delete_use_source : Modified in 10.4.12 +main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.4.12 main.derived_opt : MDEV-11768 - timeout main.dirty_close : MDEV-19368 - mysqltest failed but provided no output main.distinct : MDEV-14194 - Crash -main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.4.9 -main.drop_debug : Modified in 10.1.42 +main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.4.12 main.dyncol : MDEV-19455 - Extra warning +main.engine_error_in_alter-8453 : Modified in 10.4.12 +main.error_simulation : Modified in 10.4.12 main.events_2 : MDEV-13277 - Crash -main.events_bugs : MDEV-12892 - Crash +main.events_bugs : MDEV-12892 - Crash; modified in 10.4.12 main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result main.flush : MDEV-19368 - mysqltest failed but provided no output main.flush_ssl : MDEV-21276 - Aria recovery failure -main.func_json : Modified in 10.4.9 -main.func_math : MDEV-20966 - Wrong error code; modified in 10.4.9 -main.func_misc : Modified in 10.4.9 +main.foreign_key : Modified in 10.4.12 +main.func_math : MDEV-20966 - Wrong error code; modified in 10.4.12 +main.func_misc : Modified in 10.4.12 +main.func_regexp_pcre : Modified in 10.4.12 +main.func_regexp_pcre_debug : Modified in 10.4.12 +main.func_time : Modified in 10.4.12 main.gis : MDEV-13411 - wrong result on P8 main.gis_notembedded : MDEV-21264 - Wrong result with non-default charset +main.group_by : Modified in 10.4.12 +main.having_cond_pushdown : Modified in 10.4.12 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout -main.index_merge_innodb : MDEV-7142 - Plan mismatch; modified in 10.4.9 -main.index_merge_myisam : Modified in 10.4.9 -main.information_schema_db : Modified in 10.4.9 +main.index_merge_innodb : MDEV-7142 - Plan mismatch main.innodb_icp : MDEV-20168 - Wrong execution plans main.innodb_mysql_lock : MDEV-7861 - Wrong result +main.insert_debug : Added in 10.4.12 main.ipv4_and_ipv6 : MDEV-20964 - Wrong result main.ipv6 : MDEV-20964 - Wrong result -main.join : Modified in 10.1.42 -main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM -main.kill : Modified in 10.2.28 +main.join : Modified in 10.4.12 +main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.4.12 main.kill-2 : MDEV-13257 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result main.loaddata : MDEV-19368 - mysqltest failed but provided no output main.locale : MDEV-20521 - Missing warning main.log_slow : MDEV-13263 - Wrong result -main.log_slow_debug : Modified in 10.4.9 +main.log_slow_debug : Modified in 10.4.12 main.log_tables-big : MDEV-13408 - wrong result main.log_tables_upgrade : MDEV-20962 - Wrong result main.mdev-504 : MDEV-15171 - warning main.mdev375 : MDEV-10607 - sporadic "can't connect" +main.mdev6830 : Modified in 10.4.12 main.merge : MDEV-10607 - sporadic "can't connect" +main.merge-big : Modified in 10.4.12 +main.merge_debug : Modified in 10.4.12 main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out -main.myisam : Modified in 10.4.9 +main.myisam_debug : Modified in 10.4.12 main.mysql : MDEV-20156 - Wrong result main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; MDEV-19511 - Big endian issue main.mysql_client_test_comp : MDEV-16641 - Error in exec main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed main.mysql_cp932 : MDEV-21275 - Wrong result main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed -main.mysql_upgrade-20228 : Added in 10.4.9 main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result main.mysql_upgrade_noengine : MDEV-14355 - Wrong result main.mysql_upgrade_view : MDEV-20161 - Wrong result main.mysqladmin : MDEV-20535 - Wrong result main.mysqlcheck : MDEV-20164 - Wrong result -main.mysqld_option_err : MDEV-21236 - Wrong error +main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap main.mysqldump : MDEV-14800 - Stack smashing detected main.mysqldump-max : MDEV-21272 - Wrong result main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug @@ -118,74 +120,72 @@ main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-13887 - Wrong result main.old-mode : MDEV-19373 - Wrong result main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.opt_tvc : Modified in 10.4.12 main.order_by : Modified in 10.4.11 -main.order_by_innodb : Modified in 10.4.9 main.order_by_optimizer_innodb : MDEV-10683 - Wrong result -main.parser : Modified in 10.4.9 -main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock; modified in 10.4.9 -main.partition_innodb : MDEV-20169 - Wrong result; modified in 10.4.9 +main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock +main.partition_innodb : MDEV-20169 - Wrong result main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 main.partition_mrr_aria : Added in 10.4.11 main.partition_mrr_innodb : Added in 10.4.11 main.partition_mrr_myisam : Added in 10.4.11 main.partition_pruning : Modified in 10.4.11 -main.partition_ucs2 : Added in 10.4.9 -main.partition_utf8 : Modified in 10.4.9 -main.plugin : Include file modified in 10.4.9 main.plugin_auth : MDEV-20957 - Upgrade file was not properly created main.plugin_auth_qa_2 : MDEV-20165 - Wrong result main.pool_of_threads : MDEV-18135 - SSL error: key too small -main.processlist : Modified in 10.4.9 -main.processlist_notembedded : Added in 10.4.9 -main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.4.9 +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count main.query_cache : MDEV-16180 - Wrong result main.query_cache_debug : MDEV-15281 - Query cache is disabled +main.range_innodb : Modified in 10.4.12 +main.range_interrupted-13751 : Modified in 10.4.12 main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.rowid_filter_innodb : MDEV-20538 - Wrong result; modified in 10.4.11 +main.rowid_filter_innodb : MDEV-20538 - Wrong result; modified in 10.4.12 main.select : MDEV-20532 - Floating point differences +main.select_debug : Modified in 10.4.12 main.select_jcl6 : MDEV-20532 - Floating point differences main.select_pkeycache : MDEV-20532 - Floating point differences main.selectivity : Modified in 10.4.11 main.set_statement : MDEV-13183 - Wrong result main.set_statement_notembedded : MDEV-19414 - Wrong result main.shm : MDEV-12727 - Mismatch, ERROR 2013 -main.show_explain : MDEV-10674 - Wrong result code -main.sp : MDEV-7866 - Mismatch; modified in 10.4.9 -main.sp-code : Modified in 10.4.9 +main.show_explain : MDEV-10674 - Wrong result code; modified in 10.4.12 +main.show_explain_non_select : Modified in 10.4.12 +main.show_explain_ps : Modified in 10.4.12 +main.slowlog_enospace-10508 : Modified in 10.4.12 +main.sp : MDEV-7866 - Mismatch main.sp-security : MDEV-10607 - sporadic "can't connect" main.sp_notembedded : MDEV-10607 - internal error main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_7937 : MDEV-20958 - Wrong result +main.ssl_7937 : MDEV-20958 - Wrong result; modified in 10.4.12 +main.ssl_8k_key : Modified in 10.4.12 main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_crl : MDEV-19119 - Wrong error code; modified in 10.4.11 +main.ssl_crl_clients : Modified in 10.4.12 +main.ssl_system_ca : Added in 10.4.12 main.ssl_timeout : MDEV-11244 - Crash -main.stat_tables : Modified in 10.4.9 +main.stat_tables-enospc : Modified in 10.4.12 main.stat_tables_par : MDEV-13266 - Wrong result main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding -main.statement-expr : Modified in 10.4.9 main.status : MDEV-13255 - Wrong result -main.subselect : MDEV-20551 - Valgrind failure; modified in 10.4.9 +main.subselect : MDEV-20551 - Valgrind failure main.subselect_innodb : MDEV-10614 - Wrong result -main.subselect_notembedded : Modified in 10.4.9 -main.subselect_sj : Modified in 10.4.9 -main.sum_distinct-big : Modified in 10.4.9 -main.table_value_constr : Modified in 10.4.9 main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.tls_version : MDEV-20170 - Unknown SSL error -main.tls_version1 : MDEV-20170 - Unknown SSL error +main.timezone2 : Modified in 10.4.12 main.type_blob : MDEV-15195 - Wrong result -main.type_date : Modified in 10.1.42 -main.type_datetime : Modified in 10.1.42 +main.type_datetime : Modified in 10.4.12 main.type_datetime_hires : MDEV-10687 - Timeout main.type_float : MDEV-20532 - Floating point differences -main.type_int : Modified in 10.1.42 -main.type_newdecimal : MDEV-20532 - Floating point differences; modified in 10.4.9 +main.type_int : Modified in 10.4.12 +main.type_newdecimal : MDEV-20532 - Floating point differences main.type_ranges : MDEV-20532 - Floating point differences -main.uniques_crash-7912 : MDEV-21210 - Excessive memory consumption +main.type_time : Modified in 10.4.12 +main.union_crash-714 : Modified in 10.4.12 main.userstat : MDEV-12904 - SSL errors main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query +main.warnings_debug : Modified in 10.4.12 +main.win : Modified in 10.4.12 main.xa : MDEV-11769 - lock wait timeout #----------------------------------------------------------------------- @@ -202,44 +202,47 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed #----------------------------------------------------------------------- -binlog.backup : Added in 10.4.9 -binlog.binlog_commit_wait : MDEV-10150 - Mismatch -binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown -binlog.binlog_mysqlbinlog_row : Modified in 10.4.9 -binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ -binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ -binlog.binlog_row_binlog : MDEV-20213 - Server crash -binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.1.42 -binlog.binlog_stm_binlog : MDEV-20412 - Wrong result -binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.1.42 -binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint -binlog.flashback-largebinlog : MDEV-19764 - Out of memory -binlog.load_data_stm_view : MDEV-16948 - Wrong result -binlog.read_only : Added in 10.4.9 -binlog.read_only_statement : Added in 10.4.9 -binlog.show_concurrent_rotate : MDEV-20215 - Wrong result +binlog.binlog_commit_wait : MDEV-10150 - Mismatch +binlog.binlog_index : Include file modified in 10.2.31 +binlog.binlog_invalid_read_in_rotate : Added in 10.4.12 +binlog.binlog_ioerr : MDEV-20159 - Assertion failure; include file modified in 10.2.31 +binlog.binlog_killed : MDEV-12925 - Wrong result +binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown +binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ +binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ +binlog.binlog_parallel_replication_marks_row : Include file modified in 10.4.12 +binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.4.12 +binlog.binlog_row_binlog : MDEV-20213 - Server crash +binlog.binlog_show_binlog_event_random_pos : Added in 10.4.12 +binlog.binlog_stm_binlog : MDEV-20412 - Wrong result +binlog.binlog_write_error : Include file Include file modified in 10.2.31 +binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint +binlog.flashback-largebinlog : MDEV-19764 - Out of memory +binlog.load_data_stm_view : MDEV-16948 - Wrong result +binlog.show_concurrent_rotate : MDEV-20215 - Wrong result #----------------------------------------------------------------------- binlog_encryption.binlog_incident : MDEV-20213 - Server crash -binlog_encryption.binlog_mdev_20574_old_binlog : Added in 10.4.9 +binlog_encryption.binlog_index : Include file modified in 10.4.12 +binlog_encryption.binlog_ioerr : Include file modified in 10.4.12 +binlog_encryption.binlog_write_error : Include file Include file modified in 10.4.12 binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint binlog_encryption.encrypted_master : MDEV-14201 - Extra warnings binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log binlog_encryption.encrypted_slave : MDEV-18135 - SSL error: key too small binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed -binlog_encryption.multisource : MDEV-20213 - Server crash -binlog_encryption.mysqlbinlog : Modified in 10.4.9 -binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash; include file modified in 10.4.9 -binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result -binlog_encryption.rpl_corruption : MDEV-20159 - Assertion failure; MDEV-20953 - Wrong error code; include file modified in 10.4.11 +binlog_encryption.multisource : MDEV-20213 - Server crash; MDEV-21289 - Wrong error code +binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash +binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result; include file modified in 10.4.12 +binlog_encryption.rpl_corruption : MDEV-20159 - Assertion failure; MDEV-20953 - Wrong error code; include file modified in 10.4.12 binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start -binlog_encryption.rpl_init_slave_errors : MDEV-20213 - Server crash +binlog_encryption.rpl_incident : Include file modified in 10.4.12 +binlog_encryption.rpl_init_slave_errors : MDEV-20213 - Server crash; include file modified in 10.4.12 binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include binlog_encryption.rpl_mixed_binlog_max_cache_size : MDEV-20956 - Incorrect checksum for freed object -binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include -binlog_encryption.rpl_parallel_ignored_errors : Added in 10.4.9 +binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include; include file modified in 10.4.12 +binlog_encryption.rpl_parallel_ignored_errors : Include file modified in 10.4.12 binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning; MDEV-20573 - Wrong result @@ -252,39 +255,36 @@ binlog_encryption.rpl_typeconv : MDEV-14362 - Lost c #----------------------------------------------------------------------- -compat/oracle.plugin : Include file modified in 10.4.9 -compat/oracle.ps : Modified in 10.4.9 -compat/oracle.statement-expr : Modified in 10.4.9 +compat/oracle.sp-goto : Modified in 10.4.12 +compat/oracle.sp-goto-debug : Added in 10.4.12 #----------------------------------------------------------------------- connect.alter : MDEV-18135 - SSL error: key too small connect.drop-open-error : MDEV-18135 - SSL error: key too small -connect.grant : Modified in 10.4.9 -connect.grant2 : Modified in 10.4.9 -connect.ini_grant : Modified in 10.4.9 +connect.grant : Modified in 10.1.44 +connect.grant2 : Modified in 10.1.44 +connect.ini_grant : Modified in 10.1.44 connect.json : MDEV-18135 - SSL error: key too small -connect.mysql_grant : Modified in 10.4.9 +connect.mysql_grant : Modified in 10.1.44 connect.part_file : MDEV-18135 - SSL error: key too small connect.part_table : MDEV-18135 - SSL error: key too small connect.pivot : MDEV-14803 - Failed to discover table connect.secure_file_priv : MDEV-18135 - SSL error: key too small connect.vcol : MDEV-12374 - Fails on Windows -connect.xml2_grant : Include file modified in 10.4.9 -connect.xml_grant : Include file modified in 10.4.9 +connect.xml2_grant : Include file modified in 10.1.44 +connect.xml_grant : Include file modified in 10.1.44 connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- encryption.corrupted_during_recovery : MDEV-20159 - Assertion failure -encryption.create_or_replace : MDEV-12694 - Timeout; MDEV-16115 - Trying to access tablespace +encryption.create_or_replace : MDEV-16115 - Trying to access tablespace encryption.debug_key_management : MDEV-13841 - Timeout encryption.encrypt_and_grep : MDEV-13765 - Wrong result encryption.innochecksum : MDEV-13644 - Assertion failure -encryption.innodb-bad-key-change : Combinations added in 10.4.9 -encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect to local MySQL server through socket; combinations added in 10.4.9 -encryption.innodb-bad-key-change3 : Combinations added in 10.4.9 -encryption.innodb-bad-key-change4 : Modified in 10.4.9 +encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect to local MySQL server through socket +encryption.innodb-checksum-algorithm : MDEV-20213 - Server crash encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate encryption.innodb-discard-import : MDEV-19113 - Timeout encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout @@ -294,7 +294,7 @@ encryption.innodb-missing-key : MDEV-14728 - SSL error encryption.innodb-page_encryption : MDEV-10641 - mutex problem encryption.innodb-page_encryption_log_encryption : MDEV-17339 - Crash on restart encryption.innodb-read-only : MDEV-16563 - Crash on startup -encryption.innodb-redo-badkey : MDEV-20839 - Extra warnings; re-enabled in 10.4.9; modified in 10.4.9 +encryption.innodb-redo-badkey : Modified in 10.4.12 encryption.innodb-redo-nokeys : MDEV-20159 - Assertion failure encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition encryption.innodb-spatial-index : MDEV-13746 - Wrong result @@ -306,6 +306,7 @@ encryption.innodb_encryption : MDEV-15675 - Timeout encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result encryption.innodb_encryption_filekeys : MDEV-15673 - Timeout +encryption.innodb_encryption_is : MDEV-12898 - Server hang on startup encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash encryption.innodb_encryption_tables : MDEV-17339 - Crash on restart encryption.innodb_first_page : MDEV-10689 - Crash @@ -334,11 +335,10 @@ federated.federated_innodb : MDEV-10617 - Wrong checksum federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617 - Wrong checksum federated.federatedx : MDEV-10617 - Wrong checksum; modified in 10.4.11 -federated.federatedx_versioning : Modified in 10.4.9 #----------------------------------------------------------------------- -funcs_1.is_basics_mixed : Modified in 10.4.9 +funcs_1.is_check_constraints : Modified in 10.4.12 funcs_1.memory_views : MDEV-11773 - timeout funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan @@ -365,34 +365,33 @@ galera_3nodes.* : Suite is not stable yet gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure -gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.4.9 +gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.4.12 gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result -innodb.alter_algorithm : Modified in 10.4.9 innodb.alter_copy : MDEV-16181 - Assertion failure innodb.alter_crash : MDEV-16944 - The process cannot access the file innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out +innodb.alter_not_null_debug : Modified in 10.4.12 innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.blob-crash : MDEV-19298 - Assertion failure +innodb.blob-update-debug : Modified in 10.4.12 innodb.doublewrite : MDEV-12905 - Server crash -innodb.full_crc32_import : Modified in 10.4.9 +innodb.full_crc32_import : Modified in 10.4.12 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.4.11 -innodb.information_schema_grants : Added in 10.4.9 innodb.innodb-32k-crash : MDEV-20194 - Extra warnings; modified in 10.4.11 innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.4.11 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS -innodb.innodb-alter-nullable : Modified in 10.4.9 innodb.innodb-alter-table : MDEV-10619 - Testcase timeout -innodb.innodb-autoinc : Modified in 10.4.9 innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash innodb.innodb-blob : MDEV-12053 - Client crash -innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query; modified in 10.4.9 +innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query +innodb.innodb-dict : MDEV-20159 - Assertion failure innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-get-fk : MDEV-13276 - Server crash innodb.innodb-index-online : MDEV-14809 - Cannot save statistics @@ -402,21 +401,26 @@ innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_snappy : MDEV-13644 - Assertion failure innodb.innodb-page_compression_tables : MDEV-13644 - Assertion failure innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem +innodb.innodb-replace-debug : Modified in 10.4.12 +innodb.innodb-stats-initialize-failure : Modified in 10.4.12 innodb.innodb-table-online : MDEV-13894 - Wrong result -innodb.innodb-virtual-columns-debug : Modified in 10.4.9 +innodb.innodb-timeout : MDEV-20159 - Assertion failure innodb.innodb-wl5522 : MDEV-13644 - Assertion failure innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure +innodb.innodb_bug11754376 : Modified in 10.4.12 innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt +innodb.innodb_bug30113362 : Added in 10.4.12 innodb.innodb_bug30423 : MDEV-7311 - Wrong result innodb.innodb_bug47167 : MDEV-20524 - Table 'user' is marked as crashed and should be repaired innodb.innodb_bug48024 : MDEV-14352 - Assertion failure +innodb.innodb_bug56947 : Modified in 10.4.12 innodb.innodb_bug59641 : MDEV-13830 - Assertion failure innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start +innodb.innodb_corrupt_bit : Modified in 10.4.12 innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full -innodb.innodb_force_recovery : Modified in 10.4.9 innodb.innodb_information_schema : MDEV-8851 - Wrong result innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.4.11 innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.4.11 @@ -425,35 +429,37 @@ innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_prefix_index_restart_server : MDEV-20213 - Server crash innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison innodb.innodb_stats : MDEV-10682 - wrong result -innodb.innodb_stats_persistent : MDEV-17745 - Wrong result; modified in 10.4.9 +innodb.innodb_stats_persistent : MDEV-17745 - Wrong result; MDEV-21567 - Wrong result in execution plan innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed -innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait +innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait; modified in 10.4.12 +innodb.innodb_wl6326 : Added in 10.4.12 +innodb.innodb_wl6326_big : Added in 10.4.12 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.instant_alter : Modified in 10.4.11 +innodb.instant_alter : Modified in 10.4.12 innodb.instant_alter_bugs : Modified in 10.4.11 innodb.instant_alter_debug : Modified in 10.4.11 innodb.instant_alter_extend : MDEV-20963 - Binary files differ -innodb.instant_alter_index_rename : Modified in 10.4.9 innodb.instant_alter_limit : Modified in 10.4.11 +innodb.leaf_page_corrupted_during_recovery : MDEV-21572 - Server crash innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start; MDEV-20648 - Assertion failure innodb.log_file : MDEV-20159 - Assertion failure innodb.log_file_name : MDEV-14193 - Exception innodb.log_file_size : MDEV-15668 - Not found pattern innodb.monitor : MDEV-16179 - Wrong result +innodb.page_id_innochecksum : MDEV-20159 - Assertion failure innodb.purge_secondary : MDEV-15681 - Wrong result innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile +innodb.redo_log_during_checkpoint : Modified in 10.4.12 innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace -innodb.row_size_error_log_warnings_3 : Added in 10.4.11 -innodb.stat_tables : Added in 10.4.9 +innodb.row_size_error_log_warnings_3 : Modified in 10.4.12 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temporary_table : MDEV-13265 - Wrong result -innodb.temporary_table_optimization : Modified in 10.4.9 -innodb.trx_id_future : Modified in 10.1.42 +innodb.truncate_inject : Modified in 10.2.31 innodb.undo_log : Modified in 10.4.11 innodb.undo_truncate : MDEV-17340 - Server hung; MDEV-20840 - Sporadic timeout innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; MDEV-19200 - Shutdown fails @@ -462,13 +468,13 @@ innodb.xa_recovery : MDEV-15279 - mysqld got exception #----------------------------------------------------------------------- -innodb_fts.concurrent_insert : MDEV-21223 - Server crash; modified in 10.4.9 -innodb_fts.crash_recovery : Modified in 10.4.9 +innodb_fts.concurrent_insert : Modified in 10.4.12 innodb_fts.innodb_fts_misc : Modified in 10.4.11 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed innodb_fts.sync : MDEV-14808 - Wrong result +innodb_fts.sync_block : Modified in 10.4.12 innodb_fts.sync_ddl : MDEV-18654 - Assertion failure #----------------------------------------------------------------------- @@ -477,8 +483,11 @@ innodb_gis.alter_spatial_index : MDEV-13745 - Server crash innodb_gis.innodb_gis_rtree : MDEV-20213 - Server crash innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded +innodb_gis.rtree_debug : Modified in 10.4.12 innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check +innodb_gis.rtree_rollback1 : Modified in 10.4.12 +innodb_gis.rtree_rollback2 : Modified in 10.4.12 innodb_gis.rtree_split : MDEV-14208 - Too many arguments innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed @@ -486,7 +495,7 @@ innodb_gis.types : MDEV-15679 - Table is marked as crashed #----------------------------------------------------------------------- innodb_zip.bug53591 : Modified in 10.4.11 -innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed +innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.4.12 innodb_zip.innochecksum : MDEV-14486 - Server failed to shut down innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings innodb_zip.prefix_index_liftedlimit : Modified in 10.4.11 @@ -498,28 +507,26 @@ innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 1 #----------------------------------------------------------------------- -maria.insert_select : MDEV-12757 - Timeout -maria.insert_select-7314 : MDEV-16492 - Timeout -maria.lock : Modified in 10.4.9 -maria.maria : MDEV-14430 - Extra warning -maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start +maria.aria_pack_mdev14183 : Added in 10.4.12 +maria.insert_select : MDEV-12757 - Timeout +maria.insert_select-7314 : MDEV-16492 - Timeout +maria.maria : MDEV-14430 - Extra warning +maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start #----------------------------------------------------------------------- mariabackup.absolute_ibdata_paths : MDEV-16571 - Wrong result mariabackup.apply-log-only : MDEV-20135 - Timeout mariabackup.data_directory : MDEV-15270 - Error on exec -mariabackup.encrypted_page_corruption : Modified in 10.4.9 -mariabackup.extra_lsndir_stream : Added in 10.4.9 mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future; MDEV-18569 - Table doesn't exist mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure; modified in 10.4.11 mariabackup.incremental_encrypted : MDEV-15667 - timeout mariabackup.incremental_rocksdb : MDEV-20954 - Cannot access the file +mariabackup.innodb_redo_log_overwrite : Added in 10.4.12 mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result mariabackup.mdev-14447 : MDEV-15201 - Timeout -mariabackup.mdev-18438 : Added in 10.4.9 -mariabackup.partial : MDEV-19298 - Assertion failure; modified in 10.4.9 +mariabackup.partial : MDEV-19298 - Assertion failure mariabackup.partial_exclude : MDEV-15270 - Error on exec mariabackup.unencrypted_page_compressed : MDEV-18653 - Wrong error mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault @@ -546,8 +553,9 @@ mroonga/wrapper.repair_table_no_index_file : MDEV-14807 - Wrong error message #----------------------------------------------------------------------- multi_source.gtid : MDEV-14202 - Crash -multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - wrong result +multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - wrong result; MDEV-21290 - Wrong result multi_source.load_data : MDEV-21235 - Slave crash +multi_source.mdev-8874 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.mdev-9544 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.multisource : MDEV-10417 - Fails on Mips multi_source.reset_slave : MDEV-10690 - Wrong result @@ -556,6 +564,17 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h #----------------------------------------------------------------------- +optimizer_unfixed_bugs.bug36981 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug40992 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug41996 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug42991 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug43249 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug43360 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug43448 : Modified in 10.4.12 +optimizer_unfixed_bugs.bug43617 : Modified in 10.4.12 + +#----------------------------------------------------------------------- + parts.partition_alter1_1_2_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_1_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_2_innodb : MDEV-18655 - ASAN unknown crash @@ -563,13 +582,11 @@ parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL s parts.partition_auto_increment_archive : MDEV-16491 - Marked as crashed and should be repaired parts.partition_auto_increment_maria : MDEV-14430 - Extra warning parts.partition_basic_innodb : MDEV-20214 - ASAN error -parts.partition_debug : Modified in 10.4.9 -parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist; modified in 10.4.9 -parts.partition_debug_myisam : Modified in 10.4.9 +parts.partition_debug : Modified in 10.4.12 +parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist; modified in 10.4.12 parts.partition_exch_qa_10 : MDEV-11765 - wrong result parts.partition_innodb_status_file : MDEV-12901 - Valgrind parts.partition_special_innodb : MDEV-16942 - Timeout -parts.reorganize_partition_innodb : Added in 10.4.9 #----------------------------------------------------------------------- @@ -577,32 +594,66 @@ percona.* : MDEV-10997 - Not maintained #----------------------------------------------------------------------- -perfschema.connect_attrs : MDEV-17283 - Wrong result -perfschema.dml_file_instances : MDEV-15179 - Wrong result -perfschema.dml_threads : MDEV-17746 - Wrong errno -perfschema.func_file_io : MDEV-5708 - fails for s390x -perfschema.func_mutex : MDEV-5708 - fails for s390x -perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash -perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash -perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash -perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash -perfschema.misc : Modified in 10.4.11 -perfschema.pfs_upgrade_event : MDEV-20957 - Wrong result -perfschema.pfs_upgrade_func : MDEV-20957 - Upgrade file was not properly created -perfschema.pfs_upgrade_proc : MDEV-20533 - Upgrade file was not properly created -perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was not properly created -perfschema.privilege_table_io : MDEV-13184 - Extra lines -perfschema.relaylog : MDEV-18134 - Wrong result -perfschema.rpl_gtid_func : MDEV-16897 - Wrong result -perfschema.socket_instances_func : MDEV-20140 - Wrong result -perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result -perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result -perfschema.stage_mdl_function : MDEV-20157 - Wrong result -perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders -perfschema.stage_mdl_procedure : MDEV-11545 - Missing row -perfschema.stage_mdl_table : MDEV-12638 - Wrong result -perfschema.start_server_low_digest : MDEV-21221 - Wrong result -perfschema.threads_mysql : MDEV-10677 - Wrong result +perfschema.connect_attrs : MDEV-17283 - Wrong result +perfschema.dml_file_instances : MDEV-15179 - Wrong result +perfschema.dml_threads : MDEV-17746 - Wrong errno +perfschema.func_file_io : MDEV-5708 - fails for s390x +perfschema.func_mutex : MDEV-5708 - fails for s390x +perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash; modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_again_deny : Modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_bad_allow : Modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_bad_deny : Modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_good_allow : Modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_good_deny : Modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_noname_allow : Modified in 10.4.12 +perfschema.hostcache_ipv4_addrinfo_noname_deny : Modified in 10.4.12 +perfschema.hostcache_ipv4_auth_plugin : Modified in 10.4.12 +perfschema.hostcache_ipv4_blocked : Modified in 10.4.12 +perfschema.hostcache_ipv4_format : Modified in 10.4.12 +perfschema.hostcache_ipv4_max_con : Modified in 10.4.12 +perfschema.hostcache_ipv4_nameinfo_again_allow : Modified in 10.4.12 +perfschema.hostcache_ipv4_nameinfo_again_deny : Modified in 10.4.12 +perfschema.hostcache_ipv4_nameinfo_noname_allow : Modified in 10.4.12 +perfschema.hostcache_ipv4_nameinfo_noname_deny : Modified in 10.4.12 +perfschema.hostcache_ipv4_passwd : Modified in 10.4.12 +perfschema.hostcache_ipv4_ssl : Modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash; modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_again_deny : Modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash; modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_bad_deny : Modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_good_allow : Modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_good_deny : Modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_noname_allow : Modified in 10.4.12 +perfschema.hostcache_ipv6_addrinfo_noname_deny : Modified in 10.4.12 +perfschema.hostcache_ipv6_auth_plugin : Modified in 10.4.12 +perfschema.hostcache_ipv6_blocked : Modified in 10.4.12 +perfschema.hostcache_ipv6_max_con : Modified in 10.4.12 +perfschema.hostcache_ipv6_nameinfo_again_allow : Modified in 10.4.12 +perfschema.hostcache_ipv6_nameinfo_again_deny : Modified in 10.4.12 +perfschema.hostcache_ipv6_nameinfo_noname_allow : Modified in 10.4.12 +perfschema.hostcache_ipv6_nameinfo_noname_deny : Modified in 10.4.12 +perfschema.hostcache_ipv6_passwd : Modified in 10.4.12 +perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; modified in 10.4.12 +perfschema.hostcache_peer_addr : MDEV-21462 - Test condition timeout; modified in 10.4.12 +perfschema.misc : Modified in 10.4.11 +perfschema.pfs_upgrade_event : MDEV-20957 - Wrong result +perfschema.pfs_upgrade_func : MDEV-20957 - Upgrade file was not properly created +perfschema.pfs_upgrade_proc : MDEV-20533 - Upgrade file was not properly created +perfschema.pfs_upgrade_table : MDEV-20533 - Exec failed +perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was not properly created +perfschema.privilege_table_io : MDEV-13184 - Extra lines +perfschema.relaylog : MDEV-18134 - Wrong result +perfschema.rpl_gtid_func : MDEV-16897 - Wrong result +perfschema.socket_instances_func : MDEV-20140 - Wrong result +perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result +perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result +perfschema.stage_mdl_function : MDEV-20157 - Wrong result +perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders +perfschema.stage_mdl_procedure : MDEV-11545 - Missing row +perfschema.stage_mdl_table : MDEV-12638 - Wrong result +perfschema.start_server_innodb : MDEV-21573 - Wrong result +perfschema.start_server_low_digest : MDEV-21221 - Wrong result +perfschema.threads_mysql : MDEV-10677 - Wrong result #----------------------------------------------------------------------- @@ -611,11 +662,10 @@ perfschema_stress.* : MDEV-10996 - Not maintained #----------------------------------------------------------------------- period.delete : Modified in 10.4.11 -period.versioning : MDEV-20159 - Assertion failure; include file modified in 10.4.9 +period.versioning : MDEV-20159 - Assertion failure #----------------------------------------------------------------------- -plugins.feedback_plugin_load : Modified in 10.4.9 plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.multiauth : MDEV-20163 - Plugin could not be loaded plugins.processlist : MDEV-16574 - Wrong result @@ -635,7 +685,6 @@ rocksdb.drop_index_inplace : MDEV-14162 - Crash on shutdown rocksdb.drop_table : MDEV-14308 - Timeout rocksdb.drop_table3 : MDEV-16949 - Server crash rocksdb.dup_key_update : MDEV-17284 - Wrong result -rocksdb.index_merge_rocksdb2 : Include file modified in 10.4.9 rocksdb.locking_issues : MDEV-14464 - Wrong result rocksdb.mariadb_ignore_dirs : MDEV-16639 - Server crash rocksdb.mariadb_port_fixes : MDEV-16387 - Wrong plan @@ -664,47 +713,55 @@ roles.create_and_grant_role : MDEV-11772 - wrong result #----------------------------------------------------------------------- -rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free +rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free; modified in 10.4.12 rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server rpl.create_or_replace_mix : MDEV-20523 - Wrong result rpl.create_or_replace_statement : MDEV-20523 - Wrong result rpl.create_select : MDEV-14121 - Assertion failure +rpl.kill_race_condition : Modified in 10.4.12 rpl.last_insert_id : MDEV-10625 - warnings in error log -rpl.mdev_17588 : Modified in 10.1.42 -rpl.rpl_000011 : Modified in 10.4.9 rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_binlog_errors : MDEV-12742 - Crash rpl.rpl_binlog_grant : MDEV-21274 - Lost connection at handshake rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master +rpl.rpl_binlog_rollback_cleanup : Added in 10.4.12 +rpl.rpl_bug33931 : Modified in 10.4.12 +rpl.rpl_bug41902 : Modified in 10.4.12 rpl.rpl_cant_read_event_incident : MDEV-20960 - Abort on shutdown +rpl.rpl_checksum : Include file modified in 10.2.31 rpl.rpl_circular_for_4_hosts : MDEV-20536 - Server crash rpl.rpl_colSize : MDEV-16112 - Server crash rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code -rpl.rpl_create_or_replace_fail : Added in 10.1.42 rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac rpl.rpl_ddl : MDEV-10417 - Fails on Mips rpl.rpl_domain_id_filter : MDEV-20213 - Server crash -rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash -rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed +rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash; modified in 10.4.12 +rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed; modified in 10.4.12 rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_dual_pos_advance : MDEV-20213 - Server crash rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning +rpl.rpl_flushlog_loop : MDEV-21570 - Server crash rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output +rpl.rpl_get_master_version_and_clock : Modified in 10.4.12 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings -rpl.rpl_gtid_reconnect : MDEV-14497 - Crash +rpl.rpl_gtid_reconnect : MDEV-14497 - Crash; modified in 10.4.12 rpl.rpl_gtid_startpos : MDEV-20141 - mysqltest failed but provided no output rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings rpl.rpl_gtid_until : MDEV-10625 - warnings in error log +rpl.rpl_heartbeat : MDEV-20213 - Server crash +rpl.rpl_heartbeat_debug : Modified in 10.4.12 rpl.rpl_ignore_grant : MDEV-20159 - Assertion failure rpl.rpl_ignore_table_update : MDEV-20159 - Assertion failure +rpl.rpl_incident : Include file modified in 10.2.31 +rpl.rpl_init_slave_errors : Include file modified in 10.2.31 rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x @@ -712,44 +769,40 @@ rpl.rpl_insert_id : MDEV-15197 - Wrong result rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips -rpl.rpl_ip_mix : Modified in 10.4.9 -rpl.rpl_ip_mix2 : Modified in 10.4.9 rpl.rpl_ipv4_as_ipv6 : MDEV-20147 - Incorrect checksum for freed object -rpl.rpl_known_bugs_detection : Modified in 10.1.42 rpl.rpl_lcase_tblnames_rewrite_db : MDEV-20213 - Server crash -rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog +rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog; modified in 10.4.12 rpl.rpl_mdev-11092 : Modified in 10.4.11 rpl.rpl_mdev12179 : MDEV-19043 - Table marked as crashed rpl.rpl_mdev6020 : MDEV-15272 - Server crash -rpl.rpl_mdev_17614 : Added in 10.1.42 +rpl.rpl_mixed_mixing_engines : MDEV-21266 - Timeout rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait rpl.rpl_parallel : MDEV-10653 - Timeouts rpl.rpl_parallel2 : MDEV-17390 - Operation cannot be performed rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash -rpl.rpl_parallel_ignored_errors : Added in 10.4.9 rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure rpl.rpl_parallel_multilevel : MDEV-20160 - Server crash rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout -rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master +rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master; modified in 10.4.12 rpl.rpl_parallel_optimistic_nobinlog : MDEV-15278 - Failed to sync with master rpl.rpl_parallel_retry : MDEV-11119 - Crash; MDEV-17109 - Timeout rpl.rpl_parallel_temptable : MDEV-10356 - Crash; MDEV-19076 - Wrong result rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings rpl.rpl_read_only : MDEV-20159 - Assertion failure -rpl.rpl_read_only2 : Added in 10.4.9 rpl.rpl_relayrotate : MDEV-20213 - Server crash -rpl.rpl_rotate_logs : Modified in 10.4.9 rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_big_table_id : Modified in 10.4.12 +rpl.rpl_row_corruption : MDEV-21569 - mutex: LOCK_global_system_variables unlocking rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result rpl.rpl_row_end_of_statement_loss : MDEV-21237 - Server crash -rpl.rpl_row_find_row_debug : Modified in 10.4.9 +rpl.rpl_row_find_row_debug : Modified in 10.4.12 rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_index_choice : MDEV-15196 - Slave crash +rpl.rpl_row_index_choice : MDEV-15196 - Slave crash; modified in 10.4.12 rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum rpl.rpl_semi_sync : MDEV-11220 - Wrong result @@ -757,8 +810,7 @@ rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings rpl.rpl_semi_sync_gtid_reconnect : Added in 10.4.11 -rpl.rpl_semi_sync_skip_repl : MDEV-21223 - Server crash -rpl.rpl_semi_sync_slave_reply_fail : Added in 10.4.9 +rpl.rpl_semi_sync_skip_repl : Modified in 10.4.12 rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_no_slave : MDEV-20159 - Assertion failure rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition @@ -766,28 +818,31 @@ rpl.rpl_semisync_ali_issues : MDEV-16272 - Wrong result rpl.rpl_set_null_myisam : MDEV-20213 - Server crash rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning rpl.rpl_show_slave_hosts : MDEV-10681 - Crash +rpl.rpl_show_slave_running : Modified in 10.4.12 rpl.rpl_shutdown_wait_semisync_slaves : MDEV-20213 - Server crash -rpl.rpl_skip_error : Modified in 10.4.9 rpl.rpl_skip_replication : MDEV-13258 - Extra warning rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock rpl.rpl_slave_load_in : MDEV-20159 - Assertion failure +rpl.rpl_slave_load_remove_tmpfile : Modified in 10.4.12 rpl.rpl_slave_load_tmpdir_not_exist : MDEV-14203 - Extra warning +rpl.rpl_slave_shutdown_mdev20821 : Added in 10.4.12 rpl.rpl_slow_query_log : MDEV-13250 - Test abort rpl.rpl_sp_effects : MDEV-13249 - Crash rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout +rpl.rpl_stm_lcase_tblnames : Modified in 10.4.12 rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion -rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash +rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash; include file modified in 10.4.12 +rpl.rpl_stop_slave : Modified in 10.4.12 rpl.rpl_sync : MDEV-13830 - Assertion failure -rpl.rpl_sync_with_innodb_thd_conc : Added in 10.1.42 rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output rpl.rpl_trigger : MDEV-18055 - Wrong result rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error -rpl.rpl_unsafe_statements : Modified in 10.1.42 rpl.rpl_user_variables : MDEV-20522 - Wrong result rpl.rpl_variables : MDEV-20150 - Server crash +rpl.rpl_view_debug : Modified in 10.4.12 rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result rpl.show_status_stop_slave_race-7126 : MDEV-17438 - Timeout @@ -804,12 +859,8 @@ rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained #----------------------------------------------------------------------- -sequence.group_by : Modified in 10.4.9 - -#----------------------------------------------------------------------- - -sphinx.* : MDEV-10986 - Tests have not been maintained; suite.pm modified in 10.4.9 -sphinx.sphinx : MDEV-10986 - Sporadic failures; modified in 10.4.9 +sphinx.* : MDEV-10986 - Tests have not been maintained +sphinx.sphinx : MDEV-10986 - Sporadic failures sphinx.union-5539 : MDEV-10986 - Sporadic failures #----------------------------------------------------------------------- @@ -834,7 +885,6 @@ spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x spider/bugfix.return_found_rows_insert : Added in 10.4.11 spider/bugfix.return_found_rows_update : Added in 10.4.11 -spider/bugfix.select_by_null : Added in 10.4.9 #----------------------------------------------------------------------- @@ -873,7 +923,6 @@ spider/regression/e112122.load_data_part_replace_ddi1 : Added in 10.4.11 #----------------------------------------------------------------------- sql_sequence.concurrent_create : MDEV-16635 - Server crash -sql_sequence.other : Modified in 10.4.9 sql_sequence.rebuild : Added in 10.4.11 sql_sequence.view : Modified in 10.4.11 @@ -888,18 +937,17 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #----------------------------------------------------------------------- sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x -sys_vars.delayed_insert_limit_func : Modified in 10.4.9 +sys_vars.debug_dbug_func : Modified in 10.4.12 sys_vars.host_cache_size_auto : MDEV-20112 - Wrong result sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error -sys_vars.innodb_change_buffering_debug_basic : Modified in 10.4.9 +sys_vars.innodb_buffer_pool_size_basic : Modified in 10.4.12 +sys_vars.innodb_checksum_algorithm_basic : MDEV-21568 - Errno: 2000 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion sys_vars.slow_query_log_func : MDEV-14273 - Wrong result -sys_vars.sysvars_innodb : Modified in 10.2.28 sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result sys_vars.wait_timeout_func : MDEV-12896 - Wrong result -sys_vars.wsrep_provider_basic : MDEV-19457 - Assertion failure #----------------------------------------------------------------------- @@ -945,7 +993,6 @@ tokudb_bugs.xa : MDEV-11804 - Lock wait timeout #----------------------------------------------------------------------- tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection -tokudb_parts.partition_debug_tokudb : Include file modified in 10.4.9 #----------------------------------------------------------------------- @@ -969,44 +1016,34 @@ unit.mf_iocache : MDEV-20952 - ASAN stack-buffer-overflow #----------------------------------------------------------------------- -vcol.not_supported : MDEV-10639 - Testcase timeout -vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout; modified in 10.4.9 -vcol.vcol_misc : MDEV-16651 - Wrong error message -vcol.vcol_sql_mode_datetime : Added in 10.4.9 -vcol.vcol_sql_mode_time : Added in 10.4.9 -vcol.vcol_sql_mode_timestamp : Added in 10.4.9 +vcol.not_supported : MDEV-10639 - Testcase timeout +vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout +vcol.vcol_misc : MDEV-16651 - Wrong error message #----------------------------------------------------------------------- -versioning.alter : Modified in 10.4.9 -versioning.auto_increment : Include file modified in 10.4.9 -versioning.commit_id : Include file modified in 10.4.9 -versioning.create : Modified in 10.4.9 -versioning.delete : Modified in 10.4.11 -versioning.delete_history : Modified in 10.4.9 -versioning.engines : Combinations added in 10.4.9 -versioning.foreign : Modified in 10.4.9 -versioning.insert : Include file modified in 10.4.9 -versioning.key_type : Combinations added in 10.4.9 -versioning.online : Modified in 10.4.9 -versioning.partition : Modified in 10.4.11 -versioning.partition_innodb : Modified in 10.4.9 -versioning.replace : Modified in 10.4.9 -versioning.select : Modified in 10.4.11 -versioning.select2 : Include file modified in 10.4.9 -versioning.trx_id : Modified in 10.4.9 -versioning.update : MDEV-20955 - Wrong result code; modified in 10.4.11 -versioning.update-big : Modified in 10.4.9 -versioning.view : Modified in 10.4.11 +versioning.delete : Modified in 10.4.11 +versioning.partition : Modified in 10.4.11 +versioning.select : Modified in 10.4.11 +versioning.trx_id : Modified in 10.4.12 +versioning.update : MDEV-20955 - Wrong result code; modified in 10.4.11 +versioning.view : Modified in 10.4.11 #----------------------------------------------------------------------- +wsrep.* : Config file modified in 10.4.12 +wsrep.alter_table_innodb : Configuration deleted in 10.4.12 +wsrep.binlog_format : Configuration added in 10.4.12 wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node -wsrep.mdev_6832 : MDEV-14195 - Check testcase failed; modified in 10.4.9 -wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.1.42 -wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use; configuration added in 10.4.11 -wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock; modified in 10.4.9 +wsrep.mdev_10186 : Configuration modified in 10.4.12 +wsrep.mdev_6832 : MDEV-14195 - Check testcase failed +wsrep.mysql_tzinfo_to_sql_symlink : Modified in 10.4.12 +wsrep.mysql_tzinfo_to_sql_symlink_skip : Modified in 10.4.12 +wsrep.plugin : Modified in 10.4.12 +wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use; re-enabled in 10.4.12 +wsrep.trans : Configuration added in 10.4.12 +wsrep.variables : MDEV-17585 - Deadlock; modified in 10.4.12 #----------------------------------------------------------------------- -wsrep_info.plugin : MDEV-13569 - No nodes coming from prim view +wsrep_info.* : Config file modified in 10.3.22 From 1ef8d0b45da2987c0f7fac180fb630ce75087d2e Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Mon, 27 Jan 2020 15:12:05 -0500 Subject: [PATCH 49/49] bump the VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bdeaa025260..20637eab53b 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=4 -MYSQL_VERSION_PATCH=12 +MYSQL_VERSION_PATCH=13 SERVER_MATURITY=stable