If you save a sql query it is available in the "saved sql queries" drop down of the SQL tab.
Next to the drop down are three radio buttons, on eis to only display the selected query without running it e.g. to only edit the query.
The bug:
If the saved SQL query is longer than 1000 chars, the query is not displayed.
Reproducing steps:
Navigate to a table in your DB and select the SQL tab.
Enter the SQL query:
SELECT count(*) AS a FROM 'table'
enter 'test' into the save sql text box under it and check both check boxes next to it.
Hit OK.
Go again to the SQL tab
Select the 'test' entry from the drop down list in the button and select "display only" from the radio buttons.
Hit OK
Now you see how it should work: The SQL query is displayed again in the text area above.
Now change the sql query to make it longer than 1000 chars by simply appending about 1000 'a's to the 'AS a' clause.
Now redo all steps from above: enter 'test' in the text box under it, check both check boxes .... try to display the saved query again:
It now displays the standard query in the text area not the saved one.
Logged In: YES
user_id=1826895
Originator: YES
Responsible for this behavior is line 180 in import.lib.php. Changing $max_sql_len > 1000 e.g. to $max_sql_len > 50000 will display the above test just fine. But I think this is not the perfect sollution. It just moves the border. What should be done is skipping this block not only if the query is executed but also if it is only displayed. So line 178 should be changed from
if (!$go_sql) {
to
if (!$go_sql && !$sql_is_only_displayed) {
$sql_is_only_displayed should be replaced with the propriate variable, because I don't know which one whould be correct here fot this purpose.
Regards
Maik
Logged In: YES
user_id=1383652
Originator: NO
what if you set
$cfg['MaxCharactersInDisplayedSQL'] = 1000;
to a higher value?
Logged In: YES
user_id=1826895
Originator: YES
Changing $cfg['MaxCharactersInDisplayedSQL'] does not help, because the "1000" is hard coded in line 180 in import.lib.php
Also changing the value whould only result in "moving" the problem to greater values.
Logged In: YES
user_id=210714
Originator: NO
Fixed in subversion, thanks for reporting.