diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-02-24 01:23:18 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-02-24 01:23:18 +0100 |
commit | 2b60525d57e30e668cfe97a8d7d3327577663c79 (patch) | |
tree | b22a2a3d7ad68b7a5214eb0463fa78066b92940c /storage/connect/xindex.cpp | |
parent | a769cb2fc5605ada10bf586fa63750bc79cd658d (diff) | |
download | mariadb-git-2b60525d57e30e668cfe97a8d7d3327577663c79.tar.gz |
- Add support to NULL values. This concern the MYSQL
and ODBC table types. Not supported yet for indexes.
modified:
storage/connect/colblk.cpp
storage/connect/colblk.h
storage/connect/connect.cc
storage/connect/ha_connect.cc
storage/connect/tabmysql.cpp
storage/connect/tabodbc.cpp
storage/connect/valblk.cpp
storage/connect/valblk.h
storage/connect/value.cpp
storage/connect/value.h
storage/connect/xindex.cpp
Diffstat (limited to 'storage/connect/xindex.cpp')
-rw-r--r-- | storage/connect/xindex.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index 073767752d3..5971f578113 100644 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -279,7 +279,7 @@ int XINDEX::Qcompare(int *i1, int *i2) bool XINDEX::Make(PGLOBAL g, PIXDEF sxp) { /*********************************************************************/ - /* Table can be accessed through an index. */ + /* Table can be accessed through an index. */ /*********************************************************************/ int k, rc = RC_OK; int *bof, i, j, n, ndf, nkey; @@ -2861,6 +2861,12 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln) { int len = colp->GetLength(), prec = colp->GetPrecision(); + // Currently no indexing on NULL columns + if (colp->IsNullable()) { + sprintf(g->Message, "Cannot index nullable column %s", colp->GetName()); + return true; + } // endif nullable + if (kln && len > kln && colp->GetResultType() == TYPE_STRING) { len = kln; Prefix = true; |