diff options
-rw-r--r-- | .bzrignore | 1 | ||||
-rw-r--r-- | client/mysqltest.cc | 5 | ||||
-rw-r--r-- | plugin/auth_socket/auth_socket.c | 2 | ||||
-rw-r--r-- | sql-common/client_plugin.c | 2 | ||||
-rw-r--r-- | sql/mdl.cc | 3 | ||||
-rw-r--r-- | sql/set_var.cc | 1 | ||||
-rw-r--r-- | sql/slave.cc | 7 | ||||
-rw-r--r-- | sql/sql_parse.cc | 5 | ||||
-rw-r--r-- | sql/sql_show.cc | 2 | ||||
-rw-r--r-- | sql/sql_table.cc | 2 | ||||
-rw-r--r-- | storage/myisam/mi_locking.c | 2 |
11 files changed, 12 insertions, 20 deletions
diff --git a/.bzrignore b/.bzrignore index 1dda81015e7..ff3fefd074e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1129,3 +1129,4 @@ libmysql/strings_def.h libmysql_r/strings_def.h storage/maria/aria_log_control scripts/mytop +include/*.h.tmp diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 3381c4f116d..23b9eb578c6 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -886,6 +886,7 @@ static void init_connection_thd(struct st_connection *cn) #else /*EMBEDDED_LIBRARY*/ +#define init_connection_thd(X) do { } while(0) #define do_send_query(cn,q,q_len) mysql_send_query(cn->mysql, q, q_len) #define do_read_query_result(cn) mysql_read_query_result(cn->mysql) @@ -5487,9 +5488,7 @@ void do_connect(struct st_command *command) con_slot->name= 0; } -#ifdef EMBEDDED_LIBRARY init_connection_thd(con_slot); -#endif /*EMBEDDED_LIBRARY*/ if (!(con_slot->mysql= mysql_init(0))) die("Failed on mysql_init()"); @@ -8470,9 +8469,7 @@ int main(int argc, char **argv) cursor_protocol_enabled= cursor_protocol; st_connection *con= connections; -#ifdef EMBEDDED_LIBRARY init_connection_thd(con); -#endif /*EMBEDDED_LIBRARY*/ if (! (con->mysql= mysql_init(0))) die("Failed in mysql_init()"); if (opt_connect_timeout) diff --git a/plugin/auth_socket/auth_socket.c b/plugin/auth_socket/auth_socket.c index 00e86bb25cf..2aa4a0794ea 100644 --- a/plugin/auth_socket/auth_socket.c +++ b/plugin/auth_socket/auth_socket.c @@ -24,7 +24,7 @@ the owner of the client process matches the user name that was used when connecting to mysqld. */ -#define _GNU_SOURCE /* for struct ucred */ +#define _GNU_SOURCE 1 /* for struct ucred */ #include <mysql/plugin_auth.h> #include <sys/socket.h> diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index 0acadaa10fc..add5c60c056 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -243,6 +243,7 @@ int mysql_client_plugin_init() struct st_mysql_client_plugin **builtin; va_list unused; DBUG_ENTER("mysql_client_plugin_init"); + LINT_INIT_STRUCT(unused); if (initialized) DBUG_RETURN(0); @@ -307,6 +308,7 @@ mysql_client_register_plugin(MYSQL *mysql, { va_list unused; DBUG_ENTER("mysql_client_register_plugin"); + LINT_INIT_STRUCT(unused); if (is_not_initialized(mysql, plugin->name)) DBUG_RETURN(NULL); diff --git a/sql/mdl.cc b/sql/mdl.cc index 21410db2d22..45f0c02338e 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -2223,9 +2223,6 @@ bool MDL_context::visit_subgraph(MDL_wait_for_graph_visitor *gvisitor) @note If during deadlock resolution context which performs deadlock detection is chosen as a victim it will be informed about the fact by setting VICTIM status to its wait slot. - - @retval TRUE A deadlock is found. - @retval FALSE No deadlock found. */ void MDL_context::find_deadlock() diff --git a/sql/set_var.cc b/sql/set_var.cc index a229002282b..3494d5b1694 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -39,7 +39,6 @@ #include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone #include "sql_acl.h" // SUPER_ACL #include "sql_select.h" // free_underlaid_joins -#include "sql_show.h" // make_default_log_name #include "sql_view.h" // updatable_views_with_limit_typelib #include "lock.h" // lock_global_read_lock, // make_global_read_lock_block_commit, diff --git a/sql/slave.cc b/sql/slave.cc index 26d57353084..7e60b0ef3ec 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2206,11 +2206,8 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) simulate_error|= (1 << SLAVE_THD_IO);); DBUG_EXECUTE_IF("simulate_sql_slave_error_on_init", simulate_error|= (1 << SLAVE_THD_SQL);); -#if !defined(DBUG_OFF) - if (init_thr_lock() || thd->store_globals() || simulate_error & (1<< thd_type)) -#else - if (init_thr_lock() || thd->store_globals()) -#endif + if (init_thr_lock() || thd->store_globals() || + IF_DBUG(simulate_error & (1<< thd_type), 0)) { thd->cleanup(); DBUG_RETURN(-1); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a952c596a8b..ad5aa281ea7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -49,9 +49,8 @@ // mysql_restore_table #include "sql_reload.h" // reload_acl_and_cache #include "sql_admin.h" // mysql_assign_to_keycache -#include "sql_connect.h" // check_user, - // decrease_user_connections, - // thd_init_client_charset, check_mqh, +#include "sql_connect.h" // decrease_user_connections, + // check_mqh, // reset_mqh #include "sql_rename.h" // mysql_rename_table #include "sql_tablespace.h" // mysql_alter_tablespace diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 78503faa68c..4485991cdaf 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1984,7 +1984,7 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond) CHARSET_INFO *cs= system_charset_info; char *user; my_hrtime_t unow= my_hrtime(); - DBUG_ENTER("fill_process_list"); + DBUG_ENTER("fill_schema_processlist"); user= thd->security_ctx->master_access & PROCESS_ACL ? NullS : thd->security_ctx->priv_user; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2ead7a167e5..a5ef2c4b7fc 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3876,6 +3876,7 @@ void sp_prepare_create_field(THD *thd, Create_field *sql_field) } +#ifdef WITH_PARTITION_STORAGE_ENGINE /** Auxiliary function which allows to check if freshly created .FRM file for table can be opened. @@ -3913,6 +3914,7 @@ static bool check_if_created_table_can_be_opened(THD *thd, (void) file->ha_create_handler_files(path, NULL, CHF_DELETE_FLAG, create_info); return result; } +#endif /** diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c index 4ee1763193e..6eb25f089b2 100644 --- a/storage/myisam/mi_locking.c +++ b/storage/myisam/mi_locking.c @@ -315,7 +315,6 @@ void mi_update_status(void* param) */ if (info->state == &info->save_state) { -#ifndef DBUG_OFF DBUG_PRINT("info", ("updating status: key_file: %lu data_file: %lu rows: %lu", (ulong) info->state->key_file_length, @@ -326,7 +325,6 @@ void mi_update_status(void* param) DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld", (long) info->s->state.state.key_file_length, (long) info->s->state.state.data_file_length)); -#endif info->s->state.state= *info->state; #ifdef HAVE_QUERY_CACHE DBUG_PRINT("info", ("invalidator... '%s' (status update)", |