summaryrefslogtreecommitdiff
path: root/storage/connect/tabdos.cpp
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-02-02 17:55:53 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-02-02 17:55:53 +0100
commit0f810b58faf487c7cd59f2ee520f62deb0f712eb (patch)
treedfb52d41ffd83d0dbffb969c091fe190b9457a24 /storage/connect/tabdos.cpp
parent542d769ea1a22a7a6a87c9fe76ff911a162ade44 (diff)
parent251b52190070095e4c65ffb0ae545d49330a02b2 (diff)
downloadmariadb-git-10.4-merge-attempt.tar.gz
Merge branch 'bb-10.3-release' into bb-10.4-release10.4-merge-attempt
Diffstat (limited to 'storage/connect/tabdos.cpp')
-rw-r--r--storage/connect/tabdos.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp
index 3002f8906ed..fa764b1f84d 100644
--- a/storage/connect/tabdos.cpp
+++ b/storage/connect/tabdos.cpp
@@ -1995,7 +1995,7 @@ int TDBDOS::Cardinality(PGLOBAL g)
if (Mode == MODE_ANY && ExactInfo()) {
// Using index impossible or failed, do it the hard way
Mode = MODE_READ;
- To_Line = (char*)PlugSubAlloc(g, NULL, Lrecl + 1);
+ To_Line = (char*)PlugSubAlloc(g, NULL, (size_t)Lrecl + 1);
if (Txfp->OpenTableFile(g))
return (Cardinal = Txfp->Cardinality(g));
@@ -2145,6 +2145,9 @@ bool TDBDOS::OpenDB(PGLOBAL g)
} // endif use
if (Mode == MODE_DELETE && !Next && Txfp->GetAmType() != TYPE_AM_DOS
+#if defined(BSON_SUPPORT)
+ && Txfp->GetAmType() != TYPE_AM_BIN
+#endif // BSON_SUPPORT
&& Txfp->GetAmType() != TYPE_AM_MGO) {
// Delete all lines. Not handled in MAP or block mode
Txfp = new(g) DOSFAM((PDOSDEF)To_Def);
@@ -2229,7 +2232,7 @@ int TDBDOS::ReadDB(PGLOBAL g)
return RC_EF;
case -2: // No match for join
return RC_NF;
- case -3: // Same record as last non null one
+ case -3: // Same record as non null last one
num_there++;
return RC_OK;
default: