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); //]]> - +