~clint-fewbar/ubuntu/lucid/mysql-dfsg-5.1/increase-killtimeout

« back to all changes in this revision

Viewing changes to storage/myisam/mi_packrec.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Mathias Gug
  • Date: 2009-08-05 11:40:21 UTC
  • mfrom: (1.1.3 upstream) (0.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20090805114021-59bj0bgfm2ufllbk
Tags: 5.1.37-1ubuntu1
[ Mathias Gug ]
* Merge from debian unstable and 5.0, remaining changes:
  - debian/control:
    + Properly upgrade libmysqlclient16-dev packages to
    libmysqlclient-dev:
      * Make libmysqlclient16-dev a transitional package depending on
        libmysqlclient-dev.
      * Make libmysqlclient-dev replace libmysqlclient16-dev.
    + Don't provide a libmysqlclient15-dev package as long as there are
      packages still build-depending on libmysqlclient15-dev and
      mysql-dsfg-5.0 is in the archive.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.1.files: install apparmor profile.
    - debian/mysql-server-5.1.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.1.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
* debian/libmysqlclient16.symbols.amd64: remove amd64 symbols as it has
  not been correctly generated in Debian.
* Add Apport hook: (LP: #354188)
  - debian/mysql-server-5.1.py: apport package hook.
  - debian/mysql-server-5.1.files, debian/rules: install apport package
    hook.
* debian/additions/my.cnf: 
  - drop old_password option.
  - fix commented logging options to use general_log and general_log_file.
* Dropped - accepted in Debian:
  - debian/mysql-server-5.1.config:
    + ask for MySQL root password at priority high instead of medium so
      that the password prompt is seen on a default install. (LP: #319843)
    + don't ask for root password when upgrading from a 5.0 install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
    This segment will be reallocated after construction of the tables.
210
210
  */
211
211
  length=(uint) (elements*2+trees*(1 << myisam_quick_table_bits));
 
212
  /*
 
213
    To keep some algorithms simpler, we accept that they access
 
214
    bytes beyond the end of the input data. This can affect up to
 
215
    one byte less than the "word size" size used in this file,
 
216
    which is BITS_SAVED / 8. To avoid accessing non-allocated
 
217
    data, we add (BITS_SAVED / 8) - 1 bytes to the buffer size.
 
218
  */
212
219
  if (!(share->decode_tables=(uint16*)
213
220
        my_malloc((length + OFFSET_TABLE_SIZE) * sizeof(uint16) +
214
 
                  (uint) (share->pack.header_length - sizeof(header)),
215
 
                  MYF(MY_WME | MY_ZEROFILL))))
 
221
                  (uint) (share->pack.header_length - sizeof(header) +
 
222
                  (BITS_SAVED / 8) - 1), MYF(MY_WME | MY_ZEROFILL))))
216
223
    goto err1;
217
224
  tmp_buff=share->decode_tables+length;
218
225
  disk_cache= (uchar*) (tmp_buff+OFFSET_TABLE_SIZE);
1431
1438
    bit_buff->current_byte=0;
1432
1439
    return;
1433
1440
  }
 
1441
 
1434
1442
#if BITS_SAVED == 64
1435
1443
  bit_buff->current_byte=  ((((uint) ((uchar) bit_buff->pos[7]))) +
1436
1444
                             (((uint) ((uchar) bit_buff->pos[6])) << 8) +
1494
1502
      DBUG_PRINT("warning",("File isn't extended for memmap"));
1495
1503
      DBUG_RETURN(0);
1496
1504
    }
1497
 
    if (mi_dynmap_file(info, share->state.state.data_file_length))
 
1505
    if (mi_dynmap_file(info,
 
1506
                       share->state.state.data_file_length + 
 
1507
                         MEMMAP_EXTRA_MARGIN))
1498
1508
      DBUG_RETURN(0);
1499
1509
  }
1500
1510
  info->opt_flag|= MEMMAP_USED;