Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:176Ādam b. Abū Iyās > Ibn Abū Dhiʾb > Saʿīd al-Maqburī > Abū Hurayrah

Messenger of Allah ﷺ said, "A person is considered in prayer as long as he is waiting for the prayer in the mosque as long as he does not do Hadath." A non-Arab man asked, "O Abu Huraira! What is Hadath?" I replied, "It is the passing of wind (from the anus) (that is one of the types of Hadath).  

البخاري:١٧٦حَدَّثَنَا آدَمُ بْنُ أَبِي إِيَاسٍ قَالَ حَدَّثَنَا ابْنُ أَبِي ذِئْبٍ عَنْ سَعِيدٍ الْمَقْبُرِيِّ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ النَّبِيُّ ﷺ لاَ يَزَالُ الْعَبْدُ فِي صَلاَةٍ مَا كَانَ فِي الْمَسْجِدِ يَنْتَظِرُ الصَّلاَةَ مَا لَمْ يُحْدِثْ فَقَالَ رَجُلٌ أَعْجَمِيٌّ مَا الْحَدَثُ يَا أَبَا هُرَيْرَةَ قَالَ الصَّوْتُ يَعْنِي الضَّرْطَةَ