#101 SQL command - multiple commands

closed-fixed
Jakub Vrána
Common (150)
5
2010-11-26
2010-11-25
helix84
No

Adminer 3.1.0, PostgreSQL, browser-independent

When I run the following SQL in Adminer "SQL command", some parts of the interface do not appear. Everything works if I enter only a single SQL command. The visually missing parts are: Left sidebar complately missing, everything after "EXPLAIN" link missing and EXPLAIN doesn't expand.

SELECT item_id
INTO TEMPORARY my_query
FROM metadatavalue
WHERE text_lang='en' AND metadata_field_id=82 AND text_value='xxx';

SELECT my_query.item_id,resourcepolicy.epersongroup_id,text_value
FROM my_query,resourcepolicy,metadatavalue
WHERE my_query.item_id=resourcepolicy.resource_id AND resourcepolicy.resource_type_id=2 AND my_query.item_id=metadatavalue.item_id AND metadata_field_id=25;

End of Adminer's HTML:
...
<a href='#explain-2' onclick="return !toggle('explain-2');">EXPLAIN</a>
<div id='explain-2' class='hidden'>

I.e. <table cellspacing='0' class='nowrap'> and everything that follows is NOT displayed, the HTML is truncated.

I tried to figure out the exact circumstances of occurence. I only noticed that this happens when I use the TEMPORARY table, not if I run two independent SELECTs.

Discussion

  • Jakub Vrána
    Jakub Vrána
    2010-11-26

    Thank you for the report, I've fixed it in Git.

    The reason is that EXPLAIN is executed in a separate connection to not overwrite FOUND_ROWS() and things like that. The temporary table is not created in this second connection.

     
  • Jakub Vrána
    Jakub Vrána
    2010-11-26

    • status: open --> closed-fixed