From 8762895bb3edbd8849afc2a866a60ae081e49a1a Mon Sep 17 00:00:00 2001 From: Michal Adamec Date: Wed, 18 Mar 2020 17:26:50 +0100 Subject: [PATCH] MSSQL: Don't trucate displayed comments to 30 chars (use varchar maximum of 8000 upon casting) --- adminer/drivers/mssql.inc.php | 2 +- changes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index eba5dc52..f5836c4b 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -368,7 +368,7 @@ if (isset($_GET["mssql"])) { } function fields($table) { - $comments = get_key_vals("SELECT objname, cast(value as varchar) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)"); + $comments = get_key_vals("SELECT objname, cast(value as varchar(max)) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)"); $return = array(); foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default] FROM sys.all_columns c diff --git a/changes.txt b/changes.txt index 9502f6dc..1f684cd9 100644 --- a/changes.txt +++ b/changes.txt @@ -5,6 +5,7 @@ PostgreSQL: Export all FKs after all CREATE TABLE (PR #351) PostgreSQL: Fix dollar-quoted syntax highlighting (bug #738) PostgreSQL: Do not show view definition from other schema (PR #392) PostgreSQL 10: Support GENERATED ALWAYS BY IDENTITY (PR #386) +MS SQL: Don't truncate comments to 30 chars (PR #376) Re-enable PHP warnings (regression from 4.7.8) Adminer 4.7.8 (released 2020-12-06):