summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorunknown <mats@romeo.(none)>2006-09-13 19:25:12 +0200
committerunknown <mats@romeo.(none)>2006-09-13 19:25:12 +0200
commit3936ce19d20e085cb5317d2fc024ee6818e4bbf4 (patch)
treea66b9bd59add75c92a1ec41646e6f0d3aa5baeb1 /sql/field.cc
parentd4d01d5906d09ac23ae6f46e71377ea2786505fc (diff)
downloadmariadb-git-3936ce19d20e085cb5317d2fc024ee6818e4bbf4.tar.gz
WL#3259 (RBR with more columns on slave than master):
Incorporating changes from review. Fixing one bug that surfaced. mysql-test/extra/rpl_tests/rpl_row_tabledefs.test: Adding tests that UPDATE and DELETE does not generate an error. mysql-test/r/rpl_row_tabledefs_2myisam.result: Result change. mysql-test/r/rpl_row_tabledefs_3innodb.result: Result change. mysql-test/t/disabled.def: Enabling rpl_sp_effects (even though it gives a result mismatch currently). sql/field.cc: Using constant to denote undefined last null byte. sql/field.h: Using constant to denote undefined last null byte. Adding documentation. sql/log_event.cc: Not generating error for non-NULL no-DEFAULT columns when updating or deleting row. Better documentation and comments. sql/rpl_utility.cc: Moving documentation to header file. sql/rpl_utility.h: Documenting class and members.
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 340f33f1e01..479a562aaac 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1261,7 +1261,10 @@ my_size_t
Field::do_last_null_byte() const
{
DBUG_ASSERT(null_ptr == NULL || (byte*) null_ptr >= table->record[0]);
- return null_ptr ? (byte*) null_ptr - table->record[0] + 1 : 0;
+ if (null_ptr)
+ return (byte*) null_ptr - table->record[0] + 1;
+ else
+ return LAST_NULL_BYTE_UNDEF;
}
@@ -8196,7 +8199,10 @@ Field_bit::do_last_null_byte() const
else
result= bit_ptr;
- return result ? (byte*) result - table->record[0] + 1 : 0;
+ if (result)
+ return (byte*) result - table->record[0] + 1;
+ else
+ return LAST_NULL_BYTE_UNDEF;
}
Field *Field_bit::new_key_field(MEM_ROOT *root,