File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -674,7 +674,7 @@ DTD_IDENTIFIER char(20)
674674ROUTINE_TYPE FUNCTION
675675SHOW STATUS LIKE 'handler_read%next';
676676Variable_name Value
677- Handler_read_next54
677+ Handler_read_nextcount_routines
678678Handler_read_rnd_next 3
679679#
680680# 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'
686686 AND SPECIFIC_NAME = 'not_existing_proc';
687687SHOW STATUS LIKE 'handler_read%next';
688688Variable_name Value
689- Handler_read_next54
689+ Handler_read_nextcount_routines
690690Handler_read_rnd_next 1
691691#
692692# Now the index must be used
Original file line number Diff line number Diff line change @@ -291,12 +291,15 @@ USE i_s_parameters_test;
291291CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
292292 RETURN CONCAT('XYZ, ' ,s);
293293
294+ --let count_routines = `select count(*) from information_schema.routines`
295+
294296--echo #
295297--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
296298--echo # but we will use SPECIFIC_NAME for filtering records from mysql.proc
297299FLUSH STATUS;
298300query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
299301 WHERE SPECIFIC_NAME = 'test_func5';
302+ --replace_result $count_routines count_routines
300303SHOW STATUS LIKE 'handler_read%next';
301304
302305--echo #
@@ -307,8 +310,8 @@ FLUSH STATUS;
307310query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
308311 WHERE CONCAT(SPECIFIC_SCHEMA) = 'i_s_parameters_test'
309312 AND SPECIFIC_NAME = 'not_existing_proc';
313+ --replace_result $count_routines count_routines
310314SHOW STATUS LIKE 'handler_read%next';
311-
312315--echo #
313316--echo # Now the index must be used
314317FLUSH STATUS;
Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ COLLATION_CONNECTION latin1_swedish_ci
898898DATABASE_COLLATION latin1_swedish_ci
899899SHOW STATUS LIKE 'handler_read%next';
900900Variable_name Value
901- Handler_read_next54
901+ Handler_read_nextcount_routines
902902Handler_read_rnd_next 2
903903#
904904# 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'
910910 AND ROUTINE_NAME = 'not_existing_proc';
911911SHOW STATUS LIKE 'handler_read%next';
912912Variable_name Value
913- Handler_read_next54
913+ Handler_read_nextcount_routines
914914Handler_read_rnd_next 1
915915#
916916# Now the index must be used
Original file line number Diff line number Diff line change @@ -264,13 +264,16 @@ CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
264264 RETURN CONCAT('XYZ, ' ,s);
265265
266266
267+ --let count_routines = `select count(*) from information_schema.routines`
268+
267269--echo #
268270--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
269271--echo # but we will use ROUTINE_NAME for filtering records from mysql.proc
270272FLUSH STATUS;
271273--replace_column 24 <created> 25 <modified>
272274query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
273275 WHERE ROUTINE_NAME = 'test_func5';
276+ --replace_result $count_routines count_routines
274277SHOW STATUS LIKE 'handler_read%next';
275278
276279--echo #
@@ -281,6 +284,7 @@ FLUSH STATUS;
281284query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
282285 WHERE CONCAT(ROUTINE_SCHEMA) = 'i_s_routines_test'
283286 AND ROUTINE_NAME = 'not_existing_proc';
287+ --replace_result $count_routines count_routines
284288SHOW STATUS LIKE 'handler_read%next';
285289
286290--echo #
You can’t perform that action at this time.
0 commit comments