and remove usage of RESET MASTER in loops.
- Remove sleep of 0.1 second that was done even when not needed.
- Don't call include/wait_wsrep_ready.inc if NO_WSREP is defined.
- Added NO_WSREP=1 to all atomic tests.
- Use 'select 1' instead of 'show status' to check is server is up.
- Changed RESET MASTER to FLUSH BINARY LOGS to speed up atomic tests.
To be able to do this, added a new parameter variable to
show_events.inc to allow one to specify the name of the binary log
in the output.
The logic of the new code is:
- Log CREATE view to DDL log, with a marker if old view existed
- If old view exists (in case of CREATE or REPLACE view), make a copy
of the old view as view_name.frm-
- Create the new view definition file
- Delete copy of view if it was created.
Crash recovery:
- Delete view_name.frm~ file (Temporary file for view definition)
- If query was logged to binary log
- Delete copy of view if it exists
- else
-rename the copy of the view over the .frm file (restoring the
old definition)
One benefit of the new code is that CREATE OR REPLACE VIEW for an
existing view is no fully atomic: Either the view will be replaced or
the old one will be left unchanged.