صحيح البخاري Sahih Bukhari كتاب العمل في الصلاة The Book of Dealing With Actions In As-Salat (The Prayer)
بَابُ تَفَكُّرِ الرَّجُلِ الشَّيْءَ فِي الصَّلاَةِ:

(18) Chapter. Thinking of something during As-Salat (the prayer).

3 hadith
Hadith 1221
حَدَّثَنَا إِسْحَاقُ بْنُ مَنْصُورٍ ، حَدَّثَنَا رَوْحٌ ، حَدَّثَنَا عُمَرُ هُوَ ابْنُ سَعِيدٍ , قَالَ : أَخْبَرَنِي ابْنُ أَبِي مُلَيْكَةَ ، عَنْ عُقْبَةَ بْنِ الْحَارِثِ رَضِيَ اللَّهُ عَنْهُ , قَالَ : " صَلَّيْتُ مَعَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ الْعَصْرَ ، فَلَمَّا سَلَّمَ قَامَ سَرِيعًا دَخَلَ عَلَى بَعْضِ نِسَائِهِ ، ثُمَّ خَرَجَ وَرَأَى مَا فِي وُجُوهِ الْقَوْمِ مِنْ تَعَجُّبِهِمْ لِسُرْعَتِهِ , فَقَالَ : ذَكَرْتُ وَأَنَا فِي الصَّلَاةِ تِبْرًا عِنْدَنَا فَكَرِهْتُ أَنْ يُمْسِيَ أَوْ يَبِيتَ عِنْدَنَا ، فَأَمَرْتُ بِقِسْمَتِهِ " .
Narrated `Uqba bin Al-Harith: I offered the `Asr prayer with the Prophet and after finishing the prayer with Taslim he got up quickly and went to some of his wives and then came out. He noticed the signs of astonishment on the faces of the people caused by his speed. He then said, "I remembered while I was in my prayer that a piece of gold was Lying in my house and I disliked that it should remain with us throughout the night, and so I have ordered it to be distributed."
Hadith Reference Sahih Bukhari / The Book of Dealing With Actions In As-Salat (The Prayer) / Hadith: 1221
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 1222
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ ، حَدَّثَنَا اللَّيْثُ ، عَنْ جَعْفَرٍ ، عَنْ الْأَعْرَجِ , قَالَ : قَالَ أَبُو هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " إِذَا أُذِّنَ بِالصَّلَاةِ أَدْبَرَ الشَّيْطَانُ لَهُ ضُرَاطٌ حَتَّى لَا يَسْمَعَ التَّأْذِينَ ، فَإِذَا سَكَتَ الْمُؤَذِّنُ أَقْبَلَ فَإِذَا ثُوِّبَ أَدْبَرَ ، فَإِذَا سَكَتَ أَقْبَلَ فَلَا يَزَالُ بِالْمَرْءِ يَقُولُ لَهُ اذْكُرْ مَا لَمْ يَكُنْ يَذْكُرُ حَتَّى لَا يَدْرِيَ كَمْ صَلَّى " ، قَالَ أَبُو سَلَمَةَ بْنُ عَبْدِ الرَّحْمَنِ : إِذَا فَعَلَ أَحَدُكُمْ ذَلِكَ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ قَاعِدٌ ، وَسَمِعَهُ أَبُو سَلَمَةَ مِنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ .
Narrated Abu Huraira: Allah's Apostle said, "When the Adhan for the prayer is pronounced, then Satan takes to his heels passing wind so that he may not hear the Adhan and when the Mu'adh-dhin finishes, he comes back; and when the Iqama is pronounced he again takes to his heels and when it is finished, he again comes back and continues reminding the praying person of things that he used not to remember when not in prayer till he forgets how much he has prayed." Abu Salama bin `Abdur-Rahman said, "If anyone of you has such a thing (forgetting the number of rak`at he has prayed) he should perform two prostrations of Sahu (i.e. forgetfulness) while sitting." Abu Salama narrates this from Abu Huraira.
Hadith Reference Sahih Bukhari / The Book of Dealing With Actions In As-Salat (The Prayer) / Hadith: 1222
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 1223
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى ، حَدَّثَنَا عُثْمَانُ بْنُ عُمَرَ , قَالَ : أَخْبَرَنِي ابْنُ أَبِي ذِئْبٍ ، عَنْ سَعِيدٍ الْمَقْبُرِيِّ , قَالَ : قَالَ أَبُو هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ : يَقُولُ النَّاسُ أَكْثَرَ أَبُو هُرَيْرَةَ ، فَلَقِيتُ رَجُلًا , فَقُلْتُ : " بِمَا قَرَأَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ الْبَارِحَةَ فِي الْعَتَمَةِ ؟ فَقَالَ : لَا أَدْرِي ، فَقُلْتُ : لَمْ تَشْهَدْهَا ؟ قَالَ : بَلَى ، قُلْتُ : لَكِنْ أَنَا أَدْرِي ، قَرَأَ سُورَةَ كَذَا وَكَذَا " .
Narrated Abu Huraira: People say that I narrate too many narrations of the Prophet; once I met a man (during the lifetime of the Prophet) and asked him, "Which Sura did Allah's Apostle s recite yesterday in the `Isha' prayer?" He said, "I do not know." I said, "Did you not attend the prayer?" He said, "Yes, (I did)." I said, "I know. He recited such and such Sura."
Hadith Reference Sahih Bukhari / The Book of Dealing With Actions In As-Salat (The Prayer) / Hadith: 1223
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة