[packages/percona-server] - up to 5.7.28; also fshould ix ocassional SHOW SESSION VARIABLES hang (https://bugs.mysql.com/bug.p

arekm arekm at pld-linux.org
Mon Jan 13 19:27:42 CET 2020


commit 349cd2e8c299021ed17d305196f576ad27710244
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Jan 13 19:27:32 2020 +0100

    - up to 5.7.28; also fshould ix ocassional SHOW SESSION VARIABLES hang (https://bugs.mysql.com/bug.php?id=92387)

 bug-92387.patch         | 121 ++++++++++++++++++++++++++++++++++++++++++++++++
 mysql-chain-certs.patch |  18 +------
 percona-server.spec     |  10 ++--
 3 files changed, 128 insertions(+), 21 deletions(-)
---
diff --git a/percona-server.spec b/percona-server.spec
index 47aebef..dc035ec 100644
--- a/percona-server.spec
+++ b/percona-server.spec
@@ -43,8 +43,8 @@
 %undefine	with_tokudb
 %endif
 
-%define		rel	2
-%define		percona_rel	30
+%define		rel	1
+%define		percona_rel	31
 %include	/usr/lib/rpm/macros.perl
 Summary:	Percona Server: a very fast and reliable SQL database engine
 Summary(de.UTF-8):	Percona Server: ist eine SQL-Datenbank
@@ -55,12 +55,12 @@ Summary(ru.UTF-8):	Percona Server - быстрый SQL-сервер
 Summary(uk.UTF-8):	Percona Server - швидкий SQL-сервер
 Summary(zh_CN.UTF-8):	Percona Server数据库服务器
 Name:		percona-server
-Version:	5.7.27
+Version:	5.7.28
 Release:	%{percona_rel}.%{rel}
 License:	GPL + Percona Server FLOSS Exception
 Group:		Applications/Databases
 Source0:	https://www.percona.com/downloads/Percona-Server-5.7/LATEST/source/tarball/%{name}-%{version}-%{percona_rel}.tar.gz
-# Source0-md5:	f4161888aa25073597bbf4c4e9226479
+# Source0-md5:	0e10c019af943dece4ef7d98cdb36010
 Source100:	http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
 # Source100-md5:	5cac34f3d78a9d612ca4301abfcbd666
 %if %{without system_boost}
@@ -84,6 +84,7 @@ Patch0:		mysql-opt.patch
 Patch1:		mysql-versioning.patch
 Patch2:		mysql-protobuf.patch
 Patch3:		build.patch
+Patch4:		bug-92387.patch
 
 Patch11:	mysql-upgrade.patch
 Patch12:	mysql-config.patch
@@ -508,6 +509,7 @@ cd ../..
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %patch19 -p1
 %patch20 -p1
diff --git a/bug-92387.patch b/bug-92387.patch
new file mode 100644
index 0000000..63b3eb1
--- /dev/null
+++ b/bug-92387.patch
@@ -0,0 +1,121 @@
+commit 95e3a1a52dbe8fc21eb0410540853db531254a24
+Author: Nisha Gopalakrishnan <nisha.gopalakrishnan at oracle.com>
+Date:   Wed Oct 9 07:03:55 2019 +0530
+
+    BUG#29836204: P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
+    
+    Analysis
+    ========
+    
+    Querying the performance_schema tables like "session variables"
+    under LOCK TABLE MODE while there is a meta data change for the
+    table locked caused the performance_schema query to hang in
+    "opening_tables" state.
+    
+    While opening the performance_schema internal temporary table
+    in "open_table", the table share version was compared with the
+    share version of the opened tables(i.e in this case the table
+    which was altered using ALTER TABLE under lock table mode)/
+    Since the share version was different, the retry logic for
+    opening tables was triggered. This continued in a loop since
+    the table share version was always different.
+    
+    Fix
+    ===
+    While opening performance_schema tables, the flag
+    'MYSQL_OPEN_IGNORE_FLUSH' is set since FLUSH TABLES/share
+    version comparison does not apply for performance_schema tables.
+    Querying the P_S tables should be allowed in lock table mode.
+    
+    Change-Id: I4ac73dbfb9e67076a6297fcaa184c3d2606ffd40
+
+diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
+index b9d5b025f0e..0712289c8e6 100644
+--- a/mysql-test/r/lock.result
++++ b/mysql-test/r/lock.result
+@@ -471,3 +471,28 @@ DROP TABLE m1, t1;
+ #
+ # End of 6.0 tests.
+ #
++#
++# Bug#29836204:  P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
++#
++SET @saved_show_compatibility_56= @@global.show_compatibility_56;
++# Ensures that the P_S is used for the SHOW command.
++SET GLOBAL show_compatibility_56= OFF;
++CREATE TABLE t1(fld1 int) ENGINE=MYISAM;
++LOCK TABLE t1 WRITE;
++ALTER TABLE t1 DISABLE KEYS;
++# Without patch, the SHOW command hangs.
++SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
++Variable_name	Value
++foreign_key_checks	ON
++# Wihout patch, the SELECT from P_S hangs.
++SELECT * FROM performance_schema.global_variables WHERE variable_name="read_only";
++VARIABLE_NAME	VARIABLE_VALUE
++read_only	OFF
++# Test added for coverage (Querying from I_S)
++SET GLOBAL show_compatibility_56= @saved_show_compatibility_56;
++SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
++Variable_name	Value
++foreign_key_checks	ON
++# Clean up.
++UNLOCK TABLES;
++DROP TABLE t1;
+diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
+index 2fd69a23fac..4a8ecf141e2 100644
+--- a/mysql-test/t/lock.test
++++ b/mysql-test/t/lock.test
+@@ -583,6 +583,33 @@ DROP TABLE m1, t1;
+ --echo # End of 6.0 tests.
+ --echo #
+ 
++
++--echo #
++--echo # Bug#29836204:  P_S TABLE ACCESS HANGS WHILE IN LOCK TABLES MODE
++--echo #
++
++SET @saved_show_compatibility_56= @@global.show_compatibility_56;
++--echo # Ensures that the P_S is used for the SHOW command.
++SET GLOBAL show_compatibility_56= OFF;
++CREATE TABLE t1(fld1 int) ENGINE=MYISAM;
++LOCK TABLE t1 WRITE;
++ALTER TABLE t1 DISABLE KEYS;
++
++--echo # Without patch, the SHOW command hangs.
++SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
++
++--echo # Wihout patch, the SELECT from P_S hangs.
++SELECT * FROM performance_schema.global_variables WHERE variable_name="read_only";
++
++--echo # Test added for coverage (Querying from I_S)
++SET GLOBAL show_compatibility_56= @saved_show_compatibility_56;
++SHOW SESSION VARIABLES LIKE 'FOREIGN_KEY_CHECKS';
++
++--echo # Clean up.
++UNLOCK TABLES;
++DROP TABLE t1;
++
++
+ # Check that all connections opened by test cases in this file are really
+ # gone so execution of other tests won't be affected by their presence.
+ --source include/wait_until_count_sessions.inc
+diff --git a/sql/sql_base.cc b/sql/sql_base.cc
+index 567920cfb61..d23772910d2 100644
+--- a/sql/sql_base.cc
++++ b/sql/sql_base.cc
+@@ -3051,6 +3051,14 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
+     DBUG_RETURN(true);
+   }
+ 
++  /*
++    P_S table access should be allowed while in LTM, the ignore flush flag is
++    set to avoid the infinite reopening of the table due to version number
++    mismatch.
++  */
++  if (BELONGS_TO_P_S_UNDER_LTM(thd, table_list))
++    flags|= MYSQL_OPEN_IGNORE_FLUSH;
++
+   key_length= get_table_def_key(table_list, &key);
+ 
+   /*
diff --git a/mysql-chain-certs.patch b/mysql-chain-certs.patch
index 3914311..f0c7b6e 100644
--- a/mysql-chain-certs.patch
+++ b/mysql-chain-certs.patch
@@ -22,20 +22,4 @@ diff -Naur mysql-5.1.47.orig/vio/viosslfactories.c mysql-5.1.47/vio/viosslfactor
    {
      *error= SSL_INITERR_CERT;
      DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file));
-diff -Naur mysql-5.1.47.orig/extra/yassl/src/ssl.cpp mysql-5.1.47/extra/yassl/src/ssl.cpp
---- mysql-5.1.47.orig/extra/yassl/src/ssl.cpp	2010-05-06 11:24:26.000000000 -0400
-+++ mysql-5.1.47/extra/yassl/src/ssl.cpp	2010-05-26 23:29:13.000000000 -0400
-@@ -1606,10 +1606,10 @@
-     }
- 
- 
--    int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*)
-+    int SSL_CTX_use_certificate_chain_file(SSL_CTX* ctx, const char* file)
-     {
--        // TDOD:
--        return SSL_SUCCESS;
-+        // For the moment, treat like use_certificate_file
-+        return read_file(ctx, file, SSL_FILETYPE_PEM, Cert);
-     }
- 
- 
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/percona-server.git/commitdiff/349cd2e8c299021ed17d305196f576ad27710244



More information about the pld-cvs-commit mailing list