SAN FRANCISCO (AP) - Reliever Jean Machi and San Francisco took advantage of a huge baserunning blunder by Pittsburgh, tagging out two runners who wandered away on the same play and beating the Pirates to end a six-game losing streak.
The Giants stopped a skid that matched its longest of the season, and avoided the club's first winless homestand of at least seven games in the 15-year history of AT&T Park.
The Pirates, who had won three in a row, led 5-4 in the sixth when Chris Stewart drew a one-out walk with runners on second and third. Machi (6-0) got the ball back from the catcher and noticed Travis Snider had left second base, thinking it was a bases-loaded walk. Machi threw to shortstop Brandon Crawford to trap Snider in a rundown. Crawford tagged out Snider, then threw to Machi to catch Gaby Sanchez in a rundown when he broke home from third. Machi tossed back to third baseman Pablo Sandoval for the tag.
Justin Wilson (3-2) took the loss. Santiago Casilla, San Francisco's fifth reliever after Tim Lincecum's short start, earned his eighth save in 11 chances.
Colorado loaded the bases on two walks and Michael McKenry's third hit of the game before Barnes singled with one out against Wesley Wright (0-2). Drew Stubbs then scored on a wild pitch, helping the Rockies stop a three-game slide.
Rob Scahill (1-0) pitched a scoreless inning for his second major league win and Adam Ottavino got three outs for his first career save.
Scahill was recalled from Triple-A Colorado Springs before the game, bolstering Colorado's bullpen after it used eight relievers in Tuesday night's 16-inning loss.
Price (11-8), the subject of trade speculation heading into Thursday's deadline for non-waiver deals, had his bid to win a team-record seventh consecutive start dashed after allowing four runs and seven hits over seven innings.
BOSTON (AP) - Mark Buehrle pitched 6 2-3 innings to earn his first win in almost two months and Dioner Navarro had three hits and three RBIs to lead the Toronto Blue Jays over Boston for their fifth consecutive victory.
Buehrle (11-7) allowed one run on six hits to snap a six-game losing streak that matched the longest of his career.
Lester was originally scheduled to start for Boston, but the All-Star was scratched while his name is bandied about ahead of Thursday's trade deadline. As the Red Sox went down in the ninth, fans remaining from the sellout crowd chanted, ''Jonny Lester!''
CINCINNATI (AP) - Paul Goldschmidt hit a two-run homer that kept Alfredo Simon winless since the All-Star game, and Arizona held on to take a series between two teams struggling to score runs.
Goldschmidt's 19th homer off Simon (12-6) gave the Diamondbacks two of three in the series. Simon has gone 0-3 since his first All-Star selection. Didi Gregorius added a two-run homer in the ninth.
The Reds fell to 2-10 since the All-Star break. Devin Mesoraco's three-run homer in the ninth off Addison Reed ended a streak of 11 straight games with three runs or fewer, Cincinnati's longest such stretch of futility since 1967.
Wade Miley (7-7) gave up seven hits and four walks in 6 2-3 innings, improving to 4-1 in his past five starts fpor Arizona. Reed earned his 26th save in 31 chances