0 && MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) >= 3) {
// Special speedup for newer MySQL Versions (in 4.0 format changed)
if ($cfgSkipLockedTables == true && MYSQL_MAJOR_VERSION == 3.23 && intval(MYSQL_MINOR_VERSION) >= 30) {
$query = 'SHOW OPEN TABLES FROM ' . db_name($db);
$result = mysql_query($query);
// Blending out tables in use
if ($result != false && mysql_num_rows($result) > 0) {
while ($tmp = mysql_fetch_array($result)) {
// if in use memorize tablename
if (preg_match('/in_use=[1-9]+/', $tmp['Comment'])) {
$sot_cache[$tmp[0]] = true;
}
}
mysql_free_result($result);
if (isset($sot_cache)) {
$query = 'SHOW TABLES FROM ' . db_name($db);
$result = mysql_query($query);
if ($result != false && mysql_num_rows($result) > 0) {
while ($tmp = mysql_fetch_array($result)) {
if (!isset($sot_cache[$tmp[0]])) {
$sts_result = mysql_query('SHOW TABLE STATUS FROM ' . db_name($db) . ' LIKE \'' . addslashes($tmp[0]) . '\'');
$sts_tmp = mysql_fetch_array($sts_result);
$tbl_cache[] = $sts_tmp;
} else { // table in use
$tbl_cache[] = array('Name' => $tmp[0]);
}
}
mysql_free_result($result);
$sot_ready = true;
}
}
}
}
if (!isset($sot_ready)) {
$result = mysql_query('SHOW TABLE STATUS FROM ' . db_name($db));
if ($result != false && mysql_num_rows($result) > 0) {
while ($sts_tmp = mysql_fetch_array($result)) {
$tbl_cache[] = $sts_tmp;
}
mysql_free_result($result);
}
}
}
// 2. Displays tables
if ($num_tables == 0) {
echo $strNoTablesFound . "\n";
}
// show table size on mysql >= 3.23 - staybyte - 11 June 2001
else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
?>
|
|
|
|
|
&pos=0">
|
|
|
|
&zero_rows=">
|
&zero_rows=">
|
0) {
list($formated_size, $unit) = format_byte_down($tblsize, 3, 1);
} else {
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
}
?>
|
|
|
|
|
|
= 3.23
else {
$i = 0;
echo "\n";
?>