@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | if ($user == '') { |
70 | 70 | $user = $this->user; |
71 | 71 | } |
72 | - if ($password == '') { |
|
73 | - $password = $this->password; |
|
74 | - } |
|
75 | - if ($port == '') { |
|
76 | - $port = $this->port; |
|
77 | - } |
|
72 | + if ($password == '') { |
|
73 | + $password = $this->password; |
|
74 | + } |
|
75 | + if ($port == '') { |
|
76 | + $port = $this->port; |
|
77 | + } |
|
78 | 78 | /* establish connection, select database */ |
79 | 79 | if (!is_object($this->linkId)) { |
80 | 80 | $this->connectionAttempt++; |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | } |
88 | 88 | $this->linkId = mysqli_init(); |
89 | 89 | $this->linkId->options(MYSQLI_INIT_COMMAND, "SET NAMES {$this->characterSet} COLLATE {$this->collation}, COLLATION_CONNECTION = {$this->collation}, COLLATION_DATABASE = {$this->collation}"); |
90 | - if ($port != '') { |
|
91 | - $this->linkId->real_connect($host, $user, $password, $database, $port); |
|
92 | - } else { |
|
93 | - $this->linkId->real_connect($host, $user, $password, $database); |
|
94 | - } |
|
90 | + if ($port != '') { |
|
91 | + $this->linkId->real_connect($host, $user, $password, $database, $port); |
|
92 | + } else { |
|
93 | + $this->linkId->real_connect($host, $user, $password, $database); |
|
94 | + } |
|
95 | 95 | $this->linkId->set_charset($this->characterSet); |
96 | 96 | if ($this->linkId->connect_errno) { |
97 | 97 | $this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error); |
@@ -246,18 +246,18 @@ discard block |
||
246 | 246 | $this->connect(); |
247 | 247 | } |
248 | 248 | $start = microtime(true); |
249 | - $onlyRollback = true; |
|
250 | - $fails = 0; |
|
251 | - while ($fails < 10 && false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) { |
|
252 | - $fails++; |
|
253 | - if (@mysqli_errno($this->linkId) == 3101) |
|
254 | - usleep(500000); // half a second |
|
255 | - else |
|
256 | - $onlyRollback = false; |
|
257 | - } |
|
258 | - if ($onlyRollback === true && false === $this->queryId) { |
|
259 | - myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error '.$fails.' Times, Giving Up', __LINE__, __FILE__); |
|
260 | - } |
|
249 | + $onlyRollback = true; |
|
250 | + $fails = 0; |
|
251 | + while ($fails < 10 && false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) { |
|
252 | + $fails++; |
|
253 | + if (@mysqli_errno($this->linkId) == 3101) |
|
254 | + usleep(500000); // half a second |
|
255 | + else |
|
256 | + $onlyRollback = false; |
|
257 | + } |
|
258 | + if ($onlyRollback === true && false === $this->queryId) { |
|
259 | + myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error '.$fails.' Times, Giving Up', __LINE__, __FILE__); |
|
260 | + } |
|
261 | 261 | $this->addLog($queryString, microtime(true) - $start, $line, $file); |
262 | 262 | $this->Row = 0; |
263 | 263 | $this->Errno = @mysqli_errno($this->linkId); |