clause server fires immediately after creating event and time between create and delete
event sometimes is enough for firing. So adding STARTS clause moves first execution in
future after drop of event
1. Added STARTS clause for CREATE EVENT.
2. Updated result file.
Select of the test could not perform deterministically, because the table remains to be
updatable by the running event handler.
Fixed with changing verification to use a logical values instead of comparison
with a pre-recorded results.
mysql-test/include/rpl_events.inc:
changing verification to use a logical values instead of comparison with a pre-recorded
results
mysql-test/suite/rpl/r/rpl_events.result:
resutls updated.
Updated test to use new include function
wait_for_slave_running_off.inc:
Created new include to resolve the timing issue recorded by Bug#30209
rpl_events.inc:
The issue shown in Bug#30128 is that 'from er' shows up in a part of the test that it should not show up in. This event really is not created until later in the test, yet since the test runs row and then turns around and runs statement, I am guessing that the first run may not have cleaned up like it should, so I am adding a sync with master after the drop of table t1 to ensure that both master and slave are clean.
mysql-test/suite/rpl/t/rpl_packet.test:
Updated test to use new include function
mysql-test/include/wait_for_slave_running_off.inc:
Created new include to resolve the timing issue recorded by Bug#30209
mysql-test/include/rpl_events.inc:
The issue shown in Bug#30128 is that 'from er' shows up in a part of the test that it should not show up in. This event really is not created until later in the test, yet since the test runs row and then turns around and runs statement, I am guessing that the first run may not have cleaned up like it should, so I am adding a sync with master after the drop of table t1 to ensure that both master and slave are clean.
This patch contains enhancements to the rpl_events test to correct
timing issues related to the firing of events and verification of the
results of those events.
mysql-test/include/rpl_events.inc:
BUG#28991 : rpl_events failure in pushbuild
This patch contains refinements to the rpl_events test to remove all
timing issues related to sleep commands. It also refines the test to
include additional documentation.
mysql-test/r/rpl_events.result:
BUG#28991 : rpl_events failure in pushbuild
This patch contains the result file for the refinements to the
rpl_events test.
In tests waiting on a timeout is not deterministic enough
to make sure that an event actually finished executing.
Fixed the test by waiting in a loop and checking the effect
that the event is supposed to produce.
mysql-test/include/rpl_events.inc:
Bug #28991: wait until event has taken effect
the SELECT in the test to only the expected rows. This helps
eliminate the possibility of spurious rows causing the test to
fail.
mysql-test/r/rpl_events.result:
This patch modifies the test results to match the new SELECT for test
results.
This patch removes the SLAVESIDE_DISABLED token from the event status clause
and adds the ability to mark an event as status = SLAVESIDE_DISABLED by using
the syntax DISABLE ON SLAVE instead.
The patch also adds tests to rpl_events to check the new syntax.
mysql-test/include/rpl_events.inc:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds tests to check the SQL syntax change from SLAVESIDE_DISABLED
to DISABLE ON SLAVE.
mysql-test/r/rpl_events.result:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds the results for the tests to check the SQL syntax change
from SLAVESIDE_DISABLED to DISABLE ON SLAVE.
sql/lex.h:
WL#3629 - Replication of Invocation and Invoked Features
This patch removes the SLAVESIDE_DISABLED token.
sql/sql_yacc.yy:
WL#3629 - Replication of Invocation and Invoked Features
This patch removes the SLAVESIDE_DISABLED token from the event status clause
and adds the ability to mark an event as status = SLAVESIDE_DISABLED by using
the syntax DISABLE ON SLAVE instead.
This patch corrects errors that occurred in a local manual merge as a result
of updating the local repository and includes changes necessary to correct
problems found during the recalculation of next execution of events in RBR.
mysql-test/include/rpl_events.inc:
WL#3629 - Replication of Invocation and Invoked Features
This patch changes the rpl_events test to be more comprehensive in catching
errors as a result of RBR. Changes include clarification of SELECTs with
WHERE clauses and synchronization with master and slave.
mysql-test/r/rpl_events.result:
WL#3629 - Replication of Invocation and Invoked Features
This patch changes the results for the rpl_events test to accomodate the changes
in the test.
scripts/mysql_system_tables.sql:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds the originator column and a new enum value to the mysql.event table.
This change was necessary to accomodate changes as a result of other patches.
sql/event_data_objects.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch corrects an error in merging that occurred during manual merge.
The status check was changed to include either ENABLED or DISABLED in the
gate to change the status to SLAVESIDE_DISABLED for events replicated to
the slave.
This patch also includes an update to correct a problem encountered during
testing after the local merge. The update_timing_fields method is replicating
the timing changes in RBR to the slave thereby over writing the change to the
status column in the process. This code includes a check to turn off the next
binlog event if in RBR.
sql/event_queue.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch corrects an error in merging that occurred during manual merge.
The code was corrected to include both types of disabled status enums
(DISABLED, SLAVESIDE_DISABLED) in the create_event and update_event methods.
sql/sql_show.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch corrects an error in merging that occurred during manual merge.
It corrects the order in which the originator column appears in the show
structures. The error caused incorrect output on SHOW EVENTS commands.
This changeset adds replication of events and user-defined functions.
There are several bug reports involved in this change:
BUG#16421, BUG#17857, BUG#20384:
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED'). A status of
SLAVESIDE_DISABLED is set on the slave during replication of events.
This enables users to determine which events werereplicated from the
master and to later enable them if they promote the slave to a master.
The CREATE, ALTER, and DROP statements are binlogged.
A new test was added for replication of events (rpl_events).
BUG#17671:
This patch modifies the code to permit logging of user-defined functions.
Note: this is the CREATE FUNCTION ... SONAME variety. A more friendly error
message to be displayed should a replicated user-defined function not be
found in the loadable library or if the library is missing from the
slave.The CREATE andDROP statements are binlogged. A new test was added
for replication of user-defined functions (rpl_udf).
The patch also adds a new column to the mysql.event table named
'originator' that is used to store the server_id of the server that
the event originated on. This enables users to promote a slave to a
master and later return the promoted slave to a slave and disable the
replicated events.
mysql-test/lib/init_db.sql:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the SLAVESIDE_DISABLED to the list of enumerated
values for the mysql.event table.
This patch adds the column 'originator' to the mysql.event table.
mysql-test/r/events.result:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the 'originator' column to the events test results.
This was necessary to ensure the manual insert into mysql.event table
succeeds because the originator column is set to NOT NULL.
mysql-test/r/events_grant.result:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the 'originator' column to the events_grant test results.
This was necessary to ensure the manual insert into mysql.event table
succeeds because the originator column is set to NOT NULL.
mysql-test/r/events_restart_phase1.result:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the 'originator' column to the events_restart_phase1
test results. This was necessary to ensure the manual insert into
mysql.event table succeeds because the originator column is set to
NOT NULL.
mysql-test/r/system_mysql_db.result:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the SLAVESIDE_DISABLED to the list of enumerated
values for the mysql.event table.
This patch adds the column 'originator' to the mysql.event table.
These changes to the result file were necessary to ensure correct test
results.
mysql-test/t/events.test:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the 'originator' column to the events
test. This was necessary to ensure the manual insert into
mysql.event table succeeds because the originator column is set to
NOT NULL.
mysql-test/t/events_restart_phase1.test:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the 'originator' column to the events_restart_phase1
test. This was necessary to ensure the manual insert into
mysql.event table succeeds because the originator column is set to
NOT NULL.
scripts/mysql_create_system_tables.sh:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the SLAVESIDE_DISABLED to the list of enumerated
values for the mysql.event table.
This patch adds the column 'originator' to the mysql.event table.
scripts/mysql_fix_privilege_tables.sql:
WL#3629 - Replication of Invocation and Invoked Feature
This patch adds the SLAVESIDE_DISABLED to the list of enumerated
values for the mysql.event table.
This patch adds the column 'originator' to the mysql.event table.
sql/event_data_objects.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events.
This patch uses the new Event_basic:: enumerated values.
sql/event_data_objects.h:
WL#3629 - Replication of Invocation and Invoked Features
This patch moves the duplicated enumeration values for ENABLED,
SLAVESIDE_DISABLED, and DISABLED to the Event_basic class removing
them from the other Event_* classes.
sql/event_db_repository.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events.
The patch also adds a new column to the mysql.event table named
'originator' that is used to store the server_id of the server that
the event originated on. This enables users to promote a slave to a
master and later return the promoted slave to a slave and disable the
replicated events.
sql/event_db_repository.h:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to add a new field named 'originator'
to the enum_event_table_field and associated structure.
sql/event_queue.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events.
sql/events.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events.
sql/lex.h:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to add the new SLAVESIDE_DISABLE symbol
to the lexical parser.
sql/slave.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit the capture of the error on
the slave when a UDF from a loadable library is not loaded on the server
when replicated from the master.
sql/sql_parse.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch removes the comment because drop functions commands
are replicated.
sql/sql_show.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. The code also adds changes the display width of the status
column for the schema table for the show events command and also adds
the new column 'originator' to the events_field_info structure.
sql/sql_udf.cc:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to add the binlogging of the create and
drop function events.
sql/sql_yacc.yy:
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to change the enumeration of the status
column for the events in the parser. The code uses the Event_basic::
enumerations allowing the enums to be defined in one place.
mysql-test/t/rpl_events.test:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test for testing replication of events. The test
uses include files so that the test can test under both RBR and SBR.
mysql-test/r/rpl_events.result:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new result file for testing replication of events.
mysql-test/r/rpl_udf.result:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new result file for testing replication of UDFs.
mysql-test/t/rpl_udf.test:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test for testing replication of UDFs. The test
uses include files so that the test can test under both RBR and SBR.
mysql-test/include/rpl_events.inc:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new include file for testing replication of events.
This file contains the core test procedures.
mysql-test/include/rpl_udf.inc:
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new include file for testing replication of UDFs.
This file contains the core test procedures.