summaryrefslogtreecommitdiff
path: root/sql/rpl_utility.h
diff options
context:
space:
mode:
authorcbell/Chuck@mysql_cab_desk. <>2007-08-10 12:48:01 -0400
committercbell/Chuck@mysql_cab_desk. <>2007-08-10 12:48:01 -0400
commite8ea4b84c0fd98d0ed312f10cc07fef145ff9c38 (patch)
treed3ef511f255d489f7a8ebaf7ce57c0512a4a2607 /sql/rpl_utility.h
parentac1767df0942f44ebc3db69c1005ee975804fff4 (diff)
downloadmariadb-git-e8ea4b84c0fd98d0ed312f10cc07fef145ff9c38.tar.gz
BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash
This patch adds functionality to row-based replication to ensure the slave's column sizes are >= to that of the master. It also includes some refactoring for the code from WL#3228.
Diffstat (limited to 'sql/rpl_utility.h')
-rw-r--r--sql/rpl_utility.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/rpl_utility.h b/sql/rpl_utility.h
index 034b6e084af..c0c233477cb 100644
--- a/sql/rpl_utility.h
+++ b/sql/rpl_utility.h
@@ -61,7 +61,7 @@ public:
*/
table_def(field_type *types, ulong size, uchar *field_metadata,
int metadata_size, uchar *null_bitmap)
- : m_size(size), m_type(0),
+ : m_size(size), m_type(0), m_field_metadata_size(metadata_size),
m_field_metadata(0), m_null_bits(0), m_memory(NULL)
{
m_memory= (uchar *)my_multi_malloc(MYF(MY_WME),
@@ -190,7 +190,7 @@ public:
uint16 field_metadata(uint index) const
{
DBUG_ASSERT(index < m_size);
- if (m_field_metadata)
+ if (m_field_metadata_size)
return m_field_metadata[index];
else
return 0;
@@ -239,6 +239,7 @@ private:
ulong m_size; // Number of elements in the types array
field_type *m_type; // Array of type descriptors
uint16 *m_field_metadata;
+ uint m_field_metadata_size;
uchar *m_null_bits;
uchar *m_memory;
};