First - as many have said, pick your establishment more carefully. Gun free zones with a high percentage of unarmed patrons are an attractive victim zone. If out clubbing and you are socially press ganged to go into a bar (assuming legal carry is even allowed) then what do you do?
First, where are the exits? Live bands have caused major fires with pyrotechnics, you do want to get out. Are the doors locked? Not Good. Maybe a discreet phone call to who would get an inspector out to write them up - like, after 11:00 on a party night when they are off duty?
Things are breaking down rapidly right there. Nope, you could be The Man and get in the owners face about the chained fire escape doors, but he'd likely invite you to leave with his bouncer's assistance.
Next you are sandwiched into a booth - and what kind of carry did you practice? Pocket? Belt? No better than in a car or at a desk, it's a highly constricted draw with no room to maneuver. Not Good. You need to sit on the periphery of the booth. A table might be better. In college we used to practice this in small groups maneuvering to get the best seat to view pretty girls coming into a restaurant, but the social dynamics will get you in the wrong seat about half the time. In a bar the gunman may not be coming in the front door, YMMV.
Now add blaring music with a definite thumping staccato, flashing lights, and it all covers up what we would normally use to identify gunfire - loud noises and muzzle flashes. About all you get initially is a visual clue IF you aren't hit by the first burst of rounds flying past you. In this situation anything is a backstop to the shooter - he's working on the reverse of the four rules of safety, much the same as combat. A hit is a hit and it makes little difference if it's accidental.
However, you are at least trained in the four rules, hitting innocent civilians isn't in your game plan, and in the aftermath their legal response is significant, much less their moral outrage, the spin the media will put on it, and even worse, being nominated volunteer terrorist of the month in aiding the shooter kill more people. See the thread on why five shots aren't enough - or why they might still be too much.
So, sitting trapped in the back of a booth with patrons scrambling, your group members frozen in place, and you not understanding where the threat is located, much less being able to retrieve your weapon? You are going to have to push kick and shove people out of the way - and they are trying to push kick and shove others out of the way at the same time. It's total chaos with the music likely still thumping as the DJ bailed early, people now screaming, and guess what, the police response is still minutes away. Plenty of time to order pizza and get delivery, right?
During the chaos you have a window of opportunity to move out of the area and it seems the best thing to do is retreat - to that exit you previously staked out that will open. If on the way you are blocked by the shooter then immediate action could be your best course.
Remaining in the building with your handgun drawn and firing back will complicate things. First, you are now a shooter and witnesses will likely think you are part of his team. Hitting an innocent bystander who moved thru the line of fire will prove it to them and they might react by oops worst case shooting back at YOU. Now we have a gun battle with only good guys participating. Isn't chaos fun? It works to the initial shooters advantage as he now sees who has guns to target.
Once the initial strike team on the exterior moves to breach and contain you are then another armed shooter, too. And good luck with that. The predominant tendency for a cop is to shoot first - they can and do get a big pass on collateral damage, just review any NYC street shooting with officers typically engaging in volley fire while passersby work around the scene.
"Unfortunately Mr. Good Guy died when the response team mistakenly took him as a shooter because he was waving a gun around discharging it among the fleeing patrons." Add in from another thread that a high capacity firearm will be recognized as a bigger threat - "because shooters choose them to kill more people." No, it's not statistically supported among mass shootings but it's definitely part of the anti gun agit prop and what a lot of people think - hi cap = more dead people.
Think about what gun a cop will recognize as a CCW for self protection vs a shooter's choice of weapon, add in your choice of dress and type of haircut, etc. Reality says yes they very well profile on sight even tho training says it can be deceptive.
The takeaway is don't go into victim zones during high risk times. I scan Walgreen parking lots here before pulling in late nights when family needs an immediate prescription, I watch patrons in Walmarts after 10:30 when the kids needed a gallon of milk for breakfast the next morning. There is more criminal activity after dark in most cities and being out in that social mix exposes you to more risk at those times.
Most of us won't be out or go there because of it. Which means most of us won't train, won't be ready, and will freeze in place because of it. We really don't know if any of the survivors were carrying, legally or otherwise, and unless the police frisk every one we may never find out in the future. They got out the door and quickly moved away early in the event.
Maybe they did the right thing. It worked for them.