summaryrefslogtreecommitdiff
path: root/sql/rpl_tblmap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/rpl_tblmap.cc')
-rw-r--r--sql/rpl_tblmap.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/rpl_tblmap.cc b/sql/rpl_tblmap.cc
index a004c354263..6ef9a8623fe 100644
--- a/sql/rpl_tblmap.cc
+++ b/sql/rpl_tblmap.cc
@@ -119,7 +119,13 @@ int table_mapping::set_table(ulong table_id, TABLE* table)
}
e->table_id= table_id;
e->table= table;
- my_hash_insert(&m_table_ids,(uchar *)e);
+ if (my_hash_insert(&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;
+ DBUG_RETURN(ERR_MEMORY_ALLOCATION);
+ }
DBUG_PRINT("info", ("tid %lu -> table 0x%lx (%s)",
table_id, (long) e->table,