summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/CMakeLists.txt18
-rw-r--r--storage/connect/bson.cpp8
-rw-r--r--storage/connect/bsonudf.cpp33
-rw-r--r--storage/connect/colblk.cpp7
-rw-r--r--storage/connect/filamdbf.cpp4
-rw-r--r--storage/connect/filamfix.cpp2
-rw-r--r--storage/connect/filamgz.cpp6
-rw-r--r--storage/connect/filamvct.cpp1
-rw-r--r--storage/connect/filamzip.cpp1
-rw-r--r--storage/connect/filter.cpp5
-rw-r--r--storage/connect/ha_connect.cc36
-rw-r--r--storage/connect/ha_connect.h6
-rw-r--r--storage/connect/inihandl.cpp7
-rw-r--r--storage/connect/ioapi.h2
-rw-r--r--storage/connect/javaconn.cpp2
-rw-r--r--storage/connect/jdbconn.cpp6
-rw-r--r--storage/connect/jsonudf.cpp6
-rw-r--r--storage/connect/libdoc.cpp8
-rw-r--r--storage/connect/maputil.cpp2
-rw-r--r--storage/connect/myconn.cpp10
-rw-r--r--storage/connect/mysql-test/connect/r/alter_engine.result11
-rw-r--r--storage/connect/mysql-test/connect/r/drop-open-error.result2
-rw-r--r--storage/connect/mysql-test/connect/r/mysql_index.result14
-rw-r--r--storage/connect/mysql-test/connect/r/type_inet6.result15
-rw-r--r--storage/connect/mysql-test/connect/t/alter_engine.test11
-rw-r--r--storage/connect/mysql-test/connect/t/mysql_index.test4
-rw-r--r--storage/connect/mysql-test/connect/t/type_inet6.test10
-rw-r--r--storage/connect/odbconn.cpp7
-rw-r--r--storage/connect/plgdbutl.cpp11
-rw-r--r--storage/connect/tabbson.cpp14
-rw-r--r--storage/connect/tabdos.cpp9
-rw-r--r--storage/connect/tabext.cpp2
-rw-r--r--storage/connect/tabfix.cpp2
-rw-r--r--storage/connect/tabfmt.cpp9
-rw-r--r--storage/connect/tabjdbc.cpp8
-rw-r--r--storage/connect/tabjson.cpp4
-rw-r--r--storage/connect/tabmul.cpp9
-rw-r--r--storage/connect/tabmysql.cpp2
-rw-r--r--storage/connect/taboccur.cpp4
-rw-r--r--storage/connect/taboccur.h8
-rw-r--r--storage/connect/tabodbc.cpp24
-rw-r--r--storage/connect/tabpivot.cpp9
-rw-r--r--storage/connect/tabpivot.h2
-rw-r--r--storage/connect/tabutil.cpp4
-rw-r--r--storage/connect/tabxcl.cpp4
-rw-r--r--storage/connect/tabxcl.h2
-rw-r--r--storage/connect/tabxml.cpp2
-rw-r--r--storage/connect/user_connect.cc2
-rw-r--r--storage/connect/xindex.cpp1
49 files changed, 215 insertions, 161 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 0100f80415d..456a7b62815 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -147,10 +147,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)
@@ -409,6 +405,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(WIN32)
IF (libmongoc-1.0_FOUND)
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
@@ -425,6 +434,7 @@ IF(MSVC)
# Temporarily disable "conversion from size_t .."
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267")
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
string(REPLACE "/permissive-" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
diff --git a/storage/connect/bson.cpp b/storage/connect/bson.cpp
index bf03f47a10d..fa9cd5f1e52 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 0c7112ee15f..7022600e140 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -87,6 +87,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;
@@ -103,7 +104,7 @@ static PBJNX BjnxNew(PGLOBAL g, PBVAL vlp, int type, int len)
return bjnx;
} /* end of BjnxNew */
-
+#endif
/* ----------------------------------- BSNX ------------------------------------ */
/*********************************************************************************/
@@ -286,7 +287,7 @@ my_bool BJNX::ParseJpath(PGLOBAL g)
{
char* p, * p1 = NULL, * p2 = NULL, * pbuf = NULL;
int i;
- my_bool a, mul = false;
+ my_bool a;
if (Parsed)
return false; // Already done
@@ -497,7 +498,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
@@ -540,7 +542,6 @@ PVAL BJNX::GetColumnValue(PGLOBAL g, PBVAL row, int i)
/*********************************************************************************/
PBVAL BJNX::GetRowValue(PGLOBAL g, PBVAL row, int i)
{
- my_bool expd = false;
PBVAL bap;
PBVAL vlp = NULL;
@@ -621,7 +622,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n)
{
// For calculated arrays, a local Value must be used
int lng = 0;
- short type, prec = 0;
+ short type = 0, prec = 0;
bool b = n < Nod - 1;
PVAL valp;
PBVAL vlp, vp;
@@ -1083,7 +1084,7 @@ my_bool BJNX::CheckPath(PGLOBAL g, UDF_ARGS *args, PBVAL jsp, PBVAL& jvp, int n)
PSZ BJNX::Locate(PGLOBAL g, PBVAL jsp, PBVAL jvp, int k)
{
PSZ str = NULL;
- my_bool b = false, err = true;
+ my_bool err = true;
g->Message[0] = 0;
@@ -1204,7 +1205,7 @@ my_bool BJNX::LocateValue(PGLOBAL g, PBVAL jvp)
PSZ BJNX::LocateAll(PGLOBAL g, PBVAL jsp, PBVAL bvp, int mx)
{
PSZ str = NULL;
- my_bool b = false, err = true;
+ my_bool err = true;
PJPN jnp;
if (!jsp) {
@@ -2901,7 +2902,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 +2975,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;
@@ -3044,7 +3045,7 @@ my_bool bson_test_init(UDF_INIT* initid, UDF_ARGS* args, char* message) {
char* bson_test(UDF_INIT* initid, UDF_ARGS* args, char* result,
unsigned long* res_length, char* is_null, char* error) {
- char* str = NULL, * sap = NULL, * fn = NULL;
+ char* str = NULL, * fn = NULL;
int pretty = 1;
PBVAL bvp;
PGLOBAL g = (PGLOBAL)initid->ptr;
@@ -4689,7 +4690,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 +4813,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");
@@ -4978,7 +4979,7 @@ char *bbin_array_add(UDF_INIT *initid, UDF_ARGS *args, char *result,
uint n = 2;
int* x = GetIntArgPtr(g, args, n);
BJNX bnx(g, NULL, TYPE_STRING);
- PBVAL jarp, top, jvp = NULL;
+ PBVAL top, jarp = NULL, jvp = NULL;
PBVAL jsp = bnx.MakeValue(args, 0, true, &top);
if (bnx.CheckPath(g, args, jsp, jvp, 2))
@@ -5042,7 +5043,7 @@ char* bbin_array_add_values(UDF_INIT* initid, UDF_ARGS* args, char* result,
if (!CheckMemory(g, initid, args, args->arg_count, true)) {
uint i = 0;
BJNX bnx(g);
- PBVAL arp, top, jvp = NULL;
+ PBVAL arp, top;
PBVAL bvp = bnx.MakeValue(args, 0, true, &top);
if (bvp->Type == TYPE_JAR) {
@@ -5611,7 +5612,7 @@ char *bbin_object_values(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!bsp) {
if (!CheckMemory(g, initid, args, 1, true, true)) {
BJNX bnx(g);
- PBVAL top, jarp;
+ PBVAL top, jarp = NULL;
PBVAL jvp = bnx.MakeValue(args, 0, true, &top);
if (jvp->Type == TYPE_JOB) {
@@ -5666,7 +5667,7 @@ char *bbin_get_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (g->Xchk) {
bsp = (PBSON)g->Xchk;
} else if (!CheckMemory(g, initid, args, 1, true, true)) {
- char *path = MakePSZ(g, args, 1);
+ // char *path = MakePSZ(g, args, 1);
BJNX bnx(g, NULL, TYPE_STRING, initid->max_length);
PBVAL top, jvp = NULL;
PBVAL jsp = bnx.MakeValue(args, 0, true, &top);
diff --git a/storage/connect/colblk.cpp b/storage/connect/colblk.cpp
index 19e98537d27..d531685950d 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 71bf626c08c..3d1718b9983 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 1b1cb7ca3f1..46f3ea01129 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 1fe632b0bcf..634599eced3 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 fd3ce79c762..2cd80f5d43f 100644
--- a/storage/connect/filamvct.cpp
+++ b/storage/connect/filamvct.cpp
@@ -1164,7 +1164,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 4e9d008b455..77a97b95107 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 fd6a6a68de0..9d8518ec3a5 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 c1262b9630a..e95e91e1ca6 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();
@@ -2273,7 +2273,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();
@@ -5263,6 +5263,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)) {
@@ -5275,7 +5283,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;
@@ -5315,8 +5324,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");
@@ -5387,7 +5399,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);
@@ -6511,7 +6523,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);
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 218819d0b73..d1aca22b01f 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 9270e18721c..c39c94fb30d 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 4fa73002053..e2148c56bac 100644
--- a/storage/connect/ioapi.h
+++ b/storage/connect/ioapi.h
@@ -82,7 +82,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 364d49f8e7c..de37d5b6970 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 20918745316..1035c2b8305 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/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 41e73c946fb..8185be66687 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 61921555ad7..3b2696b066d 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 b2e55e619a9..b722a438011 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 76e0536633f..ca3728471b1 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/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/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/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/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 5b20b33e240..d7a7bf19729 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;
@@ -1686,7 +1683,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;
@@ -1694,7 +1691,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 3624420dfed..55c7b8110fd 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 3b1f1c84d1a..de272798e7c 100644
--- a/storage/connect/tabbson.cpp
+++ b/storage/connect/tabbson.cpp
@@ -871,7 +871,7 @@ PBVAL BCUTIL::MakeBson(PGLOBAL g, PBVAL jsp, int n)
/***********************************************************************/
PBVAL BCUTIL::GetRowValue(PGLOBAL g, PBVAL row, int i)
{
- int nod = Cp->Nod, n = nod - 1;
+ int nod = Cp->Nod;
JNODE *nodes = Cp->Nodes;
PBVAL arp;
PBVAL bvp = NULL;
@@ -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 cb6154c45e3..2e70fdfc558 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 53a0d2aa2c7..212d27f06d1 100644
--- a/storage/connect/tabext.cpp
+++ b/storage/connect/tabext.cpp
@@ -278,7 +278,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 5deb5fd0d40..60c37075f66 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 53af8d84053..49233f4f799 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 9721c62be7d..1268bcfd1de 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 56f22fa91ec..76a1f742b7f 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 131b96ffbf5..d260149514d 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 674580535a5..b14b0b14231 100644
--- a/storage/connect/tabmysql.cpp
+++ b/storage/connect/tabmysql.cpp
@@ -246,7 +246,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 c3cb5be2e8d..718b8a066d1 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 bede19f7344..4e8b4417a33 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 1047a139f3b..5ba4b511528 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/tabutil.cpp b/storage/connect/tabutil.cpp
index e23ada8cde9..941073b35e6 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 6990fa4abba..2d8df9a4053 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 f4a5b1fe1fa..6ed70f21a85 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. */