forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 0
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. 8.0 porting notes: Keeps the same histogram status variables as before since these are already being read by various applications. We should eventually remove this. Reference Patch: facebook@d1a1394 Reference Patch: facebook@15333b2e6f9 Differential Revision: D21832889
- Loading branch information
1 parent
068f5be
commit 19345e3
Showing
14 changed files
with
667 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
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_source_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 performance_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 performance_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 performance_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 |
1 change: 1 addition & 0 deletions
1
...-test/suite/sys_vars/t/rpl_semi_sync_source_histogram_trx_wait_step_size_basic-master.opt
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 @@ | ||
$SEMISYNC_MASTER_PLUGIN_OPT $SEMISYNC_MASTER_PLUGIN_LOAD |
73 changes: 73 additions & 0 deletions
73
mysql-test/suite/sys_vars/t/rpl_semi_sync_source_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,73 @@ | ||
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 performance_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 performance_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 performance_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
Oops, something went wrong.