mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Add (limited) support for UPDATE and DELETE to ODBC tables
(also provide the possibility to issue NOTE warnings) modified: storage/connect/connect.cc storage/connect/ha_connect.cc storage/connect/ha_connect.h storage/connect/odbconn.cpp storage/connect/odbconn.h storage/connect/plgdbsem.h storage/connect/tabodbc.cpp storage/connect/tabodbc.h - Return proper error number when modifying read only tables modified: storage/connect/connect.cc storage/connect/ha_connect.cc storage/connect/ha_connect.h storage/connect/mysql-test/connect/r/bin.result storage/connect/mysql-test/connect/r/csv.result storage/connect/mysql-test/connect/r/dbf.result storage/connect/mysql-test/connect/r/fix.result storage/connect/mysql-test/connect/r/ini.result storage/connect/mysql-test/connect/r/vec.result storage/connect/mysql-test/connect/t/bin.test storage/connect/mysql-test/connect/t/csv.test storage/connect/mysql-test/connect/t/dbf.test storage/connect/mysql-test/connect/t/fix.test storage/connect/mysql-test/connect/t/ini.test storage/connect/mysql-test/connect/t/vec.test storage/connect/table.cpp storage/connect/taboccur.cpp storage/connect/tabpivot.cpp storage/connect/tabutil.cpp storage/connect/tabwmi.cpp storage/connect/tabxcl.cpp
This commit is contained in:
@@ -34,7 +34,7 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */
|
||||
PSZ GetTabowner(void) {return Tabowner;}
|
||||
PSZ GetTabqual(void) {return Tabqual;}
|
||||
PSZ GetSrcdef(void) {return Srcdef;}
|
||||
PSZ GetQchar(void) {return (Qchar && *Qchar) ? Qchar : NULL;}
|
||||
int GetQuoted(void) {return Quoted;}
|
||||
int GetCatver(void) {return Catver;}
|
||||
int GetOptions(void) {return Options;}
|
||||
|
||||
@@ -53,6 +53,7 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */
|
||||
PSZ Qrystr; /* The original query */
|
||||
int Catver; /* ODBC version for catalog functions */
|
||||
int Options; /* Open connection options */
|
||||
int Quoted; /* Identifier quoting level */
|
||||
int Mxr; /* Maxerr for an Exec table */
|
||||
bool Xsrc; /* Execution type */
|
||||
}; // end of ODBCDEF
|
||||
@@ -100,10 +101,11 @@ class TDBODBC : public TDBASE {
|
||||
// Internal functions
|
||||
int Decode(char *utf, char *buf, size_t n);
|
||||
char *MakeSQL(PGLOBAL g, bool cnt);
|
||||
bool MakeInsert(PGLOBAL g);
|
||||
char *MakeInsert(PGLOBAL g);
|
||||
//bool MakeFilter(PGLOBAL g, bool c);
|
||||
bool BindParameters(PGLOBAL g);
|
||||
char *MakeStmt(PGLOBAL g);
|
||||
char *MakeUpdate(PGLOBAL g);
|
||||
char *MakeDelete(PGLOBAL g);
|
||||
|
||||
// Members
|
||||
ODBConn *Ocp; // Points to an ODBC connection class
|
||||
@@ -121,6 +123,7 @@ class TDBODBC : public TDBASE {
|
||||
char *DBQ; // The address part of Connect string
|
||||
char *Qrystr; // The original query
|
||||
int Options; // Connect options
|
||||
int Quoted; // The identifier quoting level
|
||||
int Fpos; // Position of last read record
|
||||
int AftRows; // The number of affected rows
|
||||
int Rows; // Rowset size
|
||||
@@ -206,7 +209,7 @@ class TDBXDBC : public TDBODBC {
|
||||
virtual bool OpenDB(PGLOBAL g);
|
||||
virtual int ReadDB(PGLOBAL g);
|
||||
virtual int WriteDB(PGLOBAL g);
|
||||
//virtual int DeleteDB(PGLOBAL g, int irc);
|
||||
virtual int DeleteDB(PGLOBAL g, int irc);
|
||||
//virtual void CloseDB(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user