A two-year-old boy in Shanghai disabled his mother's iPhone for the equivalent of 47 years after playing with it and repeatedly entering the wrong passcode, according to a Chinese media report.

The incident happened in January after the phone was given to the child to watch educational videos online, the news website Kankanews.com said.

The mother returned home one day and when she checked the phone found it had been disabled for 25 million minutes by pressing keys repeatedly when the handset requested the passcode be inputted, according to the article. Each time the wrong keys were pressed the phone was disabled for a period of time, the report said.

More from the South China Morning Post:

Lawsuits hit Apple after it admits deliberately slowing down ageing iPhones

Chinese woman offered refund after facial recognition allows colleague to unlock iPhone X

Lift-off in space plane race as China tests hypersonic drone model

A phone technician at an Apple store in Shanghai was quoted as saying that the woman could either wait years to try to input her passcode again or wipe the contents of the handset clean and then reinstall files.

The technician, named as Wei Chunlong, also told the website that there had been cases of phones locked for the equivalent of over 80 years by the same method. "In this woman's case, the only way out [without waiting] is to erase all the phone data and do a factory reset," Wei said.

The customer, who was only identified by her family name Lu, has waited for two months but has seen no sign of the problem rectifying itself, the report said.

"I couldn't really wait for 47 years and tell my grandchild it was your father's mistake," the woman was quoted as saying.

The report sparked a debate online in China.

Some parents said the mother should never have allowed her child to play with the phone alone.

Others said she should have backed up the data stored on her phone elsewhere so that if something went wrong she could easily retrieve it.

Follow CNBC International on Twitter and Facebook.