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
=== modified file 'Percona-Server/sql/mysqld.cc'
--- Percona-Server/sql/mysqld.cc 2013-10-01 13:00:50 +0000
+++ Percona-Server/sql/mysqld.cc 2013-10-08 16:22:02 +0000
@@ -4945,7 +4945,7 @@
4945 /*4945 /*
4946 Validate any enforced storage engine4946 Validate any enforced storage engine
4947 */4947 */
4948 if (enforce_storage_engine)4948 if (enforce_storage_engine && !opt_bootstrap && !opt_noacl)
4949 {4949 {
4950 LEX_STRING name= { enforce_storage_engine,4950 LEX_STRING name= { enforce_storage_engine,
4951 strlen(enforce_storage_engine) };4951 strlen(enforce_storage_engine) };
@@ -4968,6 +4968,8 @@
4968 enforce_storage_engine);4968 enforce_storage_engine);
4969 }4969 }
4970 }4970 }
4971 plugin_unlock(0, defplugin);
4972 plugin_unlock(0, plugin);
4971 }4973 }
4972 else4974 else
4973 {4975 {
49744976
=== modified file 'Percona-Server/sql/sql_table.cc'
--- Percona-Server/sql/sql_table.cc 2013-08-14 03:57:21 +0000
+++ Percona-Server/sql/sql_table.cc 2013-10-08 16:22:02 +0000
@@ -56,6 +56,7 @@
56#include "sql_resolver.h" // setup_order, fix_inner_refs56#include "sql_resolver.h" // setup_order, fix_inner_refs
57#include "table_cache.h"57#include "table_cache.h"
58#include <mysql/psi/mysql_table.h>58#include <mysql/psi/mysql_table.h>
59#include "mysql.h" // in_bootstrap & opt_noacl
5960
60#ifdef __WIN__61#ifdef __WIN__
61#include <io.h>62#include <io.h>
@@ -9313,11 +9314,14 @@
9313 DBUG_ENTER("check_engine");9314 DBUG_ENTER("check_engine");
9314 handlerton **new_engine= &create_info->db_type;9315 handlerton **new_engine= &create_info->db_type;
9315 handlerton *req_engine= *new_engine;9316 handlerton *req_engine= *new_engine;
9316 handlerton *enf_engine= ha_enforce_handlerton(thd);9317 handlerton *enf_engine= NULL;
93179318
9318 bool no_substitution=9319 bool no_substitution=
9319 test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION);9320 test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION);
93209321
9322 if (!in_bootstrap && !opt_noacl)
9323 enf_engine= ha_enforce_handlerton(thd);
9324
9321 if (!(*new_engine= ha_checktype(thd, ha_legacy_type(req_engine),9325 if (!(*new_engine= ha_checktype(thd, ha_legacy_type(req_engine),
9322 no_substitution, 1)))9326 no_substitution, 1)))
9323 DBUG_RETURN(true);9327 DBUG_RETURN(true);

Subscribers

People subscribed via source and target branches