summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-02-05 01:08:08 +0300
committerKonstantin Osipov <kostja@sun.com>2010-02-05 01:08:08 +0300
commitad0f1f8021dff9b93bd963603a790b5c30a7c01a (patch)
treea1d34e4650281143b62067088c8965f2cceacb2d /sql/rpl_rli.h
parent06e1a73af6ca0b912153b10bb23deba8fd333974 (diff)
parentb78e3a5d1efff8958a2ac44efadbefacaba0f163 (diff)
downloadmariadb-git-ad0f1f8021dff9b93bd963603a790b5c30a7c01a.tar.gz
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r--sql/rpl_rli.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index 838782e1de8..b1ed75146a0 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -334,13 +334,21 @@ public:
uint tables_to_lock_count; /* RBR: Count of tables to lock */
table_mapping m_table_map; /* RBR: Mapping table-id to table */
- inline table_def *get_tabledef(TABLE *tbl)
+ bool get_table_data(TABLE *table_arg, table_def **tabledef_var, TABLE **conv_table_var) const
{
- table_def *td= 0;
- for (TABLE_LIST *ptr= tables_to_lock; ptr && !td; ptr= ptr->next_global)
- if (ptr->table == tbl)
- td= &((RPL_TABLE_LIST *)ptr)->m_tabledef;
- return (td);
+ DBUG_ASSERT(tabledef_var && conv_table_var);
+ for (TABLE_LIST *ptr= tables_to_lock ; ptr != NULL ; ptr= ptr->next_global)
+ if (ptr->table == table_arg)
+ {
+ *tabledef_var= &static_cast<RPL_TABLE_LIST*>(ptr)->m_tabledef;
+ *conv_table_var= static_cast<RPL_TABLE_LIST*>(ptr)->m_conv_table;
+ DBUG_PRINT("debug", ("Fetching table data for table %s.%s:"
+ " tabledef: %p, conv_table: %p",
+ table_arg->s->db.str, table_arg->s->table_name.str,
+ *tabledef_var, *conv_table_var));
+ return true;
+ }
+ return false;
}
/*