~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to sql/field.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2227
2227
  uchar *from_null_ptr,*to_null_ptr;
2228
2228
  my_bool *null_row;
2229
2229
  uint  from_bit,to_bit;
 
2230
  /**
 
2231
    Number of bytes in the fields pointed to by 'from_ptr' and
 
2232
    'to_ptr'. Usually this is the number of bytes that are copied from
 
2233
    'from_ptr' to 'to_ptr'.
 
2234
 
 
2235
    For variable-length fields (VARCHAR), the first byte(s) describe
 
2236
    the actual length of the text. For VARCHARs with length 
 
2237
       < 256 there is 1 length byte 
 
2238
       >= 256 there is 2 length bytes
 
2239
    Thus, if from_field is VARCHAR(10), from_length (and in most cases
 
2240
    to_length) is 11. For VARCHAR(1024), the length is 1026. @see
 
2241
    Field_varstring::length_bytes
 
2242
 
 
2243
    Note that for VARCHARs, do_copy() will be do_varstring*() which
 
2244
    only copies the length-bytes (1 or 2) + the actual length of the
 
2245
    text instead of from/to_length bytes. @see get_copy_func()
 
2246
  */
2230
2247
  uint from_length,to_length;
2231
2248
  Field *from_field,*to_field;
2232
2249
  String tmp;                                   // For items