merges from mysql - upstream