summaryrefslogtreecommitdiff
path: root/storage/connect/tabodbc.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2014-11-15 18:28:24 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2014-11-15 18:28:24 +0100
commit5d8311960a8f993591075b3da6106559922183b4 (patch)
tree1efe45e1188606c895a4069c05a2501826e1f293 /storage/connect/tabodbc.cpp
parent9ade2d088d12f6a2a6f901148ed72a45dd15e9ff (diff)
downloadmariadb-git-5d8311960a8f993591075b3da6106559922183b4.tar.gz
- Implement the NEWMSG and XMSG methods
They are still experimental and should not be used in production. added: storage/connect/encas.h storage/connect/english.msg storage/connect/enids.h storage/connect/frcas.h storage/connect/french.msg storage/connect/frids.h storage/connect/frmsg.h modified: storage/connect/connect.cc storage/connect/engmsg.h storage/connect/filamdbf.cpp storage/connect/global.h storage/connect/ha_connect.cc storage/connect/msgid.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/rcmsg.c storage/connect/resource.h storage/connect/tabfmt.h - Fix global variable not being properly initialized (MDEV-6690, MDEV-7094) modified: storage/connect/ha_connect.cc storage/connect/plugutil.c storage/connect/user_connect.cc storage/connect/xindex.cpp - Implement Rewind for ODBC tables (MDEV-7097) modified: storage/connect/odbconn.cpp storage/connect/odbconn.h storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp - Reset N when reopening MYSQL tables modified: storage/connect/tabmysql.cpp
Diffstat (limited to 'storage/connect/tabodbc.cpp')
-rw-r--r--storage/connect/tabodbc.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp
index 6f006fb5967..bbc17129aaf 100644
--- a/storage/connect/tabodbc.cpp
+++ b/storage/connect/tabodbc.cpp
@@ -95,7 +95,7 @@ ODBCDEF::ODBCDEF(void)
{
Connect= Tabname= Tabschema= Tabcat= Srcdef= Qchar= Qrystr= Sep= NULL;
Catver = Options = Quoted = Maxerr = Maxres = 0;
- Xsrc = false;
+ Scrollable = Xsrc = false;
} // end of ODBCDEF constructor
/***********************************************************************/
@@ -129,6 +129,11 @@ bool ODBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Maxres = GetIntCatInfo("Maxres", 0);
Quoted = GetIntCatInfo("Quoted", 0);
Options = ODBConn::noOdbcDialog;
+//Options = ODBConn::noOdbcDialog | ODBConn::useCursorLib;
+
+ if ((Scrollable = GetBoolCatInfo("Scrollable", false)))
+ Elemt = 0; // Not compatible with extended fetch
+
Pseudo = 2; // FILID is Ok but not ROWID
return false;
} // end of DefineAM
@@ -193,6 +198,7 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp)
Quoted = MY_MAX(0, tdp->GetQuoted());
Rows = tdp->GetElemt();
Catver = tdp->Catver;
+ Scrollable = tdp->Scrollable;
} else {
Connect = NULL;
TableName = NULL;
@@ -205,6 +211,7 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp)
Quoted = 0;
Rows = 0;
Catver = 0;
+ Scrollable = false;
} // endif tdp
Quote = NULL;
@@ -231,6 +238,7 @@ TDBODBC::TDBODBC(PTDBODBC tdbp) : TDBASE(tdbp)
Catalog = tdbp->Catalog;
Srcdef = tdbp->Srcdef;
Qrystr = tdbp->Qrystr;
+ Scrollable = tdbp->Scrollable;
Quote = tdbp->Quote;
Query = tdbp->Query;
Count = tdbp->Count;
@@ -757,6 +765,12 @@ bool TDBODBC::OpenDB(PGLOBAL g)
// To_Kindex->Reset();
// rewind(Stream); >>>>>>> Something to be done with Cursor <<<<<<<
+ if (Ocp->Rewind(Query, (PODBCCOL)Columns)) {
+ Ocp->Close();
+ return true;
+ } // endif Rewind
+
+ Fpos = 0;
return false;
} // endif use