Commit 260c0de9 authored by Olivier Bertrand's avatar Olivier Bertrand

- Add (limited) UPDATE/DELETE support to MYSQL type CONNECT tables

modified:
  storage/connect/ha_connect.cc
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
parent eca84a9b
...@@ -4718,6 +4718,6 @@ maria_declare_plugin(connect) ...@@ -4718,6 +4718,6 @@ maria_declare_plugin(connect)
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
"0.1", /* string version */ "0.1", /* string version */
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL /* maturity */ MariaDB_PLUGIN_MATURITY_ALPHA /* maturity */
} }
maria_declare_plugin_end; maria_declare_plugin_end;
This diff is collapsed.
...@@ -53,8 +53,10 @@ class MYSQLDEF : public TABDEF {/* Logical table description */ ...@@ -53,8 +53,10 @@ class MYSQLDEF : public TABDEF {/* Logical table description */
PSZ Username; /* User logon name */ PSZ Username; /* User logon name */
PSZ Password; /* Password logon info */ PSZ Password; /* Password logon info */
PSZ Server; /* PServerID */ PSZ Server; /* PServerID */
PSZ Qrystr; /* The original query */
int Portnumber; /* MySQL port number (0 = default) */ int Portnumber; /* MySQL port number (0 = default) */
int Mxr; /* Maxerr for an Exec table */ int Mxr; /* Maxerr for an Exec table */
int Quoted; /* Identifier quoting level */
bool Isview; /* TRUE if this table is a MySQL view */ bool Isview; /* TRUE if this table is a MySQL view */
bool Bind; /* Use prepared statement on insert */ bool Bind; /* Use prepared statement on insert */
bool Delayed; /* Delayed insert */ bool Delayed; /* Delayed insert */
...@@ -104,9 +106,10 @@ class TDBMYSQL : public TDBASE { ...@@ -104,9 +106,10 @@ class TDBMYSQL : public TDBASE {
// Internal functions // Internal functions
bool MakeSelect(PGLOBAL g); bool MakeSelect(PGLOBAL g);
bool MakeInsert(PGLOBAL g); bool MakeInsert(PGLOBAL g);
//bool MakeUpdate(PGLOBAL g); int MakeUpdate(PGLOBAL g);
//bool MakeDelete(PGLOBAL g); int MakeDelete(PGLOBAL g);
int BindColumns(PGLOBAL g); int BindColumns(PGLOBAL g);
int SendCommand(PGLOBAL g);
// Members // Members
MYSQLC Myc; // MySQL connection class MYSQLC Myc; // MySQL connection class
...@@ -120,6 +123,7 @@ class TDBMYSQL : public TDBASE { ...@@ -120,6 +123,7 @@ class TDBMYSQL : public TDBASE {
char *Server; // The server ID char *Server; // The server ID
char *Query; // Points to SQL query char *Query; // Points to SQL query
char *Qbuf; // Used for not prepared insert char *Qbuf; // Used for not prepared insert
char *Qrystr; // The original query
bool Fetched; // True when fetch was done bool Fetched; // True when fetch was done
bool Isview; // True if this table is a MySQL view bool Isview; // True if this table is a MySQL view
bool Prep; // Use prepared statement on insert bool Prep; // Use prepared statement on insert
...@@ -129,6 +133,7 @@ class TDBMYSQL : public TDBASE { ...@@ -129,6 +133,7 @@ class TDBMYSQL : public TDBASE {
int N; // The current table index int N; // The current table index
int Port; // MySQL port number (0 = default) int Port; // MySQL port number (0 = default)
int Nparm; // The number of statement parameters int Nparm; // The number of statement parameters
int Quoted; // The identifier quoting level
}; // end of class TDBMYSQL }; // end of class TDBMYSQL
/***********************************************************************/ /***********************************************************************/
......
...@@ -602,7 +602,7 @@ int TDBODBC::GetMaxSize(PGLOBAL g) ...@@ -602,7 +602,7 @@ int TDBODBC::GetMaxSize(PGLOBAL g)
{ {
if (MaxSize < 0) { if (MaxSize < 0) {
// Make MariaDB happy // Make MariaDB happy
MaxSize = (Mode == MODE_READ) ? 100 : 0; MaxSize = (Mode == MODE_DELETE) ? 0 : 10;
#if 0 #if 0
// This is unuseful and takes time // This is unuseful and takes time
if (Srcdef) { if (Srcdef) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment