Update website
This commit is contained in:
parent
a0b0d3dae7
commit
ae7ef6ad45
3151 changed files with 566766 additions and 48 deletions
66
admin/phpMyAdmin/libraries/classes/Engines/Bdb.php
Normal file
66
admin/phpMyAdmin/libraries/classes/Engines/Bdb.php
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/**
|
||||
* The BDB storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The BDB storage engine
|
||||
*/
|
||||
class Bdb extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns array with variable names related to this storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
public function getVariables()
|
||||
{
|
||||
return [
|
||||
'version_bdb' => [
|
||||
'title' => __('Version information'),
|
||||
],
|
||||
'bdb_cache_size' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
'bdb_home' => [],
|
||||
'bdb_log_buffer_size' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
'bdb_logdir' => [],
|
||||
'bdb_max_lock' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'bdb_shared_data' => [],
|
||||
'bdb_tmpdir' => [],
|
||||
'bdb_data_direct' => [],
|
||||
'bdb_lock_detect' => [],
|
||||
'bdb_log_direct' => [],
|
||||
'bdb_no_recover' => [],
|
||||
'bdb_no_sync' => [],
|
||||
'skip_sync_bdb_logs' => [],
|
||||
'sync_bdb_logs' => [],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pattern to be used in the query for SQL variables
|
||||
* related to this storage engine
|
||||
*
|
||||
* @return string LIKE pattern
|
||||
*/
|
||||
public function getVariablesLikePattern()
|
||||
{
|
||||
return '%bdb%';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engine
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
public function getMysqlHelpPage()
|
||||
{
|
||||
return 'bdb';
|
||||
}
|
||||
}
|
15
admin/phpMyAdmin/libraries/classes/Engines/Berkeleydb.php
Normal file
15
admin/phpMyAdmin/libraries/classes/Engines/Berkeleydb.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* The BerkeleyDB storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
/**
|
||||
* This is same as BDB
|
||||
*/
|
||||
class Berkeleydb extends Bdb
|
||||
{
|
||||
}
|
27
admin/phpMyAdmin/libraries/classes/Engines/Binlog.php
Normal file
27
admin/phpMyAdmin/libraries/classes/Engines/Binlog.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* The binary log storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The binary log storage engine
|
||||
*/
|
||||
class Binlog extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns string with filename for the MySQL helppage
|
||||
* about this storage engine
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
public function getMysqlHelpPage()
|
||||
{
|
||||
return 'binary-log';
|
||||
}
|
||||
}
|
15
admin/phpMyAdmin/libraries/classes/Engines/Innobase.php
Normal file
15
admin/phpMyAdmin/libraries/classes/Engines/Innobase.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* The Innobase storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
/**
|
||||
* The Innobase storage engine
|
||||
*/
|
||||
class Innobase extends Innodb
|
||||
{
|
||||
}
|
372
admin/phpMyAdmin/libraries/classes/Engines/Innodb.php
Normal file
372
admin/phpMyAdmin/libraries/classes/Engines/Innodb.php
Normal file
|
@ -0,0 +1,372 @@
|
|||
<?php
|
||||
/**
|
||||
* The InnoDB storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
use PhpMyAdmin\Util;
|
||||
use function htmlspecialchars;
|
||||
use function implode;
|
||||
|
||||
/**
|
||||
* The InnoDB storage engine
|
||||
*/
|
||||
class Innodb extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns array with variable names related to InnoDB storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
public function getVariables()
|
||||
{
|
||||
return [
|
||||
'innodb_data_home_dir' => [
|
||||
'title' => __('Data home directory'),
|
||||
'desc' => __(
|
||||
'The common part of the directory path for all InnoDB data '
|
||||
. 'files.'
|
||||
),
|
||||
],
|
||||
'innodb_data_file_path' => [
|
||||
'title' => __('Data files'),
|
||||
],
|
||||
'innodb_autoextend_increment' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'title' => 'innodb_additional_mem_pool_size',
|
||||
'type' => PMA_ENGINE_DETAILS_TYPE_SIZE,
|
||||
],
|
||||
'innodb_buffer_pool_awe_mem_mb' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
'innodb_checksums' => [],
|
||||
'innodb_commit_concurrency' => [],
|
||||
'innodb_concurrency_tickets' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_doublewrite' => [],
|
||||
'innodb_fast_shutdown' => [],
|
||||
'innodb_file_io_threads' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_file_per_table' => [],
|
||||
'innodb_flush_log_at_trx_commit' => [],
|
||||
'innodb_flush_method' => [],
|
||||
'innodb_force_recovery' => [],
|
||||
'innodb_lock_wait_timeout' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_locks_unsafe_for_binlog' => [],
|
||||
'innodb_log_arch_dir' => [],
|
||||
'innodb_log_archive' => [],
|
||||
'innodb_log_buffer_size' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
'innodb_log_file_size' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
'innodb_log_files_in_group' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_log_group_home_dir' => [],
|
||||
'innodb_max_dirty_pages_pct' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_max_purge_lag' => [],
|
||||
'innodb_mirrored_log_groups' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_open_files' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_support_xa' => [],
|
||||
'innodb_sync_spin_loops' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_table_locks' => ['type' => PMA_ENGINE_DETAILS_TYPE_BOOLEAN],
|
||||
'innodb_thread_concurrency' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
'innodb_thread_sleep_delay' => ['type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pattern to be used in the query for SQL variables
|
||||
* related to InnoDb storage engine
|
||||
*
|
||||
* @return string SQL query LIKE pattern
|
||||
*/
|
||||
public function getVariablesLikePattern()
|
||||
{
|
||||
return 'innodb\\_%';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information pages
|
||||
*
|
||||
* @return array detail pages
|
||||
*/
|
||||
public function getInfoPages()
|
||||
{
|
||||
if ($this->support < PMA_ENGINE_SUPPORT_YES) {
|
||||
return [];
|
||||
}
|
||||
$pages = [];
|
||||
$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
|
||||
*/
|
||||
public function getPageBufferpool()
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
// 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 = $dbi->fetchResult($sql, 0, 1);
|
||||
|
||||
$output = '<table class="table table-light table-striped table-hover w-auto float-left">' . "\n"
|
||||
. ' <caption>' . "\n"
|
||||
. ' ' . __('Buffer Pool Usage') . "\n"
|
||||
. ' </caption>' . "\n"
|
||||
. ' <tfoot class="thead-light">' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th colspan="2">' . "\n"
|
||||
. ' ' . __('Total:') . ' '
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_total'],
|
||||
0
|
||||
)
|
||||
. ' ' . __('pages')
|
||||
. ' / '
|
||||
. implode(
|
||||
' ',
|
||||
Util::formatByteDown(
|
||||
$status['Innodb_buffer_pool_pages_total']
|
||||
* $status['Innodb_page_size']
|
||||
)
|
||||
) . "\n"
|
||||
. ' </th>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' </tfoot>' . "\n"
|
||||
. ' <tbody>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Free pages') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_free'],
|
||||
0
|
||||
)
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Dirty pages') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_dirty'],
|
||||
0
|
||||
)
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Pages containing data') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_data'],
|
||||
0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Pages to be flushed') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_flushed'],
|
||||
0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Busy pages') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::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>'
|
||||
. ' <th scope="row">' . __('Latched pages') . '</th>'
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_latched'],
|
||||
0
|
||||
)
|
||||
. '</td>'
|
||||
. ' </tr>';
|
||||
}
|
||||
|
||||
$output .= ' </tbody>' . "\n"
|
||||
. '</table>' . "\n\n"
|
||||
. '<table class="table table-light table-striped table-hover w-auto ml-4 float-left">' . "\n"
|
||||
. ' <caption>' . "\n"
|
||||
. ' ' . __('Buffer Pool Activity') . "\n"
|
||||
. ' </caption>' . "\n"
|
||||
. ' <tbody>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Read requests') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_read_requests'],
|
||||
0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Write requests') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_write_requests'],
|
||||
0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Read misses') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_reads'],
|
||||
0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Write waits') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_wait_free'],
|
||||
0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Read misses in %') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. ($status['Innodb_buffer_pool_read_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars(
|
||||
Util::formatNumber(
|
||||
$status['Innodb_buffer_pool_reads'] * 100
|
||||
/ $status['Innodb_buffer_pool_read_requests'],
|
||||
3,
|
||||
2
|
||||
)
|
||||
) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
. ' <th scope="row">' . __('Write waits in %') . '</th>' . "\n"
|
||||
. ' <td class="text-monospace text-right">'
|
||||
. ($status['Innodb_buffer_pool_write_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars(
|
||||
Util::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 ENGINE INNODB STATUS inside pre tags
|
||||
*/
|
||||
public function getPageStatus()
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
return '<pre id="pre_innodb_status">' . "\n"
|
||||
. htmlspecialchars((string) $dbi->fetchValue(
|
||||
'SHOW ENGINE INNODB STATUS;',
|
||||
0,
|
||||
'Status'
|
||||
)) . "\n" . '</pre>' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engine
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
public function getMysqlHelpPage()
|
||||
{
|
||||
return 'innodb-storage-engine';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the InnoDB plugin version number
|
||||
*
|
||||
* @return string the version number, or empty if not running as a plugin
|
||||
*/
|
||||
public function getInnodbPluginVersion()
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
return $dbi->fetchValue('SELECT @@innodb_version;');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the InnoDB file format
|
||||
*
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
*
|
||||
* @return string the InnoDB file format
|
||||
*/
|
||||
public function getInnodbFileFormat()
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
return $dbi->fetchValue(
|
||||
"SHOW GLOBAL VARIABLES LIKE 'innodb_file_format';",
|
||||
0,
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies if this server supports the innodb_file_per_table feature
|
||||
*
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
*
|
||||
* @return bool whether this feature is supported or not
|
||||
*/
|
||||
public function supportsFilePerTable()
|
||||
{
|
||||
global $dbi;
|
||||
|
||||
return $dbi->fetchValue(
|
||||
"SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';",
|
||||
0,
|
||||
1
|
||||
) === 'ON';
|
||||
}
|
||||
}
|
28
admin/phpMyAdmin/libraries/classes/Engines/Memory.php
Normal file
28
admin/phpMyAdmin/libraries/classes/Engines/Memory.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* The MEMORY (HEAP) storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The MEMORY (HEAP) storage engine
|
||||
*/
|
||||
class Memory extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns array with variable names dedicated to MEMORY storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
public function getVariables()
|
||||
{
|
||||
return [
|
||||
'max_heap_table_size' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
];
|
||||
}
|
||||
}
|
17
admin/phpMyAdmin/libraries/classes/Engines/Merge.php
Normal file
17
admin/phpMyAdmin/libraries/classes/Engines/Merge.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* The MERGE storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The MERGE storage engine
|
||||
*/
|
||||
class Merge extends StorageEngine
|
||||
{
|
||||
}
|
25
admin/phpMyAdmin/libraries/classes/Engines/MrgMyisam.php
Normal file
25
admin/phpMyAdmin/libraries/classes/Engines/MrgMyisam.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/**
|
||||
* The MERGE storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
/**
|
||||
* The MERGE storage engine
|
||||
*/
|
||||
class MrgMyisam extends Merge
|
||||
{
|
||||
/**
|
||||
* returns string with filename for the MySQL helppage
|
||||
* about this storage engine
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
public function getMysqlHelpPage()
|
||||
{
|
||||
return 'merge-storage-engine';
|
||||
}
|
||||
}
|
82
admin/phpMyAdmin/libraries/classes/Engines/Myisam.php
Normal file
82
admin/phpMyAdmin/libraries/classes/Engines/Myisam.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* The MyISAM storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The MyISAM storage engine
|
||||
*/
|
||||
class Myisam extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns array with variable names dedicated to MyISAM storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
public function getVariables()
|
||||
{
|
||||
return [
|
||||
'myisam_data_pointer_size' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [],
|
||||
'delay_key_write' => [],
|
||||
'bulk_insert_buffer_size' => ['type' => PMA_ENGINE_DETAILS_TYPE_SIZE],
|
||||
'skip_external_locking' => [],
|
||||
];
|
||||
}
|
||||
}
|
50
admin/phpMyAdmin/libraries/classes/Engines/Ndbcluster.php
Normal file
50
admin/phpMyAdmin/libraries/classes/Engines/Ndbcluster.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* The NDBCLUSTER storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The NDBCLUSTER storage engine
|
||||
*/
|
||||
class Ndbcluster extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns array with variable names related to NDBCLUSTER storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
public function getVariables()
|
||||
{
|
||||
return [
|
||||
'ndb_connectstring' => [],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pattern to be used in the query for SQL variables
|
||||
* related to NDBCLUSTER storage engine
|
||||
*
|
||||
* @return string SQL query LIKE pattern
|
||||
*/
|
||||
public function getVariablesLikePattern()
|
||||
{
|
||||
return 'ndb\\_%';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string with filename for the MySQL help page
|
||||
* about this storage engine
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
public function getMysqlHelpPage()
|
||||
{
|
||||
return 'ndbcluster';
|
||||
}
|
||||
}
|
194
admin/phpMyAdmin/libraries/classes/Engines/Pbxt.php
Normal file
194
admin/phpMyAdmin/libraries/classes/Engines/Pbxt.php
Normal file
|
@ -0,0 +1,194 @@
|
|||
<?php
|
||||
/**
|
||||
* The PBXT storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
use PhpMyAdmin\Util;
|
||||
use function is_string;
|
||||
use function preg_match;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* The PBXT storage engine
|
||||
*/
|
||||
class Pbxt extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns array with variable names dedicated to PBXT storage engine
|
||||
*
|
||||
* @return array variable names
|
||||
*/
|
||||
public function getVariables()
|
||||
{
|
||||
return [
|
||||
'pbxt_index_cache_size' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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' => [
|
||||
'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 int|string $formatted_size the size expression (for example 8MB)
|
||||
*
|
||||
* @return array the formatted value and its unit
|
||||
*/
|
||||
public function resolveTypeSize($formatted_size)
|
||||
{
|
||||
if (is_string($formatted_size) && preg_match('/^[0-9]+[a-zA-Z]+$/', $formatted_size)) {
|
||||
$value = Util::extractValueFromFormattedSize(
|
||||
$formatted_size
|
||||
);
|
||||
} else {
|
||||
$value = $formatted_size;
|
||||
}
|
||||
|
||||
return Util::formatByteDown($value);
|
||||
}
|
||||
|
||||
//--------------------
|
||||
|
||||
/**
|
||||
* Get information about pages
|
||||
*
|
||||
* @return array Information about pages
|
||||
*/
|
||||
public function getInfoPages()
|
||||
{
|
||||
$pages = [];
|
||||
$pages['Documentation'] = __('Documentation');
|
||||
|
||||
return $pages;
|
||||
}
|
||||
|
||||
//--------------------
|
||||
|
||||
/**
|
||||
* Get content of documentation page
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPageDocumentation()
|
||||
{
|
||||
return '<p>' . sprintf(
|
||||
__(
|
||||
'Documentation and further information about PBXT'
|
||||
. ' can be found on the %sPrimeBase XT Home Page%s.'
|
||||
),
|
||||
'<a href="' . Core::linkURL('https://mariadb.com/kb/en/mariadb/about-pbxt/')
|
||||
. '" rel="noopener noreferrer" target="_blank">',
|
||||
'</a>'
|
||||
)
|
||||
. '</p>' . "\n";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* The performance schema storage engine
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Engines;
|
||||
|
||||
use PhpMyAdmin\StorageEngine;
|
||||
|
||||
/**
|
||||
* The performance schema storage engine
|
||||
*/
|
||||
class PerformanceSchema extends StorageEngine
|
||||
{
|
||||
/**
|
||||
* Returns string with filename for the MySQL helppage
|
||||
* about this storage engine
|
||||
*
|
||||
* @return string mysql helppage filename
|
||||
*/
|
||||
public function getMysqlHelpPage()
|
||||
{
|
||||
return 'performance-schema';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue