Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXC 4474 Merge PS 5.7.44-51 Q3 2024 #1943

Merged
merged 17 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
899a9b7
Merge pull request #5325 from percona/release-5.7.44-50
adivinho Jul 9, 2024
2a26b29
PS-9301 MYSQL SERVER 8.3.0 GLOBAL-BUFFER-OVERFLOW AT 'DECIMAL_BIN_SIZ…
May 3, 2024
8561cfd
PS-9301 Assertion failure: dict0dict.ic:1102:col_index < table->n_col…
VarunNagaraju Jul 19, 2024
b41b795
PS-9301 Non existent binlog cache means empty
VarunNagaraju Jul 19, 2024
124baaf
PS-9301 Fixes HEAP-USE-AFTER-FREE errors sql/item.cc
VarunNagaraju Jul 23, 2024
e77ff2b
PS-9301 Spatial index issues
VarunNagaraju Jul 25, 2024
29c2ef5
PS-9301 LOCK_ORDER: CONNECTION_CONTROL PLUGIN INSTRUMENTATION IS NOT …
VarunNagaraju Jul 29, 2024
0df51ea
PS-9301 Threads stuck waiting in connection control plugin
VarunNagaraju Jul 29, 2024
4534862
PS-9301 PSI_THREAD_INFO not updated while executing PREPARED STATEMENTS
VarunNagaraju Jul 29, 2024
6a0e83a
Revert "PS-7538: Crash with innodb_optimize_fulltext_only"
VarunNagaraju Aug 2, 2024
641f1f4
PS-9301 Double processing of FTS index words with innodb_optimize_ful…
VarunNagaraju Jul 28, 2024
8a491a6
PS-9301 Update the versions numbers
VarunNagaraju Aug 2, 2024
f9451b6
Merge pull request #5369 from VarunNagaraju/post-EOL-3
VarunNagaraju Aug 13, 2024
5c46f67
RM-1419 PS-5.7.44-51 (post-EOL 3)
adivinho Aug 14, 2024
813837b
Merge pull request #5379 from adivinho/release-5.7.44-51
adivinho Aug 15, 2024
26f0590
PXC-4474: Merge PS 5.7.44-51 Q3 2024 (merge with conflicts)
VarunNagaraju Aug 29, 2024
6d43e26
PXC-4474: Merge PS 5.7.44-51 Conflicts resolved
VarunNagaraju Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MYSQL_VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=7
MYSQL_VERSION_PATCH=44
MYSQL_VERSION_EXTRA=-50
MYSQL_VERSION_EXTRA=-51
PXC_VERSION_EXTRA=65
9 changes: 9 additions & 0 deletions include/mysql/psi/mysql_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,15 @@ static inline void mysql_thread_set_peer_port(uint port MY_ATTRIBUTE ((unused)))

#endif

static inline void mysql_thread_set_info(
const char *str MY_ATTRIBUTE ((unused)),
int len MY_ATTRIBUTE ((unused)))
{
#ifdef HAVE_PSI_THREAD_INTERFACE
PSI_THREAD_CALL(set_thread_info)(str, len);
#endif
}

#endif /* DISABLE_MYSQL_THREAD_H */

/** @} (end of group Thread_instrumentation) */
Expand Down
7,161 changes: 7,161 additions & 0 deletions mysql-test/std_data/lob/frankenstein.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
# Install connection_control plugin
INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
# Performance schema
# Verify the instrumentation provided
SELECT * FROM performance_schema.setup_instruments
WHERE NAME LIKE "%/conn_delay/%"
ORDER BY NAME;
NAME ENABLED TIMED
stage/conn_delay/Waiting in connection_control plugin YES YES
wait/synch/cond/conn_delay/connection_delay_wait_condition YES YES
wait/synch/mutex/conn_delay/connection_delay_mutex YES YES
wait/synch/rwlock/conn_delay/connection_event_delay_lock YES YES
# Create user accounts for testing
CREATE USER u1@localhost IDENTIFIED BY 'abcd';
CREATE USER u2@localhost IDENTIFIED BY 'abcd';
Expand Down
22 changes: 22 additions & 0 deletions mysql-test/suite/connection_control/r/performance_schema.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Setup
INSTALL PLUGIN connection_control SONAME 'CONNECTION_CONTROL_LIB';
INSTALL PLUGIN connection_control_failed_login_attempts SONAME 'CONNECTION_CONTROL_LIB';
SET @@global.connection_control_failed_connections_threshold = 1;
SET @@global.connection_control_min_connection_delay = 1230;
SET @@global.connection_control_max_connection_delay = 1230;
# Not delayed connection
connect(localhost,u,,test,SOURCE_PORT,SOURCE_SOCKET);
ERROR 28000: Access denied for user 'u'@'localhost' (using password: NO)
# Delayed connection
connect(localhost,u,,test,SOURCE_PORT,SOURCE_SOCKET);
ERROR 28000: Access denied for user 'u'@'localhost' (using password: NO)
# The stage event should be in the history, the timer wait must be slightly bigger
# than configured connection delay, assume not more than 1/10 sec is good approximation,
# so the below must be 0
SELECT FLOOR((TIMER_WAIT/100000000000 - @@connection_control_min_connection_delay/100)) from performance_schema.events_stages_history_long WHERE EVENT_NAME LIKE 'stage/conn_delay/Waiting in connection_control plugin';
FLOOR((TIMER_WAIT/100000000000 - @@connection_control_min_connection_delay/100))
0
# Cleanup
# Uninstall connection_control plugin
UNINSTALL PLUGIN connection_control;
UNINSTALL PLUGIN connection_control_failed_login_attempts;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
--echo # Install connection_control plugin
--source ../inc/install_connection_control_plugin.inc

--echo # Performance schema
--echo # Verify the instrumentation provided

SELECT * FROM performance_schema.setup_instruments
WHERE NAME LIKE "%/conn_delay/%"
ORDER BY NAME;

--echo # Create user accounts for testing
CREATE USER u1@localhost IDENTIFIED BY 'abcd';
CREATE USER u2@localhost IDENTIFIED BY 'abcd';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$CONNECTION_CONTROL_PLUGIN_OPT

--performance-schema-instrument='stage/conn_delay/%=ON'
--performance-schema-consumer-events-stages-current=ON
--performance-schema-consumer-events-stages-history=ON
--performance-schema-consumer-events-stages-history-long=ON
--loose-debug='+d,delay_after_connection_delay'
40 changes: 40 additions & 0 deletions mysql-test/suite/connection_control/t/performance_schema.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This test checks if when connection delay occurs the stage event
# 'stage/conn_delay/Waiting in connection_control plugin'
# lasts around @@global.connection_control_min_connection_delay,
# so the user may get proper monitoring data.

# The test will work only in debug mode
--source include/have_debug.inc

# Make sure that connection_control plugin can be loaded
--source ../inc/have_connection_control_plugin.inc

--echo # Setup
--source ../inc/install_connection_control_plugin.inc

# set connection_control variables
SET @@global.connection_control_failed_connections_threshold = 1;
SET @@global.connection_control_min_connection_delay = 1230;
SET @@global.connection_control_max_connection_delay = 1230;

# We don't need to use client side authentication plugin for this test.
let $USE_AUTH_PLUGIN= 0;

--echo # Not delayed connection
--replace_result $MASTER_MYSOCK SOURCE_SOCKET $MASTER_MYPORT SOURCE_PORT
--error ER_ACCESS_DENIED_ERROR
connect(fail_con, localhost, u,,,,,);

--echo # Delayed connection
--replace_result $MASTER_MYSOCK SOURCE_SOCKET $MASTER_MYPORT SOURCE_PORT
--error ER_ACCESS_DENIED_ERROR
connect(fail_con, localhost, u,,,,,);

--echo # The stage event should be in the history, the timer wait must be slightly bigger
--echo # than configured connection delay, assume not more than 1/10 sec is good approximation,
--echo # so the below must be 0
SELECT FLOOR((TIMER_WAIT/100000000000 - @@connection_control_min_connection_delay/100)) from performance_schema.events_stages_history_long WHERE EVENT_NAME LIKE 'stage/conn_delay/Waiting in connection_control plugin';

--echo # Cleanup
--echo # Uninstall connection_control plugin
--source ../inc/uninstall_connection_control_plugin.inc
14 changes: 14 additions & 0 deletions mysql-test/suite/gis/r/spatial_index_data.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE `tab` (
`id` INT AUTO_INCREMENT NOT NULL,
`shape` GEOMETRY NOT NULL /*!80003 SRID 0 */,
PRIMARY KEY (`id`),
SPATIAL KEY (`shape`)
) ENGINE=InnoDB;
INSERT INTO tab VALUES (2, POINT(1,100));
SELECT id FROM tab FORCE INDEX (primary) WHERE id > 0;
id
2
SELECT id FROM tab FORCE INDEX (shape) WHERE id > 0;
id
2
DROP TABLE tab;
13 changes: 13 additions & 0 deletions mysql-test/suite/gis/r/spatial_index_explain.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CREATE TABLE `tab` (
`id` INT AUTO_INCREMENT NOT NULL,
`shape` GEOMETRY NOT NULL /*!80003 SRID 0 */,
PRIMARY KEY (`id`),
SPATIAL KEY (`shape`)
) ENGINE=InnoDB;
INSERT INTO tab VALUES (2, POINT(1,100));
EXPLAIN SELECT id FROM tab FORCE INDEX (shape);
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE tab NULL ALL NULL NULL NULL NULL 1 100.00 NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`tab`.`id` AS `id` from `test`.`tab` FORCE INDEX (`shape`)
DROP TABLE tab;
18 changes: 18 additions & 0 deletions mysql-test/suite/gis/t/spatial_index_data.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#################################################################
# TEST IF USING SPATIAL INDEX ON COLUMN RETURNS CORRECT RESULTS #
#################################################################

