diff --git a/ChangeLog b/ChangeLog index dad74c514..6d14838ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,11 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + [lang] Uzbek update, thanks to Orzu Samarqandiy 3.3.2.0 (not yet released) +- patch #2969449 [core] Name for MERGE engine varies depending on the + MySQL version, thanks to Dieter Adriaenssens - ruleant +- bug #2966078 [browse] Incorrect LIMIT is saved and sticks while browsing +- bug #2967366 [Structure] Some results of Propose table structure are + shown in hex 3.3.1.0 (not yet released) - bug #2941037 [core] Database structure not sorted by table correctly @@ -144,246 +149,6 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA in a BLOB, thanks to Vincent van der Tuin - [privileges] Improve escaping of hostname -3.2.4.0 (2009-12-02) -- bug [engines] Innodb_buffer_pool_pages_latched no longer returned in status -- bug #2890451 [setup] Inconsistent generated "designer_coords" -- bug #2890443 [mysqli] "No index used in query" exception is reported -- bug #2891250 [ob] Garbled data in navi frame (PHP 5.2.11 bug) -- bug #2887357 [core] Slow loading times with large databases (partial fix) -- bug #2893931 [lang] Typo and empty message -+ [lang] Russian update, thanks to Victor Volkov -- bug #2823599 [edit] UUID Primary Key wrongly updated -- bug #2895894 [structure] Empty default value not set properly -- bug #2897536 [parser] Copying table with bit field with default -- bug #2893221 [core] Statement may not be safe to log in statement format - -3.2.3.0 (2009-10-30) -- patch #2856664 [export] Date, time, and datetime column types now export correctly to - OpenOffice Spreadsheet, thanks to Thomas Pulickal - jemajoign -- patch #2859788 [parser] Double-character delimiters (bug #2846239), - thanks to Thomas Pulickal - jemajoign -- bug #2832600 [export] Slow export when having lots of databases -- bug #2537766 [import] Comments are stripped when editing store procedures -- bug #2852370 [operations] Renaming database deletes triggers -- bug #2872247 [interface] Failed opening required 'mysql_charsets.lib.php', thanks to CyberLeo Kitsana - cyberleo -- bug [structure] "In use" table incorrectly reported as "view" -- bug #2879909 [interface] Removed double htmlspecialchars when editing enum column -- bug #2868328 [relations] Adding foreign key when table name contains a dot -- bug #2883381 [doc] Side effects of MemoryLimit setting -- bug #2826128 [display] Inverting sort order when expression contains a function name - -3.2.2.1 (2009-10-12) -- [security] XSS and SQL injection, thanks to Herman van Rink - -3.2.2.0 (2009-09-13) -- bug #2825293 [structure] Default value for a BIT column -- bug [display] Red arrows were reversed in the list of tables -- bug #2813879 [export] Duplicate empty lines when exporting without comments -- bug #2825919 [export] Trigger export with database name -- bug #2823996 [data] Cannot edit row with no PK and a BIT field -- bug [export] Exporting results of a query which contains a LIMIT clause - inside a subquery -- bug #2837722 [export] Run complex SQL then export does not work -- bug #2839548 [export] Triggers order on export -- bug #2826986 [display] Order by BLOB and range display -- bug [display] After clicking on Show Function or Function, the UPDATE query - is not shown after execution -- bug [structure] Missing validation for BINARY and VARBINARY - -3.2.1.0 (2009-08-09) -- bug #2799009 Login with ipv6 IP address breaks redirect -- bug #2796066 [priv] Inconsistent display of databases list -- bug #2802870 [display] Incorrect overhead value for InnoDB -- bug [display] Incorrect display in replication status, - thanks to Tomas Srnka - tomassrnka -- bug #1601625 [display] The Ignore checkbox is not unchecked for ENUM -- bug #2809930 [setup] Notice: Undefined variable: k in setup/index.php -- bug [features] Incorrect report of missing relational features -- [security] XSS: Insufficient output sanitizing (not exploitable without a valid token) - thanks to Sven Vetsch/Disenchant for informing us in a responsible manner -- bug #2634827 [import] Using DELIMITER produces infinite cycle -+ new language files: uzbek_cyrillic and urbek_latin -- bug #2814109 [search] Right frame is blank -- bug #2816840 [priv] Cannot change a user's details -- bug #2816165 [display] Executed query not always displayed -- bug #2819944 [setup] Incorrect mention of designer_coords -- bug #2821757 [insert] "Insert another new row" no longer worked -+ [lang] Norwegian update, thanks to Sven-Erik Andersen -- bug [core] PMA_pow() can support negative exponents in the pow() case -+ [lang] Brazilian Portuguese update, thanks to Fabio Bucior - fabiobucior -- patch #2822384 [docs] Missing auth_type in docs-example, - thanks to Jürgen Wind - windkiel -- patch #2819728 [display] Slider effect jumping to top of page, - thanks to Jan Radem - summsel -- bug [display] Incorrect computation of overhead stats in server view - for tables under the InnoDB engine -+ [lang] Swedish update, thanks to Björn T. Hallberg - -3.2.0.1 (2009-06-30) -- [security] XSS: Insufficient output sanitizing in bookmarks - -3.2.0.0 (2009-06-15) -- [core] better support for vendor customisation (based on what Debian needs) -+ rfe #2127987 warn when session.gc_maxlifetime is less than cookie validity -+ rfe #2100910 configurable default charset for import -+ rfe #1913541 link to InnoDB status when error 150 occurs -+ rfe #1927189 strip ` from column names on import -+ rfe #1821619 LeftFrameDBSeparator can be an array -+ patch #1821619 [privileges] Extra back reference when editing table-specific - privileges, thanks to Herman van Rink - helmo -+ patch #2356575 [display] Sortable database columns, - thanks to Bryce Thornton - brycethornton -- patch #2486825 [lang] Wrong string in setup script hints, - thanks to Isaac Bennetch - ibennetch -- patch #2498350 [cleanup] XHTML cleanup, thanks to Virsacer - virsacer -+ patch #2494192 [display] Possibility of disabling the sliders, - thanks to Virsacer - virsacer -+ patch #2506831 [privileges] Create user for existing database, - thanks to Herman van Rink and Virsacer -+ patch #2505255 [privileges] Cleanup, thanks to Virsacer - virsacer -- bug #2414056 [auth] AllowNoPasswordRoot error message is too vague -- patch #2596230 [XHTML] View table headers/footers completely, - thanks to Virsacer - virsacer -- patch #2602633 [core] support column name having square brackets, - thanks to Herman van Rink - helmo -+ [lang] Lithuanian update, thanks to Rytis Slatkevicius - rytis_s -+ [auth] New setting AllowNoPassword (supercedes AllowNoPasswordRoot) that - applies to all accounts (even the anonymous user) -- patch #2652972 [relation] Missing code with hashing for relationship - editing, thanks to knittl - knittl -+ rfe #2123386 Added option to disable mcrypt warning. -- bug #2648502 Request-URI Too Large error from Location header -+ rfe #1731967 Check for relations support on main page. -+ rfe #2186820 Explanation for using Host table. -+ rfe #1369509 Link to download more themes. -+ rfe #1666487 Add option to generate password on change password page. -+ rfe #1694104 Allow logging of user status with Apache. -- patch #2649087 None default is different than other None in some languages. -+ [lang] Chinese Simplified update, thanks to Shanyan Baishui - rimyxp -- patch #2550286 [display] Sort arrows problem, thanks to Virsacer - virsacer -- [security] warn about existence of config directory on main page -+ patch #2706761 [lang] Polish update, - thanks to Pawel Smolinski - zipoking -+ patch #2715142 [export] (rfe 2416960, escape new line in CSV export) - thanks to Derek Schaefer - drummingds1 -- patch #2727250 Optimizations for PHP loops - thanks to Haeber -- bug #2650776 [import] SQL_MODE not saved during Partial Import -- patch #1863739 [auth] cache control missing (PHP-CGI), thanks to stmfd -- patch #2750541 [parser] Incorrect parsing of constraints in ALTER TABLE, - thanks to Yannick Betemps - arkhee -+ patch #2735162 [status] Server status - replication, - thanks to Tomas Srnka - tomassrnka -+ patch #2745215 [edit] Multi-row change with "]" improved, - thanks to Virsacer - virsacer -+ rfe #2657696 Automatically copy generated password -- bug #2787162 [interface] Table with name 'log_views' is incorrectly displayed as a view -+ patch #2665440 Detect mcrypt initialization failure -+ [lang] Galician update, thanks to Xosé Calvo - xosecalvo -+ [lang] Swedish update, thanks to Björn T. Hallberg -+ [lang] Norwegian update, thanks to Sven-Erik Andersen -+ [lang] Catalan update, thanks to Xavier Navarro -+ [lang] Finnish update, thanks to Jouni Kahkonen -+ [lang] Hungarian update, thanks to Jozsef Tamas Herczeg - dodika - -3.1.6.0 (not released) -- bug #2785912 [doc] no ON UPDATE CURRENT_TIMESTAMP in list of attributes - -3.1.5.0 (2009-05-15) -- patch #2739001 [export] XML does not allow spaces in element names, - thanks to Derek Schaefer - drummingds1 -- bug #2780722 [import] Incorrect maximum file size -- bug #2780356 [calendar] Null checkbox not unchecked when date is chosen -- bug [calendar] js error "window.parent.addEvent is not a function" -- patch #2773818 [export] Invalid "Content-Encoding" header, - thanks to abignale - abignale -- bug #2787162 [interface] Table with name 'log_views' is incorrectly displayed as a view -- bug #2784400 [parser] INVOKER not understood by parser -- [core] Compatibility with PHP 5.3.0RC2 - -3.1.4.0 (2009-04-25) -+ patch #1808339 [doc] Apache SSLOptions and StdEnvVars FAQ, - thanks to JT Justman - jtjustman -- bug #2491017 [operations] ANSI mode not supported (db rename and table move) -- bug #2609346 [operations] Fix copying views. -- rfe #2127983 Readd documentation link, it does not protect against anything. -- bug #1675249 [doc] Apache reverse proxy and cookies FAQ -- bug #2682140 UUID() and CURRENT_USER() should not accept arguments -- patch #2682833 [core] Fatal error: Call to a member function isDisplayed(), - thanks to Christian Rodriguez - judas_iscariote -- patch #2702772 [lang] Duplicate sentence in Polish, - thanks to Pawel Smolinski - zipoking -- patch #2709040 [doc] Wrong link in ChangeLog formatter, - thanks to Petr Vorel - pevik -- patch #2715417 [interface] Fixed truncation of enum/set values containing parenthesis - thanks to Marco Moreno - mmoreno -+ [lang] Spanish update, thanks to Daniel Hinostroza -- bug #2724844 Add Fields: Add index is missing quotes - thanks to Luke Armstrong -- bug #2740550 [interface] Using textarea CharEditing drops default values -- bug #2729191 [config] CheckConfigurationPermissions = false is worthless -- bug #2687046 [export] Structure export: Null always YES -- [doc] typos, thanks to Cédric Corazza - -3.1.3.2 (2009-04-14) -- [security] Insufficient output sanitizing when generating configuration file - -3.1.3.1 (2009-03-24) -- [security] HTTP Response Splitting and file inclusion vulnerabilities -- [security] XSS vulnerability on export page -- [security] Insufficient output sanitizing when generating configuration file - -3.1.3.0 (2009-02-28) -+ [lang] Turkish update, thanks to Burak Yavuz -- patch #2496403 [display] Multi-row change with "]", - thanks to Virsacer - virsacer -- bug #2027720 [parser] Missing space after BINARY used as cast -- patch #2520747 [core] E_DEPRECATED compatibility for PHP 5.3, - thanks to Giovanni Giacobbi - themnemonic -- bug [display] Message "Bookmark created" is not displaying -+ [display] Show AUTO_INCREMENT instead of A_I when in vertical mode -- patch #2538358 [display] Conditions for relational display field, - thanks to Virsacer - virsacer -+ [lang] Mongolian update, thanks to Bayarsaikhan Enkhtaivan - bayaraa -- patch #2553372 [display] DB comment tooltips not shown on navi, - thanks to Erdem - ahard -- patch #2561433 [structure] Display true number of rows in a view - if it contains less than MaxExactCountViews, - thanks to Virsacer - virsacer -+ [lang] Polish update, thanks to Fixer - fixeron -- bug #2568722 [designer] Compound key not shown -- patch #2550323 [XHTML] in server_databases.php, thanks to Virsacer - virsacer -- patch #2358861 [navi] Row count tooltip wrong for information_schema, - thanks to Herman van Rink - helmo -- bug #2565948 [core] Changing the connection collation changed the client - charset. -+ [lang] Romanian update, thanks to Sergiu Bivol - sbivol -- patch #1760205 [data] Insert as new row: BLOB is lost, - thanks to Herman van Rink - helmo -+ [lang] Georgian update, thanks to George Machitidze - -3.1.2.0 (2009-01-19) -- bug #1253252 [display] Can't NULL a column with relation defined -- bug #2009500 [SQL] Small improvements in generated SQL (partial fix) -- bug #1963184 [export] YAML export improvement, - thanks to Bryce Thornton - brycethornton -+ [lang] Dutch update, thanks to Herman van Rink - helmo -- patch #2407785 [cleanup] ereg*() deprecated in PHP 5.3, - thanks to Alex Frase - atfrase -- bug #2417058 [properties] Edit fields: losing auto-increment setting -- patch #2444082 [changelog] changelog.php linkifies one link wrong, - thanks to Robert Xiao - nneonneo -- bug #2363653 [properties] Various problems with table structure -- bug [display] BIT field contents disappear when edited -+ [lang] Czech update, thanks to Ondřej Vadinský. -- bug #2461735 [operations] Table operations adds "row_format" -- bug #2445213 [export] Commas for CSV Excel 2008 for Mac -- bug #2397877 [core] ForceSSL and http auth_type -- bug #2473127 [display] Deleting rows displays tbl structure, not contents -- patch #2478940 [core] PHP 5.2+ warning does not work, - thanks to Jürgen Wind - windkiel -- bug #2416418 [privileges] Escaping special characters - --- Older ChangeLogs can be found on our project website --- http://www.phpmyadmin.net/old-stuff/ChangeLogs/ diff --git a/db_operations.php b/db_operations.php index bcee977b7..c09e2e1f0 100644 --- a/db_operations.php +++ b/db_operations.php @@ -110,7 +110,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { // do not copy the data from a Merge table // note: on the calling FORM, 'data' means 'structure and data' - if ($tables_full[$each_table]['Engine'] == 'MRG_MyISAM') { + if (PMA_Table::isMerge($db, $each_table)) { if ($this_what == 'data') { $this_what = 'structure'; } diff --git a/db_printview.php b/db_printview.php index 277566dde..e7c054702 100644 --- a/db_printview.php +++ b/db_printview.php @@ -117,7 +117,7 @@ else { $sum_entries = $sum_size = 0; $odd_row = true; foreach ($tables as $sts_data) { - if (strtoupper($sts_data['ENGINE']) == 'MRG_MYISAM' + if (PMA_Table::isMerge($db, $sts_data['TABLE_NAME']) || strtoupper($sts_data['ENGINE']) == 'FEDERATED') { $merged_size = true; } else { diff --git a/db_structure.php b/db_structure.php index c0df159ca..1d923300c 100644 --- a/db_structure.php +++ b/db_structure.php @@ -225,7 +225,11 @@ foreach ($tables as $keyname => $each_table) { } //$display_rows = ' - '; break; + // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM + // Both are aliases for MERGE + case 'MRG_MyISAM' : case 'MRG_MYISAM' : + case 'MERGE' : case 'BerkeleyDB' : // Merge or BerkleyDB table: Only row count is accurate. if ($is_show_stats) { @@ -254,7 +258,7 @@ foreach ($tables as $keyname => $each_table) { } } // end switch - if ('MRG_MYISAM' != $each_table['ENGINE']) { + if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) { $sum_entries += $each_table['TABLE_ROWS']; } diff --git a/export.php b/export.php index 1f7b39e71..5399d43bf 100644 --- a/export.php +++ b/export.php @@ -439,7 +439,7 @@ if ($export_type == 'server') { } } // if this is a view or a merge table, don't export data - if (isset($GLOBALS[$what . '_data']) && !($is_view || (strcasecmp(PMA_Table::sGetStatusInfo($current_db, $table, 'Engine'),'MRG_MYISAM') == 0))) { + if (isset($GLOBALS[$what . '_data']) && !($is_view || PMA_Table::isMerge($current_db, $table))) { $local_query = 'SELECT * FROM ' . PMA_backquote($current_db) . '.' . PMA_backquote($table); if (!PMA_exportData($current_db, $table, $crlf, $err_url, $local_query)) { break 3; @@ -488,7 +488,7 @@ if ($export_type == 'server') { } } // if this is a view or a merge table, don't export data - if (isset($GLOBALS[$what . '_data']) && !($is_view || (strcasecmp(PMA_Table::sGetStatusInfo($db, $table, 'Engine'),'MRG_MYISAM') == 0))) { + if (isset($GLOBALS[$what . '_data']) && !($is_view || PMA_Table::isMerge($db, $table))) { $local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table); if (!PMA_exportData($db, $table, $crlf, $err_url, $local_query)) { break 2; @@ -537,8 +537,7 @@ if ($export_type == 'server') { // If this is an export of a single view, we have to export data; // for example, a PDF report // if it is a merge table, no data is exported - $is_merge = ! PMA_Table::isView($db, $table) && (strcasecmp(PMA_Table::sGetStatusInfo($db, $table, 'Engine'),'MRG_MYISAM') == 0); - if (isset($GLOBALS[$what . '_data']) && ! $is_merge) { + if (isset($GLOBALS[$what . '_data']) && ! PMA_Table::isMerge($db, $table)) { if (!empty($sql_query)) { // only preg_replace if needed if (!empty($add_query)) { diff --git a/libraries/Table.class.php b/libraries/Table.class.php index b2b6963ea..25e3709ec 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -238,6 +238,31 @@ class PMA_Table return $type == 'VIEW'; } + /** + * Checks if this is a merge table + * + * If the ENGINE of the table is MERGE or MRG_MYISAM (alias), this is a merge table. + * + * @param string the database name + * @param string the table name + * @return boolean true if it is a merge table + * @access public + */ + public function isMerge($db = null, $table = null) + { + // if called static, with parameters + if (! empty($db) && ! empty($table)) { + $engine = PMA_Table::sGetStatusInfo($db, $table, 'ENGINE', null, true); + } + // if called as an object + // does not work yet, because $this->settings[] is not filled correctly + else if (! empty($this)) { + $engine = $this->get('ENGINE'); + } + + return (! empty($engine) && ((strtoupper($engine) == 'MERGE') || (strtoupper($engine) == 'MRG_MYISAM'))); + } + static public function sGetToolTip($db, $table) { return PMA_Table::sGetStatusInfo($db, $table, 'Comment') @@ -254,9 +279,10 @@ class PMA_Table * @param string $table * @param string $info * @param boolean $force_read + * @param boolean if true, disables error message * @return mixed */ - static public function sGetStatusInfo($db, $table, $info = null, $force_read = false) + static public function sGetStatusInfo($db, $table, $info = null, $force_read = false, $disable_error = false) { if (! isset(PMA_Table::$cache[$db][$table]) || $force_read) { PMA_DBI_get_tables_full($db, $table); @@ -274,7 +300,9 @@ class PMA_Table } if (! isset(PMA_Table::$cache[$db][$table][$info])) { - trigger_error('unknown table status: ' . $info, E_USER_WARNING); + if (! $disable_error) { + trigger_error('unknown table status: ' . $info, E_USER_WARNING); + } return false; } diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index a6809955d..186b0d36f 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -104,10 +104,7 @@ echo PMA_pluginGetJavascript($export_list); //]]> - +
'; diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 16569640e..acc08c806 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1365,12 +1365,13 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $field_flags = PMA_DBI_field_flags($dt_result, $i); if (isset($meta->_type) && $meta->_type === MYSQLI_TYPE_BIT) { $row[$i] = PMA_printable_bit_value($row[$i], $meta->length); - } elseif (stristr($field_flags, 'BINARY') && $meta->type == 'string') { - if ($_SESSION['tmp_user_values']['display_binary'] || (isset($GLOBALS['is_analyse']) && $GLOBALS['is_analyse'])) { + // some results of PROCEDURE ANALYSE() are reported as + // being BINARY but they are quite readable, + // so don't treat them as BINARY + } elseif (stristr($field_flags, 'BINARY') && $meta->type == 'string' && !(isset($GLOBALS['is_analyse']) && $GLOBALS['is_analyse'])) { + if ($_SESSION['tmp_user_values']['display_binary']) { // user asked to see the real contents of BINARY - // fields, or we detected a PROCEDURE ANALYSE in - // the query (results are reported as being - // binary strings) + // fields if ($_SESSION['tmp_user_values']['display_binary_as_hex']) { $row[$i] = bin2hex($row[$i]); } @@ -1656,100 +1657,104 @@ function PMA_displayVerticalTable() */ function PMA_displayTable_checkConfigParams() { - $sql_key = md5($GLOBALS['sql_query']); + $sql_md5 = md5($GLOBALS['sql_query']); - $_SESSION['tmp_user_values']['query'][$sql_key]['sql'] = $GLOBALS['sql_query']; + $_SESSION['tmp_user_values']['query'][$sql_md5]['sql'] = $GLOBALS['sql_query']; if (PMA_isValid($_REQUEST['disp_direction'], array('horizontal', 'vertical', 'horizontalflipped'))) { - $_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction'] = $_REQUEST['disp_direction']; + $_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction'] = $_REQUEST['disp_direction']; unset($_REQUEST['disp_direction']); - } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction'] = $GLOBALS['cfg']['DefaultDisplay']; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction'])) { + $_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction'] = $GLOBALS['cfg']['DefaultDisplay']; } if (PMA_isValid($_REQUEST['repeat_cells'], 'numeric')) { - $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'] = $_REQUEST['repeat_cells']; + $_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells'] = $_REQUEST['repeat_cells']; unset($_REQUEST['repeat_cells']); - } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'] = $GLOBALS['cfg']['RepeatCells']; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells'])) { + $_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells'] = $GLOBALS['cfg']['RepeatCells']; } - if (PMA_isValid($_REQUEST['session_max_rows'], 'numeric') || $_REQUEST['session_max_rows'] == 'all') { - $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'] = $_REQUEST['session_max_rows']; + // as this is a form value, the type is always string so we cannot + // use PMA_isValid($_REQUEST['session_max_rows'], 'integer') + if ((PMA_isValid($_REQUEST['session_max_rows'], 'numeric') + && (int) $_REQUEST['session_max_rows'] == $_REQUEST['session_max_rows']) + || $_REQUEST['session_max_rows'] == 'all') { + $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'] = $_REQUEST['session_max_rows']; unset($_REQUEST['session_max_rows']); - } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'] = $GLOBALS['cfg']['MaxRows']; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'])) { + $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows'] = $GLOBALS['cfg']['MaxRows']; } if (PMA_isValid($_REQUEST['pos'], 'numeric')) { - $_SESSION['tmp_user_values']['query'][$sql_key]['pos'] = $_REQUEST['pos']; + $_SESSION['tmp_user_values']['query'][$sql_md5]['pos'] = $_REQUEST['pos']; unset($_REQUEST['pos']); - } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['pos'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['pos'] = 0; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['pos'])) { + $_SESSION['tmp_user_values']['query'][$sql_md5]['pos'] = 0; } if (PMA_isValid($_REQUEST['display_text'], array('P', 'F'))) { - $_SESSION['tmp_user_values']['query'][$sql_key]['display_text'] = $_REQUEST['display_text']; + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_text'] = $_REQUEST['display_text']; unset($_REQUEST['display_text']); - } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['display_text'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['display_text'] = 'P'; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['display_text'])) { + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_text'] = 'P'; } if (PMA_isValid($_REQUEST['relational_display'], array('K', 'D'))) { - $_SESSION['tmp_user_values']['query'][$sql_key]['relational_display'] = $_REQUEST['relational_display']; + $_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display'] = $_REQUEST['relational_display']; unset($_REQUEST['relational_display']); - } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['relational_display'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['relational_display'] = 'K'; + } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display'])) { + $_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display'] = 'K'; } if (isset($_REQUEST['display_binary'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['display_binary'] = true; + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary'] = true; unset($_REQUEST['display_binary']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['tmp_user_values']['query'][$sql_key]['display_binary']); + unset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary']); } else { // selected by default because some operations like OPTIMIZE TABLE // and all queries involving functions return "binary" contents, // according to low-level field flags - $_SESSION['tmp_user_values']['query'][$sql_key]['display_binary'] = true; + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary'] = true; } if (isset($_REQUEST['display_binary_as_hex'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['display_binary_as_hex'] = true; + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex'] = true; unset($_REQUEST['display_binary_as_hex']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['tmp_user_values']['query'][$sql_key]['display_binary_as_hex']); + unset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex']); } else { // display_binary_as_hex config option if (isset($GLOBALS['cfg']['DisplayBinaryAsHex']) && true === $GLOBALS['cfg']['DisplayBinaryAsHex']) { - $_SESSION['tmp_user_values']['query'][$sql_key]['display_binary_as_hex'] = true; + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex'] = true; } } if (isset($_REQUEST['display_blob'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['display_blob'] = true; + $_SESSION['tmp_user_values']['query'][$sql_md5]['display_blob'] = true; unset($_REQUEST['display_blob']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['tmp_user_values']['query'][$sql_key]['display_blob']); + unset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_blob']); } if (isset($_REQUEST['hide_transformation'])) { - $_SESSION['tmp_user_values']['query'][$sql_key]['hide_transformation'] = true; + $_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation'] = true; unset($_REQUEST['hide_transformation']); } elseif (isset($_REQUEST['display_options_form'])) { // we know that the checkbox was unchecked - unset($_SESSION['tmp_user_values']['query'][$sql_key]['hide_transformation']); + unset($_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation']); } // move current query to the last position, to be removed last // so only least executed query will be removed if maximum remembered queries // limit is reached - $tmp = $_SESSION['tmp_user_values']['query'][$sql_key]; - unset($_SESSION['tmp_user_values']['query'][$sql_key]); - $_SESSION['tmp_user_values']['query'][$sql_key] = $tmp; + $tmp = $_SESSION['tmp_user_values']['query'][$sql_md5]; + unset($_SESSION['tmp_user_values']['query'][$sql_md5]); + $_SESSION['tmp_user_values']['query'][$sql_md5] = $tmp; // do not exceed a maximum number of queries to remember if (count($_SESSION['tmp_user_values']['query']) > 10) { @@ -1758,16 +1763,16 @@ function PMA_displayTable_checkConfigParams() } // populate query configuration - $_SESSION['tmp_user_values']['display_text'] = $_SESSION['tmp_user_values']['query'][$sql_key]['display_text']; - $_SESSION['tmp_user_values']['relational_display'] = $_SESSION['tmp_user_values']['query'][$sql_key]['relational_display']; - $_SESSION['tmp_user_values']['display_binary'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['display_binary']) ? true : false; - $_SESSION['tmp_user_values']['display_binary_as_hex'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['display_binary_as_hex']) ? true : false; - $_SESSION['tmp_user_values']['display_blob'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['display_blob']) ? true : false; - $_SESSION['tmp_user_values']['hide_transformation'] = isset($_SESSION['tmp_user_values']['query'][$sql_key]['hide_transformation']) ? true : false; - $_SESSION['tmp_user_values']['pos'] = $_SESSION['tmp_user_values']['query'][$sql_key]['pos']; - $_SESSION['tmp_user_values']['max_rows'] = $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows']; - $_SESSION['tmp_user_values']['repeat_cells'] = $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells']; - $_SESSION['tmp_user_values']['disp_direction'] = $_SESSION['tmp_user_values']['query'][$sql_key]['disp_direction']; + $_SESSION['tmp_user_values']['display_text'] = $_SESSION['tmp_user_values']['query'][$sql_md5]['display_text']; + $_SESSION['tmp_user_values']['relational_display'] = $_SESSION['tmp_user_values']['query'][$sql_md5]['relational_display']; + $_SESSION['tmp_user_values']['display_binary'] = isset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary']) ? true : false; + $_SESSION['tmp_user_values']['display_binary_as_hex'] = isset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_binary_as_hex']) ? true : false; + $_SESSION['tmp_user_values']['display_blob'] = isset($_SESSION['tmp_user_values']['query'][$sql_md5]['display_blob']) ? true : false; + $_SESSION['tmp_user_values']['hide_transformation'] = isset($_SESSION['tmp_user_values']['query'][$sql_md5]['hide_transformation']) ? true : false; + $_SESSION['tmp_user_values']['pos'] = $_SESSION['tmp_user_values']['query'][$sql_md5]['pos']; + $_SESSION['tmp_user_values']['max_rows'] = $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows']; + $_SESSION['tmp_user_values']['repeat_cells'] = $_SESSION['tmp_user_values']['query'][$sql_md5]['repeat_cells']; + $_SESSION['tmp_user_values']['disp_direction'] = $_SESSION['tmp_user_values']['query'][$sql_md5]['disp_direction']; /* * debugging diff --git a/po/fr.po b/po/fr.po index c0d5d766a..1646574a0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.4.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2010-03-12 09:48+0100\n" -"PO-Revision-Date: 2010-03-12 11:16+0200\n" -"Last-Translator: Michal \n" +"PO-Revision-Date: 2010-03-12 17:49+0200\n" +"Last-Translator: \n" "Language-Team: french \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -460,10 +460,9 @@ msgstr "" "base %s?" #: libraries/messages.inc.php:96 -#, fuzzy msgctxt "$strBLOBRepositoryDisabled" msgid "Disabled" -msgstr "désactivé" +msgstr "Désactivé" #: libraries/messages.inc.php:97 msgid "Disable" @@ -474,10 +473,9 @@ msgid "You are about to DISABLE a BLOB Repository!" msgstr "Vous allez DÉSACTIVER un dépôt BLOB!" #: libraries/messages.inc.php:99 -#, fuzzy msgctxt "$strBLOBRepositoryEnabled" msgid "Enabled" -msgstr "activé" +msgstr "Activé" #: libraries/messages.inc.php:100 msgid "Enable" @@ -488,7 +486,6 @@ msgid "Remove BLOB Repository Reference" msgstr "Supprimer les références au dépôt BLOB" #: libraries/messages.inc.php:102 -#, fuzzy msgctxt "$strBLOBRepositoryRepair" msgid "Repair" msgstr "Réparer" @@ -978,7 +975,6 @@ msgid "Croatian" msgstr "croate" #: libraries/messages.inc.php:209 -#, fuzzy msgid "CSV" msgstr "CSV" @@ -1034,7 +1030,6 @@ msgid "'%s' database does not exist." msgstr "La base de données '%s' n'existe pas." #: libraries/messages.inc.php:223 libraries/messages.inc.php:984 -#, fuzzy msgid "Databases" msgstr "Bases de données" diff --git a/po/ro.po b/po/ro.po index 570d425c0..ee9b46874 100644 --- a/po/ro.po +++ b/po/ro.po @@ -4,13 +4,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.4.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2010-03-12 09:48+0100\n" -"PO-Revision-Date: 2010-03-12 09:17+0100\n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2010-03-13 00:41+0200\n" +"Last-Translator: \n" "Language-Team: romanian \n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Translate Toolkit 1.5.3\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2);;\n" +"X-Generator: Pootle 2.0.1\n" #: libraries/auth/config.auth.lib.php:107 #, php-format @@ -30,8 +33,9 @@ msgid "" "the administrator of the MySQL server." msgstr "" "phpMyAdmin a încercat să se conecteze la serverul MySQL, dar acesta a " -"respins conexiunea. Ar trebui verificat dacă datele din config.inc.php sînt " -"corecte." +"respins conexiunea. Verificați numele hostului, utilizatorul și parola în " +"fișierul de configurare și asigurați-vă că ele corespund informațiilor " +"furnizate de administratorul serverului MySQL." #. l10n: Language to use for MySQL 5.1 documentation #: libraries/common.lib.php:411 @@ -91,31 +95,31 @@ msgstr "EiO" #: libraries/messages.inc.php:23 msgid "Sun" -msgstr "Lun" +msgstr "Dum" #: libraries/messages.inc.php:23 msgid "Mon" -msgstr "Mar" +msgstr "Lun" #: libraries/messages.inc.php:23 msgid "Tue" -msgstr "Mie" +msgstr "Mar" #: libraries/messages.inc.php:23 msgid "Wed" -msgstr "Joi" +msgstr "Mie" #: libraries/messages.inc.php:23 msgid "Thu" -msgstr "Vin" +msgstr "Joi" #: libraries/messages.inc.php:23 msgid "Fri" -msgstr "Sîm" +msgstr "Vin" #: libraries/messages.inc.php:23 msgid "Sat" -msgstr "Dum" +msgstr "Sâm" #: libraries/messages.inc.php:24 msgid "Jan" @@ -345,7 +349,7 @@ msgstr "Oricare utilizator" #: libraries/messages.inc.php:68 msgid "Apply Selected Changes" -msgstr "" +msgstr "Faceți modificările selectate" #: libraries/messages.inc.php:69 msgid "" diff --git a/tbl_printview.php b/tbl_printview.php index c43efd93e..3cd28686c 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -278,10 +278,9 @@ foreach ($the_tables as $key => $table) { } if ($nonisam == false) { // Gets some sizes - $mergetable = false; - if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { - $mergetable = true; - } + + $mergetable = PMA_Table::isMerge($db, $table); + list($data_size, $data_unit) = PMA_formatByteDown($showtable['Data_length']); if ($mergetable == false) { list($index_size, $index_unit) = PMA_formatByteDown($showtable['Index_length']); diff --git a/tbl_structure.php b/tbl_structure.php index 4be5767c8..51b001e5e 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -625,10 +625,9 @@ if ($cfg['ShowStats']) { } // Gets some sizes - $mergetable = false; - if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { - $mergetable = true; - } + + $mergetable = PMA_Table::isMerge($GLOBALS['db'], $GLOBALS['table']); + // this is to display for example 261.2 MiB instead of 268k KiB $max_digits = 5; $decimals = 1;