Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 7a161c9

Browse files
Merge branch 'remove_sql_log_bin' into development
2 parents 35a47e1 + e84667d commit 7a161c9

10 files changed

+0
-68
lines changed

procedures/ps_setup_disable_background_threads.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_background_threads
2424
2525
Disable all background thread instrumentation within Performance Schema.
2626
27-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
28-
2927
Parameters
3028
-----------
3129
@@ -46,16 +44,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_background_threads
4644
NOT DETERMINISTIC
4745
MODIFIES SQL DATA
4846
BEGIN
49-
SET @log_bin := @@sql_log_bin;
50-
SET sql_log_bin = 0;
51-
5247
UPDATE performance_schema.threads
5348
SET instrumented = 'NO'
5449
WHERE type = 'BACKGROUND';
5550

5651
SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' background thread', IF(@rows != 1, 's', '')) AS summary;
57-
58-
SET sql_log_bin = @log_bin;
5952
END$$
6053

6154
DELIMITER ;

procedures/ps_setup_disable_consumers.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_consumers (
2727
Disables consumers within Performance Schema
2828
matching the input pattern.
2929
30-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
31-
3230
Parameters
3331
-----------
3432
@@ -62,16 +60,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_consumers (
6260
NOT DETERMINISTIC
6361
MODIFIES SQL DATA
6462
BEGIN
65-
SET @log_bin := @@sql_log_bin;
66-
SET sql_log_bin = 0;
67-
6863
UPDATE performance_schema.setup_consumers
6964
SET enabled = 'NO'
7065
WHERE name LIKE CONCAT('%', consumer, '%');
7166

7267
SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' consumer', IF(@rows != 1, 's', '')) AS summary;
73-
74-
SET sql_log_bin = @log_bin;
7568
END$$
7669

7770
DELIMITER ;

procedures/ps_setup_disable_instrument.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_instrument (
2727
Disables instruments within Performance Schema
2828
matching the input pattern.
2929
30-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
31-
3230
Parameters
3331
-----------
3432
@@ -72,16 +70,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_instrument (
7270
NOT DETERMINISTIC
7371
MODIFIES SQL DATA
7472
BEGIN
75-
SET @log_bin := @@sql_log_bin;
76-
SET sql_log_bin = 0;
77-
7873
UPDATE performance_schema.setup_instruments
7974
SET enabled = 'NO', timed = 'NO'
8075
WHERE name LIKE CONCAT('%', in_pattern, '%');
8176

8277
SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' instrument', IF(@rows != 1, 's', '')) AS summary;
83-
84-
SET sql_log_bin = @log_bin;
8578
END$$
8679

8780
DELIMITER ;

procedures/ps_setup_disable_thread.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_thread (
2626
2727
Disable the given connection/thread in Performance Schema.
2828
29-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
30-
3129
Parameters
3230
-----------
3331
@@ -60,16 +58,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_disable_thread (
6058
NOT DETERMINISTIC
6159
MODIFIES SQL DATA
6260
BEGIN
63-
SET @log_bin := @@sql_log_bin;
64-
SET sql_log_bin = 0;
65-
6661
UPDATE performance_schema.threads
6762
SET instrumented = 'NO'
6863
WHERE processlist_id = CONNECTION_ID();
6964

7065
SELECT CONCAT('Disabled ', @rows := ROW_COUNT(), ' thread', IF(@rows != 1, 's', '')) AS summary;
71-
72-
SET sql_log_bin = @log_bin;
7366
END$$
7467

7568
DELIMITER ;

procedures/ps_setup_enable_background_threads.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_background_threads (
2424
2525
Enable all background thread instrumentation within Performance Schema.
2626
27-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
28-
2927
Parameters
3028
-----------
3129
@@ -46,16 +44,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_background_threads (
4644
NOT DETERMINISTIC
4745
MODIFIES SQL DATA
4846
BEGIN
49-
SET @log_bin := @@sql_log_bin;
50-
SET sql_log_bin = 0;
51-
5247
UPDATE performance_schema.threads
5348
SET instrumented = 'YES'
5449
WHERE type = 'BACKGROUND';
5550

5651
SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' background thread', IF(@rows != 1, 's', '')) AS summary;
57-
58-
SET sql_log_bin = @log_bin;
5952
END$$
6053

6154
DELIMITER ;

procedures/ps_setup_enable_consumers.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_consumers (
2727
Enables consumers within Performance Schema
2828
matching the input pattern.
2929
30-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
31-
3230
Parameters
3331
-----------
3432
@@ -66,16 +64,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_consumers (
6664
NOT DETERMINISTIC
6765
MODIFIES SQL DATA
6866
BEGIN
69-
SET @log_bin := @@sql_log_bin;
70-
SET sql_log_bin = 0;
71-
7267
UPDATE performance_schema.setup_consumers
7368
SET enabled = 'YES'
7469
WHERE name LIKE CONCAT('%', consumer, '%');
7570

7671
SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' consumer', IF(@rows != 1, 's', '')) AS summary;
77-
78-
SET sql_log_bin = @log_bin;
7972
END$$
8073

8174
DELIMITER ;

procedures/ps_setup_enable_instrument.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_instrument (
2727
Enables instruments within Performance Schema
2828
matching the input pattern.
2929
30-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
31-
3230
Parameters
3331
-----------
3432
@@ -78,16 +76,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_instrument (
7876
NOT DETERMINISTIC
7977
MODIFIES SQL DATA
8078
BEGIN
81-
SET @log_bin := @@sql_log_bin;
82-
SET sql_log_bin = 0;
83-
8479
UPDATE performance_schema.setup_instruments
8580
SET enabled = 'YES', timed = 'YES'
8681
WHERE name LIKE CONCAT('%', in_pattern, '%');
8782

8883
SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' instrument', IF(@rows != 1, 's', '')) AS summary;
89-
90-
SET sql_log_bin = @log_bin;
9184
END$$
9285

9386
DELIMITER ;

procedures/ps_setup_enable_thread.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_thread (
2626
2727
Enable the given connection/thread in Performance Schema.
2828
29-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
30-
3129
Parameters
3230
-----------
3331
@@ -60,16 +58,11 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_enable_thread (
6058
NOT DETERMINISTIC
6159
MODIFIES SQL DATA
6260
BEGIN
63-
SET @log_bin := @@sql_log_bin;
64-
SET sql_log_bin = 0;
65-
6661
UPDATE performance_schema.threads
6762
SET instrumented = 'YES'
6863
WHERE processlist_id = in_connection_id;
6964

7065
SELECT CONCAT('Enabled ', @rows := ROW_COUNT(), ' thread', IF(@rows != 1, 's', '')) AS summary;
71-
72-
SET sql_log_bin = @log_bin;
7366
END$$
7467

7568
DELIMITER ;

procedures/ps_setup_reset_to_default.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_setup_reset_to_default (
5757
NOT DETERMINISTIC
5858
MODIFIES SQL DATA
5959
BEGIN
60-
SET @log_bin := @@sql_log_bin;
61-
SET sql_log_bin = 0;
62-
6360
SET @query = 'DELETE
6461
FROM performance_schema.setup_actors
6562
WHERE NOT (HOST = ''%'' AND USER = ''%'' AND ROLE = ''%'')';
@@ -149,8 +146,6 @@ BEGIN
149146
PREPARE reset_stmt FROM @query;
150147
EXECUTE reset_stmt;
151148
DEALLOCATE PREPARE reset_stmt;
152-
153-
SET sql_log_bin = @log_bin;
154149
END$$
155150

156151
DELIMITER ;

procedures/ps_truncate_all_tables.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ CREATE DEFINER='root'@'localhost' PROCEDURE ps_truncate_all_tables (
2727
Truncates all summary tables within Performance Schema,
2828
resetting all aggregated instrumentation as a snapshot.
2929
30-
Requires the SUPER privilege for "SET sql_log_bin = 0;".
31-
3230
Parameters
3331
-----------
3432
@@ -63,9 +61,6 @@ BEGIN
6361
OR table_name LIKE '%history%');
6462
DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_done = TRUE;
6563

66-
SET @log_bin := @@sql_log_bin;
67-
SET sql_log_bin = 0;
68-
6964
OPEN ps_tables;
7065

7166
ps_tables_loop: LOOP
@@ -88,8 +83,6 @@ BEGIN
8883

8984
CLOSE ps_tables;
9085

91-
SET sql_log_bin = @log_bin;
92-
9386
SELECT CONCAT('Truncated ', v_total_tables, ' tables') AS summary;
9487

9588
END$$

0 commit comments

Comments
 (0)