summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2005-05-06 11:39:30 +0300
committerunknown <monty@mishka.local>2005-05-06 11:39:30 +0300
commitab54e167052bb03f7f25cb071ee75f4f26caf68f (patch)
tree9bc36292e6c63e524c34d371f01eb8a1ec82d9ee /sql/handler.cc
parent21eed96b0261a6c6eff4f8df1493a0e57decf2bb (diff)
downloadmariadb-git-ab54e167052bb03f7f25cb071ee75f4f26caf68f.tar.gz
Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows) Fixed possible core dump in information schema client/client_priv.h: --count for mysqlshow client/mysqlshow.c: Added option --count to be used when the user want's number of rows per table in the output (We shouldn't use count(*) as default as this can be a slow operation) mysys/my_thr_init.c: Correct comment sql/ha_berkeley.cc: Remove not used variable sql/ha_berkeley.h: Remove not used variable sql/ha_innodb.cc: Remove not used function sql/ha_ndbcluster.cc: false -> FALSE true -> TRUE sql/handler.cc: Added and fixed comments Remove 'strange' code to remove compiler warnings (better to do things like this with attribute) sql/item.cc: false -> FALSE sql/item_cmpfunc.cc: Fixed indentation sql/item_cmpfunc.h: marked BETWEEN as a bool function sql/item_func.cc: Simple optimzation sql/key.cc: Removed wrong code sql/log.cc: Check result from open_index_file() sql/mysql_priv.h: Simplyfy some test of netware sql/mysqld.cc: Fixed indentation Check result form open_index_file() Simplify code with IF_NETWARE() sql/opt_range.cc: false -> FALSE true -> TRUE Fixed indentation sql/opt_sum.cc: Fixed comments sql/sp_head.cc: Simple optimzation Move variable declarations to begining of blocks sql/sql_acl.cc: Fix long lines Rename xx -> column Move declaration to beginning of block sql/sql_parse.cc: Removed comment sql/sql_select.cc: Indentation fixes sql/sql_show.cc: Fixed reference outside of array (possible core dump) sql/sql_table.cc: Simplify code Combine common code sql/sql_test.cc: false -> FALSE sql/sql_trigger.cc: false -> false true -> TRUE sql/sql_yacc.yy: Simpler test sql/unireg.cc: Added comment
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc28
1 files changed, 11 insertions, 17 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 7318de1c503..a34b3bd8aac 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -366,11 +366,11 @@ int ha_init()
if (opt_bin_log)
{
- if (!(*ht= binlog_init()))
+ if (!(*ht= binlog_init())) // Always succeed
{
- mysql_bin_log.close(LOG_CLOSE_INDEX);
- opt_bin_log= 0;
- error= 1;
+ mysql_bin_log.close(LOG_CLOSE_INDEX); // Never used
+ opt_bin_log= 0; // Never used
+ error= 1; // Never used
}
else
ha_was_inited_ok(ht++);
@@ -2417,6 +2417,7 @@ TYPELIB *ha_known_exts(void)
return &known_extensions;
}
+
#ifdef HAVE_REPLICATION
/*
Reports to table handlers up to which position we have sent the binlog
@@ -2424,19 +2425,16 @@ TYPELIB *ha_known_exts(void)
SYNOPSIS
ha_repl_report_sent_binlog()
+ thd thread doing the binlog communication to the slave
+ log_file_name binlog file name
+ end_offse t the offset in the binlog file up to which we sent the
+ contents to the slave
NOTES
Only works for InnoDB at the moment
RETURN VALUE
Always 0 (= success)
-
- PARAMETERS
- THD *thd in: thread doing the binlog communication to
- the slave
- char *log_file_name in: binlog file name
- my_off_t end_offset in: the offset in the binlog file up to
- which we sent the contents to the slave
*/
int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
@@ -2445,17 +2443,17 @@ int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
#ifdef HAVE_INNOBASE_DB
return innobase_repl_report_sent_binlog(thd,log_file_name,end_offset);
#else
- /* remove warnings about unused parameters */
- thd=thd; log_file_name=log_file_name; end_offset=end_offset;
return 0;
#endif
}
+
/*
Reports to table handlers that we stop replication to a specific slave
SYNOPSIS
ha_repl_report_replication_stop()
+ thd thread doing the binlog communication to the slave
NOTES
Does nothing at the moment
@@ -2464,14 +2462,10 @@ int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
Always 0 (= success)
PARAMETERS
- THD *thd in: thread doing the binlog communication to
- the slave
*/
int ha_repl_report_replication_stop(THD *thd)
{
- thd = thd;
-
return 0;
}
#endif /* HAVE_REPLICATION */