Below is the list of changes that have just been committed into a local
5.1 repository of alik. When alik does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-03 14:00:35+03:00, anozdrin@alik. +16 -0
Merge alik.:/mnt/raid/alik/MySQL/devel/5.1-monty
into alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
MERGE: 1.2334.1.7
mysql-test/mysql-test-run.pl@stripped, 2006-11-03 13:46:43+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.191.1.1
server-tools/instance-manager/guardian.cc@stripped, 2006-11-03 14:00:33+03:00, anozdrin@alik. +0 -5
Manual merged.
MERGE: 1.25.1.1
server-tools/instance-manager/instance.cc@stripped, 2006-11-03 14:00:33+03:00, anozdrin@alik. +0 -5
Manual merged.
MERGE: 1.38.1.1
server-tools/instance-manager/mysql_connection.cc@stripped, 2006-11-03 14:00:33+03:00, anozdrin@alik. +15 -22
Manual merged.
MERGE: 1.16.1.1
sql/ha_ndbcluster.cc@stripped, 2006-11-03 13:46:43+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.367.1.1
sql/handler.cc@stripped, 2006-11-03 13:46:43+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.279.1.1
sql/log.cc@stripped, 2006-11-03 13:46:43+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.239.1.1
sql/mysqld.cc@stripped, 2006-11-03 13:46:43+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.584.1.3
sql/sp_head.cc@stripped, 2006-11-03 13:46:44+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.240.1.1
sql/sql_base.cc@stripped, 2006-11-03 13:46:44+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.358.1.2
sql/sql_class.h@stripped, 2006-11-03 13:46:44+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.322.1.2
sql/sql_insert.cc@stripped, 2006-11-03 13:46:44+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.232.1.1
sql/sql_parse.cc@stripped, 2006-11-03 13:46:44+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.585.1.1
sql/sql_select.cc@stripped, 2006-11-03 13:46:45+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.458.1.2
sql/sql_view.cc@stripped, 2006-11-03 13:46:45+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.111.1.2
sql/table.cc@stripped, 2006-11-03 13:46:45+03:00, anozdrin@alik. +0 -0
Auto merged
MERGE: 1.246.1.2
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: anozdrin
# Host: alik.
# Root: /mnt/raid/alik/MySQL/devel/5.1-rt-merged/RESYNC
--- 1.280/sql/handler.cc 2006-11-03 14:00:41 +03:00
+++ 1.281/sql/handler.cc 2006-11-03 14:00:41 +03:00
@@ -1483,8 +1483,9 @@ bool handler::check_if_log_table_locking
{
/*
Deny locking of the log tables, which is incompatible with
- concurrent insert. Unless called from a logger THD:
- general_log_thd or slow_log_thd.
+ concurrent insert. The routine is not called if the table is
+ being locked from a logger THD (general_log_thd or slow_log_thd)
+ or from a privileged thread (see log.cc for details)
*/
if (table->s->log_table &&
sql_command != SQLCOM_TRUNCATE &&
--- 1.241/sql/log.cc 2006-11-03 14:00:41 +03:00
+++ 1.242/sql/log.cc 2006-11-03 14:00:41 +03:00
@@ -2086,7 +2086,7 @@ bool MYSQL_QUERY_LOG::write(time_t event
goto err;
/* command_type, thread_id */
- length= my_snprintf(buff, 32, "%5ld ", thread_id);
+ length= my_snprintf(buff, 32, "%5ld ", (long) thread_id);
if (my_b_write(&log_file, (byte*) buff, length))
goto err;
--- 1.585/sql/mysqld.cc 2006-11-03 14:00:41 +03:00
+++ 1.586/sql/mysqld.cc 2006-11-03 14:00:41 +03:00
@@ -1184,6 +1184,7 @@ void clean_up(bool print_message)
hostname_cache_free();
item_user_lock_free();
lex_free(); /* Free some memory */
+ item_create_cleanup();
set_var_free();
free_charsets();
(void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */
@@ -2663,19 +2664,43 @@ static int init_common_variables(const c
/* connections and databases needs lots of files */
{
- uint files, wanted_files;
+ uint files, wanted_files, max_open_files;
- wanted_files= 10+(uint) max(max_connections*5,
- max_connections+table_cache_size*2);
- set_if_bigger(wanted_files, open_files_limit);
- files= my_set_max_open_files(wanted_files);
+ /* MyISAM requires two file handles per table. */
+ wanted_files= 10+max_connections+table_cache_size*2;
+ /*
+ We are trying to allocate no less than max_connections*5 file
+ handles (i.e. we are trying to set the limit so that they will
+ be available). In addition, we allocate no less than how much
+ was already allocated. However below we report a warning and
+ recompute values only if we got less file handles than were
+ explicitly requested. No warning and re-computation occur if we
+ can't get max_connections*5 but still got no less than was
+ requested (value of wanted_files).
+ */
+ max_open_files= max(max(wanted_files, max_connections*5),
+ open_files_limit);
+ files= my_set_max_open_files(max_open_files);
if (files < wanted_files)
{
if (!open_files_limit)
{
- max_connections= (ulong) min((files-10),max_connections);
- table_cache_size= (ulong) max((files-10-max_connections)/2,64);
+ /*
+ If we have requested too much file handles than we bring
+ max_connections in supported bounds.
+ */
+ max_connections= (ulong) min(files-10-TABLE_OPEN_CACHE_MIN*2,
+ max_connections);
+ /*
+ Decrease table_cache_size according to max_connections, but
+ not below TABLE_OPEN_CACHE_MIN. Outer min() ensures that we
+ never increase table_cache_size automatically (that could
+ happen if max_connections is decreased above).
+ */
+ table_cache_size= (ulong) min(max((files-10-max_connections)/2,
+ TABLE_OPEN_CACHE_MIN),
+ table_cache_size);
DBUG_PRINT("warning",
("Changed limits: max_open_files: %u max_connections: %ld table_cache: %ld",
files, max_connections, table_cache_size));
@@ -2693,6 +2718,8 @@ static int init_common_variables(const c
return 1;
init_client_errs();
lex_init();
+ if (item_create_init())
+ return 1;
item_init();
set_var_init();
mysys_uses_curses=0;
@@ -6185,15 +6212,15 @@ The minimum value for this variable is 4
{"table_cache", OPT_TABLE_OPEN_CACHE,
"Deprecated; use --table_open_cache instead.",
(gptr*) &table_cache_size, (gptr*) &table_cache_size, 0, GET_ULONG,
- REQUIRED_ARG, 64, 1, 512*1024L, 0, 1, 0},
+ REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
{"table_definition_cache", OPT_TABLE_DEF_CACHE,
"The number of cached table definitions.",
(gptr*) &table_def_size, (gptr*) &table_def_size,
0, GET_ULONG, REQUIRED_ARG, 128, 1, 512*1024L, 0, 1, 0},
{"table_open_cache", OPT_TABLE_OPEN_CACHE,
"The number of cached open tables.",
- (gptr*) &table_cache_size, (gptr*) &table_cache_size,
- 0, GET_ULONG, REQUIRED_ARG, 64, 1, 512*1024L, 0, 1, 0},
+ (gptr*) &table_cache_size, (gptr*) &table_cache_size, 0, GET_ULONG,
+ REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
{"table_lock_wait_timeout", OPT_TABLE_LOCK_WAIT_TIMEOUT,
"Timeout in seconds to wait for a table level lock before returning an "
"error. Used only if the connection has active cursors.",
--- 1.359/sql/sql_base.cc 2006-11-03 14:00:41 +03:00
+++ 1.360/sql/sql_base.cc 2006-11-03 14:00:41 +03:00
@@ -1365,6 +1365,10 @@ TABLE_LIST *find_table_in_list(TABLE_LIS
Also SELECT::exclude_from_table_unique_test used to exclude from check
tables of main SELECT of multi-delete and multi-update
+ We also skip tables with TABLE_LIST::prelocking_placeholder set,
+ because we want to allow SELECTs from them, and their modification
+ will rise the error anyway.
+
TODO: when we will have table/view change detection we can do this check
only once for PS/SP
@@ -1411,12 +1415,13 @@ TABLE_LIST* unique_table(THD *thd, TABLE
if (((! (res= find_table_in_global_list(table_list, d_name, t_name))) &&
(! (res= mysql_lock_have_duplicate(thd, table, table_list)))) ||
((!res->table || res->table != table->table) &&
- res->select_lex && !res->select_lex->exclude_from_table_unique_test))
+ res->select_lex && !res->select_lex->exclude_from_table_unique_test &&
+ !res->prelocking_placeholder))
break;
/*
- If we found entry of this table or or table of SELECT which already
+ If we found entry of this table or table of SELECT which already
processed in derived table or top select of multi-update/multi-delete
- (exclude_from_table_unique_test).
+ (exclude_from_table_unique_test) or prelocking placeholder.
*/
table_list= res->next_global;
DBUG_PRINT("info",
--- 1.325/sql/sql_class.h 2006-11-03 14:00:41 +03:00
+++ 1.326/sql/sql_class.h 2006-11-03 14:00:42 +03:00
@@ -1449,10 +1449,12 @@ public:
#ifndef EMBEDDED_LIBRARY
inline void clear_error()
{
+ DBUG_ENTER("clear_error");
net.last_error[0]= 0;
net.last_errno= 0;
net.report_error= 0;
query_error= 0;
+ DBUG_VOID_RETURN;
}
inline bool vio_ok() const { return net.vio != 0; }
#else
@@ -1570,8 +1572,11 @@ public:
or trigger is decided when it starts executing, depending for example on
the caller (for a stored function: if caller is SELECT or
INSERT/UPDATE/DELETE...).
+
+ Don't reset binlog format for NDB binlog injector thread.
*/
- if ((temporary_tables == NULL) && (in_sub_stmt == 0))
+ if ((temporary_tables == NULL) && (in_sub_stmt == 0) &&
+ (system_thread != SYSTEM_THREAD_NDBCLUSTER_BINLOG))
{
current_stmt_binlog_row_based=
test(variables.binlog_format == BINLOG_FORMAT_ROW);
--- 1.235/sql/sql_insert.cc 2006-11-03 14:00:42 +03:00
+++ 1.236/sql/sql_insert.cc 2006-11-03 14:00:42 +03:00
@@ -261,6 +261,8 @@ static int check_update_fields(THD *thd,
TABLE *table= insert_table_list->table;
my_bool timestamp_mark;
+ LINT_INIT(timestamp_mark);
+
if (table->timestamp_field)
{
/*
@@ -1699,7 +1701,7 @@ static int
write_delayed(THD *thd,TABLE *table, enum_duplicates duplic,
LEX_STRING query, bool ignore, bool log_on)
{
- delayed_row *row;
+ delayed_row *row= 0;
delayed_insert *di=thd->di;
const Discrete_interval *forced_auto_inc;
DBUG_ENTER("write_delayed");
@@ -2306,14 +2308,18 @@ bool delayed_insert::handle_inserts(void
DBUG_RETURN(0);
err:
- DBUG_EXECUTE("error", max_rows= 0;);
+#ifndef DBUG_OFF
+ max_rows= 0; // For DBUG output
+#endif
/* Remove all not used rows */
while ((row=rows.get()))
{
delete row;
thread_safe_increment(delayed_insert_errors,&LOCK_delayed_status);
stacked_inserts--;
- DBUG_EXECUTE("error", max_rows++;);
+#ifndef DBUG_OFF
+ max_rows++;
+#endif
}
DBUG_PRINT("error", ("dropped %lu rows after an error", max_rows));
thread_safe_increment(delayed_insert_errors, &LOCK_delayed_status);
--- 1.591/sql/sql_parse.cc 2006-11-03 14:00:42 +03:00
+++ 1.592/sql/sql_parse.cc 2006-11-03 14:00:42 +03:00
@@ -4656,7 +4656,10 @@ end_with_restore_list:
send_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 :
thd->row_count_func));
else
+ {
+ DBUG_ASSERT(thd->net.report_error == 1 || thd->killed);
goto error; // Substatement should already have sent error
+ }
}
break;
}
@@ -4941,7 +4944,7 @@ end_with_restore_list:
LEX_STRING *name;
int i;
- for (i= 0; name= names++; i++)
+ for (i= 0; (name= names++); i++)
{
buff.append(i ? ", " : "(");
append_identifier(thd, &buff, name->str, name->length);
--- 1.462/sql/sql_select.cc 2006-11-03 14:00:42 +03:00
+++ 1.463/sql/sql_select.cc 2006-11-03 14:00:42 +03:00
@@ -3605,7 +3605,7 @@ best_access_path(JOIN *join,
double best= DBL_MAX;
double best_time= DBL_MAX;
double records= DBL_MAX;
- table_map best_ref_depends_map;
+ table_map best_ref_depends_map= 0;
double tmp;
ha_rows rec;
@@ -10106,7 +10106,8 @@ do_select(JOIN *join,List<Item> *fields,
enum_nested_loop_state error= NESTED_LOOP_OK;
JOIN_TAB *join_tab;
DBUG_ENTER("do_select");
-
+ LINT_INIT(join_tab);
+
join->procedure=procedure;
join->tmp_table= table; /* Save for easy recursion */
join->fields= fields;
@@ -10136,9 +10137,9 @@ do_select(JOIN *join,List<Item> *fields,
*/
if (!join->conds || join->conds->val_int())
{
- error= (*end_select)(join,join_tab,0);
+ error= (*end_select)(join, 0, 0);
if (error == NESTED_LOOP_OK || error == NESTED_LOOP_QUERY_LIMIT)
- error= (*end_select)(join,join_tab,1);
+ error= (*end_select)(join, 0, 1);
}
else if (join->send_row_on_empty_set())
{
@@ -10694,7 +10695,7 @@ int report_error(TABLE *table, int error
*/
if (error != HA_ERR_LOCK_DEADLOCK && error != HA_ERR_LOCK_WAIT_TIMEOUT)
sql_print_error("Got error %d when reading table '%s'",
- error, table->s->path);
+ error, table->s->path.str);
table->file->print_error(error,MYF(0));
return 1;
}
--- 1.249/sql/table.cc 2006-11-03 14:00:42 +03:00
+++ 1.250/sql/table.cc 2006-11-03 14:00:42 +03:00
@@ -479,7 +479,7 @@ static int open_binary_frm(THD *thd, TAB
sql_print_warning("'%s' had no or invalid character set, "
"and default character set is multi-byte, "
"so character column sizes may have changed",
- share->path);
+ share->path.str);
}
share->table_charset= default_charset_info;
}
--- 1.112/sql/sql_view.cc 2006-11-03 14:00:42 +03:00
+++ 1.113/sql/sql_view.cc 2006-11-03 14:00:42 +03:00
@@ -236,25 +236,9 @@ bool mysql_create_view(THD *thd,
bool res= FALSE;
DBUG_ENTER("mysql_create_view");
- if (lex->proc_list.first ||
- lex->result)
- {
- my_error(ER_VIEW_SELECT_CLAUSE, MYF(0), (lex->result ?
- "INTO" :
- "PROCEDURE"));
- res= TRUE;
- goto err;
- }
- if (lex->derived_tables ||
- lex->variables_used || lex->param_list.elements)
- {
- int err= (lex->derived_tables ?
- ER_VIEW_SELECT_DERIVED :
- ER_VIEW_SELECT_VARIABLE);
- my_message(err, ER(err), MYF(0));
- res= TRUE;
- goto err;
- }
+ /* This is ensured in the parser. */
+ DBUG_ASSERT(!lex->proc_list.first && !lex->result &&
+ !lex->param_list.elements && !lex->derived_tables);
if (mode != VIEW_CREATE_NEW)
{
@@ -582,40 +566,40 @@ static const int num_view_backups= 3;
*/
static File_option view_parameters[]=
{{{ C_STRING_WITH_LEN("query")},
- offsetof(TABLE_LIST, query),
+ my_offsetof(TABLE_LIST, query),
FILE_OPTIONS_ESTRING},
{{ C_STRING_WITH_LEN("md5")},
- offsetof(TABLE_LIST, md5),
+ my_offsetof(TABLE_LIST, md5),
FILE_OPTIONS_STRING},
{{ C_STRING_WITH_LEN("updatable")},
- offsetof(TABLE_LIST, updatable_view),
+ my_offsetof(TABLE_LIST, updatable_view),
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("algorithm")},
- offsetof(TABLE_LIST, algorithm),
+ my_offsetof(TABLE_LIST, algorithm),
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("definer_user")},
- offsetof(TABLE_LIST, definer.user),
+ my_offsetof(TABLE_LIST, definer.user),
FILE_OPTIONS_STRING},
{{ C_STRING_WITH_LEN("definer_host")},
- offsetof(TABLE_LIST, definer.host),
+ my_offsetof(TABLE_LIST, definer.host),
FILE_OPTIONS_STRING},
{{ C_STRING_WITH_LEN("suid")},
- offsetof(TABLE_LIST, view_suid),
+ my_offsetof(TABLE_LIST, view_suid),
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("with_check_option")},
- offsetof(TABLE_LIST, with_check),
+ my_offsetof(TABLE_LIST, with_check),
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("revision")},
- offsetof(TABLE_LIST, revision),
+ my_offsetof(TABLE_LIST, revision),
FILE_OPTIONS_REV},
{{ C_STRING_WITH_LEN("timestamp")},
- offsetof(TABLE_LIST, timestamp),
+ my_offsetof(TABLE_LIST, timestamp),
FILE_OPTIONS_TIMESTAMP},
{{ C_STRING_WITH_LEN("create-version")},
- offsetof(TABLE_LIST, file_version),
+ my_offsetof(TABLE_LIST, file_version),
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("source")},
- offsetof(TABLE_LIST, source),
+ my_offsetof(TABLE_LIST, source),
FILE_OPTIONS_ESTRING},
{{NullS, 0}, 0,
FILE_OPTIONS_STRING}
--- 1.192/mysql-test/mysql-test-run.pl 2006-11-03 14:00:42 +03:00
+++ 1.193/mysql-test/mysql-test-run.pl 2006-11-03 14:00:42 +03:00
@@ -1637,7 +1637,7 @@ sub environment_setup () {
# ----------------------------------------------------
# We are nice and report a bit about our settings
# ----------------------------------------------------
- if (!$opt_extern)
+ if (!$opt_extern && $opt_verbose)
{
print "Using MTR_BUILD_THREAD = $ENV{MTR_BUILD_THREAD}\n";
print "Using MASTER_MYPORT = $ENV{MASTER_MYPORT}\n";
@@ -2274,6 +2274,11 @@ sub initialize_servers () {
}
check_running_as_root();
}
+ else
+ {
+ # We have to create the 'var' and related directories
+ cleanup_stale_files();
+ }
}
sub mysql_install_db () {
@@ -2594,16 +2599,18 @@ sub do_before_run_mysqltest($)
}
-# MASV cleanup...
- mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are
+ if (!$opt_extern)
+ {
+ # MASV cleanup...
+ mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are
- # output current test to ndbcluster log file to enable diagnostics
- mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n");
+ # output current test to ndbcluster log file to enable diagnostics
+ mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n");
- mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
- if ( $master->[1]->{'pid'} )
- {
- mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
+ mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
+ if ( $master->[1]->{'pid'} ) {
+ mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
+ }
}
}
--- 1.241/sql/sp_head.cc 2006-11-03 14:00:42 +03:00
+++ 1.242/sql/sp_head.cc 2006-11-03 14:00:42 +03:00
@@ -1142,6 +1142,7 @@ sp_head::execute(THD *thd)
ctx->clear_handler();
ctx->enter_handler(hip);
thd->clear_error();
+ thd->is_fatal_error= 0;
thd->killed= THD::NOT_KILLED;
continue;
}
@@ -1169,8 +1170,9 @@ sp_head::execute(THD *thd)
state= EXECUTED;
done:
- DBUG_PRINT("info", ("err_status: %d killed: %d query_error: %d",
- err_status, thd->killed, thd->query_error));
+ DBUG_PRINT("info", ("err_status: %d killed: %d query_error: %d report_error: %d",
+ err_status, thd->killed, thd->query_error,
+ thd->net.report_error));
if (thd->killed)
err_status= TRUE;
@@ -2374,6 +2376,7 @@ sp_lex_keeper::reset_lex_and_exec_core(T
bool open_tables, sp_instr* instr)
{
int res= 0;
+ DBUG_ENTER("reset_lex_and_exec_core");
DBUG_ASSERT(!thd->derived_tables);
DBUG_ASSERT(thd->change_list.is_empty());
@@ -2418,7 +2421,10 @@ sp_lex_keeper::reset_lex_and_exec_core(T
res= -1;
if (!res)
+ {
res= instr->exec_core(thd, nextp);
+ DBUG_PRINT("info",("exec_core returned: %d", res));
+ }
m_lex->unit.cleanup();
@@ -2456,7 +2462,7 @@ sp_lex_keeper::reset_lex_and_exec_core(T
cleanup_items() is called in sp_head::execute()
*/
- return res || thd->net.report_error;
+ DBUG_RETURN(res || thd->net.report_error);
}
--- 1.17/server-tools/instance-manager/mysql_connection.cc 2006-11-03 14:00:42 +03:00
+++ 1.18/server-tools/instance-manager/mysql_connection.cc 2006-11-03 14:00:42 +03:00
@@ -165,7 +165,7 @@ Mysql_connection_thread::~Mysql_connecti
void Mysql_connection_thread::run()
{
- log_info("accepted mysql connection %d", (int) connection_id);
+ log_info("accepted mysql connection %lu", (unsigned long) connection_id);
my_thread_init();
@@ -175,7 +175,8 @@ void Mysql_connection_thread::run()
return;
}
- log_info("connection %d is checked successfully", (int) connection_id);
+ log_info("connection %lu is checked successfully",
+ (unsigned long) connection_id);
vio_keepalive(vio, TRUE);
@@ -314,7 +315,7 @@ int Mysql_connection_thread::do_command(
packet= (char*) net.read_pos;
enum enum_server_command command= (enum enum_server_command)
(uchar) *packet;
- log_info("connection %d: packet_length=%d, command=%d",
+ log_info("connection %lu: packet_length=%lu, command=%d",
(int) connection_id, (int) packet_length, (int) command);
return dispatch_command(command, packet + 1, packet_length - 1);
}
@@ -325,33 +326,33 @@ int Mysql_connection_thread::dispatch_co
{
switch (command) {
case COM_QUIT: // client exit
- log_info("query for connection %d received quit command",
- (int) connection_id);
+ log_info("query for connection %lu received quit command",
+ (unsigned long) connection_id);
return 1;
case COM_PING:
- log_info("query for connection %d received ping command",
- (int) connection_id);
+ log_info("query for connection %lu received ping command",
+ (unsigned long) connection_id);
net_send_ok(&net, connection_id, NULL);
break;
case COM_QUERY:
{
- log_info("query for connection %d : ----\n%s\n-------------------------",
+ log_info("query for connection %lu : ----\n%s\n-------------------------",
(int) connection_id,
(const char *) packet);
if (Command *command= parse_command(&instance_map, packet))
{
int res= 0;
- log_info("query for connection %d successfully parsed",
- (int) connection_id);
+ log_info("query for connection %lu successfully parsed",
+ (unsigned long) connection_id);
res= command->execute(&net, connection_id);
delete command;
if (!res)
- log_info("query for connection %d executed ok",
- (int) connection_id);
+ log_info("query for connection %lu executed ok",
+ (unsigned long) connection_id);
else
{
- log_info("query for connection %d executed err=%d",
- (int) connection_id, (int) res);
+ log_info("query for connection %lu executed err=%d",
+ (unsigned long) connection_id, (int) res);
net_send_error(&net, res);
return 0;
}
@@ -364,8 +365,8 @@ int Mysql_connection_thread::dispatch_co
break;
}
default:
- log_info("query for connection %d received unknown command",
- (int) connection_id);
+ log_info("query for connection %lu received unknown command",
+ (unsigned long) connection_id);
net_send_error(&net, ER_UNKNOWN_COM_ERROR);
break;
}
| Thread |
|---|
| • bk commit into 5.1 tree (anozdrin:1.2337) | Alexander Nozdrin | 3 Nov |