summaryrefslogtreecommitdiff
path: root/storage/connect/xindex.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2017-05-04 18:51:19 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2017-05-04 18:51:19 +0200
commita2af3c0d44d919051c08b63cb10bed546d5f92a3 (patch)
tree57bfdacb584a38ed930c1aaa87d08fe8c9a83847 /storage/connect/xindex.cpp
parent6525dc63366f751fcfa45a586f378a1c81458657 (diff)
downloadmariadb-git-a2af3c0d44d919051c08b63cb10bed546d5f92a3.tar.gz
Fix MDEV-12653 Cannot add index for ZIP CONNECT table
modified: storage/connect/filamzip.cpp modified: storage/connect/ha_connect.cc modified: storage/connect/tabdos.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/xindex.cpp
Diffstat (limited to 'storage/connect/xindex.cpp')
-rwxr-xr-xstorage/connect/xindex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index a2ddf468e5a..48edd12b3d8 100755
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -969,8 +969,8 @@ bool XINDEX::Init(PGLOBAL g)
// For DBF tables, Cardinality includes bad or soft deleted lines
// that are not included in the index, and can be larger then the
// index size.
- estim = (Tdbp->Ftype == RECFM_DBF);
- n = Tdbp->Cardinality(g); // n is exact table size
+ estim = (Tdbp->Ftype == RECFM_DBF || Tdbp->Txfp->GetAmType() == TYPE_AM_ZIP);
+ n = Tdbp->Cardinality(g); // n is exact table size
} else {
// Variable table not optimized
estim = true; // n is an estimate of the size