यदि आप उबंटू लिनक्स का उपयोग कर रहे हैं तो पाइथन-माइस्क्ल पैकेज में एक पैच जोड़ा गया था जिसमें उसी MYSQL_OPT_RECONNECT विकल्प को सेट करने की क्षमता शामिल थी (here देखें)। मैंने हालांकि कोशिश नहीं की है।
दुर्भाग्यवश, पैच को बाद में ऑटोकनेक्ट और ट्रांसलेशन के साथ एक संघर्ष के कारण हटा दिया गया था (वर्णित here)।
उस पृष्ठ से टिप्पणी कहते हैं: 1.2.2-7 2008-06-19
अजगर-mysqldb (1.2.2-7) अस्थिर पर निडर रिलीज में प्रकाशित; तात्कालिकता = कम
[सैंड्रो टोसी] * Debian/नियंत्रण - विवरण में सूची आइटम लाइनों, 2 अंतरिक्ष के साथ शुरू होता वेबपेजों पर पुनः स्वरूपित (बंद कर देता है: # 480,341) से बचने के लिए
[बर्न्ड Zeimetz] * Debian/पैच/02_reconnect.dpatch: - पैच गिराने: तूफान में टिप्पणी जो समस्या बताते हैं:
# Here is another sad story about bad transactional behavior. MySQL
# offers a feature to automatically reconnect dropped connections.
# What sounds like a dream, is actually a nightmare for anyone who
# is dealing with transactions. When a reconnection happens, the
# currently running transaction is transparently rolled back, and
# everything that was being done is lost, without notice. Not only
# that, but the connection may be put back in AUTOCOMMIT mode, even
# when that's not the default MySQLdb behavior. The MySQL developers
# quickly understood that this is a terrible idea, and removed the
# behavior in MySQL 5.0.3. Unfortunately, Debian and Ubuntu still
# have a patch right now which *reenables* that behavior by default
# even past version 5.0.3.
स्रोत
2008-10-16 20:11:18
मुझे लगता है कि जो कुछ भी ग्राहक है, एक खो कनेक्शन एक के नुकसान का संकेत हो सकता लेनदेन (सर्वर पावर साइकल) या कनेक्टिविटी का नुकसान। इसलिए मैं मानता हूं कि सरल पुनः कनेक्टिंग MySQL क्लाइंट उपयोगकर्ता की अपेक्षा के विरुद्ध डेटा की हानि को छुपा सकता है। –