Commit 63b84034 authored by unknown's avatar unknown

Merge mysqldev@production.mysql.com:my/mysql-5.1-release

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-release

parents 1d41f34f 91552f96
...@@ -16,7 +16,7 @@ CREATE EVENT ev_drop3 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1; ...@@ -16,7 +16,7 @@ CREATE EVENT ev_drop3 ON SCHEDULE EVERY 10 MINUTE DISABLE DO SELECT 1;
USE events_test; USE events_test;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS;
COUNT(*) COUNT(*)
203 103
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2'; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2';
COUNT(*) COUNT(*)
3 3
...@@ -29,7 +29,7 @@ CREATE DATABASE events_conn1_test2; ...@@ -29,7 +29,7 @@ CREATE DATABASE events_conn1_test2;
USE events_conn1_test2; USE events_conn1_test2;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2'; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2';
COUNT(*) COUNT(*)
100 50
SET GLOBAL event_scheduler=1; SET GLOBAL event_scheduler=1;
DROP DATABASE events_conn1_test2; DROP DATABASE events_conn1_test2;
SET GLOBAL event_scheduler=2; SET GLOBAL event_scheduler=2;
...@@ -41,14 +41,14 @@ USE events_conn1_test3; ...@@ -41,14 +41,14 @@ USE events_conn1_test3;
SET GLOBAL event_scheduler=1; SET GLOBAL event_scheduler=1;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test3'; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test3';
COUNT(*) COUNT(*)
100 50
CREATE DATABASE events_conn1_test4; CREATE DATABASE events_conn1_test4;
USE events_conn1_test4; USE events_conn1_test4;
CREATE DATABASE events_conn1_test2; CREATE DATABASE events_conn1_test2;
USE events_conn1_test2; USE events_conn1_test2;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2'; SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_test2';
COUNT(*) COUNT(*)
100 50
DROP DATABASE events_conn2_db; DROP DATABASE events_conn2_db;
DROP DATABASE events_conn3_db; DROP DATABASE events_conn3_db;
DROP DATABASE events_conn1_test2; DROP DATABASE events_conn1_test2;
......
prepare stmt1 from ' show full processlist '; prepare stmt1 from ' show full processlist ';
execute stmt1; execute stmt1;
Id User Host db Command Time State Info Id User Host db Command Time State Info
number event_scheduler localhost NULL Connect time Suspended NULL
number root localhost test Query time NULL show full processlist number root localhost test Query time NULL show full processlist
deallocate prepare stmt1; deallocate prepare stmt1;
...@@ -299,7 +299,7 @@ t9 MyISAM 10 Dynamic 2 216 432 # 2048 0 NULL # # # latin1_swedish_ci NULL ...@@ -299,7 +299,7 @@ t9 MyISAM 10 Dynamic 2 216 432 # 2048 0 NULL # # # latin1_swedish_ci NULL
prepare stmt4 from ' show status like ''Threads_running'' '; prepare stmt4 from ' show status like ''Threads_running'' ';
execute stmt4; execute stmt4;
Variable_name Value Variable_name Value
Threads_running 1 Threads_running 2
prepare stmt4 from ' show variables like ''sql_mode'' '; prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4; execute stmt4;
Variable_name Value Variable_name Value
......
...@@ -10,5 +10,6 @@ user() ...@@ -10,5 +10,6 @@ user()
# #
show processlist; show processlist;
Id User Host db Command Time State Info Id User Host db Command Time State Info
<id> event_scheduler <host> NULL <command> <time> <state> <info>
<id> root <host> test <command> <time> <state> <info> <id> root <host> test <command> <time> <state> <info>
<id> root <host> test <command> <time> <state> <info> <id> root <host> test <command> <time> <state> <info>
...@@ -34,6 +34,7 @@ lock tables t2 write; ...@@ -34,6 +34,7 @@ lock tables t2 write;
call bug9486(); call bug9486();
show processlist; show processlist;
Id User Host db Command Time State Info Id User Host db Command Time State Info
# event_scheduler localhost NULL Connect # Suspended NULL
# root localhost test Sleep # NULL # root localhost test Sleep # NULL
# root localhost test Query # Locked update t1, t2 set val= 1 where id1=id2 # root localhost test Query # Locked update t1, t2 set val= 1 where id1=id2
# root localhost test Query # NULL show processlist # root localhost test Query # NULL show processlist
......
...@@ -18,9 +18,11 @@ show processlist; ...@@ -18,9 +18,11 @@ show processlist;
end| end|
call bug4902_2()| call bug4902_2()|
Id User Host db Command Time State Info Id User Host db Command Time State Info
# event_scheduler localhost NULL Connect # Suspended NULL
# root localhost test Query # NULL show processlist # root localhost test Query # NULL show processlist
call bug4902_2()| call bug4902_2()|
Id User Host db Command Time State Info Id User Host db Command Time State Info
# event_scheduler localhost NULL Connect # Suspended NULL
# root localhost test Query # NULL show processlist # root localhost test Query # NULL show processlist
drop procedure bug4902_2| drop procedure bug4902_2|
drop function if exists bug5278| drop function if exists bug5278|
......
...@@ -26,20 +26,20 @@ Last_query_cost 0.000000 ...@@ -26,20 +26,20 @@ Last_query_cost 0.000000
FLUSH STATUS; FLUSH STATUS;
SHOW STATUS LIKE 'max_used_connections'; SHOW STATUS LIKE 'max_used_connections';
Variable_name Value Variable_name Value
Max_used_connections 1 Max_used_connections 2
SET @save_thread_cache_size=@@thread_cache_size; SET @save_thread_cache_size=@@thread_cache_size;
SET GLOBAL thread_cache_size=3; SET GLOBAL thread_cache_size=3;
SHOW STATUS LIKE 'max_used_connections'; SHOW STATUS LIKE 'max_used_connections';
Variable_name Value Variable_name Value
Max_used_connections 3 Max_used_connections 4
FLUSH STATUS; FLUSH STATUS;
SHOW STATUS LIKE 'max_used_connections'; SHOW STATUS LIKE 'max_used_connections';
Variable_name Value Variable_name Value
Max_used_connections 2
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 3 Max_used_connections 3
SHOW STATUS LIKE 'max_used_connections'; SHOW STATUS LIKE 'max_used_connections';
Variable_name Value Variable_name Value
Max_used_connections 4 Max_used_connections 4
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 5
SET GLOBAL thread_cache_size=@save_thread_cache_size; SET GLOBAL thread_cache_size=@save_thread_cache_size;
...@@ -13,7 +13,7 @@ GRANT ALL ON *.* TO event_user3@localhost; ...@@ -13,7 +13,7 @@ GRANT ALL ON *.* TO event_user3@localhost;
connect (conn2,localhost,event_user2,,events_conn2_db); connect (conn2,localhost,event_user2,,events_conn2_db);
--echo "In the second connection we create some events which won't be dropped till the end" --echo "In the second connection we create some events which won't be dropped till the end"
--disable_query_log --disable_query_log
let $1= 100; let $1= 50;
while ($1) while ($1)
{ {
eval CREATE EVENT conn2_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn2_ev$1", NOW()); eval CREATE EVENT conn2_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn2_ev$1", NOW());
...@@ -23,7 +23,7 @@ while ($1) ...@@ -23,7 +23,7 @@ while ($1)
connect (conn3,localhost,event_user3,,events_conn3_db); connect (conn3,localhost,event_user3,,events_conn3_db);
--echo "In the second connection we create some events which won't be dropped till the end" --echo "In the second connection we create some events which won't be dropped till the end"
--disable_query_log --disable_query_log
let $1= 100; let $1= 50;
while ($1) while ($1)
{ {
eval CREATE EVENT conn3_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn3_ev$1", NOW()); eval CREATE EVENT conn3_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn3_ev$1", NOW());
...@@ -45,7 +45,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_ ...@@ -45,7 +45,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_
CREATE DATABASE events_conn1_test2; CREATE DATABASE events_conn1_test2;
USE events_conn1_test2; USE events_conn1_test2;
--disable_query_log --disable_query_log
let $1= 100; let $1= 50;
while ($1) while ($1)
{ {
eval CREATE EVENT conn1_round1_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round1_ev$1", NOW()); eval CREATE EVENT conn1_round1_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round1_ev$1", NOW());
...@@ -62,7 +62,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_ ...@@ -62,7 +62,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_
CREATE DATABASE events_conn1_test3; CREATE DATABASE events_conn1_test3;
USE events_conn1_test3; USE events_conn1_test3;
--disable_query_log --disable_query_log
let $1= 100; let $1= 50;
while ($1) while ($1)
{ {
eval CREATE EVENT conn1_round2_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round2_ev$1", NOW()); eval CREATE EVENT conn1_round2_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round2_ev$1", NOW());
...@@ -74,7 +74,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_ ...@@ -74,7 +74,7 @@ SELECT COUNT(*) FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='events_conn1_
CREATE DATABASE events_conn1_test4; CREATE DATABASE events_conn1_test4;
USE events_conn1_test4; USE events_conn1_test4;
--disable_query_log --disable_query_log
let $1= 100; let $1= 50;
while ($1) while ($1)
{ {
eval CREATE EVENT conn1_round3_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round3_ev$1", NOW()); eval CREATE EVENT conn1_round3_ev$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round3_ev$1", NOW());
...@@ -85,7 +85,7 @@ while ($1) ...@@ -85,7 +85,7 @@ while ($1)
CREATE DATABASE events_conn1_test2; CREATE DATABASE events_conn1_test2;
USE events_conn1_test2; USE events_conn1_test2;
--disable_query_log --disable_query_log
let $1= 100; let $1= 50;
while ($1) while ($1)
{ {
eval CREATE EVENT ev_round4_drop$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round4_ev$1", NOW()); eval CREATE EVENT ev_round4_drop$1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO events_test.fill_it VALUES("conn1_round4_ev$1", NOW());
...@@ -116,6 +116,10 @@ disconnect conn3; ...@@ -116,6 +116,10 @@ disconnect conn3;
connection default; connection default;
USE events_test; USE events_test;
DROP TABLE fill_it; DROP TABLE fill_it;
--disable_query_log
DROP USER event_user2@localhost;
DROP USER event_user3@localhost;
--enable_query_log
# #
# DROP DATABASE test end (bug #16406) # DROP DATABASE test end (bug #16406)
# #
......
...@@ -192,7 +192,7 @@ private: ...@@ -192,7 +192,7 @@ private:
*/ */
COND_suspend_or_resume, COND_suspend_or_resume,
/* Must be always last */ /* Must be always last */
COND_LAST, COND_LAST
}; };
/* Singleton instance */ /* Singleton instance */
......
...@@ -3575,7 +3575,6 @@ we force server id to 2, but this MySQL server will not act as a slave."); ...@@ -3575,7 +3575,6 @@ we force server id to 2, but this MySQL server will not act as a slave.");
if (!opt_noacl) if (!opt_noacl)
{ {
Events::init();
plugin_load(); plugin_load();
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
udf_init(); udf_init();
...@@ -3626,6 +3625,10 @@ we force server id to 2, but this MySQL server will not act as a slave."); ...@@ -3626,6 +3625,10 @@ we force server id to 2, but this MySQL server will not act as a slave.");
mysqld_server_started= 1; mysqld_server_started= 1;
pthread_cond_signal(&COND_server_started); pthread_cond_signal(&COND_server_started);
if (!opt_noacl)
{
Events::init();
}
#if defined(__NT__) || defined(HAVE_SMEM) #if defined(__NT__) || defined(HAVE_SMEM)
handle_connections_methods(); handle_connections_methods();
#else #else
......
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