diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-03-20 23:23:42 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-03-20 23:23:42 +0300 |
commit | acc2b9e3662cd868f5108b1b4ee7257d95582f02 (patch) | |
tree | 772f4ae43ad7ce905f024b77bebdd1897d813391 /sql/field.h | |
parent | 41f23283e54d311155959faf58ae7edf81803ca3 (diff) | |
parent | 84917914e01415cbbc2a128cabc344c127e76db1 (diff) | |
download | mariadb-git-acc2b9e3662cd868f5108b1b4ee7257d95582f02.tar.gz |
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:
Text conflict in mysql-test/r/partition_innodb.result
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_cmpfunc.h
Text conflict in sql/item_sum.h
Text conflict in sql/log_event_old.cc
Text conflict in sql/protocol.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_yacc.yy
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sql/field.h b/sql/field.h index 8cfed9647f7..6cffbd2be57 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright 2000-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc. +/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Because of the function new_field() all field classes that have static @@ -58,7 +58,11 @@ public: static void operator delete(void *ptr_arg, size_t size) { TRASH(ptr_arg, size); } uchar *ptr; // Position to field in record - uchar *null_ptr; // Byte where null_bit is + /** + Byte where the @c NULL bit is stored inside a record. If this Field is a + @c NOT @c NULL field, this member is @c NULL. + */ + uchar *null_ptr; /* Note that you can use table->in_use as replacement for current_thd member only inside of val_*() and store() members (e.g. you can't use it in cons) @@ -168,7 +172,7 @@ public: */ virtual uint32 pack_length_in_rec() const { return pack_length(); } virtual int compatible_field_size(uint field_metadata, - const Relay_log_info *); + const Relay_log_info *, uint16 mflags); virtual uint pack_length_from_metadata(uint field_metadata) { return field_metadata; } /* @@ -264,6 +268,9 @@ public: inline void set_notnull(my_ptrdiff_t row_offset= 0) { if (null_ptr) null_ptr[row_offset]&= (uchar) ~null_bit; } inline bool maybe_null(void) { return null_ptr != 0 || table->maybe_null; } + /** + Signals that this field is NULL-able. + */ inline bool real_maybe_null(void) { return null_ptr != 0; } enum { @@ -806,7 +813,7 @@ public: uint pack_length_from_metadata(uint field_metadata); uint row_pack_length() { return pack_length(); } int compatible_field_size(uint field_metadata, - const Relay_log_info *rli); + const Relay_log_info *rli, uint16 mflags); uint is_equal(Create_field *new_field); virtual const uchar *unpack(uchar* to, const uchar *from, uint param_data, bool low_byte_first); @@ -1502,7 +1509,7 @@ public: return (((field_metadata >> 4) & 0x300) ^ 0x300) + (field_metadata & 0x00ff); } int compatible_field_size(uint field_metadata, - const Relay_log_info *rli); + const Relay_log_info *rli, uint16 mflags); uint row_pack_length() { return (field_length + 1); } int pack_cmp(const uchar *a,const uchar *b,uint key_length, my_bool insert_or_update); @@ -1974,7 +1981,7 @@ public: uint row_pack_length() { return (bytes_in_rec + ((bit_len > 0) ? 1 : 0)); } int compatible_field_size(uint field_metadata, - const Relay_log_info *rli); + const Relay_log_info *rli, uint16 mflags); void sql_type(String &str) const; virtual uchar *pack(uchar *to, const uchar *from, uint max_length, bool low_byte_first); |