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>
This commit is contained in:
Agus Perwira Purnomo 2019-05-18 23:56:42 +02:00 committed by William Desportes
parent cf55db06e2
commit 3a8f026ebb
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 15 additions and 11 deletions

View File

@ -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 %}

View File

@ -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 }}&amp;session_max_rows=all&amp;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 }}&amp;session_max_rows=all&amp;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) }}