Skip to content

Commit af59b67

Browse files
committed
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.
1 parent 50c5743 commit af59b67

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

mysql-test/main/information_schema_parameters.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ DTD_IDENTIFIER char(20)
674674
ROUTINE_TYPE FUNCTION
675675
SHOW STATUS LIKE 'handler_read%next';
676676
Variable_name Value
677-
Handler_read_next54
677+
Handler_read_nextcount_routines
678678
Handler_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';
687687
SHOW STATUS LIKE 'handler_read%next';
688688
Variable_name Value
689-
Handler_read_next54
689+
Handler_read_nextcount_routines
690690
Handler_read_rnd_next 1
691691
#
692692
# Now the index must be used

mysql-test/main/information_schema_parameters.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,15 @@ USE i_s_parameters_test;
291291
CREATE 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
297299
FLUSH STATUS;
298300
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
299301
WHERE SPECIFIC_NAME = 'test_func5';
302+
--replace_result $count_routines count_routines
300303
SHOW STATUS LIKE 'handler_read%next';
301304

302305
--echo #
@@ -307,8 +310,8 @@ FLUSH STATUS;
307310
query_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
310314
SHOW STATUS LIKE 'handler_read%next';
311-
312315
--echo #
313316
--echo # Now the index must be used
314317
FLUSH STATUS;

mysql-test/main/information_schema_routines.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ COLLATION_CONNECTION latin1_swedish_ci
898898
DATABASE_COLLATION latin1_swedish_ci
899899
SHOW STATUS LIKE 'handler_read%next';
900900
Variable_name Value
901-
Handler_read_next54
901+
Handler_read_nextcount_routines
902902
Handler_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';
911911
SHOW STATUS LIKE 'handler_read%next';
912912
Variable_name Value
913-
Handler_read_next54
913+
Handler_read_nextcount_routines
914914
Handler_read_rnd_next 1
915915
#
916916
# Now the index must be used

mysql-test/main/information_schema_routines.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
270272
FLUSH STATUS;
271273
--replace_column 24 <created> 25 <modified>
272274
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
273275
WHERE ROUTINE_NAME = 'test_func5';
276+
--replace_result $count_routines count_routines
274277
SHOW STATUS LIKE 'handler_read%next';
275278

276279
--echo #
@@ -281,6 +284,7 @@ FLUSH STATUS;
281284
query_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
284288
SHOW STATUS LIKE 'handler_read%next';
285289

286290
--echo #

0 commit comments

Comments
 (0)