diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-12 14:05:44 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-12 14:05:44 -0400 |
commit | 857abf148149d0d7a73dc6364b5bf3d19e58a7d1 (patch) | |
tree | c6409f2642f85e3c377febe7aeb4b8adf031f997 /sql | |
parent | 38f048a013bcb9c73d74c26af9db4cfdf7299d93 (diff) | |
download | mariadb-git-857abf148149d0d7a73dc6364b5bf3d19e58a7d1.tar.gz |
bzr merge -r4104..4120 codership/5.6/
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 1 | ||||
-rw-r--r-- | sql/sql_admin.cc | 1 | ||||
-rw-r--r-- | sql/sql_parse.cc | 6 | ||||
-rw-r--r-- | sql/wsrep_mysqld.cc | 10 |
4 files changed, 10 insertions, 8 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f3b618e6987..9c16a8ea805 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5555,7 +5555,6 @@ static my_bool have_committing_connections() if (is_committing_connection(tmp)) { - mysql_mutex_unlock(&LOCK_thread_count); return TRUE; } } diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index f24bb2cff93..4a4ecc74d7c 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -1200,6 +1200,7 @@ bool Sql_cmd_optimize_table::execute(THD *thd) if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table, FALSE, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ + WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL) thd->enable_slow_log= opt_log_slow_admin_statements; res= (specialflag & SPECIAL_NO_NEW_FUNC) ? mysql_recreate_table(thd, first_table, true) : diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0d1a3ad6ea7..aab655275b2 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1211,6 +1211,9 @@ static void wsrep_copy_query(THD *thd) { thd->wsrep_retry_command = thd->get_command(); thd->wsrep_retry_query_len = thd->query_length(); + if (thd->wsrep_retry_query) { + my_free(thd->wsrep_retry_query); + } thd->wsrep_retry_query = (char *)my_malloc( thd->wsrep_retry_query_len + 1, MYF(0)); strncpy(thd->wsrep_retry_query, thd->query(), thd->wsrep_retry_query_len); @@ -3793,8 +3796,7 @@ end_with_restore_list: if ((res= insert_precheck(thd, all_tables))) break; #ifdef WITH_WSREP - if (lex->sql_command == SQLCOM_INSERT_SELECT && - thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED) + if (thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED) { thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING; WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL); diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index a9344b0a946..79103ae8e71 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -132,7 +132,7 @@ static void wsrep_log_cb(wsrep_log_level_t level, const char *msg) { sql_print_error("WSREP: %s", msg); break; case WSREP_LOG_DEBUG: - sql_print_information ("[Debug] WSREP: %s", msg); + if (wsrep_debug) sql_print_information ("[Debug] WSREP: %s", msg); default: break; } @@ -794,10 +794,10 @@ void wsrep_filter_new_cluster (int* argc, char* argv[]) { /* make a copy of the argument to convert possible underscores to hyphens. * the copy need not to be longer than WSREP_NEW_CLUSTER option */ - char arg[sizeof(WSREP_NEW_CLUSTER) + 2]= { 0, }; + char arg[sizeof(WSREP_NEW_CLUSTER) + 1]= { 0, }; strncpy(arg, argv[i], sizeof(arg) - 1); - char* underscore; - while (NULL != (underscore= strchr(arg, '_'))) *underscore= '-'; + char* underscore(arg); + while (NULL != (underscore= strchr(underscore, '_'))) *underscore= '-'; if (!strcmp(arg, WSREP_NEW_CLUSTER)) { @@ -904,7 +904,7 @@ wsrep_causal_wait (THD* thd) switch (ret) { case WSREP_NOT_IMPLEMENTED: - msg= "consistent reads by wsrep backend. " + msg= "synchronous reads by wsrep backend. " "Please unset wsrep_causal_reads variable."; err= ER_NOT_SUPPORTED_YET; break; |