SQL-Server / Show variables:
- added column which outputs numeric values in human readable form (e.g. xx MB) MySQLi: - added option max_allowed_packet = 64MB at each connection for handling big blob fields (should be moved to general options array later on)
Dieser Commit ist enthalten in:
Ursprung
a87490e72f
Commit
bfc06577ff
3 geänderte Dateien mit 30 neuen und 11 gelöschten Zeilen
|
@ -19,20 +19,34 @@
|
||||||
<th class="right">#</th>
|
<th class="right">#</th>
|
||||||
<th><strong><?php echo $this->lang->L_NAME;?></strong></th>
|
<th><strong><?php echo $this->lang->L_NAME;?></strong></th>
|
||||||
<th><strong><?php echo $this->lang->L_VALUE;?></strong></th>
|
<th><strong><?php echo $this->lang->L_VALUE;?></strong></th>
|
||||||
|
<th class="nowrap"><?php echo $this->lang->L_INTERPRETED_AS_BYTES;?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
|
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
|
||||||
foreach ($this->variables as $name => $value) : ?>
|
foreach ($this->variables as $name => $value) {
|
||||||
|
if (strpos($value, ',') !== false) {
|
||||||
|
$value = str_replace(',', ', ', $value);
|
||||||
|
}
|
||||||
|
?>
|
||||||
<tr class="<?php echo $cycleHelper->next()?>">
|
<tr class="<?php echo $cycleHelper->next()?>">
|
||||||
<td class="small right"><?php echo $i;?>.</td>
|
<td class="small right"><?php echo $i;?>.</td>
|
||||||
<td class="small"><?php echo $this->escape($name);?></td>
|
<td class="small"><?php echo $this->escape($name);?></td>
|
||||||
<td class="small"><?php echo $this->escape($value);?></td>
|
<td class="small"><?php echo $this->escape($value);?></td>
|
||||||
</tr>
|
<td class="small nowrap">
|
||||||
<?php
|
<?php
|
||||||
++$i;
|
if (is_numeric($value)) {
|
||||||
endforeach;
|
echo $this->byteOutput($value);
|
||||||
|
} else {
|
||||||
|
echo '-';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr><?php
|
||||||
|
++$i;
|
||||||
|
};
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<br /><br /><br />
|
<br /><br /><br />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Msd_Db_Mysql extends Msd_Db_MysqlCommon
|
||||||
* $this->_connectionHandle.
|
* $this->_connectionHandle.
|
||||||
* Returns true on success or false if connection couldn't be established.
|
* Returns true on success or false if connection couldn't be established.
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Msd_Exception
|
||||||
* @return bool
|
* @return bool
|
||||||
**/
|
**/
|
||||||
protected function _dbConnect()
|
protected function _dbConnect()
|
||||||
|
@ -124,7 +124,7 @@ class Msd_Db_Mysql extends Msd_Db_MysqlCommon
|
||||||
*
|
*
|
||||||
* Returns true if selection was succesfull otherwise false.
|
* Returns true if selection was succesfull otherwise false.
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Msd_Exception
|
||||||
* @param string $database The database to select
|
* @param string $database The database to select
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|
|
@ -31,6 +31,8 @@ class Msd_Db_Mysqli extends Msd_Db_MysqlCommon
|
||||||
* Create a connection to MySQL and store the connection handle in
|
* Create a connection to MySQL and store the connection handle in
|
||||||
* $this->connectionHandle.
|
* $this->connectionHandle.
|
||||||
*
|
*
|
||||||
|
* @throws Msd_Exception
|
||||||
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
**/
|
**/
|
||||||
protected function _dbConnect()
|
protected function _dbConnect()
|
||||||
|
@ -49,6 +51,8 @@ class Msd_Db_Mysqli extends Msd_Db_MysqlCommon
|
||||||
$this->_socket
|
$this->_socket
|
||||||
);
|
);
|
||||||
error_reporting($errorReporting);
|
error_reporting($errorReporting);
|
||||||
|
$this->_mysqli->init();
|
||||||
|
$this->_mysqli->options(MYSQLI_READ_DEFAULT_GROUP, 'max_allowed_packet=64M');
|
||||||
if ($this->_mysqli->connect_errno) {
|
if ($this->_mysqli->connect_errno) {
|
||||||
$error = $this->_mysqli->connect_error;
|
$error = $this->_mysqli->connect_error;
|
||||||
$errno = $this->_mysqli->connect_errno;
|
$errno = $this->_mysqli->connect_errno;
|
||||||
|
@ -141,8 +145,8 @@ class Msd_Db_Mysqli extends Msd_Db_MysqlCommon
|
||||||
* is returned.
|
* is returned.
|
||||||
*
|
*
|
||||||
* @param string $query The query to execute
|
* @param string $query The query to execute
|
||||||
* @param const $kind Type of result set
|
* @param int $kind Type of result set
|
||||||
* @param boolean $getRows Wether to fetch all rows and return them
|
* @param boolean $getRows Whether to fetch all rows and return them
|
||||||
*
|
*
|
||||||
* @return resource|array
|
* @return resource|array
|
||||||
*/
|
*/
|
||||||
|
@ -183,7 +187,7 @@ class Msd_Db_Mysqli extends Msd_Db_MysqlCommon
|
||||||
*
|
*
|
||||||
* Can be used to walk through result sets.
|
* Can be used to walk through result sets.
|
||||||
*
|
*
|
||||||
* @param const $kind
|
* @param int $kind
|
||||||
*
|
*
|
||||||
* @return array|object
|
* @return array|object
|
||||||
*/
|
*/
|
||||||
|
@ -197,6 +201,7 @@ class Msd_Db_Mysqli extends Msd_Db_MysqlCommon
|
||||||
return $this->_resultHandle->fetch_object();
|
return $this->_resultHandle->fetch_object();
|
||||||
break;
|
break;
|
||||||
case self::ARRAY_NUMERIC:
|
case self::ARRAY_NUMERIC:
|
||||||
|
default:
|
||||||
return $this->_resultHandle->fetch_array(MYSQLI_NUM);
|
return $this->_resultHandle->fetch_array(MYSQLI_NUM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Laden …
In neuem Issue referenzieren