mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
76
html/phpmyad/libraries/engines/bdb.lib.php
Normal file
76
html/phpmyad/libraries/engines/bdb.lib.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_bdb extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* @return array variable names
|
||||
*/
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'version_bdb' => array(
|
||||
'title' => __('Version information'),
|
||||
),
|
||||
'bdb_cache_size' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'bdb_home' => array(
|
||||
),
|
||||
'bdb_log_buffer_size' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'bdb_logdir' => array(
|
||||
),
|
||||
'bdb_max_lock' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'bdb_shared_data' => array(
|
||||
),
|
||||
'bdb_tmpdir' => array(
|
||||
),
|
||||
'bdb_data_direct' => array(
|
||||
),
|
||||
'bdb_lock_detect' => array(
|
||||
),
|
||||
'bdb_log_direct' => array(
|
||||
),
|
||||
'bdb_no_recover' => array(
|
||||
),
|
||||
'bdb_no_sync' => array(
|
||||
),
|
||||
'skip_sync_bdb_logs' => array(
|
||||
),
|
||||
'sync_bdb_logs' => array(
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string LIKE pattern
|
||||
*/
|
||||
function getVariablesLikePattern()
|
||||
{
|
||||
return '%bdb%';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engne
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
function getMysqlHelpPage()
|
||||
{
|
||||
return 'bdb';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
20
html/phpmyad/libraries/engines/berkeleydb.lib.php
Normal file
20
html/phpmyad/libraries/engines/berkeleydb.lib.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load BDB class.
|
||||
*/
|
||||
require_once './libraries/engines/bdb.lib.php';
|
||||
|
||||
/**
|
||||
* This is same as BDB.
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_berkeleydb extends PMA_StorageEngine_bdb
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
25
html/phpmyad/libraries/engines/binlog.lib.php
Normal file
25
html/phpmyad/libraries/engines/binlog.lib.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_binlog extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engne
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
function getMysqlHelpPage()
|
||||
{
|
||||
return 'binary-log';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
20
html/phpmyad/libraries/engines/innobase.lib.php
Normal file
20
html/phpmyad/libraries/engines/innobase.lib.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
require_once './libraries/engines/innodb.lib.php';
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_innobase extends PMA_StorageEngine_innodb
|
||||
{
|
||||
}
|
||||
?>
|
350
html/phpmyad/libraries/engines/innodb.lib.php
Normal file
350
html/phpmyad/libraries/engines/innodb.lib.php
Normal file
@ -0,0 +1,350 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'innodb_data_home_dir' => array(
|
||||
'title' => __('Data home directory'),
|
||||
'desc' => __('The common part of the directory path for all InnoDB data files.'),
|
||||
),
|
||||
'innodb_data_file_path' => array(
|
||||
'title' => __('Data files'),
|
||||
),
|
||||
'innodb_autoextend_increment' => array(
|
||||
'title' => __('Autoextend increment'),
|
||||
'desc' => __('The increment size for extending the size of an autoextending tablespace when it becomes full.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_buffer_pool_size' => array(
|
||||
'title' => __('Buffer pool size'),
|
||||
'desc' => __('The size of the memory buffer InnoDB uses to cache data and indexes of its tables.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'innodb_additional_mem_pool_size' => array(
|
||||
'title' => 'innodb_additional_mem_pool_size',
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'innodb_buffer_pool_awe_mem_mb' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'innodb_checksums' => array(
|
||||
),
|
||||
'innodb_commit_concurrency' => array(
|
||||
),
|
||||
'innodb_concurrency_tickets' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_doublewrite' => array(
|
||||
),
|
||||
'innodb_fast_shutdown' => array(
|
||||
),
|
||||
'innodb_file_io_threads' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_file_per_table' => array(
|
||||
),
|
||||
'innodb_flush_log_at_trx_commit' => array(
|
||||
),
|
||||
'innodb_flush_method' => array(
|
||||
),
|
||||
'innodb_force_recovery' => array(
|
||||
),
|
||||
'innodb_lock_wait_timeout' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_locks_unsafe_for_binlog' => array(
|
||||
),
|
||||
'innodb_log_arch_dir' => array(
|
||||
),
|
||||
'innodb_log_archive' => array(
|
||||
),
|
||||
'innodb_log_buffer_size' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'innodb_log_file_size' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'innodb_log_files_in_group' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_log_group_home_dir' => array(
|
||||
),
|
||||
'innodb_max_dirty_pages_pct' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_max_purge_lag' => array(
|
||||
),
|
||||
'innodb_mirrored_log_groups' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_open_files' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_support_xa' => array(
|
||||
),
|
||||
'innodb_sync_spin_loops' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_table_locks' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_BOOLEAN,
|
||||
),
|
||||
'innodb_thread_concurrency' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'innodb_thread_sleep_delay' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string SQL query LIKE pattern
|
||||
*/
|
||||
function getVariablesLikePattern()
|
||||
{
|
||||
return 'innodb\\_%';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array detail pages
|
||||
*/
|
||||
function getInfoPages()
|
||||
{
|
||||
if ($this->support < PMA_ENGINE_SUPPORT_YES) {
|
||||
return array();
|
||||
}
|
||||
$pages = array();
|
||||
$pages['Bufferpool'] = __('Buffer Pool');
|
||||
$pages['Status'] = __('InnoDB Status');
|
||||
return $pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns html tables with stats over inno db buffer pool
|
||||
*
|
||||
* @return string html table with stats
|
||||
*/
|
||||
function getPageBufferpool()
|
||||
{
|
||||
// The following query is only possible because we know
|
||||
// that we are on MySQL 5 here (checked above)!
|
||||
// side note: I love MySQL 5 for this. :-)
|
||||
$sql = '
|
||||
SHOW STATUS
|
||||
WHERE Variable_name LIKE \'Innodb\\_buffer\\_pool\\_%\'
|
||||
OR Variable_name = \'Innodb_page_size\';';
|
||||
$status = PMA_DBI_fetch_result($sql, 0, 1);
|
||||
|
||||
$output = '<table class="data" id="table_innodb_bufferpool_usage">' . "\n"
|
||||
. ' <caption class="tblHeaders">' . "\n"
|
||||
. ' ' . __('Buffer Pool Usage') . "\n"
|
||||
. ' </caption>' . "\n"
|
||||
. ' <tfoot>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th colspan="2">' . "\n"
|
||||
. ' ' . __('Total') . "\n"
|
||||
. ' : ' . PMA_formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_total'], 0)
|
||||
. ' ' . __('pages')
|
||||
. ' / '
|
||||
. join(' ',
|
||||
PMA_formatByteDown($status['Innodb_buffer_pool_pages_total'] * $status['Innodb_page_size'])) . "\n"
|
||||
. ' </th>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' </tfoot>' . "\n"
|
||||
. ' <tbody>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Free pages') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_pages_free'], 0)
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Dirty pages') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_pages_dirty'], 0)
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Pages containing data') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_pages_data'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Pages to be flushed') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_pages_flushed'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Busy pages') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_pages_misc'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>';
|
||||
|
||||
// not present at least since MySQL 5.1.40
|
||||
if (isset($status['Innodb_buffer_pool_pages_latched'])) {
|
||||
$output .= ' <tr class="even">'
|
||||
. ' <th>' . __('Latched pages') . '</th>'
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_pages_latched'], 0)
|
||||
. '</td>'
|
||||
. ' </tr>';
|
||||
}
|
||||
|
||||
$output .= ' </tbody>' . "\n"
|
||||
. '</table>' . "\n\n"
|
||||
. '<table class="data" id="table_innodb_bufferpool_activity">' . "\n"
|
||||
. ' <caption class="tblHeaders">' . "\n"
|
||||
. ' ' . __('Buffer Pool Activity') . "\n"
|
||||
. ' </caption>' . "\n"
|
||||
. ' <tbody>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read requests') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_read_requests'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write requests') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_write_requests'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read misses') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_reads'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write waits') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. PMA_formatNumber($status['Innodb_buffer_pool_wait_free'], 0) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read misses in %') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. ($status['Innodb_buffer_pool_read_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars(PMA_formatNumber($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 3, 2)) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write waits in %') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. ($status['Innodb_buffer_pool_write_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars(PMA_formatNumber($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 3, 2)) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' </tbody>' . "\n"
|
||||
. '</table>' . "\n";
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns InnoDB status
|
||||
*
|
||||
* @return string result of SHOW INNODB STATUS inside pre tags
|
||||
*/
|
||||
function getPageStatus()
|
||||
{
|
||||
return '<pre id="pre_innodb_status">' . "\n"
|
||||
. htmlspecialchars(PMA_DBI_fetch_value('SHOW INNODB STATUS;', 0, 'Status')) . "\n"
|
||||
. '</pre>' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* returns content for page $id
|
||||
*
|
||||
* @param string $id page id
|
||||
* @return string html output
|
||||
*/
|
||||
function getPage($id)
|
||||
{
|
||||
if (! array_key_exists($id, $this->getInfoPages())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$id = 'getPage' . $id;
|
||||
|
||||
return $this->$id();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engne
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
function getMysqlHelpPage()
|
||||
{
|
||||
return 'innodb';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the InnoDB plugin version number
|
||||
* http://www.innodb.com/products/innodb_plugin
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
*
|
||||
* @return string the version number, or empty if not running as a plugin
|
||||
*/
|
||||
function getInnodbPluginVersion()
|
||||
{
|
||||
return PMA_DBI_fetch_value('SELECT @@innodb_version;');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the InnoDB file format
|
||||
* (works only for the InnoDB plugin)
|
||||
* http://www.innodb.com/products/innodb_plugin
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
*
|
||||
* @return string the InnoDB file format
|
||||
*/
|
||||
function getInnodbFileFormat()
|
||||
{
|
||||
return PMA_DBI_fetch_value("SHOW GLOBAL VARIABLES LIKE 'innodb_file_format';", 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Verifies if this server supports the innodb_file_per_table feature
|
||||
* (works only for the InnoDB plugin)
|
||||
* http://www.innodb.com/products/innodb_plugin
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
*
|
||||
* @return boolean whether this feature is supported or not
|
||||
*/
|
||||
function supportsFilePerTable()
|
||||
{
|
||||
$innodb_file_per_table = PMA_DBI_fetch_value("SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';", 0, 1);
|
||||
if ($innodb_file_per_table == 'ON') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
28
html/phpmyad/libraries/engines/memory.lib.php
Normal file
28
html/phpmyad/libraries/engines/memory.lib.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
* the MEMORY (HEAP) storage engine
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_memory extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* returns array with variable names dedicated to MyISAM storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'max_heap_table_size' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
15
html/phpmyad/libraries/engines/merge.lib.php
Normal file
15
html/phpmyad/libraries/engines/merge.lib.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_merge extends PMA_StorageEngine
|
||||
{
|
||||
}
|
||||
|
||||
?>
|
30
html/phpmyad/libraries/engines/mrg_myisam.lib.php
Normal file
30
html/phpmyad/libraries/engines/mrg_myisam.lib.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
require_once './libraries/engines/merge.lib.php';
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_mrg_myisam extends PMA_StorageEngine_merge
|
||||
{
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engne
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
function getMysqlHelpPage()
|
||||
{
|
||||
return 'merge';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
63
html/phpmyad/libraries/engines/myisam.lib.php
Normal file
63
html/phpmyad/libraries/engines/myisam.lib.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
* the MyISAM storage engine
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_myisam extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* returns array with variable names dedicated to MyISAM storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'myisam_data_pointer_size' => array(
|
||||
'title' => __('Data pointer size'),
|
||||
'desc' => __('The default pointer size in bytes, to be used by CREATE TABLE for MyISAM tables when no MAX_ROWS option is specified.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'myisam_recover_options' => array(
|
||||
'title' => __('Automatic recovery mode'),
|
||||
'desc' => __('The mode for automatic recovery of crashed MyISAM tables, as set via the --myisam-recover server startup option.'),
|
||||
),
|
||||
'myisam_max_sort_file_size' => array(
|
||||
'title' => __('Maximum size for temporary sort files'),
|
||||
'desc' => __('The maximum size of the temporary file MySQL is allowed to use while re-creating a MyISAM index (during REPAIR TABLE, ALTER TABLE, or LOAD DATA INFILE).'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'myisam_max_extra_sort_file_size' => array(
|
||||
'title' => __('Maximum size for temporary files on index creation'),
|
||||
'desc' => __('If the temporary file used for fast MyISAM index creation would be larger than using the key cache by the amount specified here, prefer the key cache method.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'myisam_repair_threads' => array(
|
||||
'title' => __('Repair threads'),
|
||||
'desc' => __('If this value is greater than 1, MyISAM table indexes are created in parallel (each index in its own thread) during the repair by sorting process.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC,
|
||||
),
|
||||
'myisam_sort_buffer_size' => array(
|
||||
'title' => __('Sort buffer size'),
|
||||
'desc' => __('The buffer that is allocated when sorting MyISAM indexes during a REPAIR TABLE or when creating indexes with CREATE INDEX or ALTER TABLE.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'myisam_stats_method' => array(
|
||||
),
|
||||
'delay_key_write' => array(
|
||||
),
|
||||
'bulk_insert_buffer_size' => array(
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
),
|
||||
'skip_external_locking' => array(
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
44
html/phpmyad/libraries/engines/ndbcluster.lib.php
Normal file
44
html/phpmyad/libraries/engines/ndbcluster.lib.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_ndbcluster extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'ndb_connectstring' => array(
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string SQL query LIKE pattern
|
||||
*/
|
||||
function getVariablesLikePattern()
|
||||
{
|
||||
return 'ndb\\_%';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engne
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
function getMysqlHelpPage()
|
||||
{
|
||||
return 'ndbcluster';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
106
html/phpmyad/libraries/engines/pbms.lib.php
Normal file
106
html/phpmyad/libraries/engines/pbms.lib.php
Normal file
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
* the PBMS daemon
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_pbms extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* returns array with variable names dedicated to PBMS daemon
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
function engine_init()
|
||||
{
|
||||
$this->engine = "PBMS";
|
||||
$this->title = "PrimeBase Media Streaming Daemon";
|
||||
$this->comment = "Provides BLOB streaming service for storage engines,";
|
||||
$this->support = PMA_ENGINE_SUPPORT_YES;
|
||||
}
|
||||
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'pbms_garbage_threshold' => array(
|
||||
'title' => __('Garbage Threshold'),
|
||||
'desc' => __('The percentage of garbage in a repository file before it is compacted.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
'pbms_port' => array(
|
||||
'title' => __('Port'),
|
||||
'desc' => __('The port for the PBMS stream-based communications. Setting this value to 0 will disable HTTP communication with the daemon.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
'pbms_repository_threshold' => array(
|
||||
'title' => __('Repository Threshold'),
|
||||
'desc' => __('The maximum size of a BLOB repository file. You may use Kb, MB or GB to indicate the unit of the value. A value in bytes is assumed when no unit is specified.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
'pbms_temp_blob_timeout' => array(
|
||||
'title' => __('Temp Blob Timeout'),
|
||||
'desc' => __('The timeout, in seconds, for temporary BLOBs. Uploaded BLOB data is removed after this time, unless they are referenced by a record in the database.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
'pbms_temp_log_threshold' => array(
|
||||
'title' => __('Temp Log Threshold'),
|
||||
'desc' => __('The maximum size of a temporary BLOB log file. You may use Kb, MB or GB to indicate the unit of the value. A value in bytes is assumed when no unit is specified.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
'pbms_max_keep_alive' => array(
|
||||
'title' => __('Max Keep Alive'),
|
||||
'desc' => __('The timeout for inactive connection with the keep-alive flag set. After this time the connection will be closed. The time-out is in milliseconds (1/1000).'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
'pbms_http_metadata_headers' => array(
|
||||
'title' => __('Metadata Headers'),
|
||||
'desc' => __('A ":" delimited list of metadata headers to be used to initialize the pbms_metadata_header table when a database is created.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
//--------------------
|
||||
function getInfoPages()
|
||||
{
|
||||
$pages = array();
|
||||
$pages['Documentation'] = __('Documentation');
|
||||
return $pages;
|
||||
}
|
||||
|
||||
//--------------------
|
||||
function getPage($id)
|
||||
{
|
||||
if (! array_key_exists($id, $this->getInfoPages())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$id = 'getPage' . $id;
|
||||
|
||||
return $this->$id();
|
||||
}
|
||||
|
||||
function getPageConfigure()
|
||||
{
|
||||
}
|
||||
|
||||
function getPageDocumentation()
|
||||
{
|
||||
$output = '<p>'
|
||||
. sprintf(__('Documentation and further information about PBMS can be found on %sThe PrimeBase Media Streaming home page%s.'), '<a href="' . PMA_linkURL('http://www.blobstreaming.org/') . '" target="_blank">', '</a>')
|
||||
. '</p>' . "\n"
|
||||
. '<h3>' . __('Related Links') . '</h3>' . "\n"
|
||||
. '<ul>' . "\n"
|
||||
. '<li><a href="' . PMA_linkURL('http://bpbdev.blogspot.com/') . '" target="_blank">' . __('The PrimeBase Media Streaming Blog by Barry Leslie') . '</a></li>' . "\n"
|
||||
. '<li><a href="' . PMA_linkURL('http://www.primebase.com/xt') . '" target="_blank">' . __('PrimeBase XT Home Page') . '</a></li>' . "\n"
|
||||
. '</ul>' . "\n";
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
137
html/phpmyad/libraries/engines/pbxt.lib.php
Normal file
137
html/phpmyad/libraries/engines/pbxt.lib.php
Normal file
@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
|
||||
/**
|
||||
* the MyISAM storage engine
|
||||
* @package PhpMyAdmin-Engines
|
||||
*/
|
||||
class PMA_StorageEngine_pbxt extends PMA_StorageEngine
|
||||
{
|
||||
/**
|
||||
* returns array with variable names dedicated to PBXT storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
function getVariables()
|
||||
{
|
||||
return array(
|
||||
'pbxt_index_cache_size' => array(
|
||||
'title' => __('Index cache size'),
|
||||
'desc' => __('This is the amount of memory allocated to the index cache. Default value is 32MB. The memory allocated here is used only for caching index pages.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_record_cache_size' => array(
|
||||
'title' => __('Record cache size'),
|
||||
'desc' => __('This is the amount of memory allocated to the record cache used to cache table data. The default value is 32MB. This memory is used to cache changes to the handle data (.xtd) and row pointer (.xtr) files.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_log_cache_size' => array(
|
||||
'title' => __('Log cache size'),
|
||||
'desc' => __('The amount of memory allocated to the transaction log cache used to cache on transaction log data. The default is 16MB.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_log_file_threshold' => array(
|
||||
'title' => __('Log file threshold'),
|
||||
'desc' => __('The size of a transaction log before rollover, and a new log is created. The default value is 16MB.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_transaction_buffer_size' => array(
|
||||
'title' => __('Transaction buffer size'),
|
||||
'desc' => __('The size of the global transaction log buffer (the engine allocates 2 buffers of this size). The default is 1MB.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_checkpoint_frequency' => array(
|
||||
'title' => __('Checkpoint frequency'),
|
||||
'desc' => __('The amount of data written to the transaction log before a checkpoint is performed. The default value is 24MB.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_data_log_threshold' => array(
|
||||
'title' => __('Data log threshold'),
|
||||
'desc' => __('The maximum size of a data log file. The default value is 64MB. PBXT can create a maximum of 32000 data logs, which are used by all tables. So the value of this variable can be increased to increase the total amount of data that can be stored in the database.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_garbage_threshold' => array(
|
||||
'title' => __('Garbage threshold'),
|
||||
'desc' => __('The percentage of garbage in a data log file before it is compacted. This is a value between 1 and 99. The default is 50.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC
|
||||
),
|
||||
'pbxt_log_buffer_size' => array(
|
||||
'title' => __('Log buffer size'),
|
||||
'desc' => __('The size of the buffer used when writing a data log. The default is 256MB. The engine allocates one buffer per thread, but only if the thread is required to write a data log.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_data_file_grow_size' => array(
|
||||
'title' => __('Data file grow size'),
|
||||
'desc' => __('The grow size of the handle data (.xtd) files.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_row_file_grow_size' => array(
|
||||
'title' => __('Row file grow size'),
|
||||
'desc' => __('The grow size of the row pointer (.xtr) files.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
|
||||
),
|
||||
'pbxt_log_file_count' => array(
|
||||
'title' => __('Log file count'),
|
||||
'desc' => __('This is the number of transaction log files (pbxt/system/xlog*.xt) the system will maintain. If the number of logs exceeds this value then old logs will be deleted, otherwise they are renamed and given the next highest number.'),
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the pbxt engine specific handling for
|
||||
* PMA_ENGINE_DETAILS_TYPE_SIZE variables.
|
||||
*
|
||||
* @param string $formatted_size the size expression (for example 8MB)
|
||||
*
|
||||
* @return string the formatted value and its unit
|
||||
*/
|
||||
function resolveTypeSize($formatted_size)
|
||||
{
|
||||
if (preg_match('/^[0-9]+[a-zA-Z]+$/', $formatted_size)) {
|
||||
$value = PMA_extractValueFromFormattedSize($formatted_size);
|
||||
} else {
|
||||
$value = $formatted_size;
|
||||
}
|
||||
return PMA_formatByteDown($value);
|
||||
}
|
||||
|
||||
//--------------------
|
||||
function getInfoPages()
|
||||
{
|
||||
$pages = array();
|
||||
$pages['Documentation'] = __('Documentation');
|
||||
return $pages;
|
||||
}
|
||||
|
||||
//--------------------
|
||||
function getPage($id)
|
||||
{
|
||||
if (! array_key_exists($id, $this->getInfoPages())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$id = 'getPage' . $id;
|
||||
|
||||
return $this->$id();
|
||||
}
|
||||
|
||||
function getPageDocumentation()
|
||||
{
|
||||
$output = '<p>'
|
||||
. sprintf(__('Documentation and further information about PBXT can be found on the %sPrimeBase XT Home Page%s.'), '<a href="' . PMA_linkURL('http://www.primebase.com/xt/') . '" target="_blank">', '</a>')
|
||||
. '</p>' . "\n"
|
||||
. '<h3>' . __('Related Links') . '</h3>' . "\n"
|
||||
. '<ul>' . "\n"
|
||||
. '<li><a href="' . PMA_linkURL('http://pbxt.blogspot.com/') . '" target="_blank">' . __('The PrimeBase XT Blog by Paul McCullagh') . '</a></li>' . "\n"
|
||||
. '<li><a href="' . PMA_linkURL('http://www.blobstreaming.org/') . '" target="_blank">' . __('The PrimeBase Media Streaming (PBMS) home page') . '</a></li>' . "\n"
|
||||
. '</ul>' . "\n";
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user