Explorar o código

debug db lock

stanley-king %!s(int64=8) %!d(string=hai) anos
pai
achega
c851e661a8
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      core/framework/db/mysqli.php

+ 5 - 4
core/framework/db/mysqli.php

@@ -613,7 +613,8 @@ class Db
         self::init_link();
         if (self::$iftransacte)
         {
-    		$result = self::$link[$host]->autocommit(false);
+            Log::record("autocommit start 1",Log::DEBUG);
+            $result = self::$link[$host]->autocommit(false);
     		if($result == false)
     		{
                 $errno = mysqli_errno(self::$link[$host]);
@@ -624,7 +625,7 @@ class Db
                     self::closeLink($host);
                     self::connect($host);
                 }
-                Log::record("autocommit start",Log::DEBUG);
+                Log::record("autocommit start 2",Log::DEBUG);
                 self::$link[$host]->autocommit(false);
             }
     	}
@@ -635,7 +636,7 @@ class Db
     {
         if (!self::$iftransacte) {
     		$result = self::$link[$host]->commit();
-            Log::record("autocommit end",Log::DEBUG);
+            Log::record("autocommit end 1",Log::DEBUG);
             self::$link[$host]->autocommit(true);//开启自动提交
     		self::$iftransacte = true;
     		if (!$result) throw_exception("Db Error: ".mysqli_error(self::$link[$host]));
@@ -646,7 +647,7 @@ class Db
     {
         if (!self::$iftransacte){
     		$result = self::$link[$host]->rollback();
-            Log::record("autocommit end",Log::DEBUG);
+            Log::record("autocommit end 2",Log::DEBUG);
             self::$link[$host]->autocommit(true);
     		self::$iftransacte = true;
     		if (!$result) throw_exception("Db Error: ".mysqli_error(self::$link[$host]));