With two catches behind, wicket-keeper Mark Boucher overtook Adam Gilchrist and took his tally for Test wicketkeeping catches to 401, helping South Africa restrict Bangladesh to 60 for three at stumps.
Earlier, Skipper Graeme Smith and Neil McKenzie set a world record of 415 for an opening stand.
Shahriar Nafees and nightwatchman Abdur Razzak were batting on seven and eight runs at the close.
Pace bowler Dale Steyn took all the three wickets for 14 runs to reach 100 test wickets in just 20 tests.
Steyn took seven wickets in the first test in Dhaka, where South Africa beat Bangladesh by five wickets.
At the start of Bangladesh's second innings Tamim Iqbal (14) was caught at slip by AB de Villiers off a ninth-over delivery from Steyn.
Boucher caught opener Zunaed Siddique (18) and captain Mohammad Ashraful for a duck off two consecutive deliveries from Steyn, to set his record.
Smith was on 231 and McKenzie on 170 in the morning when they surpassed the record of 413 for the opening wicket set by Indian pair of Vinoo Mankad and Pankaj Roy against New Zealand in 1956.
South Africa resumed on 570 for five after tea and lost Mark Boucher (21) and Robin Peterson (4), left-arm spinner Mohammad Rafique, playing his last international, removing them in consecutive overs to take his Test tally to 100 wickets.
Graeme Smith declared the innings just after Zunaed Siddique caught Peterson at slip off a Rafique delivery. Rafique also removed Boucher, caught at cover.
After spinner Abdur Razzak (1-129) finally broke through in the morning, right-arm pacer Shahadat Hossain (3-107) took three wickets and Saquib Al Hasan (1-68) another in the second session to slow the South African run spree.
Shahadat finally dismissed McKenzie for 226, then trapped Hashim Amla for 38 and bowled Ashwell Prince for two in his two subsequent overs.
Saquib then bowled AB de Villiers for one. Razzak made the breakthrough in the first session of the day with South Africa's batsmen plundering runs on a flat batting pitch.
score board
SOUTH AFRICA (I Innings O/n: 405/0)
McKenzie b Hossain 226
Smith b Razzak 232
Amla lbw Hossain 38
Kallis (not out) 39
Prince b Hossain 2
de Villiers b Al Hasan 1
Boucher c Hasan b Rafique 21
Peterson c Siddique b Rafique 4
Extras (B-10, W-1, LB-7, NB-2) 20
Total (for 7 wkts, 161.1 overs, decl) 583
Fall of wickets: 1-415, 2-514, 3-515, 4-519, 5-524, 6-579, 7-583.
Bowling: Mortaza 28-6-92-0, Hossain 25-1-107-3, Rafique 44.1-5-132-2, Razzak 31-1-129-1, Hasan 25-4-68-1, Ashraful 3-0-20-0, Ahmed 5-0-18-0.
BANGLADESH (I Innings)
T Iqbal c De Villiers b Steyn 14
J Siddique c Boucher b Steyn 18
S Nafees (batting) 7
Ashraful c Boucher b Steyn 0
Razzaq (batting) 8
Extras (LB-6, NB-7) 13
Total (for 3 wkts, 16 overs) 60
Fall of wickets: 1-39, 2-49, 3-49.
Bowling: Steyn 8-2-24-3, Makhaya Ntini 3-0-13-0, Morkel 3-0-16-0, Robin Peterson 2-1-1-0.
