bug #1799691 [export] "Propose table structure" and Export
This commit is contained in:
@@ -53,6 +53,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
thanks to Tim Steiner - spam38
|
thanks to Tim Steiner - spam38
|
||||||
- bug [import] Do not verify a missing enclosing character for CSV,
|
- bug [import] Do not verify a missing enclosing character for CSV,
|
||||||
because files generated by Excel don't have any enclosing character
|
because files generated by Excel don't have any enclosing character
|
||||||
|
- bug #1799691 [export] "Propose table structure" and Export
|
||||||
|
|
||||||
2.11.4.0 (2008-01-12)
|
2.11.4.0 (2008-01-12)
|
||||||
- bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE
|
- bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE
|
||||||
|
@@ -2083,7 +2083,10 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
|
|||||||
// (the url_query has extra parameters that won't be used to export)
|
// (the url_query has extra parameters that won't be used to export)
|
||||||
// (the single_table parameter is used in display_export.lib.php
|
// (the single_table parameter is used in display_export.lib.php
|
||||||
// to hide the SQL and the structure export dialogs)
|
// to hide the SQL and the structure export dialogs)
|
||||||
if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview)) {
|
// If the parser found a PROCEDURE clause
|
||||||
|
// (most probably PROCEDURE ANALYSE()) it makes no sense to
|
||||||
|
// display the Export link).
|
||||||
|
if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview) && ! isset($analyzed_sql[0]['queryflags']['procedure'])) {
|
||||||
if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
|
if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
|
||||||
$_url_params['single_table'] = 'true';
|
$_url_params['single_table'] = 'true';
|
||||||
}
|
}
|
||||||
@@ -2104,16 +2107,18 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
|
|||||||
* @todo detect privileges to create a view
|
* @todo detect privileges to create a view
|
||||||
* (but see 2006-01-19 note in display_create_table.lib.php,
|
* (but see 2006-01-19 note in display_create_table.lib.php,
|
||||||
* I think we cannot detect db-specific privileges reliably)
|
* I think we cannot detect db-specific privileges reliably)
|
||||||
|
* Note: we don't display a Create view link if we found a PROCEDURE clause
|
||||||
*/
|
*/
|
||||||
if (!$header_shown) {
|
if (!$header_shown) {
|
||||||
echo $header;
|
echo $header;
|
||||||
$header_shown = TRUE;
|
$header_shown = TRUE;
|
||||||
}
|
}
|
||||||
echo PMA_linkOrButton(
|
if (! isset($analyzed_sql[0]['queryflags']['procedure'])) {
|
||||||
'view_create.php' . $url_query,
|
echo PMA_linkOrButton(
|
||||||
PMA_getIcon('b_views.png', 'CREATE VIEW', false, true),
|
'view_create.php' . $url_query,
|
||||||
'', true, true, '') . "\n";
|
PMA_getIcon('b_views.png', 'CREATE VIEW', false, true),
|
||||||
|
'', true, true, '') . "\n";
|
||||||
|
}
|
||||||
if ($header_shown) {
|
if ($header_shown) {
|
||||||
echo '</fieldset><br />';
|
echo '</fieldset><br />';
|
||||||
}
|
}
|
||||||
|
@@ -877,6 +877,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
|||||||
* ['queryflags']['union'] = 1; for a UNION
|
* ['queryflags']['union'] = 1; for a UNION
|
||||||
* ['queryflags']['join'] = 1; for a JOIN
|
* ['queryflags']['join'] = 1; for a JOIN
|
||||||
* ['queryflags']['offset'] = 1; for the presence of OFFSET
|
* ['queryflags']['offset'] = 1; for the presence of OFFSET
|
||||||
|
* ['queryflags']['procedure'] = 1; for the presence of PROCEDURE
|
||||||
*
|
*
|
||||||
* query clauses
|
* query clauses
|
||||||
* -------------
|
* -------------
|
||||||
@@ -1437,6 +1438,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
|||||||
$in_having = FALSE; // true when we are inside the HAVING clause
|
$in_having = FALSE; // true when we are inside the HAVING clause
|
||||||
$in_select_expr = FALSE; // true when we are inside the select expr clause
|
$in_select_expr = FALSE; // true when we are inside the select expr clause
|
||||||
$in_where = FALSE; // true when we are inside the WHERE clause
|
$in_where = FALSE; // true when we are inside the WHERE clause
|
||||||
|
$seen_limit = FALSE; // true if we have seen a LIMIT clause
|
||||||
$in_limit = FALSE; // true when we are inside the LIMIT clause
|
$in_limit = FALSE; // true when we are inside the LIMIT clause
|
||||||
$after_limit = FALSE; // true when we are after the LIMIT clause
|
$after_limit = FALSE; // true when we are after the LIMIT clause
|
||||||
$in_from = FALSE; // true when we are in the FROM clause
|
$in_from = FALSE; // true when we are in the FROM clause
|
||||||
@@ -1488,11 +1490,13 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
|||||||
if ($upper_data == 'LIMIT') {
|
if ($upper_data == 'LIMIT') {
|
||||||
$section_before_limit = substr($arr['raw'], 0, $arr[$i]['pos'] - 5);
|
$section_before_limit = substr($arr['raw'], 0, $arr[$i]['pos'] - 5);
|
||||||
$in_limit = TRUE;
|
$in_limit = TRUE;
|
||||||
|
$seen_limit = TRUE;
|
||||||
$limit_clause = '';
|
$limit_clause = '';
|
||||||
$in_order_by = FALSE; // @todo maybe others to set FALSE
|
$in_order_by = FALSE; // @todo maybe others to set FALSE
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($upper_data == 'PROCEDURE') {
|
if ($upper_data == 'PROCEDURE') {
|
||||||
|
$subresult['queryflags']['procedure'] = 1;
|
||||||
$in_limit = FALSE;
|
$in_limit = FALSE;
|
||||||
$after_limit = TRUE;
|
$after_limit = TRUE;
|
||||||
}
|
}
|
||||||
@@ -1682,16 +1686,16 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($in_limit) {
|
if ($in_limit) {
|
||||||
if ($upper_data == 'OFFSET') {
|
if ($upper_data == 'OFFSET') {
|
||||||
$limit_clause .= $sep;
|
$limit_clause .= $sep;
|
||||||
}
|
}
|
||||||
$limit_clause .= $arr[$i]['data'];
|
$limit_clause .= $arr[$i]['data'];
|
||||||
if ($upper_data == 'LIMIT' || $upper_data == 'OFFSET') {
|
if ($upper_data == 'LIMIT' || $upper_data == 'OFFSET') {
|
||||||
$limit_clause .= $sep;
|
$limit_clause .= $sep;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($after_limit) {
|
if ($after_limit && $seen_limit) {
|
||||||
$section_after_limit .= $arr[$i]['data'] . $sep;
|
$section_after_limit .= $arr[$i]['data'] . $sep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user