Language:
كتاب الصلاة
8  
Prayers (Salat)
(105)
Chapter: Whoever says "Nothing annuls As-Salat (the prayer) (i.e. nothing of what others do, not the praying person himself)."
(105)
باب مَنْ قَالَ لاَ يَقْطَعُ الصَّلاَةَ شَىْءٌ
Sahih al-Bukhari 514

Narrated `Aisha:

The things which annul prayer were mentioned before me (and those were): a dog, a donkey and a woman. I said, "You have compared us (women) to donkeys and dogs. By Allah! I saw the Prophet (ﷺ) praying while I used to lie in (my) bed between him and the Qibla. Whenever I was in need of something, I disliked to sit and trouble the Prophet. So, I would slip away by the side of his feet."

حَدَّثَنَا عُمَرُ بْنُ حَفْصٍ، قَالَ حَدَّثَنَا أَبِي قَالَ، حَدَّثَنَا الأَعْمَشُ، قَالَ حَدَّثَنَا إِبْرَاهِيمُ، عَنِ الأَسْوَدِ، عَنْ عَائِشَةَ،‏.‏ قَالَ الأَعْمَشُ وَحَدَّثَنِي مُسْلِمٌ، عَنْ مَسْرُوقٍ، عَنْ عَائِشَةَ، ذُكِرَ عِنْدَهَا مَا يَقْطَعُ الصَّلاَةَ الْكَلْبُ وَالْحِمَارُ وَالْمَرْأَةُ فَقَالَتْ شَبَّهْتُمُونَا بِالْحُمُرِ وَالْكِلاَبِ، وَاللَّهِ لَقَدْ رَأَيْتُ النَّبِيَّ صلى الله عليه وسلم يُصَلِّي، وَإِنِّي عَلَى السَّرِيرِ ـ بَيْنَهُ وَبَيْنَ الْقِبْلَةِ ـ مُضْطَجِعَةً فَتَبْدُو لِي الْحَاجَةُ، فَأَكْرَهُ أَنْ أَجْلِسَ فَأُوذِيَ النَّبِيَّ صلى الله عليه وسلم فَأَنْسَلُّ مِنْ عِنْدِ رِجْلَيْهِ‏.‏
Reference : Sahih al-Bukhari 514
In-book reference : Book 8, Hadith 161
USC-MSA web (English) reference : Vol. 1, Book 9, Hadith 493
  (deprecated numbering scheme)