-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add histogram for rpl_semi_sync_master_trx_wait
Summary: add histogram for rpl_semi_sync_master_trx_wait. Test Plan: mtr tests Reviewers: rongrong Reviewed By: rongrong
- Loading branch information
1 parent
fbf7fba
commit d1a1394
Showing
9 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
mysql-test/suite/sys_vars/r/rpl_semi_sync_master_histogram_trx_wait_step_size_basic.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
SELECT COUNT(@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
COUNT(@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size) | ||
1 | ||
1 Expected | ||
SET @start_global_value = @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
SELECT @start_global_value; | ||
@start_global_value | ||
500us | ||
16ms Expected | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='16us'; | ||
select @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size | ||
16us | ||
16us Expected | ||
select * from information_schema.global_variables where variable_name='rpl_semi_sync_master_histogram_trx_wait_step_size'; | ||
VARIABLE_NAME VARIABLE_VALUE | ||
RPL_SEMI_SYNC_MASTER_HISTOGRAM_TRX_WAIT_STEP_SIZE 16us | ||
SELECT @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size = VARIABLE_VALUE | ||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
WHERE VARIABLE_NAME='rpl_semi_sync_master_histogram_trx_wait_step_size'; | ||
@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size = VARIABLE_VALUE | ||
1 | ||
1 Expected | ||
SELECT COUNT(@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
COUNT(@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size) | ||
1 | ||
1 Expected | ||
SELECT COUNT(VARIABLE_VALUE) | ||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
WHERE VARIABLE_NAME='rpl_semi_sync_master_histogram_trx_wait_step_size'; | ||
COUNT(VARIABLE_VALUE) | ||
1 | ||
1 Expected | ||
SELECT COUNT(@@local.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
ERROR HY000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' is a GLOBAL variable | ||
Expected error 'Variable is a GLOBAL variable' | ||
SELECT COUNT(@@SESSION.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
ERROR HY000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' is a GLOBAL variable | ||
Expected error 'Variable is a GLOBAL variable' | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of '32' | ||
Expected error 'Variable cannot be set to this value'; | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='0'; | ||
select @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size | ||
0 | ||
0 Expected | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='ms32'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of 'ms32' | ||
Expected error 'Variable cannot be set to this value'; | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32ps'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of '32ps' | ||
Expected error 'Variable cannot be set to this value'; | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='3s2'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of '3s2' | ||
Expected error 'Variable cannot be set to this value'; | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32@s'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of '32@s' | ||
Expected error 'Variable cannot be set to this value'; | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32s.'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of '32s.' | ||
Expected error 'Variable cannot be set to this value'; | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='s'; | ||
ERROR 42000: Variable 'rpl_semi_sync_master_histogram_trx_wait_step_size' can't be set to the value of 's' | ||
Expected error 'Variable cannot be set to this value' | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='16.5us'; | ||
select @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size | ||
16.5us | ||
16.5us Expected | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size = @start_global_value; | ||
SELECT @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size | ||
500us | ||
16ms Expected |
75 changes: 75 additions & 0 deletions
75
mysql-test/suite/sys_vars/t/rpl_semi_sync_master_histogram_trx_wait_step_size_basic.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--source include/have_innodb.inc | ||
|
||
SELECT COUNT(@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
--echo 1 Expected | ||
|
||
SET @start_global_value = @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
SELECT @start_global_value; | ||
--echo 16ms Expected | ||
|
||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='16us'; | ||
select @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
--echo 16us Expected | ||
|
||
select * from information_schema.global_variables where variable_name='rpl_semi_sync_master_histogram_trx_wait_step_size'; | ||
|
||
SELECT @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size = VARIABLE_VALUE | ||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
WHERE VARIABLE_NAME='rpl_semi_sync_master_histogram_trx_wait_step_size'; | ||
--echo 1 Expected | ||
|
||
SELECT COUNT(@@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
--echo 1 Expected | ||
|
||
SELECT COUNT(VARIABLE_VALUE) | ||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
WHERE VARIABLE_NAME='rpl_semi_sync_master_histogram_trx_wait_step_size'; | ||
--echo 1 Expected | ||
|
||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
SELECT COUNT(@@local.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
--echo Expected error 'Variable is a GLOBAL variable' | ||
|
||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
SELECT COUNT(@@SESSION.rpl_semi_sync_master_histogram_trx_wait_step_size); | ||
--echo Expected error 'Variable is a GLOBAL variable' | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32'; | ||
--echo Expected error 'Variable cannot be set to this value'; | ||
|
||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='0'; | ||
select @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
--echo 0 Expected | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='ms32'; | ||
--echo Expected error 'Variable cannot be set to this value'; | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32ps'; | ||
--echo Expected error 'Variable cannot be set to this value'; | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='3s2'; | ||
--echo Expected error 'Variable cannot be set to this value'; | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32@s'; | ||
--echo Expected error 'Variable cannot be set to this value'; | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='32s.'; | ||
--echo Expected error 'Variable cannot be set to this value'; | ||
|
||
--Error ER_WRONG_VALUE_FOR_VAR | ||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='s'; | ||
--echo Expected error 'Variable cannot be set to this value' | ||
|
||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size='16.5us'; | ||
select @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
--echo 16.5us Expected | ||
|
||
SET @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size = @start_global_value; | ||
SELECT @@GLOBAL.rpl_semi_sync_master_histogram_trx_wait_step_size; | ||
--echo 16ms Expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.