The solo was done by Paul McCartney. I think that's when he showed Harrison what he though it should sound like... it was not supposed to be the final result (just an idea) but the producer still recorded it and they found it worked great... (and they were right) ;)
Beatles - Long Tall Sally (Live, 1965) [Very Good(+) quality]