3 edited body
source | link

You should not put any faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would be way better off using MySQL Replication as follows:

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S1S2

This would automatically do all DML against that table provided you replicate to the same named table.

You should not put any faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would be way better off using MySQL Replication as follows:

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S1

This would automatically do all DML against that table provided you replicate to the same named table.

You should not put any faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would be way better off using MySQL Replication as follows:

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S2

This would automatically do all DML against that table provided you replicate to the same named table.

2 added 16 characters in body
source | link

You really cannotshould not put any faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would be way better off using MySQL Replication as follows:

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S1

This would automatically do all DML against that table provided you replicate to the same named table.

You really cannot put faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would way better off using MySQL Replication

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S1

This would automatically do all DML against that table provided you replicate to the same named table.

You should not put any faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would be way better off using MySQL Replication as follows:

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S1

This would automatically do all DML against that table provided you replicate to the same named table.

1
source | link

You really cannot put faith in triggers when it comes to federated tables. You are better off creating a temporary trigger on the real MyISAM table on the source side.

Picture this:

On Server S1 - T1 is MyISAM table - T2 is FEDERATED table to T1 over on S2

Do the following:

  • Create the Trigger on T1 to insert a row into T2
  • Insert Data into T1
  • Drop the Trigger

ALTERNATIVE

You would way better off using MySQL Replication

  • S1 is the Master
  • S2 is the Slave
  • Set replicate-do-table=db1.T1 in my.cnf on S1

This would automatically do all DML against that table provided you replicate to the same named table.