Skip to content

Commit

Permalink
Merge pull request #97 from markus456/3.1
Browse files Browse the repository at this point in the history
Fix table map event processing
  • Loading branch information
9EOR9 committed Jan 18, 2019
2 parents 3b3b492 + cb013c2 commit 78abc1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/mariadb_rpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ struct st_mariadb_rpl_table_map_event {
MARIADB_STRING database;
MARIADB_STRING table;
unsigned int column_count;
char *column_types;
MARIADB_STRING column_types;
MARIADB_STRING metadata;
char *null_indicator;
};
Expand Down
6 changes: 4 additions & 2 deletions libmariadb/mariadb_rpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN
goto mem_error;
ev+= len + 1;
rpl_event->event.table_map.column_count= mysql_net_field_length(&ev);
rpl_event->event.table_map.column_types= (char *)ev;
ev+= rpl_event->event.table_map.column_count;
len= rpl_event->event.table_map.column_count;
if (rpl_alloc_string(rpl_event, &rpl_event->event.table_map.column_types, ev, len))
goto mem_error;
ev+= len;
len= mysql_net_field_length(&ev);
if (rpl_alloc_string(rpl_event, &rpl_event->event.table_map.metadata, ev, len))
goto mem_error;
Expand Down

0 comments on commit 78abc1d

Please sign in to comment.