Commit 28749171 authored by serg@serg.mysql.com's avatar serg@serg.mysql.com
Browse files

do not use bulk insert tree code if ``myisam_bulk_insert_tree_size'' is too small

parent 74e23999
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -821,7 +821,8 @@ int _mi_init_bulk_insert(MI_INFO *info)
    }
  }

  if (num_keys==0 || num_keys>myisam_bulk_insert_tree_size)
  if (num_keys==0 ||
      num_keys * MI_MIN_SIZE_BULK_INSERT_TREE > myisam_bulk_insert_tree_size)
    return 0;

  info->bulk_insert=(TREE *)
+4 −2
Original line number Diff line number Diff line
@@ -373,6 +373,8 @@ struct st_myisam_info {
#define MI_MAX_KEYPTR_SIZE	5        /* For calculating block lengths */
#define MI_MIN_KEYBLOCK_LENGTH	50         /* When to split delete blocks */

#define MI_MIN_SIZE_BULK_INSERT_TREE 16384             /* this is per key */

/* The UNIQUE check is done with a hashed long key */

#define MI_UNIQUE_HASH_TYPE	HA_KEYTYPE_ULONG_INT