diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-08-17 12:32:15 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-08-17 12:32:15 +0400 |
commit | f240aa4cbfc50de1f2cb83ebce658bd331091f61 (patch) | |
tree | 6e866d12d1de1692babb0d37e8ca622b8b819e04 /sql/field_conv.cc | |
parent | 6321619496189f2e295bf891157938a98bf410cf (diff) | |
download | mariadb-git-f240aa4cbfc50de1f2cb83ebce658bd331091f61.tar.gz |
field_conv.cc: added comments
opt_range.cc: modified print_key() so that it doesn't do memory re-allocs when
printing multipart keys over varchar columns. When it did, key printout in
debug trace was interrupted with my_malloc/free printouts.
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index afc4d8252ff..588a99f560f 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -204,6 +204,14 @@ static void do_skip(Copy_field *copy __attribute__((unused))) } +/* + Copy: (NULLable field) -> (NULLable field) + + note: if the record we're copying from is NULL-complemetned (i.e. + from_field->table->null_row==1), it will also have all NULLable columns to be + set to NULLs, so we dont need to check table->null_row here. +*/ + static void do_copy_null(Copy_field *copy) { if (*copy->from_null_ptr & copy->from_bit) @@ -218,6 +226,10 @@ static void do_copy_null(Copy_field *copy) } } +/* + Copy: (not-NULL field in table that can be NULL-complemented) -> (NULLable + field) +*/ static void do_outer_field_null(Copy_field *copy) { @@ -235,6 +247,7 @@ static void do_outer_field_null(Copy_field *copy) } +/* Copy: (NULL-able field) -> (not NULL-able field) */ static void do_copy_not_null(Copy_field *copy) { if (*copy->from_null_ptr & copy->from_bit) @@ -248,6 +261,7 @@ static void do_copy_not_null(Copy_field *copy) } +/* Copy: (non-NULLable field) -> (NULLable field) */ static void do_copy_maybe_null(Copy_field *copy) { *copy->to_null_ptr&= ~copy->to_bit; |