Merge branch 'QA_4_3'

This commit is contained in:
Madhura Jayaratne 2014-12-23 16:52:24 +05:30
commit 62b04a7b53
3 changed files with 23 additions and 18 deletions

View File

@ -15,6 +15,7 @@ phpMyAdmin - ChangeLog
- bug #4661 Drag and drop file import always fails
- bug #4651 don't open console with esc
- bug #4664 select min() displays 1 row, but reports the table amount of rows returned
- bug #4666 Undefined indexes in table stucture print view of a view
4.3.3.0 (2014-12-21)
- bug The "Recently used tables" setting should be with Nav panel

View File

@ -52,6 +52,7 @@ function PMA_getHtmlForPrintViewFooter()
/**
* return html for Print View Columns
*
* @param bool $tbl_is_view whether table is a view
* @param array $columns columns list
* @param array $analyzed_sql analyzed sql
* @param bool $have_rel have relation?
@ -63,7 +64,7 @@ function PMA_getHtmlForPrintViewFooter()
* @return string
*/
function PMA_getHtmlForPrintViewColumns(
$columns, $analyzed_sql, $have_rel,
$tbl_is_view, $columns, $analyzed_sql, $have_rel,
$res_rel, $db, $table, $cfgRelation
) {
$html = '';
@ -81,21 +82,24 @@ function PMA_getHtmlForPrintViewColumns(
}
$field_name = htmlspecialchars($row['Field']);
// here, we have a TIMESTAMP that SHOW FULL COLUMNS reports as having the
// NULL attribute, but SHOW CREATE TABLE says the contrary. Believe
// the latter.
/**
* @todo merge this logic with the one in tbl_structure.php
* or move it in a function similar to $GLOBALS['dbi']->getColumnsFull()
* but based on SHOW CREATE TABLE because information_schema
* cannot be trusted in this case (MySQL bug)
*/
$analyzed_for_field = $analyzed_sql[0]['create_table_fields'][$field_name];
if (! empty($analyzed_for_field['type'])
&& $analyzed_for_field['type'] == 'TIMESTAMP'
&& $analyzed_for_field['timestamp_not_null']
) {
$row['Null'] = '';
if (! $tbl_is_view) {
// here, we have a TIMESTAMP that SHOW FULL COLUMNS reports as having
// the NULL attribute, but SHOW CREATE TABLE says the contrary.
// Believe the latter.
/**
* @todo merge this logic with the one in tbl_structure.php
* or move it in a function similar to $GLOBALS['dbi']->getColumnsFull()
* but based on SHOW CREATE TABLE because information_schema
* cannot be trusted in this case (MySQL bug)
*/
$analyzed_for_field
= $analyzed_sql[0]['create_table_fields'][$field_name];
if (! empty($analyzed_for_field['type'])
&& $analyzed_for_field['type'] == 'TIMESTAMP'
&& $analyzed_for_field['timestamp_not_null']
) {
$row['Null'] = '';
}
}
$html .= "\n";
@ -484,7 +488,7 @@ function PMA_getHtmlForTableStructure(
$html .= '</thead>';
$html .= '<tbody>';
$html .= PMA_getHtmlForPrintViewColumns(
$columns, $analyzed_sql, $have_rel,
$tbl_is_view, $columns, $analyzed_sql, $have_rel,
$res_rel, $db, $table, $cfgRelation
);
$html .= '</tbody>';

View File

@ -460,7 +460,7 @@ class PMA_TblPrintViewTest extends PHPUnit_Framework_TestCase
$cfgRelation = array('mimework' => true);
$html = PMA_getHtmlForPrintViewColumns(
$columns, $analyzed_sql, $have_rel,
false, $columns, $analyzed_sql, $have_rel,
$res_rel, $db, $table, $cfgRelation
);