diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-05-28 19:13:31 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-05-28 19:13:31 -0300 |
commit | 1164841167ce62d213fd0084aad376be8fcc371b (patch) | |
tree | eef16fecac880a9779e086028ad9f933d3e53c6d /sql | |
parent | 92f659e7a34153b2eed6340356ac505704567c7c (diff) | |
download | mariadb-git-1164841167ce62d213fd0084aad376be8fcc371b.tar.gz |
Backport: Remove unused and ancient files, functions, and facilities.
client/mysql.cc:
Remove unused functions.
client/sql_string.cc:
Remove unused functions.
include/my_pthread.h:
Remove unused prototype.
mysys/my_pthread.c:
Remove unused function.
sql/lock.cc:
Remove unused function.
sql/lock.h:
Remove unused and duplicated prototypes.
sql/sql_class.h:
Removed unused variables.
sql/sql_const.h:
Remove unused defines.
sql/sql_priv.h:
Remove unused defines.
sql/sql_string.cc:
Remove unused prototype.
sql/thr_malloc.cc:
Remove unused function.
sql/thr_malloc.h:
Remove unused prototype.
storage/myisam/CMakeLists.txt:
Remove obsolete fulltext file.
storage/myisam/Makefile.am:
Remove obsolete files (were already commented out).
storage/myisam/ft_eval.c:
Remove obsolete fulltext file.
storage/myisam/ft_eval.h:
Remove obsolete fulltext file.
storage/myisam/ft_stem.c:
Remove obsolete fulltext file.
storage/myisam/ft_test1.c:
Remove obsolete fulltext file.
storage/myisam/ft_test1.h:
Remove obsolete fulltext file.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/lock.cc | 14 | ||||
-rw-r--r-- | sql/lock.h | 36 | ||||
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/sql_const.h | 6 | ||||
-rw-r--r-- | sql/sql_delete.cc | 3 | ||||
-rw-r--r-- | sql/sql_priv.h | 4 | ||||
-rw-r--r-- | sql/sql_string.cc | 7 | ||||
-rw-r--r-- | sql/thr_malloc.cc | 4 | ||||
-rw-r--r-- | sql/thr_malloc.h | 1 |
9 files changed, 4 insertions, 73 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 758ea6cf914..3f13f15454a 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -533,20 +533,6 @@ void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table) } } -/* Downgrade all locks on a table to new WRITE level from WRITE_ONLY */ - -void mysql_lock_downgrade_write(THD *thd, TABLE *table, - thr_lock_type new_lock_type) -{ - MYSQL_LOCK *locked; - if ((locked = get_lock_data(thd, &table, 1, GET_LOCK_UNLOCK))) - { - for (uint i=0; i < locked->lock_count; i++) - thr_downgrade_write_lock(locked->locks[i], new_lock_type); - my_free((uchar*) locked,MYF(0)); - } -} - /** Abort all other threads waiting to get lock in table. */ diff --git a/sql/lock.h b/sql/lock.h index 19b23f1f42b..f7c19913675 100644 --- a/sql/lock.h +++ b/sql/lock.h @@ -53,52 +53,22 @@ typedef struct st_mysql_lock MYSQL_LOCK; MYSQL_OPEN_HAS_MDL_LOCK) -#include "thr_lock.h" /* thr_lock_type */ - -struct TABLE_LIST; -class THD; -struct TABLE; -typedef struct st_mysql_lock MYSQL_LOCK; - MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count, uint flags); void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock); void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock); void mysql_unlock_some_tables(THD *thd, TABLE **table,uint count); void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table); void mysql_lock_abort(THD *thd, TABLE *table, bool upgrade_lock); -void mysql_lock_downgrade_write(THD *thd, TABLE *table, - thr_lock_type new_lock_type); bool mysql_lock_abort_for_thread(THD *thd, TABLE *table); MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b); TABLE_LIST *mysql_lock_have_duplicate(THD *thd, TABLE_LIST *needle, TABLE_LIST *haystack); -bool lock_global_read_lock(THD *thd); -void unlock_global_read_lock(THD *thd); -bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh, - bool is_not_commit); -void start_waiting_global_read_lock(THD *thd); -bool make_global_read_lock_block_commit(THD *thd); -bool set_protect_against_global_read_lock(void); -void unset_protect_against_global_read_lock(void); -/* Lock based on stored routine name */ -bool lock_routine_name(THD *thd, bool is_function, const char *db, - const char *name); void broadcast_refresh(void); - /* Lock based on name */ -int lock_and_wait_for_table_name(THD *thd, TABLE_LIST *table_list); -int lock_table_name(THD *thd, TABLE_LIST *table_list, bool check_in_use); -void unlock_table_name(THD *thd, TABLE_LIST *table_list); -bool wait_for_locked_table_names(THD *thd, TABLE_LIST *table_list); bool lock_table_names(THD *thd, TABLE_LIST *table_list); void unlock_table_names(THD *thd); -bool lock_table_names_exclusively(THD *thd, TABLE_LIST *table_list); -bool is_table_name_exclusively_locked_by_this_thread(THD *thd, - TABLE_LIST *table_list); -bool is_table_name_exclusively_locked_by_this_thread(THD *thd, uchar *key, - int key_length); -void broadcast_refresh(void); - - +/* Lock based on stored routine name */ +bool lock_routine_name(THD *thd, bool is_function, const char *db, + const char *name); #endif /* LOCK_INCLUDED */ diff --git a/sql/sql_class.h b/sql/sql_class.h index fb28d3b09c8..22143eb1498 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2119,8 +2119,6 @@ public: char scramble[SCRAMBLE_LENGTH+1]; bool slave_thread, one_shot_set; - bool locked, some_tables_deleted; - bool last_cuted_field; bool no_errors, password; /** Set to TRUE if execution of the current compound statement diff --git a/sql/sql_const.h b/sql/sql_const.h index 72f34ed6be8..dca66628ddb 100644 --- a/sql/sql_const.h +++ b/sql/sql_const.h @@ -136,7 +136,6 @@ #ifndef MYSQLD_NET_RETRY_COUNT #define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int. #endif -#define TEMP_POOL_SIZE 128 #define QUERY_ALLOC_BLOCK_SIZE 8192 #define QUERY_ALLOC_PREALLOC_SIZE 8192 @@ -146,11 +145,8 @@ #define ACL_ALLOC_BLOCK_SIZE 1024 #define UDF_ALLOC_BLOCK_SIZE 1024 #define TABLE_ALLOC_BLOCK_SIZE 1024 -#define BDB_LOG_ALLOC_BLOCK_SIZE 1024 #define WARN_ALLOC_BLOCK_SIZE 2048 #define WARN_ALLOC_PREALLOC_SIZE 1024 -#define PROFILE_ALLOC_BLOCK_SIZE 2048 -#define PROFILE_ALLOC_PREALLOC_SIZE 1024 /* The following parameters is to decide when to use an extra cache to @@ -194,8 +190,6 @@ */ #define MATCHING_ROWS_IN_OTHER_TABLE 10 -#define RAID_BLOCK_SIZE 1024 - #define MY_CHARSET_BIN_MB_MAXLEN 1 /** Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). */ diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 25e470f56ea..2e86315d072 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -25,8 +25,7 @@ #include "sql_cache.h" // query_cache_* #include "sql_base.h" // open_temprary_table #include "sql_table.h" // build_table_filename -#include "lock.h" // lock_and_wait_for_table_name, - // unlock_table_name +#include "lock.h" // unlock_table_name #include "sql_view.h" // check_key_in_view, mysql_frm_type #include "sql_parse.h" // mysql_init_select #include "sql_acl.h" // *_ACL diff --git a/sql/sql_priv.h b/sql/sql_priv.h index 20893e0caa8..8601b10b9bf 100644 --- a/sql/sql_priv.h +++ b/sql/sql_priv.h @@ -187,10 +187,6 @@ extern char err_shared_dir[]; #define BINLOG_DUMP_NON_BLOCK 1 -/* sql_show.cc:show_log_files() */ -#define SHOW_LOG_STATUS_FREE "FREE" -#define SHOW_LOG_STATUS_INUSE "IN USE" - /* Some defines for exit codes for ::is_equal class functions. */ diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 9fbc06b7529..762eebba031 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -24,13 +24,6 @@ #include <m_string.h> #include <m_ctype.h> #include <mysql_com.h> -/* - The following extern declarations are ok as these are interface functions - required by the string function -*/ - -extern uchar* sql_alloc(unsigned size); -extern void sql_element_free(void *ptr); #include "sql_string.h" diff --git a/sql/thr_malloc.cc b/sql/thr_malloc.cc index 638f3bbb9f1..7696f28081d 100644 --- a/sql/thr_malloc.cc +++ b/sql/thr_malloc.cc @@ -109,10 +109,6 @@ void* sql_memdup(const void *ptr, size_t len) return pos; } -void sql_element_free(void *ptr __attribute__((unused))) -{} /* purecov: deadcode */ - - char *sql_strmake_with_convert(const char *str, size_t arg_length, CHARSET_INFO *from_cs, diff --git a/sql/thr_malloc.h b/sql/thr_malloc.h index a655884b8b4..6b372a285a2 100644 --- a/sql/thr_malloc.h +++ b/sql/thr_malloc.h @@ -27,7 +27,6 @@ void *sql_calloc(size_t); char *sql_strdup(const char *str); char *sql_strmake(const char *str, size_t len); void *sql_memdup(const void * ptr, size_t size); -void sql_element_free(void *ptr); char *sql_strmake_with_convert(const char *str, size_t arg_length, CHARSET_INFO *from_cs, size_t max_res_length, |