This commit is contained in:
Sergei Golubchik 2011-10-19 22:50:45 +02:00
parent 533d274c03
commit 42b8235788
11 changed files with 12 additions and 20 deletions

View file

@ -1129,3 +1129,4 @@ libmysql/strings_def.h
libmysql_r/strings_def.h libmysql_r/strings_def.h
storage/maria/aria_log_control storage/maria/aria_log_control
scripts/mytop scripts/mytop
include/*.h.tmp

View file

@ -886,6 +886,7 @@ static void init_connection_thd(struct st_connection *cn)
#else /*EMBEDDED_LIBRARY*/ #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_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) #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; con_slot->name= 0;
} }
#ifdef EMBEDDED_LIBRARY
init_connection_thd(con_slot); init_connection_thd(con_slot);
#endif /*EMBEDDED_LIBRARY*/
if (!(con_slot->mysql= mysql_init(0))) if (!(con_slot->mysql= mysql_init(0)))
die("Failed on mysql_init()"); die("Failed on mysql_init()");
@ -8470,9 +8469,7 @@ int main(int argc, char **argv)
cursor_protocol_enabled= cursor_protocol; cursor_protocol_enabled= cursor_protocol;
st_connection *con= connections; st_connection *con= connections;
#ifdef EMBEDDED_LIBRARY
init_connection_thd(con); init_connection_thd(con);
#endif /*EMBEDDED_LIBRARY*/
if (! (con->mysql= mysql_init(0))) if (! (con->mysql= mysql_init(0)))
die("Failed in mysql_init()"); die("Failed in mysql_init()");
if (opt_connect_timeout) if (opt_connect_timeout)

View file

@ -24,7 +24,7 @@
the owner of the client process matches the user name that was used when the owner of the client process matches the user name that was used when
connecting to mysqld. connecting to mysqld.
*/ */
#define _GNU_SOURCE /* for struct ucred */ #define _GNU_SOURCE 1 /* for struct ucred */
#include <mysql/plugin_auth.h> #include <mysql/plugin_auth.h>
#include <sys/socket.h> #include <sys/socket.h>

View file

@ -243,6 +243,7 @@ int mysql_client_plugin_init()
struct st_mysql_client_plugin **builtin; struct st_mysql_client_plugin **builtin;
va_list unused; va_list unused;
DBUG_ENTER("mysql_client_plugin_init"); DBUG_ENTER("mysql_client_plugin_init");
LINT_INIT_STRUCT(unused);
if (initialized) if (initialized)
DBUG_RETURN(0); DBUG_RETURN(0);
@ -307,6 +308,7 @@ mysql_client_register_plugin(MYSQL *mysql,
{ {
va_list unused; va_list unused;
DBUG_ENTER("mysql_client_register_plugin"); DBUG_ENTER("mysql_client_register_plugin");
LINT_INIT_STRUCT(unused);
if (is_not_initialized(mysql, plugin->name)) if (is_not_initialized(mysql, plugin->name))
DBUG_RETURN(NULL); DBUG_RETURN(NULL);

View file

@ -2223,9 +2223,6 @@ bool MDL_context::visit_subgraph(MDL_wait_for_graph_visitor *gvisitor)
@note If during deadlock resolution context which performs deadlock @note If during deadlock resolution context which performs deadlock
detection is chosen as a victim it will be informed about the detection is chosen as a victim it will be informed about the
fact by setting VICTIM status to its wait slot. 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() void MDL_context::find_deadlock()

View file

@ -39,7 +39,6 @@
#include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone #include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone
#include "sql_acl.h" // SUPER_ACL #include "sql_acl.h" // SUPER_ACL
#include "sql_select.h" // free_underlaid_joins #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 "sql_view.h" // updatable_views_with_limit_typelib
#include "lock.h" // lock_global_read_lock, #include "lock.h" // lock_global_read_lock,
// make_global_read_lock_block_commit, // make_global_read_lock_block_commit,

View file

@ -2206,11 +2206,8 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
simulate_error|= (1 << SLAVE_THD_IO);); simulate_error|= (1 << SLAVE_THD_IO););
DBUG_EXECUTE_IF("simulate_sql_slave_error_on_init", DBUG_EXECUTE_IF("simulate_sql_slave_error_on_init",
simulate_error|= (1 << SLAVE_THD_SQL);); simulate_error|= (1 << SLAVE_THD_SQL););
#if !defined(DBUG_OFF) if (init_thr_lock() || thd->store_globals() ||
if (init_thr_lock() || thd->store_globals() || simulate_error & (1<< thd_type)) IF_DBUG(simulate_error & (1<< thd_type), 0))
#else
if (init_thr_lock() || thd->store_globals())
#endif
{ {
thd->cleanup(); thd->cleanup();
DBUG_RETURN(-1); DBUG_RETURN(-1);

View file

@ -49,9 +49,8 @@
// mysql_restore_table // mysql_restore_table
#include "sql_reload.h" // reload_acl_and_cache #include "sql_reload.h" // reload_acl_and_cache
#include "sql_admin.h" // mysql_assign_to_keycache #include "sql_admin.h" // mysql_assign_to_keycache
#include "sql_connect.h" // check_user, #include "sql_connect.h" // decrease_user_connections,
// decrease_user_connections, // check_mqh,
// thd_init_client_charset, check_mqh,
// reset_mqh // reset_mqh
#include "sql_rename.h" // mysql_rename_table #include "sql_rename.h" // mysql_rename_table
#include "sql_tablespace.h" // mysql_alter_tablespace #include "sql_tablespace.h" // mysql_alter_tablespace

View file

@ -1984,7 +1984,7 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
CHARSET_INFO *cs= system_charset_info; CHARSET_INFO *cs= system_charset_info;
char *user; char *user;
my_hrtime_t unow= my_hrtime(); my_hrtime_t unow= my_hrtime();
DBUG_ENTER("fill_process_list"); DBUG_ENTER("fill_schema_processlist");
user= thd->security_ctx->master_access & PROCESS_ACL ? user= thd->security_ctx->master_access & PROCESS_ACL ?
NullS : thd->security_ctx->priv_user; NullS : thd->security_ctx->priv_user;

View file

@ -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 Auxiliary function which allows to check if freshly created .FRM
file for table can be opened. 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); (void) file->ha_create_handler_files(path, NULL, CHF_DELETE_FLAG, create_info);
return result; return result;
} }
#endif
/** /**

View file

@ -315,7 +315,6 @@ void mi_update_status(void* param)
*/ */
if (info->state == &info->save_state) if (info->state == &info->save_state)
{ {
#ifndef DBUG_OFF
DBUG_PRINT("info", DBUG_PRINT("info",
("updating status: key_file: %lu data_file: %lu rows: %lu", ("updating status: key_file: %lu data_file: %lu rows: %lu",
(ulong) info->state->key_file_length, (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", DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld",
(long) info->s->state.state.key_file_length, (long) info->s->state.state.key_file_length,
(long) info->s->state.state.data_file_length)); (long) info->s->state.state.data_file_length));
#endif
info->s->state.state= *info->state; info->s->state.state= *info->state;
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
DBUG_PRINT("info", ("invalidator... '%s' (status update)", DBUG_PRINT("info", ("invalidator... '%s' (status update)",