diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-10-14 20:37:38 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-10-14 20:37:38 +0400 |
commit | 9b41c7532d18b04d2f430932ad916886c77fbff6 (patch) | |
tree | f4b1025df0074aacaf5f04f64aac370a80806ee1 /sql/rpl_tblmap.cc | |
parent | 2b75d952e68375eb1727040074266bbe1b436653 (diff) | |
download | mariadb-git-9b41c7532d18b04d2f430932ad916886c77fbff6.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2617.22.5
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Tue 2009-01-27 05:08:48 +0300
message:
Remove non-prefixed use of HASH.
Always use my_hash_init(), my_hash_inited(), my_hash_search(),
my_hash_element(), my_hash_delete(), my_hash_free() rather
than non-prefixed counterparts (hash_init(), etc).
Remove the backward-compatible defines.
Diffstat (limited to 'sql/rpl_tblmap.cc')
-rw-r--r-- | sql/rpl_tblmap.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/rpl_tblmap.cc b/sql/rpl_tblmap.cc index a004c354263..8b7fea3b40e 100644 --- a/sql/rpl_tblmap.cc +++ b/sql/rpl_tblmap.cc @@ -34,10 +34,10 @@ table_mapping::table_mapping() No "free_element" function for entries passed here, as the entries are allocated in a MEM_ROOT (freed as a whole in the destructor), they cannot be freed one by one. - Note that below we don't test if hash_init() succeeded. This constructor - is called at startup only. + Note that below we don't test if my_hash_init() succeeded. This + constructor is called at startup only. */ - (void) hash_init(&m_table_ids,&my_charset_bin,TABLE_ID_HASH_SIZE, + (void) my_hash_init(&m_table_ids,&my_charset_bin,TABLE_ID_HASH_SIZE, offsetof(entry,table_id),sizeof(ulong), 0,0,0); /* We don't preallocate any block, this is consistent with m_free=0 above */ @@ -49,7 +49,7 @@ table_mapping::~table_mapping() #ifdef MYSQL_CLIENT clear_tables(); #endif - hash_free(&m_table_ids); + my_hash_free(&m_table_ids); free_root(&m_mem_root, MYF(0)); } @@ -115,7 +115,7 @@ int table_mapping::set_table(ulong table_id, TABLE* table) #ifdef MYSQL_CLIENT free_table_map_log_event(e->table); #endif - hash_delete(&m_table_ids,(uchar *)e); + my_hash_delete(&m_table_ids,(uchar *)e); } e->table_id= table_id; e->table= table; @@ -132,7 +132,7 @@ int table_mapping::remove_table(ulong table_id) entry *e= find_entry(table_id); if (e) { - hash_delete(&m_table_ids,(uchar *)e); + my_hash_delete(&m_table_ids,(uchar *)e); /* we add this entry to the chain of free (free for use) entries */ e->next= m_free; m_free= e; @@ -150,7 +150,7 @@ void table_mapping::clear_tables() DBUG_ENTER("table_mapping::clear_tables()"); for (uint i= 0; i < m_table_ids.records; i++) { - entry *e= (entry *)hash_element(&m_table_ids, i); + entry *e= (entry *)my_hash_element(&m_table_ids, i); #ifdef MYSQL_CLIENT free_table_map_log_event(e->table); #endif |