mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-29104 - fix test cases, for compilation without performance schema.
Fix test cases to remove hardcoded expected number for 'handler_next_read' status variable. Apparently, number of rows in I_S.routines depends on whether or not 'sys' schema is loaded, and this depends on whether or not perfschema is compiled in.
This commit is contained in:
@ -674,7 +674,7 @@ DTD_IDENTIFIER char(20)
|
|||||||
ROUTINE_TYPE FUNCTION
|
ROUTINE_TYPE FUNCTION
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_next 54
|
Handler_read_next count_routines
|
||||||
Handler_read_rnd_next 3
|
Handler_read_rnd_next 3
|
||||||
#
|
#
|
||||||
# We cannot use the index due to CONCAT(), and filtering by SPECIFIC_NAME
|
# We cannot use the index due to CONCAT(), and filtering by SPECIFIC_NAME
|
||||||
@ -686,7 +686,7 @@ WHERE CONCAT(SPECIFIC_SCHEMA) = 'i_s_parameters_test'
|
|||||||
AND SPECIFIC_NAME = 'not_existing_proc';
|
AND SPECIFIC_NAME = 'not_existing_proc';
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_next 54
|
Handler_read_next count_routines
|
||||||
Handler_read_rnd_next 1
|
Handler_read_rnd_next 1
|
||||||
#
|
#
|
||||||
# Now the index must be used
|
# Now the index must be used
|
||||||
|
@ -291,12 +291,15 @@ USE i_s_parameters_test;
|
|||||||
CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
|
CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
|
||||||
RETURN CONCAT('XYZ, ' ,s);
|
RETURN CONCAT('XYZ, ' ,s);
|
||||||
|
|
||||||
|
--let count_routines = `select count(*) from information_schema.routines`
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
|
--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
|
||||||
--echo # but we will use SPECIFIC_NAME for filtering records from mysql.proc
|
--echo # but we will use SPECIFIC_NAME for filtering records from mysql.proc
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
||||||
WHERE SPECIFIC_NAME = 'test_func5';
|
WHERE SPECIFIC_NAME = 'test_func5';
|
||||||
|
--replace_result $count_routines count_routines
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
@ -307,8 +310,8 @@ FLUSH STATUS;
|
|||||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
||||||
WHERE CONCAT(SPECIFIC_SCHEMA) = 'i_s_parameters_test'
|
WHERE CONCAT(SPECIFIC_SCHEMA) = 'i_s_parameters_test'
|
||||||
AND SPECIFIC_NAME = 'not_existing_proc';
|
AND SPECIFIC_NAME = 'not_existing_proc';
|
||||||
|
--replace_result $count_routines count_routines
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Now the index must be used
|
--echo # Now the index must be used
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
|
@ -898,7 +898,7 @@ COLLATION_CONNECTION latin1_swedish_ci
|
|||||||
DATABASE_COLLATION latin1_swedish_ci
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_next 54
|
Handler_read_next count_routines
|
||||||
Handler_read_rnd_next 2
|
Handler_read_rnd_next 2
|
||||||
#
|
#
|
||||||
# We cannot use the index due to CONCAT(), and filtering by ROUTINE_NAME
|
# We cannot use the index due to CONCAT(), and filtering by ROUTINE_NAME
|
||||||
@ -910,7 +910,7 @@ WHERE CONCAT(ROUTINE_SCHEMA) = 'i_s_routines_test'
|
|||||||
AND ROUTINE_NAME = 'not_existing_proc';
|
AND ROUTINE_NAME = 'not_existing_proc';
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_next 54
|
Handler_read_next count_routines
|
||||||
Handler_read_rnd_next 1
|
Handler_read_rnd_next 1
|
||||||
#
|
#
|
||||||
# Now the index must be used
|
# Now the index must be used
|
||||||
|
@ -264,6 +264,8 @@ CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
|
|||||||
RETURN CONCAT('XYZ, ' ,s);
|
RETURN CONCAT('XYZ, ' ,s);
|
||||||
|
|
||||||
|
|
||||||
|
--let count_routines = `select count(*) from information_schema.routines`
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
|
--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
|
||||||
--echo # but we will use ROUTINE_NAME for filtering records from mysql.proc
|
--echo # but we will use ROUTINE_NAME for filtering records from mysql.proc
|
||||||
@ -271,6 +273,7 @@ FLUSH STATUS;
|
|||||||
--replace_column 24 <created> 25 <modified>
|
--replace_column 24 <created> 25 <modified>
|
||||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
||||||
WHERE ROUTINE_NAME = 'test_func5';
|
WHERE ROUTINE_NAME = 'test_func5';
|
||||||
|
--replace_result $count_routines count_routines
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
@ -281,6 +284,7 @@ FLUSH STATUS;
|
|||||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
||||||
WHERE CONCAT(ROUTINE_SCHEMA) = 'i_s_routines_test'
|
WHERE CONCAT(ROUTINE_SCHEMA) = 'i_s_routines_test'
|
||||||
AND ROUTINE_NAME = 'not_existing_proc';
|
AND ROUTINE_NAME = 'not_existing_proc';
|
||||||
|
--replace_result $count_routines count_routines
|
||||||
SHOW STATUS LIKE 'handler_read%next';
|
SHOW STATUS LIKE 'handler_read%next';
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
Reference in New Issue
Block a user