3 * Tests for PMA_StorageEngine_innodb
5 * @package PhpMyAdmin-test
7 namespace PhpMyAdmin\Tests\Engines
;
9 use PhpMyAdmin\Engines\Innodb
;
10 use PhpMyAdmin\Tests\PmaTestCase
;
13 * Tests for PhpMyAdmin\Engines\Innodb
15 * @package PhpMyAdmin-test
17 class InnodbTest
extends PmaTestCase
25 * Sets up the fixture, for example, opens a network connection.
26 * This method is called before a test is executed.
31 protected function setUp()
33 $GLOBALS['server'] = 0;
34 $this->object = new Innodb('innodb');
38 * Tears down the fixture, for example, closes a network connection.
39 * This method is called after a test is executed.
44 protected function tearDown()
50 * Test for getVariables
54 public function testGetVariables()
58 'innodb_data_home_dir' => array(
59 'title' => __('Data home directory'),
60 'desc' => __('The common part of the directory path for all InnoDB data files.'),
62 'innodb_data_file_path' => array(
63 'title' => __('Data files'),
65 'innodb_autoextend_increment' => array(
66 'title' => __('Autoextend increment'),
67 'desc' => __('The increment size for extending the size of an autoextending tablespace when it becomes full.'),
70 'innodb_buffer_pool_size' => array(
71 'title' => __('Buffer pool size'),
72 'desc' => __('The size of the memory buffer InnoDB uses to cache data and indexes of its tables.'),
75 'innodb_additional_mem_pool_size' => array(
76 'title' => 'innodb_additional_mem_pool_size',
79 'innodb_buffer_pool_awe_mem_mb' => array(
82 'innodb_checksums' => array(
84 'innodb_commit_concurrency' => array(
86 'innodb_concurrency_tickets' => array(
89 'innodb_doublewrite' => array(
91 'innodb_fast_shutdown' => array(
93 'innodb_file_io_threads' => array(
96 'innodb_file_per_table' => array(
98 'innodb_flush_log_at_trx_commit' => array(
100 'innodb_flush_method' => array(
102 'innodb_force_recovery' => array(
104 'innodb_lock_wait_timeout' => array(
107 'innodb_locks_unsafe_for_binlog' => array(
109 'innodb_log_arch_dir' => array(
111 'innodb_log_archive' => array(
113 'innodb_log_buffer_size' => array(
116 'innodb_log_file_size' => array(
119 'innodb_log_files_in_group' => array(
122 'innodb_log_group_home_dir' => array(
124 'innodb_max_dirty_pages_pct' => array(
127 'innodb_max_purge_lag' => array(
129 'innodb_mirrored_log_groups' => array(
132 'innodb_open_files' => array(
135 'innodb_support_xa' => array(
137 'innodb_sync_spin_loops' => array(
140 'innodb_table_locks' => array(
143 'innodb_thread_concurrency' => array(
146 'innodb_thread_sleep_delay' => array(
150 $this->object->getVariables()
155 * Test for getVariablesLikePattern
159 public function testGetVariablesLikePattern()
163 $this->object->getVariablesLikePattern()
168 * Test for getInfoPages
172 public function testGetInfoPages()
176 $this->object->getInfoPages()
178 $this->object->support
= 2;
181 'Bufferpool' => 'Buffer Pool',
182 'Status' => 'InnoDB Status'
184 $this->object->getInfoPages()
189 * Test for getPageBufferpool
193 public function testGetPageBufferpool()
196 '<table class="data" id="table_innodb_bufferpool_usage">
197 <caption class="tblHeaders">
204 : 4,096 pages / 65,536 KiB
211 <td class="value">0</td>
215 <td class="value">0</td>
218 <th>Pages containing data</th>
223 <th>Pages to be flushed</th>
234 <table class="data" id="table_innodb_bufferpool_activity">
235 <caption class="tblHeaders">
240 <th>Read requests</th>
245 <th>Write requests</th>
260 <th>Read misses in %</th>
261 <td class="value">50 %
265 <th>Write waits in %</th>
266 <td class="value">0 %
272 $this->object->getPageBufferpool()
277 * Test for getPageStatus
281 public function testGetPageStatus()
284 '<pre id="pre_innodb_status">' . "\n" . "\n" . '</pre>' . "\n",
285 $this->object->getPageStatus()
295 public function testGetPage()
299 $this->object->getPage('Status')
301 $this->object->support
= 2;
303 '<pre id="pre_innodb_status">' . "\n" . "\n" . '</pre>' . "\n",
304 $this->object->getPage('Status')
309 * Test for getMysqlHelpPage
313 public function testGetMysqlHelpPage()
316 'innodb-storage-engine',
317 $this->object->getMysqlHelpPage()
323 * Test for getInnodbPluginVersion
327 public function testGetInnodbPluginVersion()
331 $this->object->getInnodbPluginVersion()
337 * Test for supportsFilePerTable
341 public function testSupportsFilePerTable()
344 $this->object->supportsFilePerTable()
350 * Test for getInnodbFileFormat
354 public function testGetInnodbFileFormat()
358 $this->object->getInnodbFileFormat()