diff options
Diffstat (limited to 'storage/connect')
61 files changed, 213 insertions, 170 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index d7651680e1c..088ecfbf3b2 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -152,10 +152,6 @@ ADD_FEATURE_INFO(CONNECT_LIBXML2 CONNECT_WITH_LIBXML2 IF(WIN32) - # /MP option of the Microsoft compiler does not work well with COM #import - string(REPLACE "/MP" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - string(REPLACE "/MP" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - OPTION(CONNECT_WITH_MSXML "Compile CONNECT storage engine with MSXML support" ON) IF(CONNECT_WITH_MSXML) add_definitions(-DMSX6 -DDOMDOC_SUPPORT) @@ -414,6 +410,19 @@ IF(NOT TARGET connect) RETURN() ENDIF() +IF(MSVC AND (CMAKE_CXX_FLAGS MATCHES "/MP")) + # domdoc.cpp uses compiler directive #import which is not compatible + # with the /MP option, resulting in compiler error C2813. + # Remove /MP for this file. + SET(src_list ${CONNECT_SOURCES}) + LIST(FIND src_list domdoc.cpp idx) + IF(idx GREATER -1) + STRING(REPLACE "/MP" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + LIST(REMOVE_AT src_list ${idx}) + SET_SOURCE_FILES_PROPERTIES(${src_list} PROPERTIES COMPILE_FLAGS "/MP") + ENDIF() +ENDIF() + IF(MSVC) IF (libmongoc-1.0_FOUND) SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS diff --git a/storage/connect/bson.cpp b/storage/connect/bson.cpp index 1a1c5cf5d8d..1eef3c063d6 100644 --- a/storage/connect/bson.cpp +++ b/storage/connect/bson.cpp @@ -83,7 +83,7 @@ BDOC::BDOC(PGLOBAL G) : BJSON(G, NULL) PBVAL BDOC::ParseJson(PGLOBAL g, char* js, size_t lng) { size_t i; - bool b = false, ptyp = (bool *)pty; + bool b = false; PBVAL bvp = NULL; s = js; @@ -145,7 +145,7 @@ PBVAL BDOC::ParseJson(PGLOBAL g, char* js, size_t lng) b = false; break; } // endif b - + /* fall through */ default: if (bvp->Type != TYPE_UNKNOWN) { bvp->To_Val = ParseAsArray(i); @@ -683,7 +683,7 @@ bool BDOC::SerializeArray(OFFSET arp, bool b) } else if (jp->WriteChr('[')) return true; - for (vp; vp; vp = MVP(vp->Next)) { + for (; vp; vp = MVP(vp->Next)) { if (first) first = false; else if ((!b || jp->Prty()) && jp->WriteChr(',')) @@ -718,7 +718,7 @@ bool BDOC::SerializeObject(OFFSET obp) if (jp->WriteChr('{')) return true; - for (prp; prp; prp = GetNext(prp)) { + for (; prp; prp = GetNext(prp)) { if (first) first = false; else if (jp->WriteChr(',')) diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp index 7d930d1f410..531894a68cc 100644 --- a/storage/connect/bsonudf.cpp +++ b/storage/connect/bsonudf.cpp @@ -88,6 +88,7 @@ static PBSON BbinAlloc(PGLOBAL g, ulong len, PBVAL jsp) /*********************************************************************************/ /* SubAlloc a new BJNX class with protection against memory exhaustion. */ /*********************************************************************************/ +#ifdef NOT_USED static PBJNX BjnxNew(PGLOBAL g, PBVAL vlp, int type, int len) { PBJNX bjnx; @@ -104,7 +105,7 @@ static PBJNX BjnxNew(PGLOBAL g, PBVAL vlp, int type, int len) return bjnx; } /* end of BjnxNew */ - +#endif /* ----------------------------------- BSNX ------------------------------------ */ /*********************************************************************************/ @@ -498,7 +499,8 @@ void BJNX::SetJsonValue(PGLOBAL g, PVAL vp, PBVAL vlp) break; case TYPE_NULL: vp->SetNull(true); - default: + /* fall through */ + default: vp->Reset(); } // endswitch Type @@ -2901,7 +2903,7 @@ my_bool bson_array_grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return true; PGLOBAL g = (PGLOBAL)initid->ptr; - PBJNX bxp = new(g) BJNX(g); + (void) new(g) BJNX(g); JsonMemSave(g); return false; @@ -2974,7 +2976,7 @@ my_bool bson_object_grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return true; PGLOBAL g = (PGLOBAL)initid->ptr; - PBJNX bxp = new(g) BJNX(g); + (void) new(g) BJNX(g); JsonMemSave(g); return false; @@ -4689,7 +4691,7 @@ char *bfile_convert(UDF_INIT* initid, UDF_ARGS* args, char* result, str = (char*)g->Xchk; if (!str) { - PUSH_WARNING(*g->Message ? g->Message : "Unexpected error"); + PUSH_WARNING(g->Message[0] != '\0' ? g->Message : "Unexpected error"); *is_null = 1; *error = 1; *res_length = 0; @@ -4812,7 +4814,7 @@ char *bfile_bjson(UDF_INIT *initid, UDF_ARGS *args, char *result, str = (char*)g->Xchk; if (!str) { - if (*g->Message) + if (g->Message[0] != '\0') str = strcpy(result, g->Message); else str = strcpy(result, "Unexpected error"); diff --git a/storage/connect/colblk.cpp b/storage/connect/colblk.cpp index 24f2c98597f..79fc2a5e076 100644 --- a/storage/connect/colblk.cpp +++ b/storage/connect/colblk.cpp @@ -81,13 +81,12 @@ COLBLK::COLBLK(PCOL col1, PTDB tdbp) if (tdbp) { // Attach the new column to the table block - if (!tdbp->GetColumns()) + if (!tdbp->GetColumns()) { tdbp->SetColumns(this); - else { + } else { for (colp = tdbp->GetColumns(); colp->Next; colp = colp->Next) ; - colp->Next = this; - } // endelse + } // endelse } } // end of COLBLK copy constructor diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp index b6c2bd3bdaa..94ff480f83e 100644 --- a/storage/connect/filamdbf.cpp +++ b/storage/connect/filamdbf.cpp @@ -337,7 +337,7 @@ PQRYRES DBFColumns(PGLOBAL g, PCSZ dp, PCSZ fn, PTOS topt, bool info) hp->Encryptflag, hp->Mdxflag, hp->Language); htrc("%hd records, last changed %02d/%02d/%d\n", hp->Records(), hp->Filedate[1], hp->Filedate[2], - hp->Filedate[0] + (hp->Filedate[0] <= 30) ? 2000 : 1900); + hp->Filedate[0] + ((hp->Filedate[0] <= 30) ? 2000 : 1900)); htrc("Field Type Offset Len Dec Set Mdx\n"); } // endif trace @@ -949,7 +949,7 @@ int DBFFAM::DeleteRecords(PGLOBAL g, int irc) } *Tdbp->GetLine() = '*'; Modif++; // Modified line in Delete mode - } // endif irc + } // endif irc return RC_OK; } // end of DeleteRecords diff --git a/storage/connect/filamfix.cpp b/storage/connect/filamfix.cpp index 1964e752eb6..117a4e8dda6 100644 --- a/storage/connect/filamfix.cpp +++ b/storage/connect/filamfix.cpp @@ -135,8 +135,6 @@ bool FIXFAM::AllocateBuffer(PGLOBAL g) // The buffer must be prepared depending on column types int n = 0; bool b = false; - PDOSDEF defp __attribute__((unused))= (PDOSDEF)Tdbp->GetDef(); -// PCOLDEF cdp; PBINCOL colp; // Prepare the first line of the buffer diff --git a/storage/connect/filamgz.cpp b/storage/connect/filamgz.cpp index 34575c22e71..d6c48cb25a9 100644 --- a/storage/connect/filamgz.cpp +++ b/storage/connect/filamgz.cpp @@ -647,7 +647,7 @@ int ZBKFAM::WriteBuffer(PGLOBAL g) int ZBKFAM::DeleteRecords(PGLOBAL g, int irc) { if (irc == RC_EF) { - LPCSTR name __attribute__((unused)) = Tdbp->GetName(); + (void) Tdbp->GetName(); // XXX Should be removed ? PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); defp->SetBlock(0); @@ -673,7 +673,7 @@ void ZBKFAM::CloseTableFile(PGLOBAL g, bool) int rc = RC_OK; if (Tdbp->GetMode() == MODE_INSERT) { - LPCSTR name __attribute__((unused))= Tdbp->GetName(); + (void) Tdbp->GetName(); // XXX Should be removed? PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); if (CurNum && !Closing) { @@ -1356,7 +1356,7 @@ void ZLBFAM::CloseTableFile(PGLOBAL g, bool) int rc = RC_OK; if (Tdbp->GetMode() == MODE_INSERT) { - LPCSTR name __attribute__((unused))= Tdbp->GetName(); + (void) Tdbp->GetName(); // XXX Should be removed? PDOSDEF defp = (PDOSDEF)Tdbp->GetDef(); // Closing is True if last Write was in error diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp index df889e9ab72..76e9336dedf 100644 --- a/storage/connect/filamvct.cpp +++ b/storage/connect/filamvct.cpp @@ -1169,7 +1169,6 @@ bool VCTFAM::ResetTableSize(PGLOBAL g, int block, int last) if (!Header) { // Update catalog values for Block and Last PVCTDEF defp = (PVCTDEF)Tdbp->GetDef(); - LPCSTR name __attribute__((unused))= Tdbp->GetName(); defp->SetBlock(Block); defp->SetLast(Last); diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp index 814503ae6f7..f0ee947bc23 100644 --- a/storage/connect/filamzip.cpp +++ b/storage/connect/filamzip.cpp @@ -1207,7 +1207,6 @@ int UZDFAM::Cardinality(PGLOBAL g) return 1; int card = -1; - GetFileLength(g); card = Records; diff --git a/storage/connect/filter.cpp b/storage/connect/filter.cpp index a3f75304a47..da418d38e31 100644 --- a/storage/connect/filter.cpp +++ b/storage/connect/filter.cpp @@ -856,7 +856,7 @@ PFIL FILTER::LinkFilter(PGLOBAL g, PFIL fp2) /***********************************************************************/ /* Checks whether filter contains reference to a previous table that */ -/* is not logically joined to the currently openned table, or whether */ +/* is not logically joined to the currently opened table, or whether */ /* it is a Sub-Select filter. In any case, local is set to FALSE. */ /* Note: This function is now applied to de-linearized filters. */ /***********************************************************************/ @@ -1220,7 +1220,8 @@ bool FILTER::Eval(PGLOBAL g) int i; // n = 0; //PSUBQ subp = NULL; PARRAY ap = NULL; - PDBUSER dup __attribute__((unused)) = PlgGetUser(g); + + (void) PlgGetUser(g); if (Opc <= OP_XX) { diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 4199270fc49..1064b14113f 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -170,12 +170,12 @@ #define JSONMAX 50 // JSON Default max grp size extern "C" { - char version[]= "Version 1.07.0003 June 06, 2021"; + char version[]= "Version 1.07.0002 March 22, 2021"; #if defined(_WIN32) - char compver[]= "Version 1.07.0003 " __DATE__ " " __TIME__; - char slash= '\\'; + char compver[]= "Version 1.07.0002 " __DATE__ " " __TIME__; + static char slash= '\\'; #else // !_WIN32 - char slash= '/'; + static char slash= '/'; #endif // !_WIN32 } // extern "C" @@ -824,7 +824,6 @@ static int connect_init_func(void *p) init_connect_psi_keys(); connect_hton= (handlerton *)p; - connect_hton->state= SHOW_OPTION_YES; connect_hton->create= connect_create_handler; connect_hton->flags= HTON_TEMPORARY_NOT_SUPPORTED; connect_hton->table_options= connect_table_option_list; @@ -1178,7 +1177,8 @@ ulonglong ha_connect::table_flags() const // HA_NULL_IN_KEY | not implemented yet // HA_FAST_KEY_READ | causes error when sorting (???) HA_NO_TRANSACTIONS | HA_DUPLICATE_KEY_NOT_IN_ORDER | - HA_NO_BLOBS | HA_MUST_USE_TABLE_CONDITION_PUSHDOWN; + HA_NO_BLOBS | HA_MUST_USE_TABLE_CONDITION_PUSHDOWN | + HA_REUSES_FILE_NAMES; ha_connect *hp= (ha_connect*)this; PTOS pos= hp->GetTableOptionStruct(); @@ -2274,7 +2274,7 @@ int ha_connect::MakeRecord(char *buf) case TYPE_DECIM: p= value->GetCharString(val); charset= tdbp->data_charset(); - rc= fp->store(p, strlen(p), charset, CHECK_FIELD_WARN); + rc= fp->store_text(p, strlen(p), charset, CHECK_FIELD_WARN); break; case TYPE_BIN: p= value->GetCharValue(); @@ -5264,6 +5264,14 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) thd->push_internal_handler(&error_handler); bool got_error= open_table_def(thd, share); thd->pop_internal_handler(); + if (!got_error && share->db_type() != connect_hton) + { + /* The .frm file is not for the connect engine. Something is wrong! */ + got_error= 1; + rc= HA_ERR_INTERNAL_ERROR; + my_error(HA_ERR_INTERNAL_ERROR, MYF(0), + "TABLE_SHARE is not for the CONNECT engine"); + } if (!got_error) { // Now we can work if ((pos= share->option_struct)) { @@ -5276,7 +5284,8 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) } // endif pos } // endif open_table_def - + else + rc= ENOENT; free_table_share(share); } else // Temporary file ok= true; @@ -5316,8 +5325,11 @@ int ha_connect::rename_table(const char *from, const char *to) @see check_quick_keys() in opt_range.cc */ -ha_rows ha_connect::records_in_range(uint inx, key_range *min_key, - key_range *max_key) +ha_rows ha_connect::records_in_range(uint inx, + const key_range *min_key, + const key_range *max_key, + page_range *pages) + { ha_rows rows; DBUG_ENTER("ha_connect::records_in_range"); @@ -5388,7 +5400,7 @@ static char *encode(PGLOBAL g, const char *cnm) char *buf= (char*)PlugSubAlloc(g, NULL, strlen(cnm) * 3); uint dummy_errors; uint32 len= copy_and_convert(buf, strlen(cnm) * 3, - &my_charset_utf8_general_ci, + &my_charset_utf8mb3_general_ci, cnm, strlen(cnm), &my_charset_latin1, &dummy_errors); @@ -6512,7 +6524,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, DBUG_RETURN(HA_ERR_INTERNAL_ERROR); } // endif charset - if (type == TAB_XML && data_charset != &my_charset_utf8_general_ci) { + if (type == TAB_XML && data_charset != &my_charset_utf8mb3_general_ci) { my_printf_error(ER_UNKNOWN_ERROR, "DATA_CHARSET='%s' is not supported for TABLE_TYPE=XML", MYF(0), options->data_charset); @@ -7194,7 +7206,8 @@ ha_connect::check_if_supported_inplace_alter(TABLE *altered_table, ALTER_ADD_UNIQUE_INDEX | ALTER_DROP_UNIQUE_INDEX | ALTER_ADD_PK_INDEX | - ALTER_DROP_PK_INDEX; + ALTER_DROP_PK_INDEX | + ALTER_INDEX_ORDER; alter_table_operations inplace_offline_operations= ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE | diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index a3b120fcd0d..090f8343e1e 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -146,7 +146,7 @@ typedef class ha_connect *PHC; /** @brief Class definition for the storage engine */ -class ha_connect: public handler +class ha_connect final : public handler { THR_LOCK_DATA lock; ///< MySQL lock CONNECT_SHARE *share; ///< Shared lock info @@ -463,8 +463,8 @@ int index_prev(uchar *buf); int start_stmt(THD *thd, thr_lock_type lock_type); int external_lock(THD *thd, int lock_type); ///< required int delete_all_rows(void); - ha_rows records_in_range(uint inx, key_range *min_key, - key_range *max_key); + ha_rows records_in_range(uint inx, const key_range *start_key, + const key_range *end_key, page_range *pages); /** These methods can be overridden, but their default implementation provide useful functionality. diff --git a/storage/connect/inihandl.cpp b/storage/connect/inihandl.cpp index de04fa91883..cd06f7fadd7 100644 --- a/storage/connect/inihandl.cpp +++ b/storage/connect/inihandl.cpp @@ -112,8 +112,6 @@ static PROFILE *MRUProfile[N_CACHED_PROFILES] = {NULL}; //static CRITICAL_SECTION PROFILE_CritSect = CRITICAL_SECTION_INIT("PROFILE_CritSect"); -static const char hex[17] = "0123456789ABCDEF"; - BOOL WritePrivateProfileString(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename); @@ -1340,7 +1338,7 @@ BOOL WritePrivateProfileSection(LPCSTR section, * Note that when the buffer is big enough then the return value may be any * value between 1 and len-1 (or len in Win95), including len-2. */ -#ifdef NOT_USED +#ifdef TEST_MODULE static DWORD GetPrivateProfileSectionNames(LPSTR buffer, DWORD size, LPCSTR filename) { @@ -1357,12 +1355,11 @@ GetPrivateProfileSectionNames(LPSTR buffer, DWORD size, LPCSTR filename) LeaveCriticalSection(&PROFILE_CritSect); return ret; } // end of GetPrivateProfileSectionNames -#endif + /************************************************************************ * Program to test the above ************************************************************************/ -#ifdef TEST_MODULE int main(int argc, char**argv) { char buff[128]; char *p, *inifile = "D:\\Plug\\Data\\contact.ini"; diff --git a/storage/connect/ioapi.h b/storage/connect/ioapi.h index 743aabc910b..44430e56dd4 100644 --- a/storage/connect/ioapi.h +++ b/storage/connect/ioapi.h @@ -83,7 +83,7 @@ #include "mz64conf.h" #endif -/* a type choosen by DEFINE */ +/* a type chosen by DEFINE */ #ifdef HAVE_64BIT_INT_CUSTOM typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; #else diff --git a/storage/connect/javaconn.cpp b/storage/connect/javaconn.cpp index 0dc467aa7ee..bf104402628 100644 --- a/storage/connect/javaconn.cpp +++ b/storage/connect/javaconn.cpp @@ -349,7 +349,7 @@ bool JAVAConn::GetJVM(PGLOBAL g) /***********************************************************************/ bool JAVAConn::Open(PGLOBAL g) { - bool brc = true, err = false; + bool brc = true; jboolean jt = (trace(1)); // Link or check whether jvm library was linked diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp index 7af2b7e3a44..f79b2ffac03 100644 --- a/storage/connect/jdbconn.cpp +++ b/storage/connect/jdbconn.cpp @@ -769,7 +769,6 @@ bool JDBConn::Connect(PJPARM sop) int irc = RC_FX; bool err = false; jint rc; - jboolean jt = (trace(1)); PGLOBAL& g = m_G; /*******************************************************************/ @@ -939,7 +938,7 @@ int JDBConn::Rewind(PCSZ sql) if (gmID(m_G, fetchid, "Fetch", "(I)Z")) return -1; - jboolean b = env->CallBooleanMethod(job, fetchid, 0); + (void) env->CallBooleanMethod(job, fetchid, 0); rbuf = m_Rows; } else if (ExecuteCommand(sql) != RC_FX) @@ -1191,7 +1190,7 @@ int JDBConn::ExecuteUpdate(PCSZ sql) /***********************************************************************/ int JDBConn::GetResultSize(PCSZ sql, PCOL colp) { - int rc, n = 0; + int rc; if ((rc = ExecuteQuery(sql)) != RC_OK) return -1; @@ -1498,7 +1497,6 @@ bool JDBConn::SetParam(JDBCCOL *colp) PCSZ fnc = "Unknown"; uint n; short len, tp; - int crow = 0; PQRYRES qrp = cap->Qrp; PCOLRES crp; jboolean rc = false; diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index 2320c1c5b69..f27f5a9d55b 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -1051,7 +1051,7 @@ int JOBJECT::GetSize(bool b) { for (PJPR jpp = First; jpp; jpp = jpp->Next) // If b return only non null pairs - if (!b || jpp->Val && !jpp->Val->IsNull()) + if (!b || (jpp->Val && !jpp->Val->IsNull())) n++; return n; @@ -1581,10 +1581,12 @@ PVAL JVALUE::GetValue(PGLOBAL g) PVAL valp = NULL; if (DataType != TYPE_JSON) + { if (DataType == TYPE_STRG) valp = AllocateValue(g, Strp, DataType, Nd); else valp = AllocateValue(g, &LLn, DataType, Nd); + } return valp; } // end of GetValue @@ -1755,6 +1757,7 @@ void JVALUE::SetValue(PGLOBAL g, PVAL valp) case TYPE_TINY: B = valp->GetTinyValue() != 0; DataType = TYPE_BOOL; + break; case TYPE_INT: N = valp->GetIntValue(); DataType = TYPE_INTG; diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 4d4606cce44..1ae722a2fc5 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -5313,7 +5313,7 @@ char *jbin_object_delete(UDF_INIT *initid, UDF_ARGS *args, char *result, PCSZ key; PJOB jobp; PJVAL jvp = MakeValue(g, args, 0, &top); - PJSON jsp __attribute__((unused)) = jvp->GetJson(); + (void) jvp->GetJson(); // XXX Should be removed? if (CheckPath(g, args, top, jvp, 2)) PUSH_WARNING(g->Message); @@ -5954,7 +5954,7 @@ char *jfile_convert(UDF_INIT* initid, UDF_ARGS* args, char* result, str = (char*)g->Xchk; if (!str) { - PUSH_WARNING(*g->Message ? g->Message : "Unexpected error"); + PUSH_WARNING(g->Message[0] != '\0' ? g->Message : "Unexpected error"); *is_null = 1; *error = 1; *res_length = 0; @@ -6082,7 +6082,7 @@ char *jfile_bjson(UDF_INIT *initid, UDF_ARGS *args, char *result, str = (char*)g->Xchk; if (!str) { - if (*g->Message) + if (g->Message[0] != '\0') str = strcpy(result, g->Message); else str = strcpy(result, "Unexpected error"); diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp index d9305a59a3c..60e24841a94 100644 --- a/storage/connect/libdoc.cpp +++ b/storage/connect/libdoc.cpp @@ -765,8 +765,8 @@ int LIBXMLDOC::Decode(xmlChar *cnt, char *buf, int n) { const char *txt = (const char *)cnt; uint dummy_errors; - uint32 len= copy_and_convert(buf, n, &my_charset_utf8_general_ci, txt, - strlen(txt), &my_charset_utf8_general_ci, + uint32 len= copy_and_convert(buf, n, &my_charset_utf8mb3_general_ci, txt, + strlen(txt), &my_charset_utf8mb3_general_ci, &dummy_errors); buf[len]= '\0'; return 0; @@ -777,8 +777,8 @@ int LIBXMLDOC::Decode(xmlChar *cnt, char *buf, int n) /******************************************************************/ xmlChar *LIBXMLDOC::Encode(PGLOBAL g, char *txt) { - const CHARSET_INFO *ics= &my_charset_utf8_general_ci; - const CHARSET_INFO *ocs= &my_charset_utf8_general_ci; + const CHARSET_INFO *ics= &my_charset_utf8mb3_general_ci; + const CHARSET_INFO *ocs= &my_charset_utf8mb3_general_ci; size_t i = strlen(txt); size_t o = i * ocs->mbmaxlen / ics->mbmaxlen + 1; char *buf; diff --git a/storage/connect/maputil.cpp b/storage/connect/maputil.cpp index 043a37f13d0..903798bccdd 100644 --- a/storage/connect/maputil.cpp +++ b/storage/connect/maputil.cpp @@ -190,7 +190,7 @@ bool CloseMemMap(void *memory, size_t dwSize) { if (memory) { // All this must be redesigned - int rc __attribute__((unused))= msync((char*)memory, dwSize, MS_SYNC); + msync((char*)memory, dwSize, MS_SYNC); return (munmap((char*)memory, dwSize) < 0) ? true : false; } else return false; diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index e0e69c61183..579ca07616e 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -88,8 +88,8 @@ static MYSQL_RES *connect_use_result(MYSQL *mysql) DBUG_RETURN(NULL); } // endif status - if (!(result = (MYSQL_RES*) my_malloc(sizeof(*result) + - sizeof(ulong) * mysql->field_count, + if (!(result = (MYSQL_RES*) my_malloc(PSI_NOT_INSTRUMENTED, + sizeof(*result) + sizeof(ulong) * mysql->field_count, MYF(MY_WME | MY_ZEROFILL)))) DBUG_RETURN(NULL); @@ -97,8 +97,8 @@ static MYSQL_RES *connect_use_result(MYSQL *mysql) result->methods = mysql->methods; /* Ptrs: to one row */ - if (!(result->row = (MYSQL_ROW)my_malloc(sizeof(result->row[0]) * - (mysql->field_count+1), MYF(MY_WME)))) { + if (!(result->row = (MYSQL_ROW)my_malloc(PSI_NOT_INSTRUMENTED, + sizeof(result->row[0]) * (mysql->field_count+1), MYF(MY_WME)))) { my_free(result); DBUG_RETURN(NULL); } // endif row @@ -120,7 +120,7 @@ static MYSQL_RES *connect_use_result(MYSQL *mysql) /************************************************************************/ /* MyColumns: constructs the result blocks containing all columns */ /* of a MySQL table or view. */ -/* info = TRUE to get catalog column informations. */ +/* info = TRUE to get catalog column information. */ /************************************************************************/ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db, const char *user, const char *pwd, diff --git a/storage/connect/mysql-test/connect/r/alter_engine.result b/storage/connect/mysql-test/connect/r/alter_engine.result new file mode 100644 index 00000000000..530574d276d --- /dev/null +++ b/storage/connect/mysql-test/connect/r/alter_engine.result @@ -0,0 +1,11 @@ +# +# MDEV-24422 Server crashes in GetTypeID / ha_connect::GetRealType upon +# altering table engine +# +CREATE TABLE t1 (f INT) ENGINE=CONNECT; +Warnings: +Warning 1105 No table_type. Will be set to DOS +Warning 1105 No file name. Table will use t1.dos +ALTER TABLE t1 ENGINE InnoDB; +ALTER TABLE t1 ENGINE CONNECT; +DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/r/alter_xml2.result b/storage/connect/mysql-test/connect/r/alter_xml2.result index 058079e99f3..88359e4b4e1 100644 --- a/storage/connect/mysql-test/connect/r/alter_xml2.result +++ b/storage/connect/mysql-test/connect/r/alter_xml2.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml # # Testing changing table type (not in-place) # diff --git a/storage/connect/mysql-test/connect/r/drop-open-error.result b/storage/connect/mysql-test/connect/r/drop-open-error.result index f0ad8553d8b..34f58a845dc 100644 --- a/storage/connect/mysql-test/connect/r/drop-open-error.result +++ b/storage/connect/mysql-test/connect/r/drop-open-error.result @@ -2,6 +2,8 @@ create table t1 (c varchar(8)); create table tcon engine=connect table_type=mysql CONNECTION='mysql://root@localhost/test/t1' SRCDEF='select c from t1 where c in ("foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar")'; ERROR HY000: Too long value for 'SRCDEF' drop table mdev9949; +Warnings: +Warning 1017 Can't find file: './test/mdev9949.dos' (errno: 2 "No such file or directory") drop table t1; select @@secure_file_priv 'must be NULL'; must be NULL diff --git a/storage/connect/mysql-test/connect/r/infoschema2-9739.result b/storage/connect/mysql-test/connect/r/infoschema2-9739.result index 32ca77dc71d..6abc576ff8e 100644 --- a/storage/connect/mysql-test/connect/r/infoschema2-9739.result +++ b/storage/connect/mysql-test/connect/r/infoschema2-9739.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml create table t1 (i int) engine=Connect table_type=XML option_list='xmlsup=libxml2'; Warnings: Warning 1105 No file name. Table will use t1.xml diff --git a/storage/connect/mysql-test/connect/r/mysql_index.result b/storage/connect/mysql-test/connect/r/mysql_index.result index e81caf671a4..54acc7be08d 100644 --- a/storage/connect/mysql-test/connect/r/mysql_index.result +++ b/storage/connect/mysql-test/connect/r/mysql_index.result @@ -52,8 +52,8 @@ id msg SELECT * FROM t2 WHERE id >= 3; id msg 3 Trois -5 Cinq 4 Four +5 Cinq 6 Six SELECT * FROM t2 WHERE id < 3; id msg @@ -302,18 +302,18 @@ matricule nom prenom 403 HERMITTE PHILIPPE 7626 HENIN PHILIPPE 9096 HELENA PHILIPPE -SELECT matricule, nom, prenom FROM t2 ORDER BY nom LIMIT 10; +SELECT matricule, nom, prenom FROM t2 ORDER BY nom,prenom LIMIT 10; matricule nom prenom -1340 ABBE MICHELE -2945 ABBEVILLE PASCAL -307 ABBAYE ANNICK 4552 ABBADIE MONIQUE -6399 ABEILLES RENE +307 ABBAYE ANNICK 6627 ABBAYE GERALD 7961 ABBE KATIA +1340 ABBE MICHELE +9270 ABBE SOPHIE +2945 ABBEVILLE PASCAL 8596 ABEBERRY PATRICK +6399 ABEILLES RENE 8673 ABEL JEAN PIERRE -9270 ABBE SOPHIE SELECT a.nom, a.prenom, b.nom FROM t1 a STRAIGHT_JOIN t2 b ON a.prenom = b.prenom WHERE a.nom = 'FOCH' AND a.nom != b.nom; nom prenom nom FOCH BERNADETTE BERTIN diff --git a/storage/connect/mysql-test/connect/r/type_inet6.result b/storage/connect/mysql-test/connect/r/type_inet6.result new file mode 100644 index 00000000000..495a7a515b7 --- /dev/null +++ b/storage/connect/mysql-test/connect/r/type_inet6.result @@ -0,0 +1,15 @@ +# +# MDEV-21764 CONNECT table with INET6 field produces warnings upon SELECT +# +CREATE TABLE t1 (a INET6) ENGINE=CONNECT TABLE_TYPE=DOS; +Warnings: +Warning 1105 No file name. Table will use t1.dos +INSERT INTO t1 VALUES ('::'); +INSERT INTO t1 VALUES ('::ffff'); +INSERT INTO t1 VALUES ('ffff::ffff'); +SELECT * FROM t1; +a +:: +::ffff +ffff::ffff +DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/r/xml2.result b/storage/connect/mysql-test/connect/r/xml2.result index 40411be3b90..3f82ed1adff 100644 --- a/storage/connect/mysql-test/connect/r/xml2.result +++ b/storage/connect/mysql-test/connect/r/xml2.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml SET NAMES utf8; # # Testing tag values diff --git a/storage/connect/mysql-test/connect/r/xml2_grant.result b/storage/connect/mysql-test/connect/r/xml2_grant.result index a6e6c150b59..e014f00f577 100644 --- a/storage/connect/mysql-test/connect/r/xml2_grant.result +++ b/storage/connect/mysql-test/connect/r/xml2_grant.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml # # Beginning of grant.inc # diff --git a/storage/connect/mysql-test/connect/r/xml2_html.result b/storage/connect/mysql-test/connect/r/xml2_html.result index 499108b724d..0ec47ad8038 100644 --- a/storage/connect/mysql-test/connect/r/xml2_html.result +++ b/storage/connect/mysql-test/connect/r/xml2_html.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml SET NAMES utf8; # # Testing HTML like XML file diff --git a/storage/connect/mysql-test/connect/r/xml2_mdev5261.result b/storage/connect/mysql-test/connect/r/xml2_mdev5261.result index 0ee5712dd02..8913663f6ae 100644 --- a/storage/connect/mysql-test/connect/r/xml2_mdev5261.result +++ b/storage/connect/mysql-test/connect/r/xml2_mdev5261.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml SET NAMES utf8; CREATE TABLE t1 (i INT UNIQUE NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='xt1.xml' OPTION_LIST='xmlsup=libxml2,Rownode=N'; ERROR HY000: Table type XML is not indexable diff --git a/storage/connect/mysql-test/connect/r/xml2_mult.result b/storage/connect/mysql-test/connect/r/xml2_mult.result index 0146baa89c0..5d68527b592 100644 --- a/storage/connect/mysql-test/connect/r/xml2_mult.result +++ b/storage/connect/mysql-test/connect/r/xml2_mult.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml SET NAMES utf8; # # Testing expanded values diff --git a/storage/connect/mysql-test/connect/r/xml2_zip.result b/storage/connect/mysql-test/connect/r/xml2_zip.result index e743af32418..7e36650da71 100644 --- a/storage/connect/mysql-test/connect/r/xml2_zip.result +++ b/storage/connect/mysql-test/connect/r/xml2_zip.result @@ -1,5 +1,3 @@ -Warnings: -Warning 1105 No file name. Table will use t1.xml # # Testing zipped XML tables # diff --git a/storage/connect/mysql-test/connect/t/alter_engine.test b/storage/connect/mysql-test/connect/t/alter_engine.test new file mode 100644 index 00000000000..789a0955d3b --- /dev/null +++ b/storage/connect/mysql-test/connect/t/alter_engine.test @@ -0,0 +1,11 @@ +--source include/have_innodb.inc + +--echo # +--echo # MDEV-24422 Server crashes in GetTypeID / ha_connect::GetRealType upon +--echo # altering table engine +--echo # + +CREATE TABLE t1 (f INT) ENGINE=CONNECT; +ALTER TABLE t1 ENGINE InnoDB; +ALTER TABLE t1 ENGINE CONNECT; +DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/t/have_libxml2.inc b/storage/connect/mysql-test/connect/t/have_libxml2.inc index fc16265aa12..64722af0ec4 100644 --- a/storage/connect/mysql-test/connect/t/have_libxml2.inc +++ b/storage/connect/mysql-test/connect/t/have_libxml2.inc @@ -1,4 +1,5 @@ --disable_query_log +--disable_warnings --error 0,ER_UNKNOWN_ERROR CREATE TABLE t1 (a VARCHAR(10)) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2'; @@ -12,6 +13,7 @@ if (!`SELECT count(*) FROM INFORMATION_SCHEMA.TABLES Skip Need LIBXML2; } DROP TABLE t1; +--enable_warnings --enable_query_log diff --git a/storage/connect/mysql-test/connect/t/misc.test b/storage/connect/mysql-test/connect/t/misc.test index 4dc8dded651..5cfe2a8fdbb 100644 --- a/storage/connect/mysql-test/connect/t/misc.test +++ b/storage/connect/mysql-test/connect/t/misc.test @@ -1,3 +1,4 @@ +--source have_libxml2.inc # Overlong table type --error ER_UNKNOWN_ERROR diff --git a/storage/connect/mysql-test/connect/t/mysql_index.test b/storage/connect/mysql-test/connect/t/mysql_index.test index ebc4965e8e1..cb4a332cdf8 100644 --- a/storage/connect/mysql-test/connect/t/mysql_index.test +++ b/storage/connect/mysql-test/connect/t/mysql_index.test @@ -50,6 +50,7 @@ SELECT * FROM t2 WHERE id = 3; SELECT * FROM t2 WHERE id IN (2,4); SELECT * FROM t2 WHERE id IN (2,4) AND msg = 'Two'; SELECT * FROM t2 WHERE id > 4; +--sorted_result SELECT * FROM t2 WHERE id >= 3; SELECT * FROM t2 WHERE id < 3; SELECT * FROM t2 WHERE id < 2 OR id > 4; @@ -130,8 +131,7 @@ SELECT matricule, nom, prenom FROM t2 WHERE nom > 'HELEN' AND nom < 'HEROS'; SELECT matricule, nom, prenom FROM t2 WHERE nom BETWEEN 'HELEN' AND 'HEROS'; --sorted_result SELECT matricule, nom, prenom FROM t2 WHERE nom BETWEEN 'HELEN' AND 'HEROS' AND prenom = 'PHILIPPE'; ---sorted_result -SELECT matricule, nom, prenom FROM t2 ORDER BY nom LIMIT 10; +SELECT matricule, nom, prenom FROM t2 ORDER BY nom,prenom LIMIT 10; --sorted_result SELECT a.nom, a.prenom, b.nom FROM t1 a STRAIGHT_JOIN t2 b ON a.prenom = b.prenom WHERE a.nom = 'FOCH' AND a.nom != b.nom; diff --git a/storage/connect/mysql-test/connect/t/type_inet6.test b/storage/connect/mysql-test/connect/t/type_inet6.test new file mode 100644 index 00000000000..19f5c13e270 --- /dev/null +++ b/storage/connect/mysql-test/connect/t/type_inet6.test @@ -0,0 +1,10 @@ +--echo # +--echo # MDEV-21764 CONNECT table with INET6 field produces warnings upon SELECT +--echo # + +CREATE TABLE t1 (a INET6) ENGINE=CONNECT TABLE_TYPE=DOS; +INSERT INTO t1 VALUES ('::'); +INSERT INTO t1 VALUES ('::ffff'); +INSERT INTO t1 VALUES ('ffff::ffff'); +SELECT * FROM t1; +DROP TABLE t1; diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 88ae12ea23c..eaa5d1748c2 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -1289,10 +1289,7 @@ bool ODBConn::DriverConnect(DWORD Options) #else // !_WIN32 HWND hWnd = (HWND)1; #endif // !_WIN32 - PGLOBAL& g = m_G; - PDBUSER dup = PlgGetUser(g); -//if (Options & noOdbcDialog || dup->Remote) wConnectOption = SQL_DRIVER_NOPROMPT; //else if (Options & forceOdbcDialog) // wConnectOption = SQL_DRIVER_PROMPT; @@ -1691,7 +1688,7 @@ int ODBConn::PrepareSQL(char *sql) b = false; if (m_hstmt) { - RETCODE rc = SQLFreeStmt(m_hstmt, SQL_CLOSE); + SQLFreeStmt(m_hstmt, SQL_CLOSE); hstmt = m_hstmt; m_hstmt = NULL; @@ -1699,7 +1696,7 @@ int ODBConn::PrepareSQL(char *sql) if (m_Tdb->GetAmType() != TYPE_AM_XDBC) ThrowDBX(MSG(SEQUENCE_ERROR)); - } // endif m_hstmt + } // endif m_hstmt rc = SQLAllocStmt(m_hdbc, &hstmt); diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index c1534eb6c2a..0f075a67876 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -425,12 +425,13 @@ char *ExtractFromPath(PGLOBAL g, char *pBuff, char *FileName, OPVAL op) return pBuff; } // end of PlgExtractFromPath + +#ifdef NOT_USED /***********************************************************************/ -/* Check the occurence and matching of a pattern against a string. */ +/* Check the occurrence and matching of a pattern against a string. */ /* Because this function is only used for catalog name checking, */ /* it must be case insensitive. */ /***********************************************************************/ -#ifdef NOT_USED static bool PlugCheckPattern(PGLOBAL g, LPCSTR string, LPCSTR pat) { if (pat && strlen(pat)) { @@ -444,7 +445,7 @@ static bool PlugCheckPattern(PGLOBAL g, LPCSTR string, LPCSTR pat) return true; } // end of PlugCheckPattern -#endif +#endif /* NOT_USED */ /***********************************************************************/ /* PlugEvalLike: evaluates a LIKE clause. */ @@ -571,7 +572,7 @@ bool EvalLikePattern(LPCSTR sp, LPCSTR tp) b = (t || !*sp); /* true if % or void strg. */ else if (!t) { /*******************************************************************/ - /* No character to skip, check occurence of <subtring-specifier> */ + /* No character to skip, check occurrence of <subtring-specifier> */ /* at the very beginning of remaining string. */ /*******************************************************************/ if (p) { @@ -585,7 +586,7 @@ bool EvalLikePattern(LPCSTR sp, LPCSTR tp) if (p) /*****************************************************************/ /* Here is the case explaining why we need a recursive routine. */ - /* The test must be done not only against the first occurence */ + /* The test must be done not only against the first occurrence */ /* of the <substring-specifier> in the remaining string, */ /* but also with all eventual succeeding ones. */ /*****************************************************************/ diff --git a/storage/connect/tabbson.cpp b/storage/connect/tabbson.cpp index 95360487ac1..b69618a60cb 100644 --- a/storage/connect/tabbson.cpp +++ b/storage/connect/tabbson.cpp @@ -2017,6 +2017,7 @@ PSZ BSONCOL::GetJpath(PGLOBAL g, bool proj) } // endif for (p1 = p2 = mgopath; *p1; p1++) + { if (i) { // Inside [] if (isdigit(*p1)) { if (!proj) @@ -2055,17 +2056,18 @@ PSZ BSONCOL::GetJpath(PGLOBAL g, bool proj) Sgfy = true; break; } // endif p2 - + /* fall through */ default: *p2++ = *p1; break; } // endswitch p1; + } - if (*(p2 - 1) == '.') - p2--; + if (*(p2 - 1) == '.') + p2--; - *p2 = 0; - return mgopath; + *p2 = 0; + return mgopath; } else return NULL; diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index 797b988b309..62eecb5e69e 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -648,8 +648,9 @@ int TDBDOS::MakeBlockValues(PGLOBAL g) PDOSDEF defp = (PDOSDEF)To_Def; PDOSCOL colp = NULL; PDBUSER dup = PlgGetUser(g); - PCATLG cat __attribute__((unused))= defp->GetCat(); //void *memp = cat->GetDescp(); + (void) defp->GetCat(); // XXX Should be removed? + if ((nrec = defp->GetElemt()) < 2) { if (!To_Def->Partitioned()) { @@ -1018,8 +1019,10 @@ bool TDBDOS::GetBlockValues(PGLOBAL g) FILE *opfile; PCOLDEF cdp; PDOSDEF defp = (PDOSDEF)To_Def; - PCATLG cat __attribute__((unused))= defp->GetCat(); - PDBUSER dup = PlgGetUser(g); + PDBUSER dup = PlgGetUser(g); + + (void) defp->GetCat(); // XXX Should be removed? + #if 0 if (Mode == MODE_INSERT && Txfp->GetAmType() == TYPE_AM_DOS) diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp index 2e222201d1f..44a996243db 100644 --- a/storage/connect/tabext.cpp +++ b/storage/connect/tabext.cpp @@ -280,7 +280,7 @@ int TDBEXT::Decode(PCSZ txt, char *buf, size_t n) uint dummy_errors; uint32 len = copy_and_convert(buf, n, &my_charset_latin1, txt, strlen(txt), - &my_charset_utf8_general_ci, + &my_charset_utf8mb3_general_ci, &dummy_errors); buf[len] = '\0'; return 0; diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 5ecd862b13b..c965b63835c 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -52,8 +52,6 @@ /* DB static variables. */ /***********************************************************************/ extern int num_read, num_there, num_eq[2]; // Statistics -static const longlong M2G = 0x80000000; -static const longlong M4G = (longlong)2 * M2G; char BINCOL::Endian = 'H'; /***********************************************************************/ diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp index 6eb28f84bd0..e742ed223c8 100644 --- a/storage/connect/tabfmt.cpp +++ b/storage/connect/tabfmt.cpp @@ -802,8 +802,7 @@ bool TDBCSV::OpenDB(PGLOBAL g) Fldtyp[i] = IsTypeNum(cdp->GetType()); } // endif cdp } - - } // endif Use + } // endif Use if (Header) { // Check that the Lrecl is at least equal to the header line length @@ -1082,8 +1081,7 @@ bool TDBCSV::PrepareWriting(PGLOBAL g) else strcat(To_Line, Field[i]); } - - } // endfor i + } // endfor i #if defined(_DEBUG) assert ((unsigned)nlen == strlen(To_Line)); @@ -1137,6 +1135,7 @@ int TDBCSV::CheckWrite(PGLOBAL g) // Check whether record is too int for (int i = 0; i < Fields; i++) + { if (Field[i]) { if (!(n = strlen(Field[i]))) n += (Quoted > 2 ? 2 : 0); @@ -1162,7 +1161,7 @@ int TDBCSV::CheckWrite(PGLOBAL g) } // endif nlen } // endif Field - + } return nlen; } // end of CheckWrite diff --git a/storage/connect/tabjdbc.cpp b/storage/connect/tabjdbc.cpp index dc1f5e2fe5b..46fb7695a51 100644 --- a/storage/connect/tabjdbc.cpp +++ b/storage/connect/tabjdbc.cpp @@ -381,7 +381,7 @@ bool TDBJDBC::MakeInsert(PGLOBAL g) int len = 0; uint pos; bool b = false; - PTABLE tablep = To_Table; + // PTABLE tablep = To_Table; PCOL colp; for (colp = Columns; colp; colp = colp->GetNext()) @@ -585,11 +585,13 @@ bool TDBJDBC::OpenDB(PGLOBAL g) if (Memory < 3) { // Method will depend on cursor type if ((Rbuf = Query ? Jcp->Rewind(Query->GetStr()) : 0) < 0) + { if (Mode != MODE_READX) { Jcp->Close(); return true; } else Rbuf = 0; + } } else Rbuf = Qrp->Nblin; @@ -1022,7 +1024,7 @@ JDBCCOL::JDBCCOL(JDBCCOL *col1, PTDB tdbp) : EXTCOL(col1, tdbp) void JDBCCOL::ReadColumn(PGLOBAL g) { PTDBJDBC tdbp = (PTDBJDBC)To_Tdb; - int i = tdbp->Fpos - 1, n = tdbp->CurNum; + int i = tdbp->Fpos - 1; if (tdbp->Memory == 3) { // Get the value from the stored memory @@ -1142,8 +1144,6 @@ int TDBXJDC::GetMaxSize(PGLOBAL g) /***********************************************************************/ bool TDBXJDC::OpenDB(PGLOBAL g) { - bool rc = false; - if (trace(1)) htrc("JDBC OpenDB: tdbp=%p tdb=R%d use=%d mode=%d\n", this, Tdb_No, Use, Mode); diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 67eb5bbede0..ec76d82d917 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -1068,7 +1068,7 @@ bool TDBJSN::OpenDB(PGLOBAL g) /*********************************************************************/ /* Lrecl is Ok. */ /*********************************************************************/ - size_t linelen = Lrecl; + MODE mode = Mode; // Buffer must be allocated in g->Sarea @@ -1729,7 +1729,6 @@ PVAL JSONCOL::MakeJson(PGLOBAL g, PJSON jsp, int n) /***********************************************************************/ PJVAL JSONCOL::GetRowValue(PGLOBAL g, PJSON row, int i) { - int n = Nod - 1; PJVAL val = NULL; for (; i < Nod && row; i++) { @@ -1862,7 +1861,6 @@ void JSONCOL::ReadColumn(PGLOBAL g) /***********************************************************************/ PVAL JSONCOL::GetColumnValue(PGLOBAL g, PJSON row, int i) { - int n = Nod - 1; PJAR arp; PJVAL val = NULL; diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp index fe68e12bc77..4fad2b27cd8 100644 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -671,8 +671,8 @@ TDBDIR::TDBDIR(PSZ fpat) : TDBASE((PTABDEF)NULL) /***********************************************************************/ char* TDBDIR::Path(PGLOBAL g) { - PCATLG cat __attribute__((unused))= PlgGetCatalog(g); - PTABDEF defp = (PTABDEF)To_Def; + (void) PlgGetCatalog(g); // XXX Should be removed? + PTABDEF defp = (PTABDEF)To_Def; #if defined(_WIN32) if (!*Drive) { @@ -711,7 +711,6 @@ int TDBDIR::GetMaxSize(PGLOBAL g) int n = -1; #if defined(_WIN32) int rc; - // Start searching files in the target directory. hSearch = FindFirstFile(Path(g), &FileData); @@ -1047,8 +1046,8 @@ int TDBSDR::FindInDir(PGLOBAL g) // Start searching files in the target directory. #if defined(_WIN32) - HANDLE h; int rc; + HANDLE h; #if defined(PATHMATCHSPEC) if (!*Drive) @@ -1176,7 +1175,7 @@ int TDBSDR::FindInDir(PGLOBAL g) // Look in the name sub-directory strcat(strcat(Direc, Entry->d_name), "/"); - if ((k = FindInDir(g)) < 0) + if ((k= FindInDir(g)) < 0) return k; else n += k; diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index 26381e347ae..7192b572309 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -247,7 +247,7 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url, bool b) // Found that if the string is: // user:@hostname:port/db/table // Then password is a null string, so set to NULL - if ((pwd[0] == 0)) + if (pwd[0] == 0) Password = NULL; else Password = pwd; diff --git a/storage/connect/taboccur.cpp b/storage/connect/taboccur.cpp index fe5e6c44fbd..fabbf65526e 100644 --- a/storage/connect/taboccur.cpp +++ b/storage/connect/taboccur.cpp @@ -294,7 +294,7 @@ TDBOCCUR::TDBOCCUR(POCCURDEF tdp) : TDBPRX(tdp) Col = NULL; // To source column blocks array Mult = PrepareColist(Colist); // Multiplication factor N = 0; // The current table index - M = 0; // The occurence rank + M = 0; // The occurrence rank RowFlag = 0; // 0: Ok, 1: Same, 2: Skip } // end of TDBOCCUR constructor @@ -433,7 +433,7 @@ int TDBOCCUR::GetMaxSize(PGLOBAL g) /***********************************************************************/ /* In this sample, ROWID will be the (virtual) row number, */ -/* while ROWNUM will be the occurence rank in the multiple column. */ +/* while ROWNUM will be the occurrence rank in the multiple column. */ /***********************************************************************/ int TDBOCCUR::RowNumber(PGLOBAL, bool b) { diff --git a/storage/connect/taboccur.h b/storage/connect/taboccur.h index 4538d3d71f2..13bc055cd6f 100644 --- a/storage/connect/taboccur.h +++ b/storage/connect/taboccur.h @@ -35,7 +35,7 @@ class OCCURDEF : public PRXDEF { /* Logical table description */ protected: // Members char *Colist; /* The source column list */ - char *Xcol; /* The multiple occurence column */ + char *Xcol; /* The multiple occurrence column */ char *Rcol; /* The rank column */ }; // end of OCCURDEF @@ -76,12 +76,12 @@ class TDBOCCUR : public TDBPRX { PCOL *Col; // To source multiple columns int Mult; // Multiplication factor int N; // The current table index - int M; // The occurence rank + int M; // The occurrence rank BYTE RowFlag; // 0: Ok, 1: Same, 2: Skip }; // end of class TDBOCCUR /***********************************************************************/ -/* Class OCCURCOL: for the multiple occurence column. */ +/* Class OCCURCOL: for the multiple occurrence column. */ /***********************************************************************/ class OCCURCOL : public COLBLK { public: @@ -106,7 +106,7 @@ class OCCURCOL : public COLBLK { }; // end of class OCCURCOL /***********************************************************************/ -/* Class RANKCOL: for the multiple occurence column ranking. */ +/* Class RANKCOL: for the multiple occurrence column ranking. */ /***********************************************************************/ class RANKCOL : public COLBLK { public: diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp index 2a4ee89b235..fb9168f3b88 100644 --- a/storage/connect/tabodbc.cpp +++ b/storage/connect/tabodbc.cpp @@ -301,7 +301,6 @@ bool TDBODBC::MakeInsert(PGLOBAL g) char *catp = NULL, buf[NAM_LEN * 3]; int len = 0; bool oom, b = false; - PTABLE tablep = To_Table; PCOL colp; for (colp = Columns; colp; colp = colp->GetNext()) @@ -322,9 +321,6 @@ bool TDBODBC::MakeInsert(PGLOBAL g) if (catp) len += strlen(catp) + 1; - //if (tablep->GetSchema()) - // schmp = (char*)tablep->GetSchema(); - //else if (Schema && *Schema) schmp = Schema; @@ -557,15 +553,17 @@ bool TDBODBC::OpenDB(PGLOBAL g) if (Memory < 3) { // Method will depend on cursor type - if ((Rbuf = Ocp->Rewind(Query->GetStr(), (PODBCCOL)Columns)) < 0) - if (Mode != MODE_READX) { - Ocp->Close(); - return true; - } else - Rbuf = 0; - - } else + if ((Rbuf = Ocp->Rewind(Query->GetStr(), (PODBCCOL)Columns)) < 0) { + if (Mode != MODE_READX) { + Ocp->Close(); + return true; + } else { + Rbuf = 0; + } + } + } else { Rbuf = Qrp->Nblin; + } CurNum = 0; Fpos = 0; @@ -1215,8 +1213,6 @@ int TDBXDBC::GetMaxSize(PGLOBAL g) /***********************************************************************/ bool TDBXDBC::OpenDB(PGLOBAL g) { - bool rc = false; - if (trace(1)) htrc("ODBC OpenDB: tdbp=%p tdb=R%d use=%dmode=%d\n", this, Tdb_No, Use, Mode); diff --git a/storage/connect/tabpivot.cpp b/storage/connect/tabpivot.cpp index d700cff0e41..ba9b903399d 100644 --- a/storage/connect/tabpivot.cpp +++ b/storage/connect/tabpivot.cpp @@ -187,7 +187,7 @@ PQRYRES PIVAID::MakePivotColumns(PGLOBAL g) } // endif picol // Prepare the column list - for (pcrp = &Qryp->Colresp; (crp = *pcrp); ) + for (pcrp = &Qryp->Colresp; (crp = *pcrp); ) { if (SkipColumn(crp, skc)) { // Ignore this column *pcrp = crp->Next; @@ -204,7 +204,7 @@ PQRYRES PIVAID::MakePivotColumns(PGLOBAL g) *pcrp = crp->Next; } else pcrp = &crp->Next; - + } if (!Rblkp) { strcpy(g->Message, MSG(NO_DEF_PIVOTCOL)); goto err; @@ -340,7 +340,6 @@ int PIVAID::Qcompare(int *i1, int *i2) bool PIVOTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) { char *p1, *p2; - PHC hc __attribute__((unused))= ((MYCAT*)Cat)->GetHandler(); if (PRXDEF::DefineAM(g, am, poff)) return TRUE; @@ -405,7 +404,7 @@ TDBPIVOT::TDBPIVOT(PPIVOTDEF tdp) : TDBPRX(tdp) Accept = tdp->Accept; Mult = -1; // Estimated table size N = 0; // The current table index - M = 0; // The occurence rank + M = 0; // The occurrence rank FileStatus = 0; // Logical End-of-File RowFlag = 0; // 0: Ok, 1: Same, 2: Skip } // end of TDBPIVOT constructor @@ -645,7 +644,7 @@ int TDBPIVOT::GetMaxSize(PGLOBAL g __attribute__((unused))) /***********************************************************************/ /* In this sample, ROWID will be the (virtual) row number, */ -/* while ROWNUM will be the occurence rank in the multiple column. */ +/* while ROWNUM will be the occurrence rank in the multiple column. */ /***********************************************************************/ int TDBPIVOT::RowNumber(PGLOBAL, bool b) { diff --git a/storage/connect/tabpivot.h b/storage/connect/tabpivot.h index 6c2d53e9527..d819d55a61a 100644 --- a/storage/connect/tabpivot.h +++ b/storage/connect/tabpivot.h @@ -138,7 +138,7 @@ class TDBPIVOT : public TDBPRX { int Mult; // Multiplication factor int Ncol; // The number of generated columns int N; // The current table index - int M; // The occurence rank + int M; // The occurrence rank int Port; // MySQL port number BYTE FileStatus; // 0: First 1: Rows 2: End-of-File BYTE RowFlag; // 0: Ok, 1: Same, 2: Skip diff --git a/storage/connect/tabrest.h b/storage/connect/tabrest.h index 9066a89b306..901d9102e95 100644 --- a/storage/connect/tabrest.h +++ b/storage/connect/tabrest.h @@ -6,9 +6,7 @@ #pragma once #if defined(_WIN32) -static PCSZ slash = "\\"; #else // !_WIN32 -static PCSZ slash = "/"; #define stricmp strcasecmp #endif // !_WIN32 diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index d8885b7f49d..f0f6bb58db6 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -536,7 +536,7 @@ int TDBPRX::GetMaxSize(PGLOBAL g) /***********************************************************************/ /* In this sample, ROWID will be the (virtual) row number, */ -/* while ROWNUM will be the occurence rank in the multiple column. */ +/* while ROWNUM will be the occurrence rank in the multiple column. */ /***********************************************************************/ int TDBPRX::RowNumber(PGLOBAL g, bool b) { @@ -686,7 +686,7 @@ char *PRXCOL::Decode(PGLOBAL g, const char *cnm) uint32 len= copy_and_convert(buf, strlen(cnm) + 1, &my_charset_latin1, cnm, strlen(cnm), - &my_charset_utf8_general_ci, + &my_charset_utf8mb3_general_ci, &dummy_errors); buf[len]= '\0'; return buf; diff --git a/storage/connect/tabxcl.cpp b/storage/connect/tabxcl.cpp index 5b1cf57cebb..d354f556ca1 100644 --- a/storage/connect/tabxcl.cpp +++ b/storage/connect/tabxcl.cpp @@ -103,7 +103,7 @@ TDBXCL::TDBXCL(PXCLDEF tdp) : TDBPRX(tdp) Xcolp = NULL; // To the XCLCOL column Mult = tdp->Mult; // Multiplication factor N = 0; // The current table index - M = 0; // The occurence rank + M = 0; // The occurrence rank RowFlag = 0; // 0: Ok, 1: Same, 2: Skip New = TRUE; // TRUE for new line Sep = tdp->Sep; // The Xcol separator @@ -142,7 +142,7 @@ int TDBXCL::GetMaxSize(PGLOBAL g) /***********************************************************************/ /* For this table type, ROWID is the (virtual) row number, */ -/* while ROWNUM is be the occurence rank in the multiple column. */ +/* while ROWNUM is be the occurrence rank in the multiple column. */ /***********************************************************************/ int TDBXCL::RowNumber(PGLOBAL, bool b) { diff --git a/storage/connect/tabxcl.h b/storage/connect/tabxcl.h index fde000ee709..2ae96703548 100644 --- a/storage/connect/tabxcl.h +++ b/storage/connect/tabxcl.h @@ -72,7 +72,7 @@ class TDBXCL : public TDBPRX { PXCLCOL Xcolp; // To the XCVCOL column int Mult; // Multiplication factor int N; // The current table index - int M; // The occurence rank + int M; // The occurrence rank BYTE RowFlag; // 0: Ok, 1: Same, 2: Skip bool New; // TRUE for new line char Sep; // The Xcol separator diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 6bc3209da59..3bd2cfbf6cd 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -710,7 +710,7 @@ PTDB TDBXML::Clone(PTABS t) /***********************************************************************/ const CHARSET_INFO *TDBXML::data_charset() { - return &my_charset_utf8_general_ci; + return &my_charset_utf8mb3_general_ci; } // end of data_charset /***********************************************************************/ diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc index 5268651d080..ba446a3e2f3 100644 --- a/storage/connect/user_connect.cc +++ b/storage/connect/user_connect.cc @@ -112,7 +112,7 @@ bool user_connect::user_init() if (g) printf("%s\n", g->Message); - g= PlugExit(g); + (void) PlugExit(g); if (dup) free(dup); diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index cef4d8a47b3..7f0efb727a2 100644 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -1211,7 +1211,6 @@ bool XINDEX::MapInit(PGLOBAL g) PCOL colp; PXCOL prev = NULL, kcp = NULL; PDOSDEF defp = (PDOSDEF)Tdbp->To_Def; - PDBUSER dup __attribute__((unused))= PlgGetUser(g); /*********************************************************************/ /* Get the estimated table size. */ |