Skip to content
Permalink
Browse files
- Enable CONNECT tables to have triggers
  Update version number
  modified:   storage/connect/ha_connect.cc
  • Loading branch information
Buggynours committed Jan 27, 2019
1 parent 27fec12 commit 0f388dd
Showing 1 changed file with 12 additions and 7 deletions.
@@ -170,9 +170,9 @@
#define JSONMAX 10 // JSON Default max grp size

extern "C" {
char version[]= "Version 1.06.0008 October 06, 2018";
char version[] = "Version 1.06.0009 January 27, 2019";
#if defined(__WIN__)
char compver[]= "Version 1.06.0008 " __DATE__ " " __TIME__;
char compver[]= "Version 1.06.0009 " __DATE__ " " __TIME__;
char slash= '\\';
#else // !__WIN__
char slash= '/';
@@ -1914,9 +1914,11 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
break;
} // endswitch xmode

if (xmod != MODE_INSERT || tdbp->GetAmType() == TYPE_AM_MYSQL
|| tdbp->GetAmType() == TYPE_AM_ODBC
|| tdbp->GetAmType() == TYPE_AM_JDBC) {
// g->More is 1 when executing commands from triggers
if (!g->More && (xmod != MODE_INSERT
|| tdbp->GetAmType() == TYPE_AM_MYSQL
|| tdbp->GetAmType() == TYPE_AM_ODBC
|| tdbp->GetAmType() == TYPE_AM_JDBC)) {
// Get the list of used fields (columns)
char *p;
unsigned int k1, k2, n1, n2;
@@ -4674,7 +4676,10 @@ int ha_connect::start_stmt(THD *thd, thr_lock_type lock_type)
PGLOBAL g= GetPlug(thd, xp);
DBUG_ENTER("ha_connect::start_stmt");

if (check_privileges(thd, GetTableOptionStruct(), table->s->db.str, true))
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))
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);

// Action will depend on lock_type
@@ -7312,7 +7317,7 @@ maria_declare_plugin(connect)
0x0106, /* version number (1.06) */
NULL, /* status variables */
connect_system_variables, /* system variables */
"1.06.0008", /* string version */
"1.06.0009", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}
maria_declare_plugin_end;

0 comments on commit 0f388dd

Please sign in to comment.