Forward port changes from latest lp:maria trunk merge