CREATE TABLE `tab` (
`id` INT AUTO_INCREMENT NOT NULL,
`shape` GEOMETRY NOT NULL /*!80003 SRID 0 */,
PRIMARY KEY (`id`),
SPATIAL KEY (`shape`)
) ENGINE=InnoDB;

INSERT INTO tab VALUES (2, POINT(1,100));

SELECT id FROM tab FORCE INDEX (primary) WHERE id > 0;

SELECT id FROM tab FORCE INDEX (shape) WHERE id > 0;

DROP TABLE tab;
16 changes: 16 additions & 0 deletions mysql-test/suite/gis/t/spatial_index_explain.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###############################################################################
# TEST IF MYSQL CRASHES WHEN EXPLAINING WITH A FORCE INDEX ON A SPATIAL INDEX #
###############################################################################

CREATE TABLE `tab` (
`id` INT AUTO_INCREMENT NOT NULL,
`shape` GEOMETRY NOT NULL /*!80003 SRID 0 */,
PRIMARY KEY (`id`),
SPATIAL KEY (`shape`)
) ENGINE=InnoDB;

INSERT INTO tab VALUES (2, POINT(1,100));

EXPLAIN SELECT id FROM tab FORCE INDEX (shape);

DROP TABLE tab;
168 changes: 168 additions & 0 deletions mysql-test/suite/innodb_fts/r/optimize_big.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
SET GLOBAL innodb_optimize_fulltext_only=ON;
CREATE TABLE book (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
heading VARCHAR(20),
content TEXT,
FULLTEXT idx (content)
) ENGINE= InnoDB DEFAULT CHARSET=utf8mb4;
CREATE PROCEDURE find (word CHAR(20))
SELECT heading FROM book WHERE MATCH(content)
AGAINST (word IN NATURAL LANGUAGE MODE)
ORDER BY id;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/lob/frankenstein.txt' INTO TABLE book CHARACTER SET utf8mb4
FIELDS TERMINATED BY '#' LINES TERMINATED BY '@' (heading, content);
CALL find('they');
heading
?Letter 1
Letter 2
Letter 4
Chapter 1
Chapter 2
Chapter 3
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Chapter 24
CALL find('wretched');
heading
Letter 4
Chapter 5
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 15
Chapter 20
Chapter 21
Chapter 24
CALL find('mariner');
heading
Letter 2
Chapter 5
SET GLOBAL innodb_ft_aux_table="test/book";
OPTIMIZE TABLE book;
Table Op Msg_type Msg_text
test.book optimize status OK
CALL find('they');
heading
?Letter 1
Letter 2
Letter 4
Chapter 1
Chapter 2
Chapter 3
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Chapter 24
CALL find('wretched');
heading
Letter 4
Chapter 5
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 15
Chapter 20
Chapter 21
Chapter 24
CALL find('mariner');
heading
Letter 2
Chapter 5
SET GLOBAL innodb_ft_aux_table="test/book";
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
count(*)
47753
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
count(*)
0
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
count(*)
0
DELETE FROM book;
CALL find('they');
heading
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
count(*)
28
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
count(*)
47753
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
count(*)
0
OPTIMIZE TABLE book;
Table Op Msg_type Msg_text
test.book optimize status OK
CALL find('they');
heading
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
count(*)
28
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
count(*)
33742
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
count(*)
0
SET GLOBAL innodb_ft_num_word_optimize=10000;
OPTIMIZE TABLE book;
Table Op Msg_type Msg_text
test.book optimize status OK
OPTIMIZE TABLE book;
Table Op Msg_type Msg_text
test.book optimize status OK
CALL find('they');
heading
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
count(*)
0
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
count(*)
0
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
count(*)
0
DROP TABLE book;
DROP PROCEDURE find;
SET GLOBAL innodb_optimize_fulltext_only=OFF;
SET GLOBAL innodb_ft_aux_table=default;
SET GLOBAL innodb_ft_num_word_optimize=default;
Loading
Loading