Commit 50d95649 authored by tomas@poseidon.bredbandsbolaget.se's avatar tomas@poseidon.bredbandsbolaget.se
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1

into  poseidon.bredbandsbolaget.se:/home/tomas/mysql-5.1-new-ndb-merge
parents fe9ee5c7 a1a94e23
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -195,9 +195,11 @@ test slave_terminate SLAVESIDE_DISABLED 2
DROP EVENT test.slave_terminate;
"Cleanup"
DROP TABLE t1;
CREATE TABLE t28953 (a INT);
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
DO BEGIN
select * from t1;
select * from t28953;
END;|
ALTER EVENT event1 RENAME TO event2;
DROP EVENT event2;
DROP TABLE t28953;
+9 −1
Original line number Diff line number Diff line
@@ -28,10 +28,12 @@ set binlog_format=statement;

connection master;

CREATE TABLE t28953 (a INT);

DELIMITER |;
CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR
DO BEGIN
	select * from t1;
	select * from t28953;
END;|
DELIMITER ;|

@@ -45,3 +47,9 @@ DROP EVENT event2;

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;
+12 −1
Original line number Diff line number Diff line
@@ -76,11 +76,22 @@ let $wait_condition=select count(*) = 0 from information_schema.events
where event_name='event_4' and status='enabled';
--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;

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;

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;

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(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
+1 −1
Original line number Diff line number Diff line
@@ -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) */
  DBUG_PRINT("signal", ("Broadcasting COND_thread_count"));
  my_thread_end();
  (void) pthread_cond_broadcast(&COND_thread_count);

  my_thread_end();
  pthread_exit(0);
  DBUG_RETURN(0);                               // Impossible
}