mariadb/storage
Sergey Vojtovich b602127bf0 BUG#51868 - crash with myisam_use_mmap and partitioned
myisam tables

Queries following TRUNCATE of partitioned MyISAM table
may crash server if myisam_use_mmap is true.

Internally this is MyISAM bug, but limited to partitioned
tables, because MyISAM doesn't use ::delete_all_rows()
method for TRUNCATE, but goes via table recreate instead.

MyISAM didn't properly fall back to non-mmaped I/O after
mmap() failure. Was not repeatable on linux before, likely
because (quote from man mmap):
  SUSv3  specifies  that  mmap() should fail if length is 0.
  However, in kernels before 2.6.12, mmap() succeeded in
  this case: no mapping was created and the call returned
  addr. Since kernel 2.6.12, mmap() fails with the error
  EINVAL for this case.

mysql-test/r/partition.result:
  A test case for BUG#51868.
mysql-test/t/partition.test:
  A test case for BUG#51868.
storage/myisam/mi_delete_all.c:
  _mi_unmap_file() is compressed record format specific,
  which is read-only. As compressed MyISAM data files are
  read-only, we must never use _mi_unmap_file() in
  mi_delete_all_rows().
storage/myisam/mi_dynrec.c:
  Make myisam mmap code more durable to errors:
  - set file_read/file_write handlers if mmap succeeded;
  - reset file_read/file_write handlers on unmap.
storage/myisam/mi_extra.c:
  Moved file_read/file_write handlers initialization to
  mi_dynmap_file().
storage/myisam/myisamdef.h:
  Added mi_munmap_file() declaration.
2010-03-22 16:30:27 +04:00
..
archive BUG#48757 - missing .ARZ file causes server crash 2010-02-12 16:33:03 +04:00
blackhole Bug #40877: multi statement execution fails in 5.1.30 2009-10-16 13:29:42 +03:00
csv Bug#33717 INSERT...(default) fails for enum. Crashes CSV tables, loads spaces for MyISAM 2010-02-17 16:13:42 +04:00
example Bug #49829 Many "hides virtual function" warnings with 2010-03-14 17:01:45 +01:00
federated Bug #49829 Many "hides virtual function" warnings with 2010-03-14 17:01:45 +01:00
heap Merge from 5.0 2009-09-17 17:25:52 +02:00
ibmdb2i merging with mysql-5.1-bugteam 2009-12-11 17:27:12 +05:30
innobase Applying InnoDB snapshot, fixes BUG#50691 2010-02-26 13:04:24 +04:00
innodb_plugin Fix for BUG#49502 - CMake error compiling 5.1 on Windows 2009-12-14 13:42:26 +05:30
myisam BUG#51868 - crash with myisam_use_mmap and partitioned 2010-03-22 16:30:27 +04:00
myisammrg Bug #49829 Many "hides virtual function" warnings with 2010-03-14 17:01:45 +01:00
ndb Bug #35250: readline check breaks when doing vpath build 2010-03-09 17:51:31 +02:00
Makefile.am Backport WL#3653 to 5.1 to enable bundled innodb plugin. 2009-06-10 10:59:49 +02:00
mysql_storage_engine.cmake Bug #47797 CMake, engine can't specify additional libraries to link with 2009-10-08 14:54:11 +02:00