summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2007-03-01 00:25:50 +0300
committerunknown <kostja@bodhi.local>2007-03-01 00:25:50 +0300
commit5c58738ad100a24266f561c9feb25ff00e1a34e0 (patch)
tree8d0d669704ff926310b4a30859fc1f3e8572fb81
parent469282461cb3ed1e0bd0b7bb9d4745eec5d6c58a (diff)
downloadmariadb-git-5c58738ad100a24266f561c9feb25ff00e1a34e0.tar.gz
Remove dead code: flush_version was never increased in the server,
therefore the logic associated with it never worked. sql/ha_partition.cc: Remove dead code. Update comments. sql/mysql_priv.h: Remove dead code (flush_version). sql/mysqld.cc: Remove dead code (flush_version). sql/sql_base.cc: Remove dead code. sql/table.cc: Remove dead code. sql/table.h: Remove dead code.
-rw-r--r--sql/ha_partition.cc5
-rw-r--r--sql/mysql_priv.h2
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/sql_base.cc8
-rw-r--r--sql/table.cc1
-rw-r--r--sql/table.h2
6 files changed, 8 insertions, 14 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 87d24207dcd..25feab40261 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -4466,7 +4466,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info,
2) It is called from close_thread_table which in turn is called from
close_thread_tables except in the case where the tables are locked
in which case ha_commit_stmt is called instead.
- It is only called from here if flush_version hasn't changed and the
+ It is only called from here if refresh_version hasn't changed and the
table is not an old table when calling close_thread_table.
close_thread_tables is called from many places as a general clean up
function after completing a query.
@@ -4487,8 +4487,9 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info,
The handler will set HA_KEYREAD_ONLY in its table flags to indicate this
feature is supported.
HA_EXTRA_FLUSH:
- Indication to flush tables to disk, called at close_thread_table to
+ Indication to flush tables to disk, is supposed to be used to
ensure disk based tables are flushed at end of query execution.
+ Currently is never used.
2) Parameters used by some non-MyISAM handlers
----------------------------------------------
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 68465c08746..3b00149c63a 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1558,7 +1558,7 @@ extern double log_01[32];
extern ulonglong log_10_int[20];
extern ulonglong keybuff_size;
extern ulonglong thd_startup_options;
-extern ulong refresh_version,flush_version, thread_id;
+extern ulong refresh_version, thread_id;
extern ulong binlog_cache_use, binlog_cache_disk_use;
extern ulong aborted_threads,aborted_connects;
extern ulong delayed_insert_timeout;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d9fab73a23c..a8e2258ba8c 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -469,7 +469,7 @@ ulong open_files_limit, max_binlog_size, max_relay_log_size;
ulong slave_net_timeout, slave_trans_retries;
ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0;
ulong query_cache_size=0;
-ulong refresh_version, flush_version; /* Increments on each reload */
+ulong refresh_version; /* Increments on each reload */
query_id_t global_query_id;
ulong aborted_threads, aborted_connects;
ulong delayed_insert_timeout, delayed_insert_limit, delayed_queue_size;
@@ -7015,7 +7015,7 @@ static void mysql_init_variables(void)
OPTION_QUOTE_SHOW_CREATE | OPTION_SQL_NOTES);
protocol_version= PROTOCOL_VERSION;
what_to_log= ~ (1L << (uint) COM_TIME);
- refresh_version= flush_version= 1L; /* Increments on each reload */
+ refresh_version= 1L; /* Increments on each reload */
global_query_id= thread_id= 1L;
strmov(server_version, MYSQL_SERVER_VERSION);
myisam_recover_options_str= sql_mode_str= "OFF";
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index fd2e8445132..67e8d79b2e8 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1142,12 +1142,7 @@ bool close_thread_table(THD *thd, TABLE **table_ptr)
}
else
{
- if (table->s->flush_version != flush_version)
- {
- table->s->flush_version= flush_version;
- table->file->extra(HA_EXTRA_FLUSH);
- }
- // Free memory and reset for next loop
+ /* Free memory and reset for next loop */
table->file->ha_reset();
table->in_use=0;
if (unused_tables)
@@ -1777,7 +1772,6 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list)
share= table->s;
share->version=0;
- share->flush_version=0;
table->in_use = thd;
check_unused();
table->next = thd->open_tables;
diff --git a/sql/table.cc b/sql/table.cc
index ed3cac85214..0fe1f37e9b1 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -120,7 +120,6 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
share->normalized_path.length= path_length;
share->version= refresh_version;
- share->flush_version= flush_version;
/*
This constant is used to mark that no table map version has been
diff --git a/sql/table.h b/sql/table.h
index fc2f25f3aa8..96a101315a2 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -168,7 +168,7 @@ typedef struct st_table_share
ha_rows min_rows, max_rows; /* create information */
ulong avg_row_length; /* create information */
ulong raid_chunksize;
- ulong version, flush_version, mysql_version;
+ ulong version, mysql_version;
ulong timestamp_offset; /* Set to offset+1 of record */
ulong reclength; /* Recordlength */