fix affected rows count, prepare log for DebugKit
fix affected rows count, prepare log for DebugKit