Trading glitches involving shares of Apple on an upstart stock exchange called BATS on Friday rekindled memories of the May 2010 “flash crash,” when prices gyrated wildly, shaking confidence in markets and in regulators’ ability to stay on top of them.

The incident served as a reminder that regulators have much more work to do to prevent and deal with trading disasters, but they also underscored the progress the Securities and Exchange Commission has made since May 2010.

Even though the BATS exchange suffered spectacularly embarrassing failures, the problems did not trigger a broader upheaval in the markets.

The potential fallout was contained in part because when Apple’s share price plunged, it tripped a circuit breaker that the SEC put in place in response to the 2010 flash crash.

Trading in Apple stock was halted for five minutes, after which it resumed as if nothing unusual had happened. Three trades that would have delivered too-good-to-be-true bargains for buyers of Apple stock were later unwound. According to BATS, those “erroneous trades” spanned 12 seconds and involved a total of 300 shares.

Even as BATS was issuing a full-throated mea culpa, it gave credit to the SEC’s new safety mechanism, saying the results proved “recent improvements in the U.S. equity market structure are working as intended.”

Former senator Ted Kaufman (D-Del.), who has been sounding an alarm about the rise of rapid-fire computerized trading strategies, was not comforted.

“I think we’ve been lucky that we haven’t had a bigger meltdown by now,” he said.

It was far from the first test of the circuit breaker. According to the SEC, in February alone the mechanism was tripped 15 times by unusually sharp price fluctuations.

Although some market observers initially suspected that the type of high-frequency trading employed by hedge funds contributed to Friday’s problems, BATS traced the trouble to a bug in its software.

Another stock affected by the bug was BATS itself.

The exchange was conducting its own initial public offering Friday, making its debut as a publicly traded company. But it stumbled right out of the gate when the exchange’s software for handling IPOs failed, BATS spokesman Randy Williams said.

The bug affected one of 32 computer servers that the BATS exchange uses to match buy and sell orders, Williams said. Given their alphabetical proximity, shares of Apple and BATS were handled by the same server.

Though its software had been tested, Friday was the first time BATS had tried to use it for an actual IPO, Williams said. BATS ended up canceling its IPO.

“We sincerely apologize to the industry and investing public for our failure,” Joe Ratterman, chief executive of BATS Global Markets, said in a statement.

At the SEC, the nation’s premier stock market regulator, Friday’s events were no cause for panic. The action was playing out at BATS, and there was little if anything for regulators to do except monitor the updates BATS was providing and stay in touch with the exchange.

Asked if SEC officials went to battle stations, a person familiar with the situation said the question was based on a wrong assumption. For the regulators, there was no battle to be fought.

But the agency is still working on initiatives to address the changing nature of trading, which consists largely of institutional investors buying large blocks of stock and selling them within tiny fractions of a second to capture fleeting advantages.

For years, the SEC has expressed concern that such trading might involve abuse and ma­nipu­la­tion. At a conference in February hosted by the Practising Law Institute, an SEC enforcement official said the agency is conducting investigations related to high-frequency trading.

Almost a year ago, to prevent wild swings in prices of individual stocks, the SEC proposed a safety device that would replace the single-stock circuit breaker. Known as a “limit up-limit down” mechanism, it would prevent stocks from trading outside a prescribed price band. Within the band, stocks could continue trading without interruption.

The proposal remains on the drawing board.

The May 2010 flash crash highlighted the fact that the SEC does not have the ability to track individual orders and trades in real time. Even to reconstruct trading after the fact, the regulator is dependent on organizations it regulates for the data.

After the flash crash, SEC Chairman Mary Schapiro noted in a March 15 speech, it took the SEC four months to figure out what happened. The SEC proposed that industry create a “consolidated audit trail” that would give regulators access to the data from all stock markets.

Almost two years later, Schapiro said in the recent speech, “the contours of the staff recommendations are being finalized.”