Commit bf9572ba authored by Philip Stoev's avatar Philip Stoev Committed by Nirbhay Choubey

refs codership/mysql-wsrep#228 - a test for wsrep_sync_wait and SHOW

parent 1e14db11
SET SESSION wsrep_sync_wait = 1;
CREATE DATABASE db1;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */
DROP DATABASE db1;
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
SHOW CREATE PROCEDURE p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1 FROM DUAL latin1 latin1_swedish_ci latin1_swedish_ci
DROP PROCEDURE p1;
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
SHOW PROCEDURE CODE p1;
Pos Instruction
0 stmt "SELECT 1 FROM DUAL"
DROP PROCEDURE p1;
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
SHOW CREATE FUNCTION f1;
Function sql_mode Create Function character_set_client collation_connection Database Collation
f1 NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 123 latin1 latin1_swedish_ci latin1_swedish_ci
DROP FUNCTION f1;
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
SHOW FUNCTION CODE f1;
Pos Instruction
0 freturn 3 123
DROP FUNCTION f1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a';
SHOW CREATE TRIGGER tr1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
tr1 NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci
DROP TABLE t1;
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
SHOW CREATE EVENT event1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
event1 NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `event1` ON SCHEDULE AT '2038-01-01 23:59:59' ON COMPLETION NOT PRESERVE DISABLE ON SLAVE DO SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
DROP EVENT event1;
#
# Test that the various SHOW commands obey wsrep_sync_wait - codership/mysql-wsrep#228
#
--source include/galera_cluster.inc
--connection node_2
SET SESSION wsrep_sync_wait = 1;
--connection node_1
CREATE DATABASE db1;
--connection node_2
SHOW CREATE DATABASE db1;
DROP DATABASE db1;
--connection node_1
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
--connection node_2
SHOW CREATE PROCEDURE p1;
DROP PROCEDURE p1;
--connection node_1
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
--connection node_2
SHOW PROCEDURE CODE p1;
DROP PROCEDURE p1;
--connection node_1
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
--connection node_2
SHOW CREATE FUNCTION f1;
DROP FUNCTION f1;
--connection node_1
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
--connection node_2
SHOW FUNCTION CODE f1;
DROP FUNCTION f1;
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a';
--connection node_2
SHOW CREATE TRIGGER tr1;
DROP TABLE t1;
--connection node_1
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
--connection node_2
SHOW CREATE EVENT event1;
DROP EVENT event1;
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