~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_create.c

Merging from trunk r102

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <mysql/plugin.h>
23
23
#include <my_bit.h>
24
24
 
25
 
#if defined(MSDOS) || defined(__WIN__)
26
 
#ifdef __WIN__
27
 
#include <fcntl.h>
28
 
#else
29
 
#include <process.h>                    /* Prototype for getpid */
30
 
#endif
31
 
#endif
32
25
#include <m_ctype.h>
33
26
 
34
27
/*
482
475
  share.base.pack_bits=packed;
483
476
  share.base.fields=fields;
484
477
  share.base.pack_fields=packed;
485
 
#ifdef USE_RAID
486
 
  share.base.raid_type=ci->raid_type;
487
 
  share.base.raid_chunks=ci->raid_chunks;
488
 
  share.base.raid_chunksize=ci->raid_chunksize;
489
 
#endif
490
478
 
491
479
  /* max_data_file_length and max_key_file_length are recalculated on open */
492
480
  if (options & HA_OPTION_TMP_TABLE)
573
561
 
574
562
  if (!(flags & HA_DONT_TOUCH_DATA))
575
563
  {
576
 
#ifdef USE_RAID
577
 
    if (share.base.raid_type)
578
 
    {
579
 
      (void) fn_format(filename, name, "", MI_NAME_DEXT,
580
 
                       MY_UNPACK_FILENAME | MY_APPEND_EXT);
581
 
      if ((dfile=my_raid_create(filename, 0, create_mode,
582
 
                                share.base.raid_type,
583
 
                                share.base.raid_chunks,
584
 
                                share.base.raid_chunksize,
585
 
                                MYF(MY_WME | MY_RAID))) < 0)
586
 
        goto err;
587
 
    }
588
 
    else
589
 
#endif
590
564
    {
591
565
      if (ci->data_file_name)
592
566
      {
774
748
  if (file_length)                              /* If not default */
775
749
  {
776
750
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
777
 
    if (file_length >= ULL(1) << 56)
 
751
    if (file_length >= 1ULL << 56)
778
752
      def=8;
779
753
    else
780
754
#endif
781
 
    if (file_length >= ULL(1) << 48)
 
755
    if (file_length >= 1ULL << 48)
782
756
      def=7;
783
 
    else if (file_length >= ULL(1) << 40)
 
757
    else if (file_length >= 1ULL << 40)
784
758
      def=6;
785
 
    else if (file_length >= ULL(1) << 32)
 
759
    else if (file_length >= 1ULL << 32)
786
760
      def=5;
787
 
    else if (file_length >= ULL(1) << 24)
 
761
    else if (file_length >= 1ULL << 24)
788
762
      def=4;
789
 
    else if (file_length >= ULL(1) << 16)
 
763
    else if (file_length >= 1ULL << 16)
790
764
      def=3;
791
765
    else
792
766
      def=2;