bug [export] Exporting results of a query which contains a LIMIT clause inside a subquery

This commit is contained in:
Marc Delisle
2009-08-29 11:41:26 +00:00
parent 3d519b86f9
commit b4f776e34c
17 changed files with 602 additions and 507 deletions

View File

@@ -616,8 +616,13 @@ function PMA_DBI_get_databases_full($database = null, $force_stats = false,
+= $row['Max_data_length'];
$databases[$database_name]['SCHEMA_INDEX_LENGTH']
+= $row['Index_length'];
$databases[$database_name]['SCHEMA_DATA_FREE']
+= $row['Data_free'];
// for InnoDB, this does not contain the number of
// overhead bytes but the total free space
if ('InnoDB' != $row['Engine']) {
$databases[$database_name]['SCHEMA_DATA_FREE']
+= $row['Data_free'];
}
$databases[$database_name]['SCHEMA_LENGTH']
+= $row['Data_length'] + $row['Index_length'];
}
@@ -1330,9 +1335,11 @@ function PMA_DBI_get_triggers($db, $table)
$one_result['action_timing'] = $trigger['ACTION_TIMING'];
$one_result['event_manipulation'] = $trigger['EVENT_MANIPULATION'];
$one_result['full_trigger_name'] = PMA_backquote($trigger['TRIGGER_SCHEMA']) . '.' . PMA_backquote($trigger['TRIGGER_NAME']);
// do not prepend the schema name; this way, importing the
// definition into another schema will work
$one_result['full_trigger_name'] = PMA_backquote($trigger['TRIGGER_NAME']);
$one_result['drop'] = 'DROP TRIGGER IF EXISTS ' . $one_result['full_trigger_name'];
$one_result['create'] = 'CREATE TRIGGER ' . $one_result['full_trigger_name'] . ' ' . $trigger['ACTION_TIMING']. ' ' . $trigger['EVENT_MANIPULATION'] . ' ON ' . PMA_backquote($trigger['EVENT_OBJECT_SCHEMA']) . '.' . PMA_backquote($trigger['EVENT_OBJECT_TABLE']) . "\n" . ' FOR EACH ROW ' . $trigger['ACTION_STATEMENT'] . "\n" . $delimiter . "\n";
$one_result['create'] = 'CREATE TRIGGER ' . $one_result['full_trigger_name'] . ' ' . $trigger['ACTION_TIMING']. ' ' . $trigger['EVENT_MANIPULATION'] . ' ON ' . PMA_backquote($trigger['EVENT_OBJECT_TABLE']) . "\n" . ' FOR EACH ROW ' . $trigger['ACTION_STATEMENT'] . "\n" . $delimiter . "\n";
$result[] = $one_result;
}