BLOBstreaming support (Google Summer of Code 2008, Raj Kissu Rajandran) -- work in progress

This commit is contained in:
Marc Delisle
2008-08-20 17:04:37 +00:00
parent bcf4eb5498
commit e77938bb20
74 changed files with 2515 additions and 21 deletions

View File

@@ -186,7 +186,27 @@ $hidden_fields = array();
$odd_row = true;
$sum_row_count_pre = '';
// added by rajk - for blobstreaming
$PMA_Config = $_SESSION['PMA_Config'];
if (!empty ($PMA_Config))
$session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); // list of blobstreaming tables
$tableReductionCount = 0; // the amount to reduce the table count by
foreach ($tables as $keyname => $each_table) {
if (isset($session_bs_tables))
{
// compare table name against blobstreaming tables
foreach ($session_bs_tables as $table_key=>$table_val)
// if the table is a blobstreaming table, reduce table count and skip outer foreach loop
if ($table_key == $keyname)
{
$tableReductionCount++;
continue 2;
}
}
// loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid
// statistics whatever is the table type
@@ -422,7 +442,14 @@ if ($is_show_stats) {
<tbody>
<tr><td></td>
<th align="center" nowrap="nowrap">
<?php echo sprintf($strTables, PMA_formatNumber($num_tables, 0)); ?>
<?php
// for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
// (we don't want negative numbers here) - rajk
if ($num_tables == 0)
$tableReductionCount = 0;
echo sprintf($strTables, PMA_formatNumber($num_tables - $tableReductionCount, 0));
?>
</th>
<th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
<?php echo $strSum; ?></th>