ALBANY, New York (WABC) -- New York lawmakers have approved a two-year extension of mayoral control of public schools in New York City.The state Senate passed the bill 48-2, which amends various laws including mayoral control and county sales taxes.The state Assembly approved the bill in a 115-to-15 vote just after 1 a.m.The bill extends local sales taxes, includes $55 million for upstate New York communities affected by recent floods and reduces the state's take from a struggling upstate racetrack casino. It also renames the new Tappan Zee Bridge after the late Gov. Mario Cuomo.The agreement was worked out in closed-door negotiations between lawmakers and Gov. Andrew Cuomo, Mario Cuomo's son. Assembly Speaker Carl Heastie, a Bronx Democrat, called the deal "comprehensive bipartisan legislation to meet the diverse needs of every community in New York.""It's not perfect, but it's a balance that showed compromise and it shows we're moving forward," Deputy Senate Majority Leader John DeFrancisco, R-Syracuse, said of the final bill that allowed lawmakers to adjourn for the year.The 15-year-old policy giving New York City's mayor control of city schools was set to expire Friday if lawmakers hadn't voted to renew it. Lawmakers ended their regular session last week without a deal to extend the policy, only to be ordered back into session by the governor.Mayor de Blasio issued the following statement on the vote:(The Associated Press contributed to this report)