Commit 4c5fb788 authored by unknown's avatar unknown

Fixed differences in STATE in result file for bug#34190.


BitKeeper/etc/ignore:
  Added mysql-test/suite/funcs_1.tar.zip to the ignore list
parent 8c8c0efd
...@@ -3018,3 +3018,4 @@ mysql-test/suite/funcs_1.tar.gz ...@@ -3018,3 +3018,4 @@ mysql-test/suite/funcs_1.tar.gz
mysql-test/.DS_Store mysql-test/.DS_Store
.DS_Store .DS_Store
libmysqld/sql_profile.cc libmysqld/sql_profile.cc
mysql-test/suite/funcs_1.tar.zip
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# # # #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST # # Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# # # #
# Ensure that the values fit to the current state of the connection # # Ensure that the values fit to the current event of the connection #
# and especially that they change if a connection does nothing or # # and especially that they change if a connection does nothing or #
# runs some SQL. # # runs some SQL. #
# Examples: # # Examples: #
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
# Creation: # # Creation: #
# 2007-08-09 mleich Implement this test as part of # # 2007-08-09 mleich Implement this test as part of #
# WL#3982 Test information_schema.processlist # # WL#3982 Test information_schema.processlist #
# # # 2008-01-05 HHunger Changed time test and long statement test. #
# It could happen that the long statement test #
# fail due to timing problems. # # #
######################################################################## ########################################################################
# Basic preparations # Basic preparations
...@@ -108,29 +110,22 @@ connection default; ...@@ -108,29 +110,22 @@ connection default;
# - State IS NULL # - State IS NULL
# - INFO must be empty # - INFO must be empty
# #
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT id,user,host,db,command,@time:=time,state,info FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE COMMAND = 'Sleep' AND TIME > 0; WHERE COMMAND = 'Sleep' AND TIME > 0;
--source include/wait_condition.inc --source include/wait_condition.inc
# #
# Expect to hit TIME = 1. # Expect to hit TIME > 1.
--replace_column 1 <ID> SELECT @time > 0;
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
# Change the SQL command (affects content of INFO)
--replace_column 1 <ID>
SHOW FULL PROCESSLIST;
# #
--echo # Sleep some time --echo # Sleep some time
# The value of TIME must increase and reach 2 after some sleeps. # The value of TIME must increase and reach 2 after some sleeps.
let $wait_timeout= 2; let $wait_timeout= 4;
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT id,user,host,db,command,@time2:=time,state,info FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE TIME > 1; WHERE TIME > @time;
--source include/wait_condition.inc --source include/wait_condition.inc
# #
# Expect to hit TIME = 2. # Expect to hit TIME > @time
--replace_column 1 <ID> SELECT @time < @time2;
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID>
SHOW FULL PROCESSLIST;
# #
# #
# The second connection must have an ID = my ID + 1; # The second connection must have an ID = my ID + 1;
...@@ -201,28 +196,22 @@ connection default; ...@@ -201,28 +196,22 @@ connection default;
--echo # Sleep some time --echo # Sleep some time
# The command must be after some time in work by the server. # The command must be after some time in work by the server.
# So poll till INFO is no more NULL and TIME > 0. # So poll till INFO is no more NULL and TIME > 0.
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT id,user,host,db,command,@time:=time,state,info FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO IS NOT NULL AND TIME > 0; WHERE INFO IS NOT NULL AND TIME > 0;
--source include/wait_condition.inc --source include/wait_condition.inc
# #
# Expect to see TIME = 1 # Expect to see TIME > 0;
--replace_column 1 <ID> SELECT @time > 0;
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID>
SHOW FULL PROCESSLIST;
# #
--echo # Sleep some time --echo # Sleep some time
# The value of TIME must increase and reach 2 after some sleeps. # The value of TIME must increase and reach 2 after some sleeps.
let $wait_timeout= 2; let $wait_timeout= 2;
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT id,user,host,db,command,@time2:=time,state,info FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE TIME > 1; WHERE TIME > @time;
--source include/wait_condition.inc --source include/wait_condition.inc
# #
# Expect to see TIME = 2 # Expect to see @time < @time2
--replace_column 1 <ID> SELECT @time < @time2;
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID>
SHOW FULL PROCESSLIST;
# #
--echo --echo
--echo ----- switch to connection ddicttestuser1 (user = ddicttestuser1) ----- --echo ----- switch to connection ddicttestuser1 (user = ddicttestuser1) -----
...@@ -247,19 +236,20 @@ connection default; ...@@ -247,19 +236,20 @@ connection default;
--echo # Sleep some time --echo # Sleep some time
# The command must be after some time in work by the server. # The command must be after some time in work by the server.
# There is a short phase with STATE IS NULL followed by a longer phase # There is a short phase with STATE IS NULL followed by a longer phase
# with STATE = 'init'. # with STATE = 'executing'.
# So poll till INFO is no more NULL AND STATE = 'init'. # So poll till INFO is no more NULL AND STATE = 'executing'.
let $wait_timeout= 9;
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO IS NOT NULL AND STATE = 'init'; WHERE INFO IS NOT NULL AND STATE = 'executing';
--source include/wait_condition.inc --source include/wait_condition.inc
# #
# Expect to see that SELECT/SHOW PROCESSLIST can handle my statement monster. # Expect to see that SELECT/SHOW PROCESSLIST can handle my statement monster.
--replace_column 1 <ID> 6 <TIME> --replace_column 1 <ID> 5 <COMMAND> 6 <TIME> 7 <STATE>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 6 <TIME> --replace_column 1 <ID> 5 <COMMAND> 6 <TIME> 7 <STATE>
SHOW FULL PROCESSLIST; SHOW FULL PROCESSLIST;
# SHOW PROCESSLIST truncates INFO after 100 characters. # SHOW PROCESSLIST truncates INFO after 100 characters.
--replace_column 1 <ID> 6 <TIME> --replace_column 1 <ID> 5 <COMMAND> 6 <TIME> 7 <STATE>
SHOW PROCESSLIST; SHOW PROCESSLIST;
--echo --echo
--echo ----- switch to connection ddicttestuser1 (user = ddicttestuser1) ----- --echo ----- switch to connection ddicttestuser1 (user = ddicttestuser1) -----
...@@ -267,7 +257,6 @@ connection ddicttestuser1; ...@@ -267,7 +257,6 @@ connection ddicttestuser1;
--echo # Pull("reap") the result set from the monster statement executed with "send". --echo # Pull("reap") the result set from the monster statement executed with "send".
reap; reap;
# Ensure that we see that a connection "hangs" when colliding with a # Ensure that we see that a connection "hangs" when colliding with a
# WRITE TABLE LOCK # WRITE TABLE LOCK
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
...@@ -289,6 +278,7 @@ connection default; ...@@ -289,6 +278,7 @@ connection default;
--echo # Sleep some time --echo # Sleep some time
# The command must be after some time in work by the server. # The command must be after some time in work by the server.
# So poll till INFO is no more NULL. # So poll till INFO is no more NULL.
let $wait_timeout= 4;
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO IS NOT NULL AND STATE = 'Locked'; WHERE INFO IS NOT NULL AND STATE = 'Locked';
--source include/wait_condition.inc --source include/wait_condition.inc
......
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