Commit bece44be authored by Olivier Bertrand's avatar Olivier Bertrand

- Enable CONNECT tables to have triggers

  Update version number
  modified:   storage/connect/ha_connect.cc
parent bcb8a522
...@@ -170,9 +170,9 @@ ...@@ -170,9 +170,9 @@
#define JSONMAX 10 // JSON Default max grp size #define JSONMAX 10 // JSON Default max grp size
extern "C" { extern "C" {
char version[]= "Version 1.06.0008 October 06, 2018"; char version[]= "Version 1.06.0009 January 27, 2019";
#if defined(__WIN__) #if defined(__WIN__)
char compver[]= "Version 1.06.0008 " __DATE__ " " __TIME__; char compver[]= "Version 1.06.0009 " __DATE__ " " __TIME__;
char slash= '\\'; char slash= '\\';
#else // !__WIN__ #else // !__WIN__
char slash= '/'; char slash= '/';
...@@ -1914,9 +1914,11 @@ int ha_connect::OpenTable(PGLOBAL g, bool del) ...@@ -1914,9 +1914,11 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
break; break;
} // endswitch xmode } // endswitch xmode
if (xmod != MODE_INSERT || tdbp->GetAmType() == TYPE_AM_MYSQL // g->More is 1 when executing commands from triggers
|| tdbp->GetAmType() == TYPE_AM_ODBC if (!g->More && (xmod != MODE_INSERT
|| tdbp->GetAmType() == TYPE_AM_JDBC) { || tdbp->GetAmType() == TYPE_AM_MYSQL
|| tdbp->GetAmType() == TYPE_AM_ODBC
|| tdbp->GetAmType() == TYPE_AM_JDBC)) {
// Get the list of used fields (columns) // Get the list of used fields (columns)
char *p; char *p;
unsigned int k1, k2, n1, n2; unsigned int k1, k2, n1, n2;
...@@ -4631,7 +4633,9 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, ...@@ -4631,7 +4633,9 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
break; break;
case SQLCOM_CREATE_VIEW: case SQLCOM_CREATE_VIEW:
case SQLCOM_DROP_VIEW: case SQLCOM_DROP_VIEW:
newmode= MODE_ANY; case SQLCOM_CREATE_TRIGGER:
case SQLCOM_DROP_TRIGGER:
newmode= MODE_ANY;
break; break;
case SQLCOM_ALTER_TABLE: case SQLCOM_ALTER_TABLE:
*chk= true; *chk= true;
...@@ -4674,6 +4678,9 @@ int ha_connect::start_stmt(THD *thd, thr_lock_type lock_type) ...@@ -4674,6 +4678,9 @@ int ha_connect::start_stmt(THD *thd, thr_lock_type lock_type)
PGLOBAL g= GetPlug(thd, xp); PGLOBAL g= GetPlug(thd, xp);
DBUG_ENTER("ha_connect::start_stmt"); DBUG_ENTER("ha_connect::start_stmt");
if (table->triggers)
g->More= 1; // We don't know which columns are used by the trigger
if (check_privileges(thd, GetTableOptionStruct(), table->s->db.str, true)) if (check_privileges(thd, GetTableOptionStruct(), table->s->db.str, true))
DBUG_RETURN(HA_ERR_INTERNAL_ERROR); DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
...@@ -7310,7 +7317,7 @@ maria_declare_plugin(connect) ...@@ -7310,7 +7317,7 @@ maria_declare_plugin(connect)
0x0106, /* version number (1.06) */ 0x0106, /* version number (1.06) */
NULL, /* status variables */ NULL, /* status variables */
connect_system_variables, /* system variables */ connect_system_variables, /* system variables */
"1.06.0008", /* string version */ "1.06.0009", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
} }
maria_declare_plugin_end; maria_declare_plugin_end;
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