diff options
author | Sven Sandberg <sven@mysql.com> | 2008-10-18 20:36:34 +0200 |
---|---|---|
committer | Sven Sandberg <sven@mysql.com> | 2008-10-18 20:36:34 +0200 |
commit | d88716c2cf990ae8e6b2de75612219b22259b3cf (patch) | |
tree | 0aa76ef69318ad1b988a3110ee29f8d8c471fe63 | |
parent | 90de05d0e696b663c169dea6c9fe5b2119b22a2f (diff) | |
download | mariadb-git-d88716c2cf990ae8e6b2de75612219b22259b3cf.tar.gz |
BUG#39851: race between check_testcase and tests running 'show processlist'
Problem 1: not_embedded_server runs SELECT FROM I_S.PROCESSLIST near the beginning.
check_testcase executes a query to the server before that. There is a race here,
because there is no guarantee that the thread executing check_testcase's query is
finished.
Problem 2: The SELECT FROM I_S.PROCESSLIST doens't seem very useful in the test.
It's at least misplaced.
Fix to both problems: Comment out SELECT FROM I_S.PROCESSLIST.
-rw-r--r-- | mysql-test/r/not_embedded_server.result | 5 | ||||
-rw-r--r-- | mysql-test/t/not_embedded_server.test | 34 |
2 files changed, 23 insertions, 16 deletions
diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result index 89f48a1ea56..4373d6356d9 100644 --- a/mysql-test/r/not_embedded_server.result +++ b/mysql-test/r/not_embedded_server.result @@ -1,7 +1,2 @@ -prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; -execute stmt1; -ID USER HOST DB COMMAND TIME STATE INFO -number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon' -deallocate prepare stmt1; FLUSH STATUS; Value of com_select did not change diff --git a/mysql-test/t/not_embedded_server.test b/mysql-test/t/not_embedded_server.test index fe6b8825a87..562194a62a4 100644 --- a/mysql-test/t/not_embedded_server.test +++ b/mysql-test/t/not_embedded_server.test @@ -4,21 +4,33 @@ -- source include/not_embedded.inc + +# The following fails sporadically because 'check-testcase' runs +# queries before this test and there is no way to guarantee that any +# previous process finishes. The purpose of the test is not clearly +# stated, there is no reference to any bug report, and "select from +# I_S from prepared statement" doesn't look like something that's +# really imporant to test. I'm commenting out this for now. If +# anyone wants to keep this, please fix the race and motivate why we +# need to test this. If you see this comment and it is after mid-2009 +# or so, feel free to remove this test from the file. /Sven # -# Show full process list with prepare -# To not show other connections, this must be the first test and we must -# have a server restart before this one # -# We don't have any 4.1 tests as we use I_S to query the PROCESSLIST to -# exclude system threads that may/may not be active in the server -# (namely the ndb injector thread) +## Show full process list with prepare +## To not show other connections, this must be the first test and we must +## have a server restart before this one +## +## We don't have any 4.1 tests as we use I_S to query the PROCESSLIST to +## exclude system threads that may/may not be active in the server +## (namely the ndb injector thread) +## +## End of 4.1 tests # -# End of 4.1 tests +#prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; +#--replace_column 1 number 6 time 3 localhost +#execute stmt1; +#deallocate prepare stmt1; -prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; ---replace_column 1 number 6 time 3 localhost -execute stmt1; -deallocate prepare stmt1; # |