########### suite/funcs_1/datadict/processlist_val.inc ################# # # # Testing of values within INFORMATION_SCHEMA.PROCESSLIST # # # # Ensure that the values fit to the current event of the connection # # and especially that they change if a connection does nothing or # # runs some SQL. # # Examples: # # - change the default database # # - send some time no SQL command to the server # # - send a long running query # # # # Note(mleich): # # 1. Please inform me if this test fails because of timing problems. # # I tried to avoid instabilities but the values within the column # # TIME are very sensible to fluctuations of the machine load. # # I had to unify some TIME values with "--replace_result" in cases # # where they are too unstable. # # 2. Storage engine variants of this test do not make sense. # # - I_S tables use the MEMORY storage engine whenever possible. # # - There are some I_S table which need column data types which # # are not supported by MEMORY. Example: LONGTEXT/BLOB # # MyISAM will be used for such tables. # # The column PROCESSLIST.INFO is of data type LONGTEXT # # ----> MyISAM # # - There is no impact of the GLOBAL(server) or SESSION default # # storage engine setting on the engine used for I_S tables. # # That means we cannot get NDB or InnoDB instead. # # 3. The SHOW (FULL) PROCESSLIST command are for comparison. # # The main test target is INFORMATION_SCHEMA.PROCESSLIST ! # # # # Creation: # # 2007-08-09 mleich Implement this test as part of # # 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. # # 2008-04-14 pcrews Changed --replace_columns to include host # # this is due to failure occurring on Windows # # Win results included port number as well causing # # test failures # ######################################################################## # Basic preparations --disable_abort_on_error DROP USER ddicttestuser1@'localhost'; --enable_abort_on_error CREATE USER ddicttestuser1@'localhost'; GRANT ALL ON *.* TO ddicttestuser1@'localhost'; REVOKE PROCESS ON *.* FROM ddicttestuser1@'localhost'; SET PASSWORD FOR ddicttestuser1@'localhost' = PASSWORD('ddictpass'); --disable_warnings DROP TABLE IF EXISTS test.t1; --enable_warnings CREATE TABLE test.t1 (f1 BIGINT); # Show the definition of the PROCESSLIST table #-------------------------------------------------------------------------- SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST; # Ensure that the values follow the changing default database and statement #-------------------------------------------------------------------------- # - We have now exact one connection. -> One record SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST; # - Other expected values # - USER = 'root' # - HOST = 'localhost' # - DB = 'test' # - Command = 'Query' # - TIME = 0, I hope the testing machines are all time fast enough # - State IS NULL # - INFO must contain the corresponding SHOW/SELECT PROCESSLIST USE test; --replace_column 1 SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; --replace_column 1 SHOW FULL PROCESSLIST; # # Expect to see now DB = 'information_schema' USE information_schema; --replace_column 1 3 6