diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-09-28 20:43:56 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-09-28 20:43:56 -0400 |
commit | c916085e271cd049537b1e07b36cd060c44750bd (patch) | |
tree | 337ddfcd033174143cf9bd08e6ba50174459d7ff /sql/sql_parse.cc | |
parent | 023366e6eb68edca3858c32e7492788e047d927a (diff) | |
parent | f1afc003eefe0aafd3e070c7453d9e029d8445a8 (diff) | |
download | mariadb-git-c916085e271cd049537b1e07b36cd060c44750bd.tar.gz |
bzr merge -rtag:mariadb-10.0.14 maria/10.0/
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8eb282b38f0..fc48db37f99 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -287,7 +287,7 @@ void init_update_queries(void) sql_command_flags[SQLCOM_CREATE_TABLE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS | CF_CAN_GENERATE_ROW_EVENTS; - sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS; + sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS; sql_command_flags[SQLCOM_ALTER_TABLE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS | CF_INSERTS_DATA; @@ -2996,6 +2996,9 @@ case SQLCOM_PREPARE: goto error; mysql_mutex_lock(&LOCK_active_mi); + if (!master_info_index) + goto error; + mi= master_info_index->get_master_info(&lex_mi->connection_name, Sql_condition::WARN_LEVEL_NOTE); @@ -3463,7 +3466,7 @@ end_with_restore_list: case SQLCOM_SLAVE_ALL_START: { mysql_mutex_lock(&LOCK_active_mi); - if (!master_info_index->start_all_slaves(thd)) + if (master_info_index && !master_info_index->start_all_slaves(thd)) my_ok(thd); mysql_mutex_unlock(&LOCK_active_mi); break; @@ -3479,7 +3482,7 @@ end_with_restore_list: goto error; } mysql_mutex_lock(&LOCK_active_mi); - if (!master_info_index->stop_all_slaves(thd)) + if (master_info_index && !master_info_index->stop_all_slaves(thd)) my_ok(thd); mysql_mutex_unlock(&LOCK_active_mi); break; @@ -4715,11 +4718,12 @@ end_with_restore_list: case SQLCOM_SHOW_GRANTS: { LEX_USER *grant_user= lex->grant_user; + Security_context *sctx= thd->security_ctx; if (!grant_user) goto error; - if (grant_user->user.str && - !strcmp(thd->security_ctx->priv_user, grant_user->user.str)) + if (grant_user->user.str && !strcmp(sctx->priv_user, grant_user->user.str) && + grant_user->host.str && !strcmp(sctx->priv_host, grant_user->host.str)) grant_user->user= current_user; if (grant_user->user.str == current_user.str || |