diff options
author | unknown <cbell/Chuck@mysql_cab_desk.> | 2007-09-14 11:22:41 -0400 |
---|---|---|
committer | unknown <cbell/Chuck@mysql_cab_desk.> | 2007-09-14 11:22:41 -0400 |
commit | 431fd2c1aaa4991ae6fe65f321f3ee84397cc0ef (patch) | |
tree | 842348f926dc278b89c6761445c922cfa60b6090 /sql/log_event.cc | |
parent | 0e466b540cdcdb94fb438753e6f987c26fd9d0dd (diff) | |
download | mariadb-git-431fd2c1aaa4991ae6fe65f321f3ee84397cc0ef.tar.gz |
BUG#30790 : Suspicious code in rpl_utility.cc
This patch clarifies some of the coding choices with documentationa and
removes a limitation in the code for future expansion of the CHAR and
BINARY fields to length > 255.
sql/field.cc:
BUG#30790 : Suspicious code in rpl_utility.cc
This patch adds an assertion to ensure we are not attempting to encode
negative values.
sql/log_event.cc:
BUG#30790 : Suspicious code in rpl_utility.cc
This patch adds comments to help explain the choice of variable types.
sql/rpl_utility.cc:
BUG#30790 : Suspicious code in rpl_utility.cc
This patch removes code from the calc_field_size that is not needed and
was ambiguous. Originally intended to future expansion, the code was
not needed.
Also added are comments to help explain some portions of the code.
A change was made to the korr method to use the unsigned version to
avoid extended sign problems.
sql/rpl_utility.h:
BUG#30790 : Suspicious code in rpl_utility.cc
This patch corrects some type discrepencies and removes an extra cast.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 33442baaf90..0dee50c8179 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -6469,6 +6469,16 @@ void Rows_log_event::print_helper(FILE *file, data) in the table map are initialized as zero (0). The array size is the same as the columns for the table on the slave. + Additionally, values saved for field metadata on the master are saved as a + string of bytes (uchar) in the binlog. A field may require 1 or more bytes + to store the information. In cases where values require multiple bytes + (e.g. values > 255), the endian-safe methods are used to properly encode + the values on the master and decode them on the slave. When the field + metadata values are captured on the slave, they are stored in an array of + type uint16. This allows the least number of casts to prevent casting bugs + when the field metadata is used in comparisons of field attributes. When + the field metadata is used for calculating addresses in pointer math, the + type used is uint32. */ /** |