~mysql/mysql-replication-listener/trunk

Viewing all changes in revision 69.

  • Committer: Shubhangi Garg
  • Date: 2013-04-15 09:46:45 UTC
  • Revision ID: shubhangi.garg@oracle.com-20130415094645-b7ojmwf9amf0ywuq
BAPI 56:Bug: Row_event_iterator runs into infinite loop

Description:

For a row event, in case if the data type of a column is of types newly
implemented in 5.6; namely TIME2, DATETIME2 or TIMESTAMP2; 
then Row_event_iterator() (which is responsible to iterate over one row), 
is stuck in an infinite loop .

It happens so because it takes the size of the row equal to a variable length;
which is defined by each data type of the columns in a row.
In case if the data type is not defined, the default case sets
length = ~(uint_32)0 or (2^32 - 1);  and hence the iteration never ends!

Fix:

Since we get the data type in the table map event itself, 
as well as the metadata, the data_type for the column is correct.
We just require to get the length correctly.
Also,default case is changed to set length=UINT_MAX and an exception is
thrown in case an unrecognized field type is encountered.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: