]> git.joonet.de Git - adminer.git/commitdiff
MSSQL: Don't trucate displayed comments to 30 chars (use varchar maximum of 8000...
authorMichal Adamec <emsy@waimanu.cromwell.lamac>
Wed, 18 Mar 2020 16:26:50 +0000 (17:26 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 6 Feb 2021 13:52:26 +0000 (14:52 +0100)
adminer/drivers/mssql.inc.php
changes.txt

index eba5dc5219d31aed24b26d0de8d5755bd57d246b..f5836c4bb8679744bd842191305ddeeb2e1ebaa8 100644 (file)
@@ -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
index 9502f6dc612c8c8fb83e85dd0c52d3b0a1eb8228..1f684cd9d6e3bf707289f94fdeaa0650a36e717f 100644 (file)
@@ -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):