3.4.0-rc1
[phpmyadmin/thilanka.git] / libraries / engines / pbxt.lib.php
blob0ebd2ca51a79aec7d18298d429a820a3e8d0c559
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * @package phpMyAdmin-Engines
5 */
7 /**
8 * the MyISAM storage engine
9 * @package phpMyAdmin-Engines
11 class PMA_StorageEngine_pbxt extends PMA_StorageEngine
13 /**
14 * returns array with variable names dedicated to PBXT storage engine
16 * @return array variable names
18 function getVariables()
20 return array(
21 'pbxt_index_cache_size' => array(
22 'title' => __('Index cache size'),
23 '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.'),
24 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
26 'pbxt_record_cache_size' => array(
27 'title' => __('Record cache size'),
28 '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.'),
29 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
31 'pbxt_log_cache_size' => array(
32 'title' => __('Log cache size'),
33 'desc' => __('The amount of memory allocated to the transaction log cache used to cache on transaction log data. The default is 16MB.'),
34 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
36 'pbxt_log_file_threshold' => array(
37 'title' => __('Log file threshold'),
38 'desc' => __('The size of a transaction log before rollover, and a new log is created. The default value is 16MB.'),
39 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
41 'pbxt_transaction_buffer_size' => array(
42 'title' => __('Transaction buffer size'),
43 'desc' => __('The size of the global transaction log buffer (the engine allocates 2 buffers of this size). The default is 1MB.'),
44 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
46 'pbxt_checkpoint_frequency' => array(
47 'title' => __('Checkpoint frequency'),
48 'desc' => __('The amount of data written to the transaction log before a checkpoint is performed. The default value is 24MB.'),
49 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
51 'pbxt_data_log_threshold' => array(
52 'title' => __('Data log threshold'),
53 '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.'),
54 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
56 'pbxt_garbage_threshold' => array(
57 'title' => __('Garbage threshold'),
58 '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.'),
59 'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC
61 'pbxt_log_buffer_size' => array(
62 'title' => __('Log buffer size'),
63 '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.'),
64 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
66 'pbxt_data_file_grow_size' => array(
67 'title' => __('Data file grow size'),
68 'desc' => __('The grow size of the handle data (.xtd) files.'),
69 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
71 'pbxt_row_file_grow_size' => array(
72 'title' => __('Row file grow size'),
73 'desc' => __('The grow size of the row pointer (.xtr) files.'),
74 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE
76 'pbxt_log_file_count' => array(
77 'title' => __('Log file count'),
78 '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.'),
79 'type' => PMA_ENGINE_DETAILS_TYPE_NUMERIC
84 /**
85 * returns the pbxt engine specific handling for
86 * PMA_ENGINE_DETAILS_TYPE_SIZE variables.
88 * @param string $formatted_size the size expression (for example 8MB)
90 * @return string the formatted value and its unit
92 function resolveTypeSize($formatted_size)
94 if (preg_match('/^[0-9]+[a-zA-Z]+$/', $formatted_size)){
95 $value = PMA_extractValueFromFormattedSize($formatted_size);
96 } else {
97 $value = $formatted_size;
99 return PMA_formatByteDown($value);
102 //--------------------
103 function getInfoPages()
105 $pages = array();
106 $pages['Documentation'] = __('Documentation');
107 return $pages;
110 //--------------------
111 function getPage($id)
113 if (! array_key_exists($id, $this->getInfoPages())) {
114 return false;
117 $id = 'getPage' . $id;
119 return $this->$id();
122 function getPageDocumentation()
124 $output = '<p>'
125 . 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>')
126 . '</p>' . "\n"
127 . '<h3>' . __('Related Links') . '</h3>' . "\n"
128 . '<ul>' . "\n"
129 . '<li><a href="' . PMA_linkURL('http://pbxt.blogspot.com/') . '" target="_blank">' . __('The PrimeBase XT Blog by Paul McCullagh') . '</a></li>' . "\n"
130 . '<li><a href="' . PMA_linkURL('http://www.blobstreaming.org/') . '" target="_blank">' . __('The PrimeBase Media Streaming (PBMS) home page') . '</a></li>' . "\n"
131 . '</ul>' . "\n";
133 return $output;