summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-01-13 10:47:56 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2023-01-13 10:47:56 +0200
commit1e04cafcba88e1801e828a5bbab7fe9fdd7ca61c (patch)
tree6adddccee0d76b14e2821e6b4263a6dfcf6ccde6 /storage/connect
parentab36eac584a0bef4a048a3fd8ae56ff2cbfcb6cc (diff)
parent3386b309756adba6b9633ad18c4e0575c7304cfe (diff)
downloadmariadb-git-1e04cafcba88e1801e828a5bbab7fe9fdd7ca61c.tar.gz
Merge 10.6 into 10.7
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/connect.cc6
-rw-r--r--storage/connect/ioapi.c3
-rw-r--r--storage/connect/tabfmt.cpp2
-rw-r--r--storage/connect/tabtbl.cpp4
-rw-r--r--storage/connect/zip.c5
5 files changed, 6 insertions, 14 deletions
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc
index 41bce530aeb..72b12552b95 100644
--- a/storage/connect/connect.cc
+++ b/storage/connect/connect.cc
@@ -237,7 +237,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
bool del, PHC)
{
char *p;
- int i, n;
+ int n;
bool rcop= true;
PCOL colp;
//PCOLUMN cp;
@@ -276,7 +276,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
n = strlen(p) + 1;
} // endfor p
- for (i = 0, colp = tdbp->GetColumns(); colp; i++, colp = colp->GetNext()) {
+ for (colp = tdbp->GetColumns(); colp; colp = colp->GetNext()) {
if (colp->InitValue(g))
throw 2;
@@ -317,7 +317,7 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
n = strlen(p) + 1;
} // endfor p
- for (i = 0, colp = utp->GetColumns(); colp; i++, colp = colp->GetNext()) {
+ for (colp = utp->GetColumns(); colp; colp = colp->GetNext()) {
if (colp->InitValue(g))
throw 5;
diff --git a/storage/connect/ioapi.c b/storage/connect/ioapi.c
index 1f339982926..b6a0ec318e6 100644
--- a/storage/connect/ioapi.c
+++ b/storage/connect/ioapi.c
@@ -221,8 +221,7 @@ static int ZCALLBACK ferror_file_func (voidpf opaque __attribute__((unused)), vo
return ret;
}
-void fill_fopen_filefunc (pzlib_filefunc_def)
- zlib_filefunc_def* pzlib_filefunc_def;
+void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
{
pzlib_filefunc_def->zopen_file = fopen_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp
index e742ed223c8..7edffc638fa 100644
--- a/storage/connect/tabfmt.cpp
+++ b/storage/connect/tabfmt.cpp
@@ -1054,7 +1054,7 @@ bool TDBCSV::PrepareWriting(PGLOBAL g)
if (!strlen(Field[i])) {
// Generally null fields are not quoted
if (Quoted > 2)
- // Except if explicitely required
+ // Except if explicitly required
strcat(strcat(To_Line, qot), qot);
} else if (Qot && (strchr(Field[i], Sep) || *Field[i] == Qot
diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp
index b2240bffa2c..607e7d131f3 100644
--- a/storage/connect/tabtbl.cpp
+++ b/storage/connect/tabtbl.cpp
@@ -230,7 +230,6 @@ PCOL TDBTBL::InsertSpecialColumn(PCOL scp)
/***********************************************************************/
bool TDBTBL::InitTableList(PGLOBAL g)
{
- int n;
uint sln;
const char *scs;
PTABLE tp, tabp;
@@ -243,7 +242,7 @@ bool TDBTBL::InitTableList(PGLOBAL g)
sln = hc->get_table()->s->connect_string.length;
// PlugSetPath(filename, Tdbp->GetFile(g), Tdbp->GetPath());
- for (n = 0, tp = tdp->Tablep; tp; tp = tp->GetNext()) {
+ for (tp = tdp->Tablep; tp; tp = tp->GetNext()) {
if (TestFil(g, To_CondFil, tp)) {
tabp = new(g) XTAB(tp);
@@ -276,7 +275,6 @@ bool TDBTBL::InitTableList(PGLOBAL g)
else
Tablist = tabp;
- n++;
} // endif filp
} // endfor tp
diff --git a/storage/connect/zip.c b/storage/connect/zip.c
index 52d63e108e7..f6a10601968 100644
--- a/storage/connect/zip.c
+++ b/storage/connect/zip.c
@@ -1471,11 +1471,6 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in
{
uLong uTotalOutBefore = zi->ci.stream.total_out;
err=deflate(&zi->ci.stream, Z_NO_FLUSH);
- if(uTotalOutBefore > zi->ci.stream.total_out)
- {
- int bBreak = 0;
- bBreak++;
- }
zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
}