diff options
author | Agus Perwira Purnomo <furunomail@gmail.com> | 2019-05-19 00:56:42 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2019-05-19 01:02:11 +0300 |
commit | 3a8f026ebbf7ae17cc08e841ce021e5943f17c52 (patch) | |
tree | a385b4b318c909494550504330b8292d4442f8dc /templates | |
parent | cf55db06e23e93bdd9c4eda08c01ce2ae7aeb80e (diff) |
Fix #14621 - "Propose table structure" on MySQL 8.0
Propose table structure link not displayed anymore for MySQL >= 8.0
Cherry-picked-from: ff6ffb1c35491b18e4096472f0419be934ee65c0
Signed-off-by: Agus Perwira Purnomo <furunomail@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/table/structure/display_structure.twig | 3 | ||||
-rw-r--r-- | templates/table/structure/optional_action_links.twig | 23 |
2 files changed, 15 insertions, 11 deletions
diff --git a/templates/table/structure/display_structure.twig b/templates/table/structure/display_structure.twig index 77c32cf0a9..e86b4095cd 100644 --- a/templates/table/structure/display_structure.twig +++ b/templates/table/structure/display_structure.twig @@ -144,7 +144,8 @@ 'tbl_is_view': tbl_is_view, 'db_is_system_schema': db_is_system_schema, 'table': table, - 'is_active': is_active + 'is_active': is_active, + 'mysql_int_version': mysql_int_version } only %} </div> {% if not tbl_is_view and not db_is_system_schema %} diff --git a/templates/table/structure/optional_action_links.twig b/templates/table/structure/optional_action_links.twig index fe7cce13ff..90b5f42617 100644 --- a/templates/table/structure/optional_action_links.twig +++ b/templates/table/structure/optional_action_links.twig @@ -1,15 +1,18 @@ <a href="#" id="printView">{{ Util_getIcon('b_print', 'Print'|trans, true) }}</a> {% if not tbl_is_view and not db_is_system_schema %} - <a href="sql.php" data-post="{{ url_query|raw }}&session_max_rows=all&sql_query= - {{- ('SELECT * FROM ' ~ Util_backquote(table) ~ ' PROCEDURE ANALYSE()')|url_encode -}} - " style="margin-right: 0;"> - {{ Util_getIcon( - 'b_tblanalyse', - 'Propose table structure'|trans, - true - ) }} - </a> - {{ Util_showMySQLDocu('procedure_analyse') }} + {# Only display propose table structure for MySQL < 8.0 #} + {% if mysql_int_version < 80000 %} + <a href="sql.php" data-post="{{ url_query|raw }}&session_max_rows=all&sql_query= + {{- ('SELECT * FROM ' ~ Util_backquote(table) ~ ' PROCEDURE ANALYSE()')|url_encode -}} + " style="margin-right: 0;"> + {{ Util_getIcon( + 'b_tblanalyse', + 'Propose table structure'|trans, + true + ) }} + </a> + {{ Util_showMySQLDocu('procedure_analyse') }} + {% endif %} {% if is_active %} <a href="tbl_tracking.php{{ url_query|raw }}"> {{ Util_getIcon('eye', 'Track table'|trans, true) }} |