• unknown's avatar
    First push for WL#3146 "less locking in auto_increment". It is a 0-real-change patch. · e63f3779
    unknown authored
    New prototype for get_auto_increment() (but new arguments not yet used), to be able
    to reserve a finite interval of auto_increment values from cooperating engines.
    A hint on how many values to reserve is found in handler::estimation_rows_to_insert,
    filled by ha_start_bulk_insert(), new wrapper around start_bulk_insert().
    NOTE: this patch changes nothing, for all engines. But it makes the API ready for those
    engines which will want to do reservation.
    More csets will come to complete WL#3146.
    
    
    sql/ha_berkeley.cc:
      update to new prototype of get_auto_increment
    sql/ha_berkeley.h:
      update to new prototype of get_auto_increment
    sql/ha_heap.cc:
      update to new prototype of get_auto_increment
    sql/ha_heap.h:
      update to new prototype of get_auto_increment
    sql/ha_innodb.cc:
      update to new prototype of get_auto_increment
    sql/ha_innodb.h:
      update to new prototype of get_auto_increment
    sql/ha_myisam.cc:
      update to new prototype of get_auto_increment
    sql/ha_myisam.h:
      update to new prototype of get_auto_increment
    sql/ha_ndbcluster.cc:
      update to new prototype of get_auto_increment
    sql/ha_ndbcluster.h:
      update to new prototype of get_auto_increment
    sql/ha_partition.cc:
      update to new prototype of get_auto_increment
    sql/ha_partition.h:
      update to new prototype of get_auto_increment
    sql/handler.cc:
      new prototype of get_auto_increment, comments, preparation for when the MySQL layer is capable
      of getting finite auto_increment intervals from cooperating engines.
    sql/handler.h:
      a wrapper around start_bulk_insert(): ha_bulk_insert(), which stores the argument (number
      of rows expected for insertion) into a member of handler: estimation_rows_to_insert.
      This member will soon be used to decide how much auto_increment values we want to reserve
      from cooperating engines.
      New prototype for get_auto_increment, preparing for cooperating engines to reserve finite auto_increment
      intervals.
      release_auto_increment() will be used by the MySQL layer to inform the engine that it has
      not used all of the interval (engine can reclaim it).
    sql/log.cc:
      note for the future
    sql/log_event.cc:
      name of wrapper
    sql/sql_insert.cc:
      name of wrapper. When done with inserting, return unused auto_inc values to engine.
    sql/sql_load.cc:
      name of wrapper. When done with inserting, return unused auto_inc values to engine.
    sql/sql_select.cc:
      name of wrapper
    sql/sql_table.cc:
      name of wrapper
    storage/archive/ha_archive.cc:
      update to new prototype of get_auto_increment.
      Archive reserves only one value (Archive's god - Brian - told me that's the truth).
    storage/archive/ha_archive.h:
      update to new prototype of get_auto_increment()
    e63f3779
ha_partition.h 39.7 KB