Remove local build config.

Summary:
All the build settings are now in our build tools, not in the code tree.

Test Plan:
Built it all three ways - works.
Built dev rpm, rpm test suite all still passes.
The rpm's output of 'show engines;' didn't change.
Ran 'arc unit' - all tests still pass.

Reviewers: jtolmer, nizamordulu

Reviewed By: jtolmer
Fix the way load_generator.py populates the initial table.

Summary:
Load generator creates a table and populates it with records. Currently
it inserts records using workers and each worker inserts multiple records
using one transaction. This causes issues with replication. This revision
changes load_generator's cursor so that it auto-commits after every INSERT.

Test Plan: Run innodb_stress_lra on devserver.

Reviewers: santoshb

Reviewed By: santoshb
Restart master in innodb_stress.inc

Summary:
rpl_restart_server.inc kills the slave 10 seconds
after sending the shutdown signal to the slave. Slave is not
crash safe with --relay_log_info_repository = FILE thus
causing a duplicate key error. The test doesn't require restarting
a slave but requires a master restart.

load_generator.py in innodb_stress tests generates very big
transactions on master. This causes the slave sql_thread to spend
more than 10 seconds in rolling back the current transaction leading
to a slave crash.

Test Plan: mysqltest.sh --big-test innodb_stress.innodb_stress_lra.test

Reviewers: nizamordulu, jtolmer

Reviewed By: jtolmer
Commit every 100 inserts while populating tables in stress tests

Summary:
Recently innodb_stress_lra started getting timeouts because during the
population of the table, load_generator.py commits transactions after
every INSERT. This change makes it so that we commit after every 100th
INSERT.

Test Plan: run innodb_stress_lra on the devserver.

Reviewers: santoshb, steaphan

Reviewed By: santoshb
Fix race between semi-sync group commit and dump thread.

Summary:
We changed the bin log dump thread so that it does not need
to acquire LOCK_log. Because of that, it was possible for
the dump thread to read events from the bin log before the
after_flush hook is called. When the dump thread wins that
race, it means that ReplSemiSyncMaster::writeTranxInBinlog
was not yet called and so the dump thread will not request
an ACK from the slave for the group being committed, possibly
resulting in the master waiting for the full semi-sync timeout
to expire before continuing.

Test Plan:
Jenkin's Valgrind builds and
mytest --valgrind --repeat=8 --parallel=8 --big-test\
  rpl.rpl_semi_sync_group_commit_deadlock ...

Reviewers: santoshb

Reviewed By: santoshb
Don't write to repository caches when not needed

Summary:
Replication repositories should not be
updated after each event. Instead they should get updated
when forced or when the repository handler processed specified
number of events (e.g: based on sync_master_info or sync_relay_log_info).
This is achieved by checking whether flush to repository is required
before even writing to repository cache, instead of checking whether flush is
required after writing to cahce.

Previous logic for flushing repository infos is

  write_info(handler);
  handler->flush_info(); // A check for whether flush is required is done inside this function

New logic for flushing repository infos is

  if (!handler->need_write()) // checks whether flush is required
    return;                   // return if flush is not required
  write_info(handler);
  handler->flush_info(); // The check for flush is removed inside this function

Relay log info with table is forced to get written during COMMIT.
Relay log info with file is never forced to get written except when
sql_thread or worker thread is exiting (since writing to file is not transactional,
we can't guarantee crash safeness).

Master info with table or file is never forced to get written while io_thread is
running. It is only forced to get written when io_thread is exiting
or during CHANGE MASTER.

Test Plan: arc unit and arc unit --everything

Reviewers: jtolmer, steaphan, yoshinori

Reviewed By: jtolmer