From f3dc6788a6a845bbbfde5ca492897c68869eda1c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 29 Jul 2002 16:11:30 +0000 Subject: [PATCH] for Loic --- ChangeLog | 9 +++++++++ Documentation.html | 8 ++++---- libraries/relation.lib.php3 | 26 ++++++++++++++++---------- libraries/sqlparser.lib.php3 | 30 +++++++++++++++--------------- tbl_change.php3 | 2 +- 5 files changed, 45 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce60216ad..bc9cb0da5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,15 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-07-29 Loïc Chapeaux + * tbl_change.php3, line 203: fixed an xhtml bug (#587974) thanks to + Christophe Jaillet + * libraries/sqlparser.lib.php3: fixed parse errors (bug #588010) + thanks to Nagi Peters and + coding standards. + * Documentation.html: coding standards. + * libraries/relation.lib.php3: beautified generated page. + 2002-07-28 Marc Delisle * lang/romanian update, thanks to Valics Lehel * lang/polish update, thanks to Jakub Wilk diff --git a/Documentation.html b/Documentation.html index c09eadc98..f5feaae06 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1681,8 +1681,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

- [3.2] When dumping a large table in compressed mode, I get a memory limit - error or a time limit error. + [3.2] When dumping a large table in compressed mode, I get a memory + limit error or a time limit error.
As of version 2.2.4, we build the compressed dump in memory, so large tables dumps may hang. The only alternative we can think about (using @@ -1692,10 +1692,10 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

- [3.3] With InnoDB tables, I lose foreign key relationships when I rename + [3.3] With InnoDB tables, I lose foreign key relationships when I rename or alter a table.
- This seems to be a InnoDB bug (fixed in MySQL 3.23.50?). However, keep + This seems to be a InnoDB bug (fixed in MySQL 3.23.50?). However, keep in mind that phpMyAdmin as of version 2.3.0 does not support InnoDB.

diff --git a/libraries/relation.lib.php3 b/libraries/relation.lib.php3 index f8251f761..672fbe839 100644 --- a/libraries/relation.lib.php3 +++ b/libraries/relation.lib.php3 @@ -149,36 +149,42 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){ $disabled = '' . $GLOBALS['strDisabled'] . ''; echo '' . "\n"; - echo '' . "\n"; - echo '' . "\n"; + + echo ' ' . "\n"; - echo '' . "\n"; + echo ' ' . "\n"; - echo '' . "\n"; - echo '' . "\n"; + echo ' ' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo '' . "\n"; + + echo ' ' . "\n"; - echo '' . "\n"; echo '
PMA Database ... ' + echo '
PMA Database ... ' . (($cfg['Server']['pmadb'] == FALSE) ? sprintf($shit, 'pmadb') : $hit) . '
relation Table ... ' + echo '
 
relation Table ... ' . ((isset($cfgRelation['relation'])) ? $hit : sprintf($shit, 'relation')) . '
'. $GLOBALS['strGeneralRelationFeat'] . ': ' + echo '
'. $GLOBALS['strGeneralRelationFeat'] . ': ' . (($cfgRelation['relwork'] == TRUE) ? $enabled : $disabled) . '
 
table_info ... ' + echo '
table_info ... ' . (($cfgRelation['displaywork'] == FALSE) ? sprintf($shit, 'table_info') : $hit) . '
' . $GLOBALS['strDisplayFeat'] . ': ' + echo '
' . $GLOBALS['strDisplayFeat'] . ': ' . (($cfgRelation['displaywork'] == TRUE) ? $enabled : $disabled) . '
 
table_coords ... ' + echo '
table_coords ... ' . ((isset($cfgRelation['table_coords'])) ? $hit : sprintf($shit, 'table_coords')) . '
pdf_pages ... ' + echo '
pdf_pages ... ' . ((isset($cfgRelation['pdf_pages'])) ? $hit : sprintf($shit, 'table_coords')) . '
' . $GLOBALS['strCreatePdfFeat'] . ': ' + echo '
' . $GLOBALS['strCreatePdfFeat'] . ': ' . (($cfgRelation['pdfwork'] == TRUE) ? $enabled : $disabled) . '
column_comments ... ' + echo '
 
column_comments ... ' . ((isset($cfgRelation['column_comments'])) ? $hit : sprintf($shit, 'col_com')) . '
' . $GLOBALS['strColComFeat'] . ': ' + echo '
' . $GLOBALS['strColComFeat'] . ': ' . (($cfgRelation['commwork'] == TRUE) ? $enabled : $disabled) . '
' . "\n"; diff --git a/libraries/sqlparser.lib.php3 b/libraries/sqlparser.lib.php3 index eb92f6833..7b0c2be57 100644 --- a/libraries/sqlparser.lib.php3 +++ b/libraries/sqlparser.lib.php3 @@ -178,12 +178,12 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { break; } - // Check for MySQL escaping using a \ - // And check for ANSI escaping using the $quotetype character - if (PMA_STR_charIsEscaped($sql, $pos) ) { + // Checks for MySQL escaping using a \ + // And checks for ANSI escaping using the $quotetype character + if (PMA_STR_charIsEscaped($sql, $pos)) { $pos ++; continue; - } else if (($sql[$pos] == $quotetype) && ($sql[$pos+1] == $quotetype)) { + } else if (($sql[$pos] == $quotetype) && ($sql[$pos + 1] == $quotetype)) { $pos = $pos + 2; continue; } else { @@ -391,7 +391,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { echo '---END CUT---

' . "\n\n"; echo '

' . "\n"; flush(); - if (PMA_PHP_INT_VERSION >= 42000 && @function_exists('ob_flush')) { + if (PMA_PHP_INT_VERSION >= 42000 && @function_exists('ob_flush')) { ob_flush(); } die(); @@ -557,7 +557,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { 'USING' ); $keywords_with_brackets_1before_cnt = 3; - + $keywords_with_brackets_2before = array( 'IGNORE', 'INDEX', @@ -567,7 +567,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { 'PROCEDURE', 'REFERENCES', 'UNIQUE', - 'USE', + 'USE' ); // $keywords_with_brackets_2before_cnt = count($keywords_with_brackets_2before); $keywords_with_brackets_2before_cnt = 9; @@ -629,9 +629,9 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { // Make sure this array is sorted! if (($typearr[1] == 'alpha_functionName') || ($typearr[1] == 'alpha_columnType') || ($typearr[1] == 'punct') || ($typearr[3] == 'digit_integer') || ($typearr[3] == 'digit_hex') || ($typearr[3] == 'digit_float') - || (($typearr[0] == 'alpha_reservedWord') + || (($typearr[0] == 'alpha_reservedWord') && PMA_STR_binarySearchInArr(strtoupper($arr[$i - 2]['data']), $keywords_with_brackets_2before, $keywords_with_brackets_2before_cnt)) - || (($typearr[1] == 'alpha_reservedWord') + || (($typearr[1] == 'alpha_reservedWord') && PMA_STR_binarySearchInArr(strtoupper($arr[$i - 1]['data']), $keywords_with_brackets_1before, $keywords_with_brackets_1before_cnt)) ) { $functionlevel++; @@ -684,7 +684,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { if ($infunction == TRUE) { $functionlevel--; $after .= ' '; - $before .= ' '; + $before .= ' '; } else { $indent--; $before .= ''; @@ -696,15 +696,15 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) { $after .= ' '; } if ($typearr[1] == 'alpha_columnType') { - $before .= ' '; + $before .= ' '; } break; case 'alpha_reservedWord': $upper = $arr[$i]['data']; - if ((($typearr[1] != 'alpha_reservedWord') - || (($typearr[1] == 'alpha_reservedWord') - && PMA_STR_binarySearchInArr(strtoupper($arr[$i-1]['data']), $keywords_no_newline, $keywords_no_newline_cnt))) - && ($typearr[1] != 'punct_level_plus') + if ((($typearr[1] != 'alpha_reservedWord') + || (($typearr[1] == 'alpha_reservedWord') + && PMA_STR_binarySearchInArr(strtoupper($arr[$i - 1]['data']), $keywords_no_newline, $keywords_no_newline_cnt))) + && ($typearr[1] != 'punct_level_plus') && (!PMA_STR_binarySearchInArr($upper, $keywords_no_newline, $keywords_no_newline_cnt))) { $before .= $space_alpha_reserved_word; } else { diff --git a/tbl_change.php3 b/tbl_change.php3 index 7498b5704..c2f374891 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -200,7 +200,7 @@ for ($i = 0; $i < $fields_cnt; $i++) {   - +