Fixed compiler warnings sql/sql_view.cc: Ensure that merged_for_insert is properly reset (Left of an old patch)
Replace static array of thread sync levels with std::vector.