The governing party in India's Uttar Pradesh state could lose key support, after a court cast doubt on the legality of a split in a rival party.
Mr Yadav could lose his majority
The Samajwadi Party formed a majority in 2003 after 40 members of the Bahujan Samaj Party (BSP) defected to it.
The High Court in Lucknow ruled that the then Speaker had not followed the rules in recognising the defection.
It ordered the current Speaker to hold fresh hearings. The BSP says the defection of its members was illegal
Uttar Pradesh is India's most populous and influential state. Elections are due there next year.
Following Tuesday's court ruling, Mr Yadav called a vote of confidence in the state assembly, which all main opposition parties boycotted.
He was backed by 207 members in the 403-seat house.
BSP leader Mayawati wants her rival to resign
State Railway Minister Ambika Chowdhury said the vote had been called to dispel any confusion created by the opposition after the High Court judgement.
The defection of the 40 BSP assembly members helped Mr Yadav win a majority, leading to the formation of the current Samajwadi Party government.
Opposition parties have demanded his resignation, saying he has no moral right to continue. Ms Chowdhury said the chief minister rejected the demands.
The BSP says the manner in which its members defected and joined the Samajwadi Party was illegal under India's anti-defection law.
Two of three High Court judges ruled that the then Speaker, Kesari Nath Tripathi, had not followed correct procedure in recognising the legislators' defection and subsequent merger with the Samajwadi Party.
They ordered current Speaker Mata Prasad Pandey to hold fresh hearings in the case.