Fix compiler warnings introduced by fix for #569
removing an unused variable, did also remove an assigment
Ticket 47337 - mep_pre_op: Unable to fetch origin entry

Bug Description:  After installing IPA, and adding a hostgroup, an error will be written
                  to the error log if you delete this host group(Unable to fetch origin entry).
                  This is caused by the referential integrity plugin trying to cleanup
                  the deleted entry's membership.  This causes the mep plugin to process the
                  delete operation, but it can not find the origin entry(because it is deleted).

Fix Description:  If the operation is internal(from a server plugin) do not write the error
                  to the standard log level.

https://fedorahosted.org/389/ticket/47337

Reviewed by: richm(Thanks!)
Ticket 568 - make usage of transaction batch flush durable

Bug Description:  if a transaction batch value >1 is specified
	in a txn commit the txn log is ionly flushed if the batch
	limit is reached. This can increase performance, but since
	the operation is acknowleded to the client, a crash before
	flushing the log would violate the durability condition.

Fix Description:   to allow txn log flushing in batches, if batch-limit > 0
	the flushing is done in the logflush thread. In a txn commit
	a worker thread adds its transaction to the list of txns to flush,
	eventually notifies the logflush thread and waits until logflushthread
	confirms that the txn was flushed. only then the worker thread
	continues and acknowledges success to the client.
	There needs to be care that the txn logs are flushed frequently by the
	logflush thread, even if there are less than the batch limit of txns
	are waiting to be flushed.
	one condition is base on active txns vs waiting txns, if there are no more
	outstanding txns do flush.
	the other condition is tiome based on two configurable timers:
	-  the logflush thread sleeps on a condition variable until it gets notified
	   by a worker thread that the batch limit is exceeded or the interval has passed
	-  if it awakes it checks when the last flush was done and either if it is longer
	   than th esecond timeer or the batch limit is reached the txns are flushed

	The fix provided here makes the use of batch vals safe, but to get a performance
	benefit further changes are required. Right now the txn is started and committed
	inside dblayer_lock|unlock_backend, so txns cannot accumulate to be flushed.
	So the order of txn and backend locking needs to be reveresed, or eventually the
	code in the worker thread handling the synchronization could be move close to
	sending the result to the client. But this optimization question ahs been moved
	to a seperate ticket: 47358

	The fix includes a minor change for the trickle thread, it is only started if trickling
	is required (trickle percentage > 0).

https://fedorahosted.org/389/ticket/568

Reviewed by: Noriko, Thanks
fix hang related to ticket 568
Ticket 47361 - Empty control list causes LDAP protocol error is thrown

Bug Description:

	If a request contains a list of controls containing zero control, it does
	not conform RFC http://tools.ietf.org/html/rfc4511#section-4.1.11. Then the
	server returns a Protocol Error.
	This is too restrictive for some applications.
	Note: such application needs to be linked with old version of mozldap or openldap
	because recent version skip sending empty list of controls

Fix Description:
	The fix is to ignore this error and let the operation complete

https://fedorahosted.org/389/ticket/47361

Reviewed by: Rich Megginson (thanks Rich !)

Platforms tested: F17 (unit + acceptance vlv/proxy/managed/psearch/tls/bindcontrol)

Flag Day: no

Doc impact: no
Ticket 47354 - Indexed search are logged with 'notes=U' in the access logs

Bug Description:
	In the access log, the flag "notes=U" is present to warn the customer that the provided filter contains not
	indexed components. This flag is set independently of the fact that all entries of the database will be
	evaluated against the filter. So it can not be used to determine if all the entries have been scanned.
	Evaluated all entries is usually a performance hit for large database containing millions of entries.

Fix Description:
	The fix consist to introduce a new flag 'notes=A' at the top level (ldbm_back_search) only when the candidate
	list is ALLID and all entries will be scanned.
	The fix also contains the update of logconv.pl to take into account this change.

https://fedorahosted.org/389/ticket/47354

Reviewed by: Rich Megginson and Mark Reynolds (thanks to you !)

Platforms tested: Fedora 17

Flag Day: no

Doc impact: no
Ticket #47362 - ipa upgrade selinuxusermap data not replicating

https://fedorahosted.org/389/ticket/47362
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: When nsslapd-port is set to 0, this causes the
replica purl to be "ldap://hostname:0".  At startup, the MMR code looks to
see if this replica purl is in the RUV, by doing a string comparison of this
purl with the ruv replica purl.  If it is not there, the MMR code wipes out
this ruv element.  Later the code in replica_check_for_data_reload() uses
this RUV to see if it needs to reinit the changelog.  Since the RUV doesn't
match the changelog RUV any more, the changelog is erased, which erases
any changes that were made in the meantime.  The missing RUV element causes
the supplier to attempt to send over changes which may already exist on the
consumer.  If one of these is an ADD, the urp code will correctly flag this
as an attempt to add an entry that already exists, and will turn this into
a replConflict entry.  A subsequent attempt to replicate the same ADD will
cause an error in the urp code which will cause it to return err=53.
Replication will then become stuck on this update - it will keep trying to
send it over and over again, and will not be able to proceed.
The only workaround is a replica reinit of the replica, to get the database
RUV and changelog in a consistent state.
I've also added some additional RUV debugging when using the REPL log level.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 614ce4e4b1774526bb8c4ad6c43a1582adcc30ec)