List:Commits« Previous MessageNext Message »
From:Vamsikrishna Bhagi Date:October 18 2012 5:36am
Subject:bzr push into mysql-trunk branch (vamsikrishna.bhagi:4754 to 4755)
Bug#14547920
View as plain text  
 4755 Vamsikrishna Bhagi	2012-10-18 [merge]
      Bazaar merge for Bug#14547920 from mysql-5.6.

    modified:
      extra/yassl/include/yassl_int.hpp
      extra/yassl/src/yassl_int.cpp
 4754 Amit Bhattacharya	2012-10-18 [merge]
      Removing the test case to fix the issues.

    removed:
      mysql-test/include/multi_table_del_sj.inc
      mysql-test/include/multi_table_upd_sj.inc
      mysql-test/r/multi_table_upd_del_sj.result
      mysql-test/t/multi_table_upd_del_sj.test
=== modified file 'extra/yassl/include/yassl_int.hpp'
--- a/extra/yassl/include/yassl_int.hpp	2012-07-24 13:24:00 +0000
+++ b/extra/yassl/include/yassl_int.hpp	2012-10-18 05:32:59 +0000
@@ -278,13 +278,13 @@ public:
 
     ~Sessions();
 
+    friend void Session_initialize();
     friend Sessions& GetSessions(); // singleton creator
 private:
     Sessions(const Sessions&);              // hide copy
     Sessions& operator=(const Sessions&);   // and assign
 };
 
-
 #ifdef _POSIX_THREADS
     typedef pthread_t THREAD_ID_T;
 #else

=== modified file 'extra/yassl/src/yassl_int.cpp'
--- a/extra/yassl/src/yassl_int.cpp	2012-07-24 13:24:00 +0000
+++ b/extra/yassl/src/yassl_int.cpp	2012-10-18 05:32:59 +0000
@@ -17,15 +17,12 @@
  * draft along with type conversion functions.
  */
 
+#include "pthread.h"
 #include "runtime.hpp"
 #include "yassl_int.hpp"
 #include "handshake.hpp"
 #include "timer.hpp"
 
-#ifdef _POSIX_THREADS
-    #include "pthread.h"
-#endif
-
 
 #ifdef HAVE_LIBZ
     #include "zlib.h"
@@ -1564,17 +1561,22 @@ SSL_SESSION::~SSL_SESSION()
     ysDelete(peerX509_);
 }
 
-
 static Sessions* sessionsInstance = 0;
+static pthread_once_t session_created= PTHREAD_ONCE_INIT;
+
+
+void Session_initialize()
+{
+    sessionsInstance = NEW_YS Sessions;
+}
+
 
 Sessions& GetSessions()
 {
-    if (!sessionsInstance)
-        sessionsInstance = NEW_YS Sessions;
+    pthread_once(&session_created, Session_initialize);
     return *sessionsInstance;
 }
 
-
 static sslFactory* sslFactoryInstance = 0;
 
 sslFactory& GetSSL_Factory()
@@ -2627,9 +2629,10 @@ extern "C" void yaSSL_CleanUp()
 {
     TaoCrypt::CleanUp();
     yaSSL::ysDelete(yaSSL::sslFactoryInstance);
-    yaSSL::ysDelete(yaSSL::sessionsInstance);
     yaSSL::ysDelete(yaSSL::errorsInstance);
-
+    yaSSL::ysDelete(yaSSL::sessionsInstance);
+    yaSSL::session_created= PTHREAD_ONCE_INIT;
+ 
     // In case user calls more than once, prevent seg fault
     yaSSL::sslFactoryInstance = 0;
     yaSSL::sessionsInstance = 0;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (vamsikrishna.bhagi:4754 to 4755)Bug#14547920Vamsikrishna Bhagi18 Oct