Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into poseidon.bredbandsbolaget.se:/home/tomas/mysql-5.1-new-ndb-merge
This commit is contained in:
commit
ded39d5a5e
@ -195,9 +195,11 @@ test slave_terminate SLAVESIDE_DISABLED 2
|
|||||||
DROP EVENT test.slave_terminate;
|
DROP EVENT test.slave_terminate;
|
||||||
"Cleanup"
|
"Cleanup"
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t28953 (a INT);
|
||||||
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
|
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
|
||||||
DO BEGIN
|
DO BEGIN
|
||||||
select * from t1;
|
select * from t28953;
|
||||||
END;|
|
END;|
|
||||||
ALTER EVENT event1 RENAME TO event2;
|
ALTER EVENT event1 RENAME TO event2;
|
||||||
DROP EVENT event2;
|
DROP EVENT event2;
|
||||||
|
DROP TABLE t28953;
|
||||||
|
@ -28,10 +28,12 @@ set binlog_format=statement;
|
|||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
|
||||||
|
CREATE TABLE t28953 (a INT);
|
||||||
|
|
||||||
DELIMITER |;
|
DELIMITER |;
|
||||||
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
|
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
|
||||||
DO BEGIN
|
DO BEGIN
|
||||||
select * from t1;
|
select * from t28953;
|
||||||
END;|
|
END;|
|
||||||
DELIMITER ;|
|
DELIMITER ;|
|
||||||
|
|
||||||
@ -45,3 +47,9 @@ DROP EVENT event2;
|
|||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
# Doing cleanup of the table referred to in the event to guarantee
|
||||||
|
# that there is no bad timing cauing it to try to access the table.
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP TABLE t28953;
|
||||||
|
sync_slave_with_master;
|
||||||
|
@ -76,11 +76,22 @@ let $wait_condition=select count(*) = 0 from information_schema.events
|
|||||||
where event_name='event_4' and status='enabled';
|
where event_name='event_4' and status='enabled';
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
# check the data
|
# Wait for the events to fire and check the data afterwards
|
||||||
|
|
||||||
|
let $wait_condition=SELECT SUM(a) >= 4 FROM table_1;
|
||||||
|
source include/wait_condition.inc;
|
||||||
SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1;
|
SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1;
|
||||||
|
|
||||||
|
let $wait_condition=SELECT SUM(a) >= 5 FROM table_2;
|
||||||
|
source include/wait_condition.inc;
|
||||||
SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2;
|
SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2;
|
||||||
|
|
||||||
|
let $wait_condition=SELECT SUM(a) >= 1 FROM table_3;
|
||||||
|
source include/wait_condition.inc;
|
||||||
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3;
|
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3;
|
||||||
|
|
||||||
|
let $wait_condition=SELECT SUM(a) >= 1 FROM table_4;
|
||||||
|
source include/wait_condition.inc;
|
||||||
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4;
|
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4;
|
||||||
|
|
||||||
SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
|
SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
|
||||||
|
@ -1869,9 +1869,9 @@ bool one_thread_per_connection_end(THD *thd, bool put_in_cache)
|
|||||||
|
|
||||||
/* It's safe to broadcast outside a lock (COND... is not deleted here) */
|
/* It's safe to broadcast outside a lock (COND... is not deleted here) */
|
||||||
DBUG_PRINT("signal", ("Broadcasting COND_thread_count"));
|
DBUG_PRINT("signal", ("Broadcasting COND_thread_count"));
|
||||||
|
my_thread_end();
|
||||||
(void) pthread_cond_broadcast(&COND_thread_count);
|
(void) pthread_cond_broadcast(&COND_thread_count);
|
||||||
|
|
||||||
my_thread_end();
|
|
||||||
pthread_exit(0);
|
pthread_exit(0);
|
||||||
DBUG_RETURN(0); // Impossible
|
DBUG_RETURN(0); // Impossible
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user