@ishan
1) osc_is_admin_user_logged_in is core function (hUser.php)
2) This happens when there are foreign keys on t_item table and during removal, everything is deleted, but only record in t_item table and table from foreign key are kept. To fix it, find foreign key and delete it.