Bears can move FAST. I spooked a black bear one time while driving on a dirt road through a forest. I came around a bend at the edge of a clearing. He took off and became a blur while running 100 yards or so across the clearing. The speed scared me. If you see one at 100 yards, better get your rifle ready in hand.
Close up, you would have no chance before it was on you.
For a backup that is on you all the time, I prefer a DA 44 magnum at least. The person in the story found out that a semi auto can jam the slide at touching distance.
If you do carry the semi auto, have a full magazine of heavy flat nosed bullets.