Conversation so far:
What was a goal Lionel Messi broke in 2012?
On 7 March, Lionel Messi scored five times in a Champions League last 16-round match against Bayer Leverkusen, an unprecedented achievement in the history of the competition.
who did Lionel Messi play for in 2012?
Lionel Messi has spent his entire professional career with Barcelona
how many goals did Lionel Messi score to break the record of top goalscorer in Barcelona's history?
On 20 March, Lionel Messi became the top goalscorer in Barcelona's history at age 24, overtaking the record of César Rodríguez's 232 goals with a hat-trick against Granada.
how old was Lionel Messi when he broke the Barcelona top goal scorer record?
On 20 March, 2012, Lionel Messi became the top goalscorer in Barcelona's history at 24 years old.
did Barcelona do well in 2012?
Despite Lionel Messi's individual form, Barcelona's four-year cycle of success under Guardiola – one of the greatest eras in the club's history – drew to an end.
who was Barcelona's coach in the first half of 2012?
In Barça's last home league match on 5 May, Lionel Messi scored all four goals before approaching the bench to embrace Guardiola, who had announced his resignation as manager.

Question: who did he beat to earn the record
Self-contained rewrite: who did Lionel Messi beat to earn the record league goals and goals scored in a calendar year?