Sometimes a tiny, almost headless screw is screwed into the end of the cable inner to expand it. I used to just splay out the cable inner a bit (there is often a countersink or counterbore in the cross-hole in the piece of brass rod to support this) before soldering it, so the solder joint did not have to support the full load. I broke a motorcycle front brake cable inner (much heavier than the bicycle type of cable you probably have there) in tension through shear finger-force once when I was twelve years old, in the heat of the moment whilst crashing. It is a lot to ask of a plain solder joint loaded in shear to support that much force, so you should preferably do something to strengthen the joint.