Merge lp:~gl-az/percona-server/BT-23310-bug1218664-5.6 into lp:percona-server/5.6

Proposed by George Ormond Lorch III
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 467
Proposed branch: lp:~gl-az/percona-server/BT-23310-bug1218664-5.6
Merge into: lp:percona-server/5.6
Diff against target: 49 lines (+8/-2)
2 files modified
Percona-Server/sql/mysqld.cc (+3/-1)
Percona-Server/sql/sql_table.cc (+5/-1)
To merge this branch: bzr merge lp:~gl-az/percona-server/BT-23310-bug1218664-5.6
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+189909@code.launchpad.net

This proposal supersedes a proposal from 2013-09-26.

Description of the change

Merge from 5.5:

Fix for https://bugs.launchpad.net/percona-server/+bug/1233354 - enforce-storage-engine causes mysqld to error on shutdown
  Fixed by calling plugin_unlock in plugin name and default checking in mysqld.cc where enforce_storage_engine name is being validated.

Fix for https://bugs.launchpad.net/percona-server/+bug/1236938 - enforce-storage-engine should not apply when server started in bootstrap or skip-gtant-tables
  Fixed by ignoring enforcement if opt_bootstrap || opt_noacl.

Same code as previous MP but bzr commit message has been fixed and branch linked to the issues directly addressed by the code changes.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote : Posted in a previous version of this proposal

Fixed as discussed on IRC, fixed newly discovered bug, jenkins:
http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/331/

Revision history for this message
George Ormond Lorch III (gl-az) wrote : Posted in a previous version of this proposal

Ohh yeah, forgot to mention. Complete cycle from mysql_install_db through mysql_upgrade (with --skip-grant-tables) tested locally under valgrind with enforce-storage-engine=innodb in all my.cnf works perfectly now.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/sql/mysqld.cc'
2--- Percona-Server/sql/mysqld.cc 2013-10-01 13:00:50 +0000
3+++ Percona-Server/sql/mysqld.cc 2013-10-08 16:22:02 +0000
4@@ -4945,7 +4945,7 @@
5 /*
6 Validate any enforced storage engine
7 */
8- if (enforce_storage_engine)
9+ if (enforce_storage_engine && !opt_bootstrap && !opt_noacl)
10 {
11 LEX_STRING name= { enforce_storage_engine,
12 strlen(enforce_storage_engine) };
13@@ -4968,6 +4968,8 @@
14 enforce_storage_engine);
15 }
16 }
17+ plugin_unlock(0, defplugin);
18+ plugin_unlock(0, plugin);
19 }
20 else
21 {
22
23=== modified file 'Percona-Server/sql/sql_table.cc'
24--- Percona-Server/sql/sql_table.cc 2013-08-14 03:57:21 +0000
25+++ Percona-Server/sql/sql_table.cc 2013-10-08 16:22:02 +0000
26@@ -56,6 +56,7 @@
27 #include "sql_resolver.h" // setup_order, fix_inner_refs
28 #include "table_cache.h"
29 #include <mysql/psi/mysql_table.h>
30+#include "mysql.h" // in_bootstrap & opt_noacl
31
32 #ifdef __WIN__
33 #include <io.h>
34@@ -9313,11 +9314,14 @@
35 DBUG_ENTER("check_engine");
36 handlerton **new_engine= &create_info->db_type;
37 handlerton *req_engine= *new_engine;
38- handlerton *enf_engine= ha_enforce_handlerton(thd);
39+ handlerton *enf_engine= NULL;
40
41 bool no_substitution=
42 test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION);
43
44+ if (!in_bootstrap && !opt_noacl)
45+ enf_engine= ha_enforce_handlerton(thd);
46+
47 if (!(*new_engine= ha_checktype(thd, ha_legacy_type(req_engine),
48 no_substitution, 1)))
49 DBUG_RETURN(true);

Subscribers

People subscribed via source and target branches